/* ============================================
   AssetCare — Design System & Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800&display=swap');

/* ── CSS Variables ── */
:root {
    /* Primary */
    --primary: #2547E0;
    --primary-dark: #1E3AC7;
    --primary-light: #4A6CF7;
    --primary-bg: rgba(37, 71, 224, 0.08);

    /* Navy */
    --navy: #0B1436;
    --navy-light: #111C4E;
    --navy-medium: #162050;

    /* Background */
    --bg-start: #EAF0FF;
    --bg-end: #FFFFFF;
    --bg-main: #F3F6FC;

    /* Surface */
    --surface: #FFFFFF;
    --surface-hover: #F8FAFF;

    /* Status */
    --green: #16A34A;
    --green-bg: #DCFCE7;
    --green-border: #BBF7D0;
    --yellow: #D97706;
    --yellow-bg: #FEF3C7;
    --yellow-border: #FDE68A;
    --red: #DC2626;
    --red-bg: #FEE2E2;
    --red-border: #FECACA;

    /* Text */
    --text-primary: #0B1436;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --text-white: #FFFFFF;

    /* Borders */
    --border: #E5E7EB;
    --border-light: #F3F4F6;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(11, 20, 54, 0.04);
    --shadow: 0 2px 8px rgba(11, 20, 54, 0.06);
    --shadow-md: 0 4px 16px rgba(11, 20, 54, 0.08);
    --shadow-lg: 0 8px 32px rgba(11, 20, 54, 0.12);
    --shadow-xl: 0 16px 48px rgba(11, 20, 54, 0.16);

    /* Radius */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 999px;

    /* Sizing */
    --sidebar-width: 260px;
    --sidebar-collapsed: 80px;
    --header-height: 72px;

    /* Transitions */
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    background: var(--bg-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    outline: none;
    font-size: 0.875rem;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: 0.875rem;
    outline: none;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../img/bg_login.png') no-repeat center center / cover;
    position: relative;
    overflow: hidden;
}

/* Blob decorations */
.login-page::before {
    content: '';
    position: absolute;
    top: -120px;
    left: -120px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(37, 71, 224, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: blobFloat 8s ease-in-out infinite;
}

.login-page::after {
    content: '';
    position: absolute;
    bottom: -150px;
    right: -150px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(37, 71, 224, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    animation: blobFloat 10s ease-in-out infinite reverse;
}

@keyframes blobFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(20px, -20px) scale(1.05);
    }

    66% {
        transform: translate(-10px, 15px) scale(0.95);
    }
}

.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 960px;
    width: 90%;
    min-height: 520px;
    position: relative;
    z-index: 1;
}

/* Left side - Login form */
.login-left {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 24px;
}

.login-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 360px;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.logo-hex {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.3rem;
    transform: rotate(-5deg);
    box-shadow: 0 4px 12px rgba(37, 71, 224, 0.3);
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-text .navy {
    color: var(--navy);
}

.logo-text .blue {
    color: var(--primary);
}

.login-tagline {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-bottom: 24px;
    margin-left: 56px;
    margin-top: -4px;
}

.login-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 4px;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 14px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: var(--transition-fast);
}

.input-wrapper input {
    width: 100%;
    padding: 11px 42px 11px 42px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: var(--text-primary);
    background: var(--surface);
    transition: var(--transition);
}

.input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 71, 224, 0.1);
}

