/* Unified page layout for AIFM admin pages.
   - Handles header (60px), footer (40px) and a fixed 20px gap above the footer.
   - Supports either a single main panel or a two-column layout with a configurable left width.
   - Keeps padding consistent (20px) without double-counting gaps. */

/* Import Google font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');

/* Universal reset */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* Prevent horizontal scroll globally */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* ========================================
   Utility Classes
   ======================================== */

/* Generic visibility toggles - use with component classes for proper specificity.
   Components define their hidden state (display: none), these override when added. */
.hidden {
    display: none !important;
}

/* Invisible - element takes up space but is not visible */
.invisible {
    visibility: hidden !important;
}

:root {
    /* Layout dimensions */
    --header-h: 60px;
    --footer-h: 40px;
    --gap: 10px;            /* desired gap above footer / between panels */
    --sidebar-width: 260px; /* override per page if needed */
    --logged-h: 25px;       /* fixed logged-in bar height */
    --panel-pad: 10px;      /* padding inside panels */
    --border-radius: 6px;   /* standard border radius for all elements */

    /* Brand Colors - User customizable */
    --color-primary: #009579;
    --color-primary-dark: #006653;
    --color-primary-darker: #006b59;
    --color-primary-hover: #00ac37;

    /* Semantic Hierarchy Colors - Property structure */
    --color-region: #009579;      /* teal - same as primary */
    --color-region-bg: rgba(0, 149, 121, 0.10);
    --color-region-hover: rgba(0, 149, 121, 0.20);

    --color-site: #9c27b0;        /* purple */
    --color-site-bg: rgba(156, 39, 176, 0.10);
    --color-site-hover: rgba(156, 39, 176, 0.20);

    --color-building: #ff9800;    /* orange */
    --color-building-bg: rgba(255, 152, 0, 0.10);
    --color-building-hover: rgba(255, 152, 0, 0.20);

    --color-floor: #1f6feb;       /* blue */
    --color-floor-bg: rgba(31, 111, 235, 0.10);
    --color-floor-hover: rgba(31, 111, 235, 0.20);

    --color-room: #e53935;        /* red */
    --color-room-bg: rgba(229, 57, 53, 0.10);
    --color-room-hover: rgba(229, 57, 53, 0.20);

    /* GeoJSON Feature Colors - Floor editor */
    --color-geojson-walls: #000000;    /* black */
    --color-geojson-windows: #ff9800;  /* orange */
    --color-geojson-stairs: #1f6feb;   /* blue */

    /* State Colors */
    --color-error: #c62828;
    --color-error-bright: #FF0000;
    --color-error-banner: #c0392b;
    --color-success: #00ac37;

    /* Action Colors */
    --color-danger: #c62828;
    --color-danger-dark: #8b1c1c;

    /* Text Colors */
    --color-text: #000000;
    --color-text-light: #ffffff;
    --color-text-secondary: #333333;
    --color-text-tertiary: #444444;
    --color-text-disabled: #777777;

    /* Background Colors */
    --color-bg: #ffffff;
    --color-white: #ffffff;
    --color-black: #000000;
    --color-bg-page: #009579;     /* page background - same as primary */
    --color-bg-panel: #ffffff;

    /* Border Colors */
    --color-border: #dddddd;
    --color-border-dark: #000000;
    --color-border-medium: #4c4c4c;

    /* Gray Scale Palette */
    --color-gray-50: #f7f7f7;
    --color-gray-100: #f4f4f4;
    --color-gray-150: #f0f0f0;
    --color-gray-200: #e5e7eb;
    --color-gray-250: #ddd;
    --color-gray-300: #d5d7db;
    --color-gray-400: #777777;
    --color-gray-500: #555555;
    --color-gray-600: #444444;
    --color-gray-700: #333333;
    --color-gray-800: #222222;
    --color-gray-900: #111827;

    /* Cancel/Secondary Button Colors */
    --color-cancel-bg: #e5e7eb;
    --color-cancel-hover: #d5d7db;
    --color-cancel-text: #111827;

    /* Tint Colors (with transparency) - Legacy aliases for primary */
    --color-tint-primary-light: rgba(0, 149, 121, 0.04);
    --color-tint-primary: var(--color-region-bg);

    /* Shadow Colors */
    --shadow-light: rgba(0, 0, 0, 0.2);
    --shadow-medium: rgba(0, 0, 0, 0.3);
    --shadow-dark: rgba(0, 0, 0, 0.5);
    --shadow-darker: rgba(0, 0, 0, 0.65);
}

