@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --hms-primary: #0a4d68;
    --hms-primary-2: #0f766e;
    --hms-accent: #f59e0b;
    --hms-bg: #f4f7fb;
    --hms-sidebar: #071a2f;
    --hms-surface: rgba(255, 255, 255, 0.78);
    --hms-border: rgba(15, 23, 42, 0.08);
    --hms-text: #132238;
    --hms-muted: #667085;
    --hms-shadow: 0 18px 50px rgba(15, 23, 42, 0.10);
}

body {
    background:
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.18) 0%, transparent 35%),
        radial-gradient(circle at bottom left, rgba(245, 158, 11, 0.12) 0%, transparent 30%),
        linear-gradient(180deg, #f8fbff 0%, #f3f7fc 100%);
    color: var(--hms-text);
    font-family: 'Manrope', sans-serif;
    letter-spacing: -0.01em;
}

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-premium {
    background:
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.20) 0%, transparent 38%),
        radial-gradient(circle at bottom left, rgba(245, 158, 11, 0.14) 0%, transparent 35%),
        linear-gradient(180deg, #f9fcff 0%, #edf4fb 100%);
}

.login-wrapper {
    width: min(460px, 95vw);
}

.login-card {
    border-radius: 1.4rem;
    background: rgba(255, 255, 255, 0.82);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: var(--hms-shadow);
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background:
        linear-gradient(180deg, rgba(7, 26, 47, 0.96), rgba(8, 44, 71, 0.95)),
        radial-gradient(circle at top, rgba(245, 158, 11, 0.15), transparent 45%);
    color: #fff;
    padding: 1.15rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand-wrap {
    padding: 0.65rem 0.55rem 1rem;
    margin-bottom: 0.6rem;
}

.sidebar-brand {
    font-weight: 800;
    letter-spacing: 0.02em;
    font-size: 1.2rem;
}

.sidebar-tag {
    margin-top: 0.25rem;
    color: rgba(226, 232, 240, 0.72);
    font-size: 0.8rem;
}

.sidebar .nav-link {
    color: rgba(226, 232, 240, 0.88);
    border-radius: 0.9rem;
    margin-bottom: .4rem;
    padding: 0.82rem 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all .18s ease;
    border: 1px solid transparent;
}

.sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,.10);
    border-color: rgba(255,255,255,.08);
    transform: translateX(2px);
}

.sidebar .nav-link.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.28), rgba(14, 165, 233, 0.20));
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.nav-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255,255,255,.65);
    flex: 0 0 auto;
}

.main-content {
    flex: 1;
    padding: 1.2rem 1.4rem;
}

.topbar {
    background: var(--hms-surface);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border: 1px solid var(--hms-border);
    border-radius: 1rem;
    box-shadow: var(--hms-shadow);
    padding: .9rem 1.1rem;
    margin-bottom: 1rem;
}

.topbar-title {
    font-size: 1rem;
    font-weight: 800;
}

.topbar-subtitle {
    font-size: .78rem;
    color: var(--hms-muted);
}

.user-chip {
    padding: .25rem 0;
}

.user-name {
    color: var(--hms-text);
    font-weight: 700;
}

.role-badge {
    background: linear-gradient(135deg, var(--hms-primary), var(--hms-primary-2));
    color: #fff;
    border-radius: 999px;
    padding: .45rem .7rem;
    font-weight: 700;
}

.btn-ghost-danger {
    border: 1px solid rgba(220, 38, 38, 0.18);
    background: rgba(255, 255, 255, 0.55);
    color: #b91c1c;
    border-radius: 999px;
}

.btn-ghost-danger:hover {
    background: rgba(220, 38, 38, 0.08);
    color: #991b1b;
}

.sidebar-toggle {
    display: none;
    border-radius: 999px;
}

.metric-card {
    border-radius: 1rem;
    background: var(--hms-surface);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    padding: 1rem 1rem .95rem;
    box-shadow: var(--hms-shadow);
    border: 1px solid var(--hms-border);
    height: 100%;
}

.metric-card h6 {
    font-size: .78rem;
    text-transform: uppercase;
    color: var(--hms-muted);
    margin-bottom: .35rem;
    letter-spacing: .08em;
}

.metric-card p {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0;
    color: var(--hms-primary);
}

.card {
    border-radius: 1rem;
    border: 1px solid var(--hms-border);
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.06);
}

.card-header {
    background: transparent !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
    font-weight: 700;
}

.table {
    color: var(--hms-text);
}

.table thead th {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--hms-muted);
    border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: rgba(15, 118, 110, 0.02);
}

.table > :not(caption) > * > * {
    padding: .82rem .85rem;
}

.form-control, .form-select {
    border-radius: .85rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    padding: .72rem .9rem;
    box-shadow: none;
}

.form-control:focus, .form-select:focus {
    border-color: rgba(14, 165, 233, 0.55);
    box-shadow: 0 0 0 .25rem rgba(14, 165, 233, 0.12);
}

.btn {
    border-radius: .85rem;
    font-weight: 700;
}

.btn-primary {
    background: linear-gradient(135deg, var(--hms-primary), var(--hms-primary-2));
    border: none;
    box-shadow: 0 12px 25px rgba(10, 77, 104, 0.20);
}

.btn-outline-primary {
    border-color: rgba(10, 77, 104, 0.24);
    color: var(--hms-primary);
}

.btn-outline-primary:hover {
    background: var(--hms-primary);
    border-color: var(--hms-primary);
}

.btn-outline-success {
    border-color: rgba(15, 118, 110, 0.24);
    color: var(--hms-primary-2);
}

.btn-outline-success:hover {
    background: var(--hms-primary-2);
    border-color: var(--hms-primary-2);
}

.btn-outline-danger {
    border-color: rgba(220, 38, 38, 0.24);
    color: #b91c1c;
}

.btn-outline-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.btn-outline-dark {
    border-color: rgba(15, 23, 42, 0.18);
    color: var(--hms-text);
}

.btn-outline-dark:hover {
    background: #111827;
    border-color: #111827;
}

.alert {
    border-radius: 1rem;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.table-responsive {
    border-radius: 1rem;
    overflow: hidden;
    background: var(--hms-surface);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--hms-border);
}

.page-link {
    border-radius: .7rem !important;
    margin: 0 .12rem;
}

@media (max-width: 991px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 1040;
        transform: translateX(-102%);
        transition: transform .24s ease;
        width: 280px;
        box-shadow: 18px 0 44px rgba(2, 6, 23, 0.28);
    }

    .app-shell.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .main-content {
        padding: .85rem .85rem 1rem;
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    .user-chip {
        gap: .5rem !important;
    }

    .topbar {
        gap: .75rem;
        flex-wrap: wrap;
    }

    .metric-card p {
        font-size: 1.15rem;
    }
}

@media print {
    .sidebar, .topbar, .btn, form {
        display: none !important;
    }

    .main-content {
        padding: 0;
    }
}