.input-wrapper input:focus+.input-icon,
.input-wrapper input:focus~.input-icon {
    color: var(--primary);
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

/* Hide native browser password reveal & clear buttons */
input::-ms-reveal,
input::-ms-clear {
    display: none;
    width: 0;
    height: 0;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.toggle-password:hover {
    color: var(--primary);
    background: rgba(37, 71, 224, 0.08);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    border-radius: 4px;
    cursor: pointer;
}

.forgot-link {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
}

.btn-login {
    width: 100%;
    padding: 11px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 71, 224, 0.35);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login.loading {
    pointer-events: none;
    opacity: 0.85;
}

.btn-login .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

.btn-login.loading .spinner {
    display: block;
}

.btn-login.loading .btn-text {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.login-divider {
    height: 1px;
    background: var(--border);
    margin: 18px 0;
}

.login-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.login-notice svg {
    width: 16px;
    height: 16px;
}

.login-error {
    background: var(--red-bg);
    color: var(--red);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 16px;
    display: none;
    align-items: center;
    gap: 8px;
    animation: shake 0.4s ease-out;
}

.login-error.show {
    display: flex;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* Right side - Illustration */
.login-right {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 32px 36px;
    position: relative;
}

.login-right h1 {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.3;
    margin-bottom: 12px;
}

.login-right h1 .highlight {
    color: var(--primary);
}

.login-right .description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 380px;
}

.login-illustration {
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius-lg);
}

/* Login footer */
.login-footer {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    z-index: 1;
    white-space: nowrap;
}

/* ============================================
   APP LAYOUT (After Login)
   ============================================ */
.app-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-main);
    width: 100%;
    overflow-x: hidden;
}

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: linear-gradient(180deg, #070d24 0%, #0B1436 40%, #111C4E 100%);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: var(--transition-slow);
    overflow: hidden;
    box-shadow: 4px 0 24px rgba(7, 13, 36, 0.15);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 72px;
    overflow: hidden;
}

.sidebar-brand .logo-hex {
    width: 40px;
    height: 40px;
    min-width: 40px;
    font-size: 1.2rem;
    border-radius: 10px;
}

.sidebar-brand-text {
    white-space: nowrap;
    transition: var(--transition);
}

.sidebar.collapsed .sidebar-brand-text {
    opacity: 0;
    width: 0;
}

.sidebar-brand-text .name {
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.3px;
}

.sidebar-brand-text .name .blue {
    color: var(--primary-light);
}

.sidebar-brand-text .subtitle {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: -2px;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 12px 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-nav-main {
    flex: 1;
}

.sidebar-nav-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 12px;
    margin-bottom: 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    margin-bottom: 4px;
    white-space: nowrap;
    text-decoration: none;
}

.nav-item:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.06);
    text-decoration: none;
}

.nav-item.active {
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 12px rgba(37, 71, 224, 0.35);
    font-weight: 600;
}

.nav-item svg,
.nav-item .nav-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item .nav-label {
    transition: var(--transition);
}

.sidebar.collapsed .nav-item .nav-label {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 12px;
}

.nav-item.logout-item {
    color: rgba(255, 255, 255, 0.4);
}

.nav-item.logout-item:hover {
    color: var(--red);
    background: rgba(220, 38, 38, 0.1);
}

/* ── Main Content ── */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: var(--transition-slow);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: calc(100% - var(--sidebar-width));
    max-width: 100%;
}

.sidebar.collapsed~.main-content,
.app-layout.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed);
    width: calc(100% - var(--sidebar-collapsed));
}

/* ── Header ── */
.app-header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 3px rgba(11, 20, 54, 0.03);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hamburger {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    transition: var(--transition-fast);
}

.hamburger:hover {
    background: var(--bg-main);
    color: var(--text-primary);
}

.page-title h1 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.3;
}

.page-title p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 1px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Notification bell */
.notification-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--bg-main);
    color: var(--text-secondary);
    font-size: 1.2rem;
    position: relative;
    transition: var(--transition);
}

.notification-btn:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    background: var(--red);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--surface);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.notification-badge:empty,
.notification-badge[data-count="0"] {
    display: none;
}

/* Notification dropdown */
.notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
    z-index: 200;
    display: none;
    animation: dropdownIn 0.2s ease-out;
    overflow: hidden;
}

.notification-dropdown.show {
    display: block;
}

@keyframes dropdownIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-list {
    max-height: 320px;
    overflow-y: auto;
}

.notification-item {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    gap: 12px;
    transition: var(--transition-fast);
    cursor: pointer;
}

.notification-item:hover {
    background: var(--surface-hover);
}

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

.notif-dot {
    width: 10px;
    height: 10px;
    min-width: 10px;
    border-radius: 50%;
    margin-top: 4px;
}

