/* ITAM System - Main Stylesheet with Material Design 3 */

@font-face {
    font-family: "Phetsarath OT";
    src: local("Phetsarath OT"), local("Phetsarath");
    font-display: swap;
}

:root {
    --font-family-base: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --font-family-lao: "Noto Sans Lao", "Phetsarath OT", "Phetsarath", "Segoe UI", Arial, sans-serif;

    /* M3 Color Tokens */
    --md-sys-color-primary: #4355B9;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #DEE0FF;
    --md-sys-color-on-primary-container: #00105C;
    --md-sys-color-surface: #FFFBFF;
    --md-sys-color-surface-variant: #E2E1EC;
    --md-sys-color-on-surface: #1B1B22;
    --md-sys-color-on-surface-variant: #46464F;
    --md-sys-color-outline: #777680;
    --md-sys-color-outline-variant: #C7C5D0;
    --md-sys-color-surface-container-lowest: #FFFFFF;
    --md-sys-color-surface-container-low: #F5F2FA;
    --md-sys-color-surface-container: #EFEDF5;
    --md-sys-color-surface-container-high: #E9E7EF;
    --md-sys-color-surface-container-highest: #E4E1E9;

    /* Backward-compatible color aliases */
    --color-primary: #4355B9;
    --color-primary-dark: #2A3990;
    --color-secondary: #5B5D72;
    --color-success: #386A20;
    --color-warning: #7D5700;
    --color-error: #BA1A1A;
    --color-info: #4355B9;

    /* Gray scale mapped to M3 neutral */
    --gray-50: #FFFBFF;
    --gray-100: #F5F2FA;
    --gray-200: #E4E1E9;
    --gray-300: #C7C5D0;
    --gray-600: #46464F;
    --gray-700: #303038;
    --gray-800: #1B1B22;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    /* M3 Shape (border-radius) */
    --md-sys-shape-corner-small: 8px;
    --md-sys-shape-corner-medium: 12px;
    --md-sys-shape-corner-large: 16px;
    --md-sys-shape-corner-extra-large: 28px;
    --md-sys-shape-corner-full: 9999px;

    --radius-sm: var(--md-sys-shape-corner-small);
    --radius-md: var(--md-sys-shape-corner-medium);
    --radius-lg: var(--md-sys-shape-corner-large);
    --radius-xl: var(--md-sys-shape-corner-extra-large);

    /* M3 Elevation (shadows) */
    --md-sys-elevation-1: 0 1px 3px 1px rgba(0,0,0,0.15), 0 1px 2px rgba(0,0,0,0.3);
    --md-sys-elevation-2: 0 2px 6px 2px rgba(0,0,0,0.15), 0 1px 2px rgba(0,0,0,0.3);
    --md-sys-elevation-3: 0 4px 8px 3px rgba(0,0,0,0.15), 0 1px 3px rgba(0,0,0,0.3);

    --shadow-sm: var(--md-sys-elevation-1);
    --shadow-md: var(--md-sys-elevation-2);
    --shadow-lg: var(--md-sys-elevation-3);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-base);
    line-height: 1.6;
    color: var(--md-sys-color-on-surface);
    background: var(--md-sys-color-surface);
    min-height: 100vh;
}

html[lang="lo"] {
    --font-family-base: var(--font-family-lao);
    --bs-body-font-family: var(--font-family-lao);
}

html[lang="lo"] body,
html[lang="lo"] input,
html[lang="lo"] select,
html[lang="lo"] textarea,
html[lang="lo"] button {
    font-family: var(--font-family-lao);
}

/* Login Page — M3 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--md-sys-color-surface);
}

.login-card {
    background: var(--md-sys-color-surface-container-low);
    border-radius: var(--md-sys-shape-corner-extra-large);
    box-shadow: var(--md-sys-elevation-1);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

.login-logo {
    width: 72px;
    height: 72px;
    background: var(--md-sys-color-primary-container);
    border-radius: var(--md-sys-shape-corner-large);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--md-sys-color-on-primary-container);
    font-size: 32px;
}

/* M3 Language Chip Toggle */
.m3-lang-toggle {
    display: inline-flex;
    border-radius: var(--md-sys-shape-corner-full);
    overflow: hidden;
    border: 1px solid var(--md-sys-color-outline);
}

.m3-lang-toggle .m3-lang-btn {
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    transition: background 0.2s, color 0.2s;
    background: transparent;
    color: var(--md-sys-color-on-surface-variant);
}

.m3-lang-toggle .m3-lang-btn.active {
    background: var(--md-sys-color-secondary-container, var(--md-sys-color-primary-container));
    color: var(--md-sys-color-on-secondary-container, var(--md-sys-color-on-primary-container));
}

