:root {
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 60px;
    --navbar-height: 56px;
    --brand: #2563eb;
    --brand-700: #1d4ed8;
    --brand-50: #eff6ff;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e5e7eb;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--surface-2);
    font-size: 14px;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.auth-page {
    min-height: 100vh;
    background:
        radial-gradient(800px 500px at 10% 10%, rgba(37, 99, 235, 0.25) 0%, rgba(37, 99, 235, 0) 60%),
        radial-gradient(700px 420px at 90% 20%, rgba(16, 185, 129, 0.18) 0%, rgba(16, 185, 129, 0) 55%),
        radial-gradient(900px 520px at 60% 100%, rgba(124, 58, 237, 0.16) 0%, rgba(124, 58, 237, 0) 55%),
        linear-gradient(180deg, #0b1220 0%, #0f172a 40%, #0b1220 100%);
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.auth-hero {
    color: rgba(226, 232, 240, 0.95);
    padding: 28px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
}

.auth-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.95);
    background: rgba(37, 99, 235, 0.18);
    border: 1px solid rgba(37, 99, 235, 0.25);
}

.auth-hero-title {
    margin: 18px 0 6px;
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.auth-hero-subtitle {
    margin: 0 0 18px;
    color: rgba(226, 232, 240, 0.75);
    font-size: 1rem;
}

.auth-hero-points {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.auth-hero-point {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(226, 232, 240, 0.9);
}

.auth-card {
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 35px 90px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    overflow: hidden;
    color: rgba(226, 232, 240, 0.95);
}

.auth-card-header {
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.auth-card-body {
    padding: 22px 20px 20px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(180deg, var(--brand) 0%, var(--brand-700) 100%);
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.18);
}

.auth-brand-name {
    font-weight: 800;
    letter-spacing: -0.2px;
    font-size: 1.1rem;
    color: rgba(226, 232, 240, 0.95);
}

.auth-brand-meta {
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.7);
}

.auth-brand-text {
    line-height: 1.15;
}

.auth-footnote {
    margin-top: 16px;
    display: flex;
    justify-content: center;
}

.auth-card .form-label {
    color: rgba(226, 232, 240, 0.85);
}

.auth-card .form-control,
.auth-card .form-select {
    background: rgba(255, 255, 255, 0.90);
    border-color: rgba(255, 255, 255, 0.22);
}

.auth-card .input-group-text {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.22);
    color: rgba(226, 232, 240, 0.9);
}

.auth-card .alert {
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.wrapper {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

.sidebar {
    width: var(--sidebar-width);
    background: radial-gradient(1000px 600px at 10% 0%, rgba(37, 99, 235, 0.25) 0%, rgba(37, 99, 235, 0) 50%),
                linear-gradient(180deg, #0b1220 0%, #0b1220 100%);
    color: #ecf0f1;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: all 0.3s;
    z-index: 1000;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    padding: 20px 15px;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header h3 {
    font-size: 1.2rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-header strong {
    display: none;
}

.sidebar.collapsed .sidebar-header h3 {
    display: none;
}

.sidebar.collapsed .sidebar-header strong {
    display: block;
    font-size: 1.5rem;
}

.sidebar-subtitle {
    padding: 8px 15px;
    font-size: 0.8rem;
    color: rgba(226, 232, 240, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar ul.components {
    padding: 0;
    margin: 0;
    list-style: none;
}

.sidebar ul li {
    list-style: none;
}

.sidebar ul li a {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s;
    white-space: nowrap;
    overflow: hidden;
    border-left: 3px solid transparent;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    background: rgba(37, 99, 235, 0.10);
    color: #e2e8f0;
    border-left-color: rgba(37, 99, 235, 0.9);
}

.sidebar ul li a i {
    width: 25px;
    font-size: 1rem;
    text-align: center;
    margin-right: 10px;
    color: rgba(226, 232, 240, 0.85);
}

.sidebar.collapsed ul li a span {
    display: none;
}

.sidebar ul li a .fas.fa-chevron-right {
    font-size: 0.7rem;
    margin-left: auto;
}

.sidebar .dropdown-toggle::after {
    display: none;
}

.sidebar ul ul {
    padding-left: 25px;
    background: rgba(255, 255, 255, 0.03);
}

.sidebar.collapsed ul ul {
    display: none;
}

.content {
    flex: 1;
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-width: 0;
    transition: all 0.3s;
}

.sidebar.collapsed ~ .content {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
}

.navbar {
    padding: 0.5rem 1rem;
}

#sidebarCollapse {
    background: transparent;
    border: none;
    color: var(--text);
    border-radius: 10px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#sidebarCollapse:hover {
    background: rgba(2, 6, 23, 0.05);
}

.card {
    border: none;
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    background: var(--surface);
}

.card-header {
    background: var(--surface);
    border-bottom: 1px solid rgba(2, 6, 23, 0.06);
    font-weight: 600;
}

.icon-box {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.table {
    font-size: 0.9rem;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: #6c757d;
}

.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

.btn {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 10px;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
}

.form-control, .form-select {
    border-radius: 12px;
    padding: 0.6rem 0.85rem;
    border-color: var(--border);
    background-color: #fff;
    transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}

.form-control:hover, .form-select:hover {
    border-color: rgba(100, 116, 139, 0.35);
}

.form-control:focus, .form-select:focus {
    border-color: rgba(37, 99, 235, 0.6);
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.15);
}

.form-control:disabled, .form-select:disabled {
    background-color: rgba(2, 6, 23, 0.03);
    color: rgba(15, 23, 42, 0.6);
}

.form-control.is-invalid, .form-select.is-invalid {
    border-color: rgba(220, 38, 38, 0.55);
}

.form-control.is-invalid:focus, .form-select.is-invalid:focus {
    box-shadow: 0 0 0 0.25rem rgba(220, 38, 38, 0.12);
}

.form-control::placeholder {
    color: rgba(100, 116, 139, 0.8);
}

.form-label {
    font-weight: 600;
    color: rgba(15, 23, 42, 0.85);
}

.form-text {
    color: rgba(100, 116, 139, 0.95);
}

.input-group-text {
    border-radius: 12px;
    border-color: var(--border);
    background: var(--surface-2);
    color: rgba(15, 23, 42, 0.7);
}

.input-group .form-control {
    border-left: 0;
}

.input-group .input-group-text + .form-control {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.btn-primary {
    background: linear-gradient(180deg, var(--brand) 0%, var(--brand-700) 100%);
    border-color: rgba(29, 78, 216, 0.6);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.15);
}

.btn-primary:hover {
    background: linear-gradient(180deg, var(--brand-700) 0%, var(--brand-700) 100%);
    border-color: rgba(29, 78, 216, 0.75);
    box-shadow: 0 14px 24px rgba(37, 99, 235, 0.20);
}

.btn-outline-secondary {
    border-color: rgba(2, 6, 23, 0.12);
    color: rgba(2, 6, 23, 0.75);
}

.btn-outline-secondary:hover {
    background: rgba(2, 6, 23, 0.05);
    border-color: rgba(2, 6, 23, 0.16);
    color: rgba(2, 6, 23, 0.85);
}

.badge {
    border-radius: 999px;
}

.login-card {
    border-radius: 12px;
}

.bg-login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.list-group-item {
    border-radius: 12px;
    margin-bottom: 5px;
    border-color: rgba(2, 6, 23, 0.06);
}

.alert {
    border-radius: 8px;
}

.text-muted {
    color: #6c757d !important;
}

.page-item.active .page-link {
    background-color: var(--brand);
    border-color: var(--brand);
}

.page-link {
    color: var(--brand);
}

.page-link:hover {
    color: var(--brand-700);
}

.dropdown-menu {
    border-radius: 14px;
    border-color: rgba(2, 6, 23, 0.08);
    box-shadow: var(--shadow-md);
}

.dropdown-item {
    border-radius: 10px;
}

.dropdown-item:active {
    background-color: rgba(37, 99, 235, 0.12);
    color: var(--text);
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar.collapsed {
        width: var(--sidebar-width);
    }

    .content {
        margin-left: 0;
        width: 100%;
    }

    .sidebar.collapsed ~ .content,
    .sidebar.active ~ .content {
        margin-left: 0;
    }
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar.active + .sidebar-overlay {
    display: block;
}

.doc-sheet {
    background: #fff;
    border: 1px solid rgba(2, 6, 23, 0.12);
    border-radius: 14px;
    padding: 24px;
}

.doc-title {
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 18px;
}

.doc-subtitle {
    margin-top: 6px;
    font-size: 13px;
    color: rgba(15, 23, 42, 0.75);
    line-height: 1.35;
}

.doc-section-title {
    margin-top: 14px;
    margin-bottom: 8px;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.4px;
}

.doc-table {
    border-color: rgba(2, 6, 23, 0.18);
}

.doc-table th {
    background: rgba(2, 6, 23, 0.04);
}

.doc-muted {
    color: rgba(15, 23, 42, 0.7);
    font-size: 12px;
}

.doc-paragraph {
    font-size: 13px;
    line-height: 1.45;
    margin-bottom: 10px;
}

.doc-line {
    font-size: 13px;
    line-height: 1.6;
}

.doc-label {
    font-weight: 700;
    margin-right: 6px;
}

.doc-signbox {
    border: 1px dashed rgba(2, 6, 23, 0.22);
    border-radius: 12px;
    padding: 14px;
    min-height: 90px;
}

.doc-signline {
    border-bottom: 1px solid rgba(2, 6, 23, 0.5);
    height: 46px;
}

.doc-signlabel {
    margin-top: 8px;
    font-size: 12px;
    color: rgba(15, 23, 42, 0.7);
    text-align: center;
}

.doc-footer {
    padding-top: 12px;
    border-top: 1px solid rgba(2, 6, 23, 0.12);
    font-size: 12px;
    color: rgba(15, 23, 42, 0.85);
}

@media print {
    body {
        background: #fff;
    }

    #sidebar,
    .navbar,
    .sidebar-overlay,
    .no-print {
        display: none !important;
    }

    .content {
        margin-left: 0 !important;
    }

    .container-fluid {
        padding: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid rgba(2, 6, 23, 0.12);
    }

    a {
        text-decoration: none !important;
        color: inherit !important;
    }
}