.notif-dot.red {
    background: var(--red);
}

.notif-dot.yellow {
    background: var(--yellow);
}

.notif-info {
    flex: 1;
}

.notif-info .notif-name {
    font-weight: 600;
    font-size: 0.85rem;
}

.notif-info .notif-detail {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.notification-empty {
    padding: 32px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Profile dropdown */
.profile-wrapper {
    position: relative;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px 6px 6px;
    border-radius: var(--radius);
    background: none;
    transition: var(--transition-fast);
}

.profile-btn:hover {
    background: var(--bg-main);
}

.profile-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
}

.profile-info {
    text-align: left;
}

.profile-info .name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.profile-info .role {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.profile-btn .chevron {
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: var(--transition-fast);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 200px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    z-index: 200;
    display: none;
    animation: dropdownIn 0.2s ease-out;
    overflow: hidden;
}

.profile-dropdown.show {
    display: block;
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.profile-dropdown-item:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.profile-dropdown-item.danger {
    color: var(--red);
}

.profile-dropdown-item.danger:hover {
    background: var(--red-bg);
}

/* ── Page Content ── */
.page-content {
    flex: 1;
    padding: 28px 32px;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

/* ============================================
   STAT CARDS
   ============================================ */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 22px 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(11, 20, 54, 0.04), 0 1px 2px rgba(11, 20, 54, 0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-light);
    min-width: 0;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--border-light);
    transition: all 0.3s ease;
}

.stat-card:nth-child(1)::before { background: linear-gradient(90deg, #2547E0, #4A6CF7); }
.stat-card:nth-child(2)::before { background: linear-gradient(90deg, #6B7280, #9CA3AF); }
.stat-card:nth-child(3)::before { background: linear-gradient(90deg, #D97706, #F59E0B); }
.stat-card:nth-child(4)::before { background: linear-gradient(90deg, #DC2626, #EF4444); }

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(11, 20, 54, 0.08), 0 4px 8px rgba(11, 20, 54, 0.04);
    border-color: var(--border);
}

.stat-card-decoration {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    opacity: 0.04;
    pointer-events: none;
}

.stat-card:nth-child(1) .stat-card-decoration { background: var(--primary); }
.stat-card:nth-child(2) .stat-card-decoration { background: #6B7280; }
.stat-card:nth-child(3) .stat-card-decoration { background: var(--yellow); }
.stat-card:nth-child(4) .stat-card-decoration { background: var(--red); }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    min-width: 48px;
    transition: all 0.3s ease;
}

.stat-icon.blue {
    background: linear-gradient(135deg, rgba(37, 71, 224, 0.1) 0%, rgba(74, 108, 247, 0.08) 100%);
    color: var(--primary);
}

.stat-icon.green {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.1) 0%, rgba(34, 197, 94, 0.08) 100%);
    color: var(--green);
}

.stat-icon.yellow {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.1) 0%, rgba(245, 158, 11, 0.08) 100%);
    color: var(--yellow);
}

.stat-icon.red {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(239, 68, 68, 0.08) 100%);
    color: var(--red);
}

.stat-icon.gray {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.1) 0%, rgba(156, 163, 175, 0.08) 100%);
    color: #6B7280;
}

.stat-card:hover .stat-icon {
    transform: scale(1.05);
}

.stat-info {
    min-width: 0;
    overflow: hidden;
    flex: 1;
}

.stat-info .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.stat-info .stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.stat-info .stat-sublabel {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 4px;
}

/* ── Dashboard Welcome ── */
.dashboard-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 0 2px;
}

.dashboard-welcome .welcome-text h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.3px;
    line-height: 1.3;
}

.dashboard-welcome .welcome-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.dashboard-welcome .welcome-date {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    background: var(--surface);
    padding: 8px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.dashboard-welcome .welcome-date svg {
    color: var(--primary);
}

/* ── Chart Card Enhanced ── */
.chart-card {
    transition: all 0.3s ease;
}

.chart-card:hover {
    box-shadow: 0 8px 24px rgba(11, 20, 54, 0.08);
}

.chart-card-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.chart-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-card-title svg {
    color: var(--primary);
    min-width: 20px;
}

.chart-card-title h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0;
}