.m3-lang-toggle .m3-lang-btn:not(.active):hover {
    background: var(--md-sys-color-surface-container-highest);
}

/* M3 Outlined Text Field */
.m3-text-field {
    position: relative;
    margin-bottom: 24px;
}

.m3-text-field input {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-family: inherit;
    color: var(--md-sys-color-on-surface);
    background: transparent;
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-shape-corner-small);
    outline: none;
    transition: border-color 0.2s;
}

.m3-text-field input::placeholder {
    color: transparent;
}

.m3-text-field label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--md-sys-color-on-surface-variant);
    pointer-events: none;
    transition: all 0.2s ease;
    background: var(--md-sys-color-surface-container-low);
    padding: 0 4px;
}

.m3-text-field input:focus ~ label,
.m3-text-field input:not(:placeholder-shown) ~ label {
    top: 0;
    font-size: 12px;
    color: var(--md-sys-color-primary);
}

.m3-text-field input:focus {
    border-color: var(--md-sys-color-primary);
    border-width: 2px;
    padding: 15px;
}

/* M3 Filled Button */
.m3-btn-filled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    letter-spacing: 0.1px;
    color: var(--md-sys-color-on-primary);
    background: var(--md-sys-color-primary);
    border: none;
    border-radius: var(--md-sys-shape-corner-full);
    cursor: pointer;
    transition: box-shadow 0.2s, opacity 0.2s;
}

.m3-btn-filled:hover {
    box-shadow: var(--md-sys-elevation-1);
}

.m3-btn-filled:active {
    opacity: 0.88;
}

/* M3 Tonal Button (small) */
.m3-btn-tonal-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    color: var(--md-sys-color-on-primary-container);
    background: var(--md-sys-color-primary-container);
    border: none;
    border-radius: var(--md-sys-shape-corner-full);
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.m3-btn-tonal-sm:hover {
    box-shadow: var(--md-sys-elevation-1);
}

.m3-btn-tonal-sm.secondary {
    background: var(--md-sys-color-surface-container-high);
    color: var(--md-sys-color-on-surface-variant);
}

/* M3 Checkbox */
.m3-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--md-sys-color-on-surface-variant);
}

.m3-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--md-sys-color-primary);
    cursor: pointer;
}

/* Login footer text */
.login-footer-text {
    font-size: 14px;
    color: var(--md-sys-color-on-surface-variant);
}

/* M3 Error container for alerts */
.m3-error-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--md-sys-shape-corner-medium);
    background: #FFDAD6;
    color: #410002;
    font-size: 14px;
    margin-bottom: 24px;
}