/* Base body styles */
body {
    margin: 0;
    padding-bottom: 0;       /* layout gap handled via main shell calc */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--color-bg-page);
}

/* Background logo image - used across all pages */
.bg-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 95%;
    z-index: 0;  /* keep behind all content */
}

/* Page frame below the navbar */
.page-shell {
    display: flex;
    flex-direction: column;
    min-height: 0;
    box-sizing: border-box;
    padding: 20px var(--gap) 0 var(--gap); /* use gap variable for side padding; no bottom to avoid double-counting gap */
    width: 100%;
    gap: var(--gap);        /* vertical spacing between logged bar and main */
    flex: 1 1 auto;
}

/* Logged-in bar spacing */
.page-shell .logged-bar {
    padding: 0; /* outer spacing handled by page-shell padding */
    height: var(--logged-h);
    display: flex;
    align-items: center;
    margin-bottom: var(--gap); /* space to main content */
}

/* Standardize header block spacing inside logged bar */
.page-shell .logged-bar .main-header {
    margin: 0;
    width: 100%;
}

/* Main area: single or double layout */
.page-shell .page-main {
    flex: 0 0 auto;
    height: calc(100vh - var(--header-h) - var(--footer-h) - var(--logged-h) - 50px); /* 50px = 10 gap + 20 top padding + 20 gap */
    min-height: 0;          /* allow children to scroll instead of growing */
    display: flex;
    gap: var(--gap);
    width: 100%;
    box-sizing: border-box;
    padding-bottom: 0;
}

/* Single panel */
.page-shell .page-main.single .panel {
    flex: 1;
    min-width: 0;
    min-height: 0;
}

/* Two panels */
.page-shell .page-main.double .panel-left {
    flex: 0 0 var(--sidebar-width);
    min-width: 0;
    min-height: 0;
}
.page-shell .page-main.double .panel-right {
    flex: 1;
    min-width: 0;
    min-height: 0;
}

/* Base panel styling */
.page-shell .panel {
    background: var(--color-bg-panel);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--panel-pad);
    box-sizing: border-box;
    overflow: auto;         /* scroll inside panels when content is tall */
    z-index: 1;
}

/* ========================================
   Table System - Global Styles
   ======================================== */

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    font-weight: 600;
    padding: 0.5em 0.75em;
    text-align: left;
    border-bottom: 1px solid var(--color-gray-200);
    background: var(--color-gray-100);
    color: var(--color-gray-700);
}

tbody td {
    padding: 0.5em 0.75em;
    border-bottom: 1px solid var(--color-gray-200);
}

/* Sortable column headers */
thead th.sortable {
    cursor: pointer;
    transition: color 0.15s ease;
}

thead th.sortable:hover {
    color: var(--color-primary);
}

/* Table row backgrounds - white rows on grey card */
tbody tr {
    background: var(--color-white);
}

tbody tr:hover td {
    background: var(--color-gray-100);
}

/* Floor-coloured rows */
tbody tr.floor-row td {
    background: var(--color-floor-bg);
}

tbody tr.floor-row:hover td {
    background: var(--color-floor);
    color: var(--color-text-light);
}

/* Room-coloured rows */
tbody tr.room-row td {
    background: var(--color-room-bg);
}

tbody tr.room-row:hover td {
    background: var(--color-room-hover);
}

/* Add rows - grey background */
tbody tr.add-row td {
    background: var(--color-gray-50);
}