/* ── Section Header ── */
.section-header {
    padding: 0 2px;
}

.section-header h3 svg {
    color: var(--primary);
}

/* ============================================
   TOOLBAR
   ============================================ */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    width: 100%;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1 1 auto;
    min-width: 0;
}

.search-box {
    position: relative;
    width: 240px;
    max-width: 100%;
    height: 36px;
    flex: 0 0 auto;
}

.search-box input {
    width: 100%;
    height: 36px;
    line-height: 34px;
    padding: 0 28px 0 32px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm, 8px);
    font-size: 0.82rem;
    background: var(--surface);
    color: var(--text-primary);
    transition: var(--transition);
    display: block;
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 71, 224, 0.08);
}

.search-box .search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    width: 15px;
    height: 15px;
}

.search-box .search-icon svg {
    width: 15px;
    height: 15px;
}

.search-clear-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    line-height: 1;
    transition: var(--transition-fast);
}

.search-clear-btn:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.filter-select {
    height: 36px;
    padding: 0 30px 0 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm, 8px);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 0.82rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: var(--transition);
    min-width: 110px;
    flex: 0 1 auto;
}

.filter-select:focus {
    border-color: var(--primary);
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-wrap: wrap;
    flex: 0 0 auto;
    max-width: 100%;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
    white-space: nowrap;
    border: 2px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: transparent;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(37, 71, 224, 0.35);
}

.btn-success {
    background: linear-gradient(135deg, var(--green) 0%, #15803d 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}

.btn-danger {
    background: linear-gradient(135deg, var(--red) 0%, #B91C1C 100%);
    color: white;
}

.btn-outline {
    background: var(--surface);
    border: 2px solid var(--border);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}

.btn-outline-red {
    background: var(--surface);
    border: 2px solid var(--border);
    color: var(--red);
}

.btn-outline-red:hover {
    border-color: var(--red);
    background: var(--red-bg);
}

.btn-outline-green {
    background: var(--surface);
    border: 2px solid var(--border);
    color: var(--green);
}

.btn-outline-green:hover {
    border-color: var(--green);
    background: var(--green-bg);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.btn-icon:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}

.btn-icon.danger:hover {
    border-color: var(--red);
    color: var(--red);
    background: var(--red-bg);
}

.btn-icon.success:hover {
    border-color: var(--green);
    color: var(--green);
    background: var(--green-bg);
}

/* ============================================
   TABLE
   ============================================ */
.table-container {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 3px rgba(11, 20, 54, 0.04), 0 1px 2px rgba(11, 20, 54, 0.02);
    overflow-x: auto;
    border: 1px solid var(--border-light);
    max-width: 100%;
}

.data-table {
    width: 100%;
    min-width: 1080px;
    border-collapse: collapse;
}

.data-table thead th {
    background: #F8FAFC;
    padding: 14px 16px;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table tbody td {
    padding: 14px 16px;
    font-size: 0.85rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--surface-hover);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.table-actions .btn-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
}

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-green {
    background: var(--green-bg);
    color: var(--green);
}

.badge-yellow {
    background: var(--yellow-bg);
    color: var(--yellow);
}

.badge-red {
    background: var(--red-bg);
    color: var(--red);
}

.badge-blue {
    background: var(--primary-bg);
    color: var(--primary);
}

.badge-gray {
    background: #F3F4F6;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.green {
    background: var(--green);
}

.status-dot.yellow {
    background: var(--yellow);
}

.status-dot.red {
    background: var(--red);
}

/* ── Pagination ── */
.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-top: 1px solid var(--border-light);
    background: var(--surface);
}

.table-info {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.pagination {
    display: flex;
    gap: 4px;
}

.page-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    transition: var(--transition-fast);
    cursor: pointer;
}

.page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 20, 54, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--surface);
    border-radius: var(--radius-xl);
    width: 95%;
    max-width: 640px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    transform: translateY(20px) scale(0.97);
    transition: var(--transition);
}