.m3-error-container i {
    font-size: 20px;
    color: var(--color-error);
    flex-shrink: 0;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* M3 Navigation Drawer */
.sidebar {
    width: 260px;
    background: var(--md-sys-color-surface-container-low);
    border-right: 1px solid var(--md-sys-color-outline-variant);
    position: fixed;
    height: 100vh;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.sidebar-brand {
    padding: 24px 16px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.sidebar-brand h4 {
    color: var(--md-sys-color-on-surface);
    margin: 0;
    font-weight: 600;
    font-size: 18px;
}

.sidebar-brand small {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 12px;
}

.sidebar-nav {
    list-style: none;
    padding: 12px;
    margin: 0;
}

.sidebar-item {
    margin: 0 0 2px 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--md-sys-color-on-surface-variant);
    text-decoration: none;
    border-radius: var(--md-sys-shape-corner-full);
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    font-weight: 500;
    font-size: 14px;
}

.sidebar-link:hover {
    background: var(--md-sys-color-surface-container-highest);
    color: var(--md-sys-color-on-surface);
}

.sidebar-link.active {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    font-weight: 600;
}

.sidebar-link.active i {
    color: var(--md-sys-color-on-primary-container);
}

.sidebar-link i {
    font-size: 20px;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 16px;
    border-top: 1px solid var(--md-sys-color-outline-variant);
    color: var(--md-sys-color-on-surface-variant);
    font-size: 12px;
}

/* M3 Tonal Error Button */
.btn-m3-tonal-error {
    background: #FFDAD6;
    color: #93000A;
    border: none;
    border-radius: var(--md-sys-shape-corner-full);
    padding: 10px 24px;
    font-weight: 500;
    transition: all 0.2s;
}
.btn-m3-tonal-error:hover {
    background: #FFB4AB;
    color: #93000A;
    box-shadow: var(--md-sys-elevation-1);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 24px;
    background: var(--md-sys-color-surface);
    min-height: 100vh;
}

/* Header */
.top-header {
    height: 70px;
    background: var(--md-sys-color-surface-container-low);
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    box-shadow: var(--md-sys-elevation-1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    margin: -24px -24px 24px -24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.user-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--md-sys-color-primary-container);
}

/* M3 Surface Cards */
.glass-card {
    background: var(--md-sys-color-surface-container-low);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-shape-corner-large);
    box-shadow: var(--md-sys-elevation-1);
    transition: box-shadow 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.glass-card:hover {
    box-shadow: var(--md-sys-elevation-2);
}

/* Stat Cards */
.stat-card {
    background: var(--md-sys-color-surface-container-lowest);
    border-radius: var(--md-sys-shape-corner-large);
    padding: 24px;
    border: 1px solid var(--md-sys-color-outline-variant);
    box-shadow: var(--md-sys-elevation-1);
    transition: box-shadow 0.2s;
    height: 100%;
}

.stat-card:hover {
    box-shadow: var(--md-sys-elevation-2);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--md-sys-shape-corner-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.stat-icon.primary {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.stat-icon.success {
    background: #C4EED0;
    color: #002106;
}

.stat-icon.warning {
    background: #FFDDB3;
    color: #261900;
}

.stat-icon.info {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.stat-icon.purple {
    background: #EADDFF;
    color: #21005D;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stat-label {
    color: var(--gray-600);
    font-size: 14px;
    margin-top: 4px;
}

.stat-change {
    font-size: 13px;
    margin-top: 8px;
    font-weight: 600;
}

.stat-change.positive {
    color: var(--color-success);
}

/* Buttons */
.btn-primary-gradient {
    background: var(--md-sys-color-primary);
    border: none;
    color: var(--md-sys-color-on-primary);
    padding: 12px 24px;
    border-radius: var(--md-sys-shape-corner-full);
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: none;
}

.btn-primary-gradient:hover {
    box-shadow: var(--md-sys-elevation-1);
    color: var(--md-sys-color-on-primary);
}

/* M3 Filled Tonal Buttons */
.btn-m3-tonal {
    border: none;
    border-radius: var(--md-sys-shape-corner-medium);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    cursor: pointer;
    display: inline-flex;
}

.btn-m3-tonal:hover {
    box-shadow: var(--md-sys-elevation-1);
}

.btn-m3-tonal-primary {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}
.btn-m3-tonal-primary:hover { color: var(--md-sys-color-on-primary-container); }

.btn-m3-tonal-success {
    background: #C4EED0;
    color: #002106;
}
.btn-m3-tonal-success:hover { color: #002106; }

.btn-m3-tonal-warning {
    background: #FFDDB3;
    color: #261900;
}
.btn-m3-tonal-warning:hover { color: #261900; }

.btn-m3-tonal-purple {
    background: #EADDFF;
    color: #21005D;
}
.btn-m3-tonal-purple:hover { color: #21005D; }

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--gray-100);
    color: var(--gray-600);
    transition: all 0.3s;
    cursor: pointer;
}

.btn-icon:hover {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

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

/* Forms */
.form-control-glass {
    background: var(--md-sys-color-surface-container-lowest);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 16px;
    transition: all 0.2s;
}

.form-control-glass:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 2px var(--md-sys-color-primary-container);
    background: var(--md-sys-color-surface-container-lowest);
}

.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 8px;
}

/* Tables */
.table-glass {
    background: var(--md-sys-color-surface-container-lowest);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--md-sys-color-outline-variant);
}

.table-glass thead th {
    background: var(--md-sys-color-surface-container-high);
    border-bottom: 2px solid var(--md-sys-color-outline-variant);
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    padding: 16px;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.table-glass tbody td {
    padding: 16px;
    border-bottom: 1px solid var(--md-sys-color-surface-variant);
    vertical-align: middle;
}

.table-glass tbody tr:hover {
    background: var(--md-sys-color-surface-container);
}

/* Badges */
.badge-custom {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-available {
    background: #D1FAE5;
    color: #065F46;
}

.badge-in-use {
    background: #FEF3C7;
    color: #92400E;
}

.badge-category {
    background: #DBEAFE;
    color: #1E40AF;
}

.badge-admin {
    background: #EDE9FE;
    color: #5B21B6;
}

/* Page Title */
.page-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 8px;
}

/* Quick Actions */
.quick-action-card {
    background: var(--md-sys-color-surface-container-lowest);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--md-sys-color-outline-variant);
}

.quick-action-card:hover {
    box-shadow: var(--md-sys-elevation-2);
}

.quick-action-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
    color: white;
}

/* Activity Timeline */
.activity-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-100);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}

.activity-content {
    flex: 1;
}

/* M3 Activity Status Colors */
.activity-item.status-checkin {
    border-left: 3px solid #386A20;
}
.activity-item.status-checkout {
    border-left: 3px solid #7D5700;
}
.activity-item.status-overdue {
    border-left: 3px solid #BA1A1A;
}

.activity-time {
    font-size: 12px;
    color: var(--gray-600);
}

/* Search Bar (legacy) */
.search-bar {
    background: var(--md-sys-color-surface-container-low);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 24px;
    border: 1px solid var(--md-sys-color-outline-variant);
}

/* M3 Search Bar */
.m3-search-container {
    position: relative;
    max-width: 720px;
}

.m3-search-input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    background: var(--md-sys-color-surface-container-highest);
    border: none;
    border-radius: var(--md-sys-shape-corner-extra-large);
    font-size: 16px;
    color: var(--md-sys-color-on-surface);
    outline: none;
    transition: box-shadow 0.2s;
}