tbody tr.add-row:hover td {
    background: var(--color-gray-100);
}

/* Empty rows - no hover effect */
tbody tr.empty-row:hover td {
    background: transparent;
}

/* Action columns - standard width and alignment */
col.col-action {
    width: 60px;
}

td.col-action,
td.col-add,
td.col-edit,
td.col-save,
td.col-cancel,
td.col-delete,
td.col-view {
    text-align: center;
    white-space: nowrap;
}

/* ========================================
   Card System - Grey Card Containers
   ======================================== */

/* Standard grey card for containing tables/content */
.card {
    background: var(--color-gray-50);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--border-radius);
    padding: 1em;
    margin-bottom: 1em;
}

.card-title {
    margin: 0 0 0.75em 0;
    font-size: 1em;
    font-weight: 600;
    color: var(--color-gray-700);
}

/* ========================================
   Modal System
   ======================================== */

/* Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--shadow-darker);
    z-index: 9998;
}

/* Modal Box - Standard sizes */
.modal-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-bg);
    color: var(--color-gray-800);
    padding: 20px 24px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 10px var(--shadow-medium);
    z-index: 9999;
    font-size: 16px;
    line-height: 1.4;
    max-width: 480px;
    width: calc(100% - 48px);
    text-align: center;
}

.modal-box--wide {
    max-width: 640px;
}

.modal-box--large {
    top: 0;
    left: 0;
    transform: none;
    max-width: none;
    width: 100%;
    height: 100%;
    border-radius: 0;
    display: flex;
    flex-direction: column;
}

/* Modal Title */
.modal-box h3 {
    font-weight: 500;
    margin: 0 0 0.7rem 0;
    font-size: 1.4em;
}

/* Modal Text/Description */
.modal-box p,
.modal-box .modal-text {
    margin: 6px 0 16px 0;
    font-size: 1em;
}

/* Modal Error - hidden by default, add .visible to show */
.modal-error {
    display: none;
    color: var(--color-error);
    margin: 10px 0 12px 0;
    text-align: center;
}
.modal-error.visible {
    display: block;
}

/* Modal Buttons Container */
.modal-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 16px;
}

/* ========================================
   Form System - Shared Input Styles
   ======================================== */

/* Core input styling - used across modals and inline forms */
.form-input {
    height: 2.8em;
    padding: 8px 12px;
    font-size: 1em;
    font-family: inherit;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    box-sizing: border-box;
    outline: none;
}

.form-input:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 1px;
    border-color: var(--color-primary);
}

.form-input:disabled {
    background: var(--color-gray-150);
    color: var(--color-text-disabled);
}

/* Label styling */
.form-label {
    display: block;
    font-weight: 600;
    color: var(--color-primary);
    font-size: 0.95em;
    margin-bottom: 4px;
}

/* Form group container */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

/* Inline error display */
.form-error {
    color: var(--color-error);
    font-size: 0.85em;
    margin-top: 4px;
}

.form-input.has-error {
    border-color: var(--color-error);
}

/* Checkbox styling - use primary color for checked state */
input[type="checkbox"] {
    accent-color: var(--color-primary);
}

/* Range slider styling - use primary color */
input[type="range"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: var(--color-gray-200);
    cursor: pointer;
    height: 6px;
    border-radius: 4px;
}

/* WebKit (Chrome, Safari, Edge) track - transparent to allow JS gradient fill */
input[type="range"]::-webkit-slider-runnable-track {
    background: transparent;
    border-radius: 4px;
    height: 6px;
}

/* WebKit thumb */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background: var(--color-primary);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    margin-top: -5px;
    cursor: pointer;
    border: none;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--color-primary-dark);
}

/* Firefox track */
input[type="range"]::-moz-range-track {
    background: var(--color-gray-200);
    border-radius: 4px;
    height: 6px;
}