.modal-overlay.show .modal {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 16px;
    border-bottom: 1px solid var(--border-light);
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy);
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg-main);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--red-bg);
    color: var(--red);
}

.modal-body {
    padding: 24px 28px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 28px 24px;
    border-top: 1px solid var(--border-light);
}

/* ── Form Styles in Modal ── */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-grid .form-group.full {
    grid-column: 1 / -1;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-label .required {
    color: var(--red);
}

.form-input {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-primary);
    background: var(--surface);
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 71, 224, 0.08);
}

.form-input::placeholder {
    color: var(--text-muted);
}

select.form-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 36px 20px;
}

.empty-state .empty-icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
    opacity: 0.7;
}

.empty-state h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    max-width: 320px;
    margin: 0 auto 12px;
    line-height: 1.5;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary);
    min-width: 300px;
    max-width: 420px;
    animation: toastIn 0.3s ease-out;
    transition: var(--transition);
}

.toast.toast-success {
    border-left-color: var(--green);
}

.toast.toast-error {
    border-left-color: var(--red);
}

.toast.toast-warning {
    border-left-color: var(--yellow);
}

.toast.removing {
    opacity: 0;
    transform: translateX(100%);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-icon {
    font-size: 1.2rem;
    min-width: 24px;
}

.toast-success .toast-icon {
    color: var(--green);
}

.toast-error .toast-icon {
    color: var(--red);
}

.toast-warning .toast-icon {
    color: var(--yellow);
}

.toast-message {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 500;
}

.toast-close {
    background: none;
    color: var(--text-muted);
    font-size: 1rem;
    padding: 2px;
    transition: var(--transition-fast);
}

.toast-close:hover {
    color: var(--text-primary);
}

/* ============================================
   CARDS GRID (Categories, Locations)
   ============================================ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.info-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.info-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.info-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--primary-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.info-card-actions {
    display: flex;
    gap: 6px;
}

.info-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 4px;
}

.info-card .card-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 14px;
    flex: 1;
}

.info-card .card-count {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
}

.info-card .card-count strong {
    color: var(--primary);
    font-weight: 700;
}

/* ============================================
   MAINTENANCE PAGE SPECIFICS
   ============================================ */
.asset-info-panel {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    flex-wrap: wrap;
}

.asset-info-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    background: var(--primary-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.asset-info-main {
    flex: 1;
    min-width: 200px;
}

.asset-info-main h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy);
}

.asset-info-main .asset-meta {
    display: flex;
    gap: 16px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.asset-info-main .asset-meta span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.asset-info-stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.info-stat {
    text-align: center;
    padding: 0 16px;
    border-left: 1px solid var(--border-light);
}

.info-stat:first-child {
    border-left: none;
}

.info-stat .stat-title {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.info-stat .stat-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--navy);
}

.next-service-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 20px;
    text-align: center;
    min-width: 160px;
}

.next-service-card.status-green {
    border-color: var(--green-border);
    background: var(--green-bg);
}

.next-service-card.status-yellow {
    border-color: var(--yellow-border);
    background: var(--yellow-bg);
}

.next-service-card.status-red {
    border-color: var(--red-border);
    background: var(--red-bg);
}

.next-service-card .ns-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.next-service-card .ns-date {
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
    margin: 4px 0;
}

.mark-service-panel {
    background: var(--green-bg);
    border: 2px solid var(--green-border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.mark-service-panel .ms-info {
    flex: 1;
}

.mark-service-panel .ms-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--green);
    margin-bottom: 4px;
}

.mark-service-panel .ms-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* Summary sidebar */
.maint-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.maint-sidebar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.summary-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.summary-card h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 16px;
}

.summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.summary-item .si-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.summary-item .si-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--navy);
}

/* Donut chart container */
.chart-container {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    min-width: 10px;
}

.legend-dot.green {
    background: var(--green);
}

.legend-dot.yellow {
    background: var(--yellow);
}

.legend-dot.red {
    background: var(--red);
}

.tips-card {
    background: linear-gradient(135deg, var(--primary-bg) 0%, rgba(37, 71, 224, 0.04) 100%);
    border: 1px solid rgba(37, 71, 224, 0.12);
}