.m3-search-input:focus {
    box-shadow: var(--md-sys-elevation-2);
    background: var(--md-sys-color-surface-container-low);
}

.m3-search-input::placeholder {
    color: var(--md-sys-color-on-surface-variant);
}

.m3-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--md-sys-color-on-surface-variant);
    font-size: 18px;
    pointer-events: none;
}

.m3-search-results {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--md-sys-color-surface-container-low);
    border-radius: var(--md-sys-shape-corner-large);
    box-shadow: var(--md-sys-elevation-3);
    max-height: 320px;
    overflow-y: auto;
    z-index: 1100;
    padding: 8px;
}

.m3-search-results.show {
    display: block;
}

.m3-search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--md-sys-shape-corner-medium);
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    color: var(--md-sys-color-on-surface);
}

.m3-search-result-item:hover {
    background: var(--md-sys-color-surface-container-highest);
    color: var(--md-sys-color-on-surface);
}

/* Autocomplete (Styled Dropdown) */
.itam-ac {
    position: relative;
}

.itam-ac-caret {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-600);
    pointer-events: none;
    z-index: 2;
    transition: transform 0.15s ease;
}

.itam-ac.open .itam-ac-caret {
    transform: translateY(-50%) rotate(180deg);
}

.itam-ac-input {
    padding-left: 16px;
    padding-right: 42px;
}

.itam-ac-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 1100;
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
    border-radius: var(--radius-md);

    /* Match Bootstrap/native select dropdown look */
    background: #fff !important;
    backdrop-filter: none !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.itam-ac-menu.show {
    display: block;
}

.itam-ac-item {
    width: 100%;
    text-align: left;
    border: 1px solid transparent;
    background: transparent;
    border-radius: var(--radius-md);
    padding: 10px 12px;
    color: var(--gray-800);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.itam-ac-item:hover,
.itam-ac-item.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.itam-ac-empty {
    padding: 10px 12px;
    color: var(--gray-600);
    font-size: 13px;
}

/* Profile Card */
.profile-card {
    background: var(--md-sys-color-surface-container-lowest);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    border: 1px solid var(--md-sys-color-outline-variant);
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 48px;
    font-weight: 700;
    box-shadow: var(--md-sys-elevation-2);
}

.profile-avatar-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 24px;
    display: block;
    border: 3px solid var(--md-sys-color-primary-container);
    box-shadow: var(--md-sys-elevation-2);
}

/* Report Cards */
.report-card {
    background: var(--md-sys-color-surface-container-lowest);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--md-sys-color-outline-variant);
    transition: box-shadow 0.2s;
    height: 100%;
}

.report-card:hover {
    box-shadow: var(--md-sys-elevation-2);
}

.report-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 16px;
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
}

.toast-glass {
    background: var(--md-sys-color-surface-container-low);
    border-radius: var(--md-sys-shape-corner-medium);
    border: 1px solid var(--md-sys-color-outline-variant);
    box-shadow: var(--md-sys-elevation-3);
}

.activity-list {
    max-height: 420px;
    overflow-y: auto;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.quick-actions .quick-action-card {
    margin: 0;
}

/* Modal */
.modal-glass .modal-content {
    background: var(--md-sys-color-surface-container-low);
    border-radius: var(--radius-xl);
    border: 1px solid var(--md-sys-color-outline-variant);
    box-shadow: var(--md-sys-elevation-3);
}

/* Sidebar Overlay (mobile scrim) */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.32);
    z-index: 999;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--md-sys-elevation-3);
    }

    .sidebar.open + .sidebar-overlay {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .m3-search-container {
        max-width: 100%;
    }

    .stat-value {
        font-size: 28px;
    }

    .page-title {
        font-size: 24px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Print Styles */
@media print {
    .sidebar, .top-header, .no-print {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
    }

    .glass-card, .stat-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