/* Firefox thumb */
input[type="range"]::-moz-range-thumb {
    background: var(--color-primary);
    border: none;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb:hover {
    background: var(--color-primary-dark);
}

/* Firefox progress (filled portion) */
input[type="range"]::-moz-range-progress {
    background: var(--color-primary);
    border-radius: 4px;
    height: 6px;
}

/* ========================================
   Modal Form Overrides
   ======================================== */

/* Modal context: center and constrain .form-input elements */
.modal-box .form-input {
    display: block;
    width: 320px;
    max-width: 100%;
    margin: 4px auto 12px auto;
}

/* Modal labels: add top margin for spacing between fields */
.modal-box .form-label {
    margin-top: 8px;
}

/* File chooser row */
.modal-file-chooser {
    margin: 8px 0 12px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.modal-file-name {
    font-size: 0.95em;
    color: var(--color-gray-600);
}

/* Progress Bar - hidden by default, add .visible to show */
.progress-container {
    display: none;
    flex-direction: column;
    align-items: center;
    margin: 8px 0;
}
.progress-container.visible {
    display: flex;
}

.progress-bar-wrap {
    width: 100%;
    max-width: 320px;
    background: var(--color-gray-150);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.progress-bar {
    height: 8px;
    width: 0%;
    background: var(--color-primary);
    transition: width 0.1s linear;
}

.progress-label {
    text-align: center;
    font-size: 12px;
    margin-top: 4px;
    color: var(--color-gray-600);
}

/* Modal Tables - inherit main table styles with modal-specific adjustments */
.modal-box table {
    width: 100%;
    border-collapse: collapse;
}

.modal-box table.centered {
    width: auto;
    max-width: 100%;
    margin: 0 auto;
}

.modal-box thead th {
    text-align: center;
    font-size: 0.9em;
}

.modal-box tbody td {
    text-align: center;
    word-break: break-word;
}

/* Modal table with grid lines */
.modal-table-grid th,
.modal-table-grid td {
    border: 1px solid var(--color-gray-200);
}

/* Layer Selection Modal */
.modal-box.layer-select {
    max-width: 700px;
}

.layer-dwg-list {
    margin: 12px 0;
}

.layer-dwg-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin: 4px 0;
    background: var(--color-gray-50);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background 0.15s ease;
}

.layer-dwg-option:hover {
    background: var(--color-tint-primary);
    border-color: var(--color-primary);
}

.layer-table {
    margin: 12px 0;
    max-height: 300px;
    overflow-y: auto;
}


/* Move Document Modal - Searchable Dropdown */
.modal-combo-container {
    position: relative;
    margin-bottom: 16px;
}

.modal-combo-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    font-size: 14px;
    font-family: inherit;
}

.modal-combo-input:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 1px;
    border-color: var(--color-primary);
}

/* Hidden by default, add .visible to show */
.modal-combo-selected {
    display: none;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    background: var(--color-bg);
    cursor: pointer;
}
.modal-combo-selected.visible {
    display: block;
}

/* Hidden by default, add .visible to show */
.modal-combo-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-top: none;
    background: var(--color-bg);
    z-index: 1000;
}
.modal-combo-dropdown.visible {
    display: block;
}

.modal-combo-item {
    padding: 8px 12px;
    cursor: pointer;
}

.modal-combo-item:hover {
    background: var(--color-tint-primary);
}

.modal-combo-empty {
    padding: 8px 12px;
    color: var(--color-gray-500);
}

/* ========================================
   Button System - Low Specificity Design
   ======================================== */

/* Base button class - all action buttons inherit these styles
   Specificity: 0,0,1,0 (single class selector) */
.btn {
    color: var(--color-text-light);
    background: var(--color-primary);
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
    border-radius: var(--border-radius);
    line-height: 1.2;
    border: 1px solid var(--color-border-dark);
    padding: 4px 10px;
    display: inline-block;
    text-decoration: none;
}

.btn:hover:not(.active) {
    background: var(--color-primary-dark);
    color: var(--color-text-light);
}