.tips-card h3 {
    color: var(--primary);
}

.tips-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   REPORTS PAGE
   ============================================ */
.report-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.report-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 1px 3px rgba(11, 20, 54, 0.04), 0 1px 2px rgba(11, 20, 54, 0.02);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.report-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 20px;
}

.report-card.full-width {
    grid-column: 1 / -1;
}

/* Bar chart */
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 200px;
    padding-top: 20px;
}

.bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.bar {
    width: 100%;
    max-width: 36px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 6px 6px 0 0;
    min-height: 4px;
    transition: var(--transition);
    position: relative;
}

.bar:hover {
    opacity: 0.85;
}

.bar-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 8px;
    text-align: center;
}

.bar-value {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

/* Horizontal bars for distribution */
.hbar-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hbar-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hbar-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    min-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hbar-track {
    flex: 1;
    height: 10px;
    background: var(--bg-main);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.hbar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-full);
    transition: width 0.8s ease-out;
}

.hbar-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--navy);
    min-width: 30px;
    text-align: right;
}

/* ============================================
   SETTINGS PAGE
   ============================================ */
.settings-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.settings-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.settings-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
}

.settings-card .form-group {
    margin-bottom: 16px;
}

/* ============================================
   ASSET SELECTOR (for maintenance page)
   ============================================ */
.asset-selector {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    text-align: center;
}

.asset-selector h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 8px;
}

.asset-selector p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.asset-selector select {
    padding: 12px 40px 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    min-width: 300px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-color: var(--surface);
    cursor: pointer;
}

/* ============================================
   CONFIRM DIALOG
   ============================================ */
.confirm-dialog .modal {
    max-width: 420px;
}

.confirm-dialog .modal-body {
    text-align: center;
    padding: 32px 28px 20px;
}

.confirm-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.8rem;
}

.confirm-icon.warning {
    background: var(--yellow-bg);
    color: var(--yellow);
}

.confirm-icon.danger {
    background: var(--red-bg);
    color: var(--red);
}

.confirm-icon.success {
    background: var(--green-bg);
    color: var(--green);
}

.confirm-dialog h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}

