:root {
    --sky-200: #bae6fd;
    --sky-300: #7dd3fc;
    --blue-300: #93c5fd;
    --cyan-200: #a5f3fc;
    --sky-500: #0ea5e9;
    --blue-500: #3b82f6;
    --slate-500: #64748b;
    --slate-700: #334155;
}

body {
    font-family: "Inter", sans-serif;
    background: #f8fafc;
    color: #1e293b;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.login-page {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.login-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
}

.login-layout {
    width: min(1080px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    border-radius: 1.25rem;
}

.login-hero {
    padding: 2.2rem 2.2rem 1.8rem;
    background: linear-gradient(145deg, #0284c7, #0ea5e9 52%, #38bdf8);
    color: #fff;
}

.login-hero-title {
    font-size: clamp(2rem, 3vw, 2.9rem);
    line-height: 1.08;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.login-hero-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.03rem;
    max-width: 92%;
}

.login-feature-list {
    display: grid;
    gap: 0.7rem;
}

.login-feature-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.68rem 0.9rem;
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-weight: 600;
}

.login-feature-item i {
    font-size: 1rem;
}

.login-hero-foot {
    margin-top: 2rem;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.95rem;
}

.login-form-panel {
    padding: 2.2rem;
    background: rgba(255, 255, 255, 0.94);
}

.login-kicker {
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
}

.login-form-title {
    font-size: clamp(1.75rem, 2.2vw, 2.3rem);
    font-weight: 800;
    line-height: 1.12;
    margin-bottom: 0.5rem;
}

.login-input {
    min-height: 46px;
}

.login-password-toggle {
    position: absolute;
    right: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #64748b;
}

.login-password-toggle:hover {
    color: #0f172a;
}

.login-demo-box {
    border: 1px dashed #bfdbfe;
    border-radius: 0.85rem;
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.8), rgba(248, 250, 252, 0.95));
    color: #334155;
    padding: 0.9rem 0.95rem;
    font-size: 0.95rem;
}

.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    mix-blend-mode: multiply;
    z-index: -1;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 40rem;
    height: 40rem;
    background: var(--sky-300);
    opacity: 0.6;
    animation: pulseBlob 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 40rem;
    height: 40rem;
    background: var(--blue-300);
    opacity: 0.5;
}

.blob-3 {
    top: 40%;
    left: 60%;
    width: 30rem;
    height: 30rem;
    background: var(--cyan-200);
    opacity: 0.45;
}

@keyframes pulseBlob {
    0%,
    100% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.4;
    }
}

.glass-panel {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 1);
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    position: relative;
}

.glass-card {
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 1);
    border-radius: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.app-container {
    min-height: 94vh;
    max-width: 1400px;
    margin: auto;
    display: flex;
    overflow: hidden;
}

.sidebar {
    width: 260px;
    border-right: 1px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease, left 0.3s ease;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    height: 80px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.topbar-left,
.topbar-right {
    min-width: 0;
}

.topbar-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.quick-search-form {
    width: min(360px, 100%);
    min-width: 180px;
}

.content-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
}

.content-scrollable::-webkit-scrollbar {
    width: 6px;
}

.content-scrollable::-webkit-scrollbar-track {
    background: transparent;
}

.content-scrollable::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 10px;
}

.content-scrollable::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.6);
}

.nav-item-glass {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    color: var(--slate-500);
    text-decoration: none;
    margin-bottom: 0.45rem;
    border: 1px solid transparent;
    transition: all 0.25s ease;
}

.nav-item-glass:hover {
    background: rgba(255, 255, 255, 0.52);
    color: #1e293b;
}

.nav-item-glass.active {
    background: #ffffff;
    color: var(--sky-500);
    border-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.gradient-text {
    background: linear-gradient(to right, var(--sky-500), var(--blue-500));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-box {
    width: 40px;
    height: 40px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--sky-500), var(--blue-500));
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.22);
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

.btn-gradient {
    background: linear-gradient(to right, var(--sky-500), var(--blue-500));
    border: none;
    color: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-gradient:hover {
    color: #fff;
    transform: scale(1.03);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-import-soft {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #047857;
}

.btn-import-soft:hover,
.btn-import-soft:focus {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    color: #065f46;
}

.btn-export-soft {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #b45309;
}

.btn-export-soft:hover,
.btn-export-soft:focus {
    background: rgba(245, 158, 11, 0.24);
    border-color: rgba(245, 158, 11, 0.45);
    color: #92400e;
}

.search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid white;
    border-radius: 2rem;
    padding-left: 2.5rem;
    padding-right: 2.4rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    background: white;
    border-color: var(--sky-300);
    box-shadow: 0 0 0 0.25rem rgba(14, 165, 233, 0.18);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.quick-search-clear {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #94a3b8;
    line-height: 1;
    padding: 0;
}

.quick-search-clear:hover {
    color: #64748b;
}

.table-glass {
    width: 100%;
    margin-bottom: 0;
    white-space: nowrap;
}

.table-glass th {
    border-bottom: 1px solid rgba(255, 255, 255, 1);
    color: var(--slate-500);
    font-weight: 600;
    padding: 1rem;
}

.table-glass td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.55);
    padding: 1rem;
    vertical-align: middle;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.table.table-borderless.table-glass tbody tr {
    transition: transform 0.2s ease, filter 0.2s ease;
}

.table.table-borderless.table-glass tbody tr:hover {
    transform: translateY(-1px);
    filter: saturate(1.04);
}

.table.table-borderless.table-glass tbody tr:hover td {
    background: rgba(14, 165, 233, 0.1);
    box-shadow: none;
}

.table.table-borderless.table-glass tbody tr:hover td:first-child {
    border-top-left-radius: 0.75rem;
    border-bottom-left-radius: 0.75rem;
}

.table.table-borderless.table-glass tbody tr:hover td:last-child {
    border-top-right-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.badge-success-soft {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    border-color: rgba(16, 185, 129, 0.28);
}

.badge-warning-soft {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
    border-color: rgba(245, 158, 11, 0.3);
}

.badge-danger-soft {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.26);
}

.badge-primary-soft {
    background: rgba(14, 165, 233, 0.12);
    color: #0369a1;
    border-color: rgba(14, 165, 233, 0.28);
}

.badge-info-soft {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, 0.26);
}