.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: 0.6;
    pointer-events: none;
    cursor: default;
}

/* Generic disabled utility class - use on any element to disable interaction */
.disabled {
    opacity: 0.6;
    pointer-events: none;
    cursor: default;
}

.btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Button variant: Cancel/Secondary
   Specificity: 0,0,3,0 (to override .btn:hover:not(.active)) */
.btn.btn--cancel {
    color: var(--color-cancel-text);
    background: var(--color-cancel-bg);
}

.btn.btn--cancel:hover {
    background: var(--color-cancel-hover);
    color: var(--color-cancel-text);
}

.btn--cancel:focus-visible {
    outline-color: var(--color-gray-500);
}

/* Button variant: Danger/Delete
   Specificity: 0,0,3,0 (to override .btn:hover:not(.active)) */
.btn.btn--danger {
    background: var(--color-danger);
}

.btn.btn--danger:hover {
    background: var(--color-danger-dark);
}

.btn.btn--danger:focus-visible {
    outline-color: var(--color-danger);
}

/* Icon buttons - square buttons for icons (download, upload, toggle views, etc.) */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 6px;
    background: var(--color-primary);
    color: var(--color-text-light);
    border: 1px solid var(--color-primary);
    border-radius: var(--border-radius);
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 2px 4px var(--shadow-light);
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}
.btn-icon:hover {
    background: var(--color-primary-dark);
    box-shadow: 0 3px 6px var(--shadow-medium);
}
.btn-icon:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}
.btn-icon img {
    width: 100%;
    height: 100%;
    display: block;
    /* SVG uses currentColor so icon inherits button text color */
}

/* Optional helper for icon header blocks inside panels */
.page-shell .panel .panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

/* Logged-in header block (ported from layout.css) */
.main-header {
	position: relative;
	width: auto;
	margin: 0; /* outer spacing handled by shell */
	padding: 0.5em;
	background: var(--color-bg);
	border: 1px solid var(--color-gray-250);
	border-radius: var(--border-radius);
	z-index: 1100;
}

/* Navbar (ported from layout.css) */
.navbar {
	display: flex;
	align-items: center;
	justify-content: flex-start; /* anchor left on wide screens */
	height: var(--header-h);
	width: 100%;
	position: sticky;
	top: 0;
	background: transparent;
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(10px);
	z-index: 1200;
}

.navbar-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 0 2rem;
	max-width: none;
}

.navbar-logo {
	font-size: 2rem;
	font-weight: 600;
	color: var(--color-text);
	text-decoration: none;
	cursor: default;
}

.navbar-container .navbar-menu {
	display: flex;
	text-align: center;
	gap: 1.5rem;
	list-style: none;
	margin-left: auto;
}