.confirm-dialog p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.confirm-dialog .modal-footer {
    justify-content: center;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1366px) {
    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .maint-sidebar {
        grid-template-columns: 1fr;
    }

    .report-grid {
        grid-template-columns: 1fr;
    }

    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .settings-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 200;
        width: 260px !important;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 199;
        display: none;
        backdrop-filter: blur(2px);
    }

    .sidebar-overlay.show {
        display: block;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        min-width: 0;
    }

    .app-header {
        padding: 0 16px;
        gap: 12px;
    }

    .header-left {
        gap: 12px;
        min-width: 0;
        flex: 1;
        overflow: hidden;
    }

    .page-title {
        min-width: 0;
        overflow: hidden;
    }

    .page-title h1 {
        font-size: 1.1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .page-title p {
        display: none;
    }

    .header-right {
        gap: 8px;
        flex-shrink: 0;
    }

    .profile-btn {
        padding: 4px;
        gap: 6px;
    }

    .profile-info,
    .profile-btn .chevron {
        display: none;
    }

    .profile-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    .notification-btn {
        width: 38px;
        height: 38px;
    }

    .notification-dropdown {
        position: fixed;
        top: var(--header-height);
        left: 12px;
        right: 12px;
        width: auto;
        max-width: calc(100vw - 24px);
        box-shadow: 0 12px 32px rgba(11, 20, 54, 0.18);
    }

    .page-content {
        padding: 16px 14px;
    }

    /* Dashboard */
    .dashboard-welcome {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px 16px;
        gap: 12px;
    }

    .dashboard-welcome .welcome-text h2 {
        font-size: 1.15rem;
    }

    .dashboard-welcome .welcome-text p {
        font-size: 0.8rem;
    }

    .dashboard-welcome .welcome-date {
        align-self: flex-start;
        font-size: 0.78rem;
        padding: 6px 12px;
    }

    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 20px;
    }

    .stat-card {
        padding: 14px 12px;
        gap: 10px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }

    .stat-icon svg {
        width: 20px;
        height: 20px;
    }

    .stat-info .stat-number {
        font-size: 1.35rem;
    }

    .stat-info .stat-label {
        font-size: 0.7rem;
        white-space: normal;
        word-break: break-word;
        line-height: 1.2;
    }

    .stat-info .stat-sublabel {
        font-size: 0.68rem;
        white-space: normal;
        line-height: 1.2;
    }

    .report-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .chart-card {
        padding: 16px;
    }

    .chart-container {
        flex-direction: column !important;
        align-items: center !important;
        gap: 14px !important;
    }

    .chart-legend {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 8px;
    }

    .section-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    .section-header > div {
        width: 100%;
    }

    .section-header .btn {
        width: 100%;
        justify-content: center;
    }

    /* Tables & Pagination */
    .table-container {
        border-radius: var(--radius);
        -webkit-overflow-scrolling: touch;
    }

    .data-table {
        min-width: 1080px;
    }

    .table-footer {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        text-align: center;
        padding: 14px 12px;
    }

    .table-info {
        font-size: 0.78rem;
    }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }

    .page-btn {
        width: 32px;
        height: 32px;
        font-size: 0.78rem;
    }

    /* Toolbar & Search/Filter */
    .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        height: auto;
    }

    .toolbar-left {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 8px;
        flex: 0 0 auto;
        height: auto;
    }

    .search-box {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        height: 36px;
        flex: 0 0 auto;
    }

    .filter-select {
        width: 100%;
        min-width: 0;
        height: 36px;
        flex: 0 0 auto;
    }

    .toolbar-right {
        width: 100%;
        margin-left: 0;
        display: flex;
        flex-direction: column;
        gap: 8px;
        flex: 0 0 auto;
        height: auto;
    }

    .toolbar-right .btn {
        width: 100%;
        justify-content: center;
    }

    /* Modals & Forms */
    .modal {
        width: 95%;
        max-height: 90vh;
        margin: 8px;
        border-radius: var(--radius-lg);
    }

    .modal-header {
        padding: 16px 18px 12px;
    }

    .modal-title {
        font-size: 1.05rem;
    }

    .modal-body {
        padding: 16px 18px;
    }

    .modal-footer {
        padding: 12px 18px 16px;
        flex-direction: column-reverse;
        gap: 8px;
    }

    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }

    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    /* Maintenance & Asset Selector */
    .maint-sidebar {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .mark-service-panel {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
        gap: 12px;
    }

    .mark-service-panel .btn {
        width: 100%;
        justify-content: center;
    }

    .asset-selector {
        padding: 16px;
    }

    .asset-selector select {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .asset-info-panel {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .asset-info-stats {
        width: 100%;
    }

    /* Settings Layout */
    .settings-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .settings-card {
        padding: 18px 16px;
    }

    /* Cards Grid (Categories, Locations) */
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Login Mobile */
    .login-container {
        grid-template-columns: 1fr;
        width: 92%;
        min-height: auto;
        padding: 16px 0;
    }

    .login-left {
        padding: 16px 0;
        width: 100%;
    }

    .login-right {
        display: none;
    }

    .login-card {
        max-width: 100%;
        padding: 24px 20px;
    }

    .login-footer {
        position: static;
        transform: none;
        margin-top: 16px;
        white-space: normal;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .stat-cards {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .page-content {
        padding: 14px 10px;
    }

    .app-header {
        padding: 0 12px;
    }

    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: 0;
        max-width: 100%;
        width: 100%;
        padding: 12px 14px;
    }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-secondary);
}

.text-sm {
    font-size: 0.82rem;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.gap-2 {
    gap: 16px;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.hidden {
    display: none !important;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {

    .sidebar,
    .app-header,
    .toolbar-right,
    .table-actions,
    .pagination,
    .btn,
    .hamburger,
    .notification-btn,
    .profile-wrapper {
        display: none !important;
    }

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

    .page-content {
        padding: 0;
    }

    .table-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }

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