.action-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    background: transparent;
    transition: all 0.2s ease;
    text-decoration: none;
}

.action-btn.edit {
    color: var(--sky-500);
}

.action-btn.edit:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: white;
    color: #0284c7;
}

.action-btn.delete {
    color: #ef4444;
}

.action-btn.delete:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: white;
    color: #b91c1c;
}

.action-btn.print {
    color: #6366f1;
}

.action-btn.print:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: white;
    color: #4f46e5;
}

.stats-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: #0f172a;
}

.dashboard-chart {
    width: 100%;
    height: 320px;
}

.dashboard-chart-sm {
    height: 260px;
}

.form-control-glass {
    background: #fff;
    border: 1px solid #dbeafe;
}

.form-control-glass:focus,
.form-select.form-control-glass:focus {
    border-color: var(--sky-300);
    box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.15);
}

.form-page-card {
    max-width: 980px;
    margin: 0 auto;
}

.form-page-card .form-control,
.form-page-card .form-select {
    min-height: 42px;
}

.searchable-select {
    position: relative;
}

.searchable-select.is-disabled {
    opacity: 0.72;
}

.searchable-select-input {
    min-height: 42px;
    padding-right: 2.35rem;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    border: 1px solid #cfe5ff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.searchable-select:focus-within .searchable-select-input {
    border-color: var(--sky-300);
    box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.15);
    background: #fff;
}

.searchable-select-caret {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: #475569;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    transition: transform 0.2s ease, color 0.2s ease;
}

.searchable-select[data-search-open="1"] .searchable-select-caret {
    transform: translateY(-50%) rotate(180deg);
    color: #0369a1;
}

.searchable-select.is-disabled .searchable-select-caret {
    cursor: not-allowed;
}

.searchable-select-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    display: block;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-4px);
    max-height: 220px;
    overflow-y: auto;
    border-radius: 0.75rem;
    border: 1px solid #d5e8ff;
    background: #fff;
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.14);
    z-index: 1060;
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.searchable-select-dropdown.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.searchable-select-dropdown::-webkit-scrollbar {
    width: 7px;
}

.searchable-select-dropdown::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.5);
    border-radius: 999px;
}

.searchable-select-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.65);
}

.searchable-select-option {
    width: 100%;
    border: 0;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    font: inherit;
    text-align: left;
    padding: 0.58rem 0.78rem;
    color: #1e293b;
    font-size: 0.95rem;
    cursor: pointer;
}

.searchable-select-option + .searchable-select-option {
    border-top: 1px solid #eef2ff;
}

.searchable-select-option:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(14, 165, 233, 0.25);
}

.searchable-select-option-text {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.searchable-select-option:hover,
.searchable-select-option.is-highlighted {
    background: rgba(14, 165, 233, 0.12);
}

.searchable-select-option.is-active {
    font-weight: 600;
    color: #0c4a6e;
    background: rgba(14, 165, 233, 0.16);
}

.searchable-select-option.is-clear {
    color: #64748b;
    font-style: italic;
}

.searchable-select-empty {
    padding: 0.68rem 0.75rem;
    color: #64748b;
    font-size: 0.9rem;
}

.searchable-select-native {
    position: absolute !important;
    inset: auto auto auto auto !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.modal-glass .modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(24px);
    border: 1px solid #fff;
    border-radius: 1rem;
}

.spinner-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.35);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1040;
    backdrop-filter: blur(2px);
}

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

@media (min-width: 769px) {
    .sidebar.collapsed {
        margin-left: -260px;
    }
}

@media (max-width: 992px) {
    .login-layout {
        grid-template-columns: 1fr;
    }

    .login-hero {
        padding-bottom: 1.4rem;
    }

    .login-hero-desc {
        max-width: 100%;
    }

    .login-hero-foot {
        margin-top: 1.2rem;
    }

    .quick-search-form {
        width: min(260px, 100%);
    }
}

@media (max-width: 768px) {
    .login-shell {
        align-items: stretch;
    }

    .login-layout {
        border-radius: 1rem;
    }

    .login-hero,
    .login-form-panel {
        padding: 1.35rem;
    }

    .login-hero-title {
        font-size: 1.95rem;
    }

    .sidebar {
        position: absolute;
        left: -260px;
        top: 0;
        height: 100%;
        z-index: 1050;
        background: rgba(255, 255, 255, 0.95);
    }

    .sidebar.show {
        left: 0;
    }

    .content-scrollable {
        padding: 1rem;
    }

    .topbar {
        gap: 0.5rem;
    }

    .quick-search-form {
        width: min(180px, 100%);
        min-width: 100px;
    }

    .form-page-card {
        max-width: 100%;
    }

    .dashboard-chart {
        height: 280px;
    }

}

@media (prefers-reduced-motion: reduce) {
    .blob-1 {
        animation: none;
    }

    .table.table-borderless.table-glass tbody tr,
    .table-glass td {
        transition: none;
    }

    .table.table-borderless.table-glass tbody tr:hover {
        transform: none;
        filter: none;
    }
}