.navbar-container .navbar-menu li .btn {
	/* Uses .btn base styling - only navbar-specific additions here */
	box-shadow: 0 2px 4px var(--shadow-light);
	transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.navbar-container .navbar-menu li .btn:hover:not(.active):not(:disabled) {
	box-shadow: 0 3px 6px var(--shadow-medium);
}

.navbar-container .navbar-menu li .active {
	/* Active state for current page - uses .btn base with grey background */
	background: var(--color-gray-300);
	cursor: default;
	transition: none;
}

.navbar-toggle {
	display: none;
	background: transparent;
	padding: 10px;
	border: none;
	cursor: pointer;
}

.bar {
	display: block;
	width: 25px;
	height: 3px;
	margin: 5px auto;
	background: var(--color-text);
	transition: all 0.3s ease-in-out;
}

/* Notification Bell (background tasks) - styled as navbar menu button */
.navbar-notifications {
	position: relative;
	display: flex;
	align-items: center;
	margin-left: 1.5rem;
}

/* Bell button uses .btn base class, override for icon sizing */
.notification-bell {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 10px;
	box-shadow: 0 2px 4px var(--shadow-light);
}

.notification-bell:hover:not(.active) {
	box-shadow: 0 3px 6px var(--shadow-medium);
}

.notification-bell img {
	width: 16px;
	height: 16px;
	filter: invert(1); /* Make icon white on primary background */
}

.notification-badge {
	position: absolute;
	top: 2px;
	right: 2px;
	background: var(--color-error);
	color: var(--color-text-light);
	border-radius: 50%;
	min-width: 16px;
	height: 16px;
	font-size: 10px;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 4px;
}

.notification-badge.hidden {
	display: none;
}

.notification-bell.has-alerts {
	animation: bell-jiggle 0.6s ease-in-out;
}

.notification-bell.has-alerts img {
	animation: bell-flash-red 1s ease-in-out infinite;
}

@keyframes bell-jiggle {
	0%, 100% { transform: rotate(0); }
	15% { transform: rotate(15deg); }
	30% { transform: rotate(-15deg); }
	45% { transform: rotate(10deg); }
	60% { transform: rotate(-10deg); }
	75% { transform: rotate(5deg); }
	90% { transform: rotate(-5deg); }
}

@keyframes bell-flash-red {
	0%, 100% { filter: invert(1); }
	50% { filter: invert(27%) sepia(95%) saturate(5000%) hue-rotate(352deg) brightness(90%) contrast(120%); }
}

.notification-dropdown {
	position: absolute;
	top: 100%;
	right: 0;
	margin-top: 8px;
	background: var(--color-primary);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: var(--border-radius);
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
	width: 300px;
	z-index: 1200;
}

.notification-dropdown.hidden {
	display: none;
}

.notification-dropdown-header {
	padding: 12px 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.2);
	font-weight: 600;
	font-size: 0.9em;
	color: var(--color-text-light);
}

.notification-dropdown-empty {
	padding: 20px 16px;
	text-align: center;
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.9em;
}

.notification-item {
	display: flex;
	align-items: flex-start;
	padding: 12px 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
	cursor: pointer;
	transition: background 0.15s ease;
	color: var(--color-text-light);
}

.notification-item:hover {
	background: var(--color-primary-dark);
}

.notification-item:last-child {
	border-bottom: none;
}

.notification-item-icon {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--color-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-right: 12px;
	flex-shrink: 0;
}

.notification-item-icon img {
	width: 16px;
	height: 16px;
	filter: invert(1);
}

.notification-item-content {
	flex: 1;
	min-width: 0;
}

.notification-item-title {
	font-size: 0.9em;
	font-weight: 500;
	color: var(--color-text-light);
	margin-bottom: 2px;
}

.notification-item-subtitle {
	font-size: 0.8em;
	color: rgba(255, 255, 255, 0.6);
}

.notification-item.complete .notification-item-icon {
	background: var(--color-success);
}

.notification-item.failed .notification-item-icon {
	background: var(--color-error);
}

.notification-item.pending .notification-item-icon {
	background: var(--color-building);
}

/* Progress bar for pending tasks */
.notification-progress {
	margin-top: 8px;
	height: 6px;
	background: rgba(255, 255, 255, 0.3);
	border-radius: 3px;
	overflow: hidden;
}

.notification-progress-bar {
	height: 100%;
	width: 30%;
	background: #3b82f6;
	border-radius: 3px;
	animation: progress-indeterminate 1.5s ease-in-out infinite;
}

@keyframes progress-indeterminate {
	0% {
		margin-left: 0%;
		background-position: 0% 0%;
	}
	50% {
		margin-left: 70%;
		background-position: 100% 0%;
	}
	100% {
		margin-left: 0%;
		background-position: 0% 0%;
	}
}

/* Dismiss button for notifications */
.notification-dismiss {
	background: none;
	border: none;
	color: rgba(255, 255, 255, 0.5);
	font-size: 1.4em;
	line-height: 1;
	padding: 0 4px;
	cursor: pointer;
	margin-left: 8px;
	flex-shrink: 0;
	align-self: flex-start;
}

.notification-dismiss:hover {
	color: rgba(255, 255, 255, 0.9);
}

/* Toast Notifications */
.toast-container {
	position: fixed;
	bottom: 60px; /* Above footer */
	right: 20px;
	z-index: 1500;
	display: flex;
	flex-direction: column;
	gap: 10px;
	pointer-events: none;
}

.toast {
	background: var(--color-primary);
	color: var(--color-text-light);
	padding: 12px 20px;
	border-radius: var(--border-radius);
	border: 1px solid rgba(255, 255, 255, 0.2);
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
	font-size: 0.9em;
	max-width: 400px;
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.3s ease, transform 0.3s ease;
	pointer-events: auto;
}

.toast.visible {
	opacity: 1;
	transform: translateY(0);
}

/* Footer (ported from layout.css) */
footer {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 1rem;
	background: transparent; /* see-through like navbar */
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.5);
	z-index: 1100;
}

footer p.copyright {
	float: right;
	padding: 0px 10px 0px 0px;
}

footer p.links {
	float: left;
}

footer p .btn {
	/* Uses .btn base styling - only footer-specific additions here */
	box-shadow: 0 2px 4px var(--shadow-light);
	transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
	margin-right: 1rem;
}
footer p .btn:last-child { margin-right: 0; }
footer p .btn:hover:not(:disabled) {
	box-shadow: 0 3px 6px var(--shadow-medium);
}

/* Responsive tweaks for navbar/footer */
@media (max-width: 880px) {
	.navbar-container .navbar-menu {
		display: none;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		position: fixed;
		top: 60px;
		right: 16px;
		left: auto;
		width: 300px;
		margin-top: 8px;
		padding: 0;
		background: var(--color-primary);
		backdrop-filter: blur(10px);
		border: 1px solid rgba(255, 255, 255, 0.2);
		border-radius: var(--border-radius);
		box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
		overflow: hidden;
		z-index: 1200;
	}

	.navbar-container .navbar-menu.active {
		display: flex;
	}

	.navbar-container .navbar-menu li {
		border-bottom: 1px solid rgba(255, 255, 255, 0.15);
	}

	.navbar-container .navbar-menu li:last-child {
		border-bottom: none;
	}

	.navbar-container .navbar-menu li .btn {
		display: block;
		width: 100%;
		padding: 12px 16px;
		background: transparent;
		border: none;
		border-radius: 0;
		box-shadow: none;
		text-align: left;
		color: var(--color-text-light);
		transition: background 0.15s ease;
	}

	.navbar-container .navbar-menu li .btn:hover:not(:disabled) {
		background: var(--color-primary-dark);
		box-shadow: none;
	}

	.navbar-container .navbar-menu li .active {
		background: var(--color-primary-dark);
		cursor: default;
	}

	.navbar-toggle {
		display: block;
		z-index: 1300;
		order: 3;
	}

	.navbar-toggle.active .bar:nth-child(2) {
		opacity: 0;
	}

	.navbar-toggle.active .bar:nth-child(1) {
		transform: translateY(8px) rotate(45deg);
	}

	.navbar-toggle.active .bar:nth-child(3) {
		transform: translateY(-8px) rotate(-45deg);
	}

	/* Bell stays visible in header on mobile, positioned left of hamburger */
	.navbar-notifications {
		position: static;
		order: 2;
		margin-left: auto;
		margin-right: 10px;
	}

	/* Bell notification dropdown on mobile */
	.navbar-notifications .notification-dropdown {
		position: fixed;
		top: 60px; /* Below navbar */
		right: 16px;
		left: auto;
		margin-top: 8px;
		width: 300px;
	}

	/* Simplify footer copyright text on small screens */
	footer p.copyright {
		font-size: 0;
	}
	footer p.copyright::before {
		content: 'AIFM V1.0';
		font-size: 1.1rem;
	}
}

@media (max-width: 480px) {
	.navbar-container {
		padding: 0 1rem;
	}

	.navbar-logo {
		font-size: 1.7rem;
	}
}
