:root {
    --bg-ink: #0f172a;
    --bg-deep: #14213d;
    --bg-panel: #17305c;
    --surface: #ffffff;
    --surface-soft: #f6f8fc;
    --surface-muted: #e2e8f0;
    --text-strong: #0f172a;
    --text-muted: #64748b;
    --line-soft: rgba(15, 23, 42, 0.1);
    --primary-color: #17305c;
    --primary-hover: #1e3a6d;
    --primary-soft: rgba(23, 48, 92, 0.1);
    --success-color: #17835d;
    --danger-color: #b44c41;
    --warning-color: #d59c21;
    --info-color: #3273dc;
    --sidebar-width: 280px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --shadow-soft: 0 18px 60px rgba(5, 14, 27, 0.12);
    --shadow-card: 0 14px 34px rgba(8, 17, 31, 0.08);
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    color: var(--text-strong);
    background-color: #f3f6fb;
    background-image: url('/assets/images/background.jpg');
    background-repeat: repeat;
    background-position: top left;
    background-attachment: fixed;
    min-height: 100vh;
}

a {
    color: var(--primary-color);
}

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    width: var(--sidebar-width);
    background: var(--primary-color);
    box-shadow: 16px 0 40px rgba(4, 10, 20, 0.24);
}

.brand-orb {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 1.2rem;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.78);
    padding: 12px 18px;
    margin: 6px 12px;
    border-radius: 14px;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
}

.sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.sidebar .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    font-weight: 600;
}

.sidebar .nav-link i {
    font-size: 1rem;
}

.main-content {
    margin-left: var(--sidebar-width);
    padding: 28px;
    min-height: 100vh;
}

.top-header {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(16px);
    padding: 18px 22px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: var(--shadow-card);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 10px 14px;
    background: var(--primary-soft);
    color: var(--text-strong);
    border: 1px solid rgba(23, 48, 92, 0.12);
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 28px;
}

.auth-card {
    background: rgba(255, 253, 248, 0.96);
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(4, 10, 20, 0.32);
    overflow: hidden;
    max-width: 880px;
    width: 50%;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.auth-card-header {
    background: var(--primary-color);
    color: #ffffff;
    padding: 32px;
    text-align: center;
}

.auth-card-body {
    padding: 32px;
}

.card {
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.96);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.premium-card {
    overflow: hidden;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--line-soft);
    font-weight: 700;
    padding: 18px 22px;
}

.card-body {
    padding: 22px;
}

.page-hero {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    padding: 28px;
    border-radius: 30px;
    color: #fff;
    background: var(--primary-color);
    box-shadow: 0 26px 60px rgba(5, 14, 27, 0.24);
}

.eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 10px;
}

.hero-title {
    margin: 0 0 8px;
    font-size: clamp(1.8rem, 2.2vw, 2.6rem);
    font-weight: 700;
}

.hero-copy {
    max-width: 620px;
    color: rgba(255, 255, 255, 0.78);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.stat-card {
    position: relative;
    border: 0;
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    border-radius: 24px 0 0 24px;
    background: var(--primary-color);
}

.stat-card.success::before {
    background: linear-gradient(180deg, #37b283, #17835d);
}

.stat-card.warning::before {
    background: linear-gradient(180deg, #efc25d, #d59c21);
}

.stat-card.danger::before {
    background: linear-gradient(180deg, #df7a70, #b44c41);
}

.metric-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    background: var(--primary-soft);
    color: var(--primary-color);
    font-size: 1.35rem;
}

.metric-label {
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-strong);
}

.form-label {
    font-weight: 600;
    color: var(--text-strong);
    margin-bottom: 8px;
}

.form-control,
.form-select {
    border-radius: 14px;
    border: 1px solid rgba(19, 37, 58, 0.12);
    padding: 11px 14px;
    background-color: rgba(255, 255, 255, 0.78);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.22rem rgba(23, 48, 92, 0.18);
    background-color: #fff;
}

.btn {
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary-color);
    border: none;
    color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-hover);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(23, 48, 92, 0.28);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: rgba(23, 48, 92, 0.4);
}

.btn-outline-primary:hover {
    background: var(--primary-soft);
    color: var(--primary-color);
    border-color: rgba(23, 48, 92, 0.6);
}

.btn-outline-secondary,
.btn-outline-light,
.btn-outline-danger {
    border-width: 1px;
}

.badge {
    padding: 7px 12px;
    font-weight: 600;
    border-radius: 999px;
}

.badge-soft-light {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.alert {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    padding: 16px 18px;
    box-shadow: var(--shadow-card);
}

.alert-success {
    background: #edf9f2;
    color: #146344;
}

.alert-danger {
    background: #fff1ef;
    color: #8b362d;
}

.alert-info {
    background: #eef4ff;
    color: #284f9b;
}

.alert-warning {
    background: #fff7e7;
    color: #8a6320;
}

.dataTables_wrapper {
    padding: 8px 0 0;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border-radius: 999px;
    border: 1px solid rgba(19, 37, 58, 0.12);
    background: rgba(255, 255, 255, 0.82);
}

table.dataTable thead th,
.table thead th {
    background: #f7f0e2;
    color: #3d4b5d;
    font-weight: 700;
    border-bottom: 1px solid rgba(19, 37, 58, 0.08);
    padding: 15px;
}

table.dataTable tbody td,
.table tbody td {
    padding: 15px;
    border-color: rgba(19, 37, 58, 0.06);
}

table.dataTable tbody tr:hover,
.table-hover tbody tr:hover {
    background: rgba(23, 48, 92, 0.05);
}

.document-preview,
.doc-card,
.empty-state,
.premium-note {
    border-radius: 18px;
}

.document-preview {
    border: 1px dashed rgba(19, 37, 58, 0.18);
    padding: 18px;
    text-align: center;
    background: #faf6ee;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.doc-card {
    background: #ffffff;
    border: 1px solid rgba(19, 37, 58, 0.08);
    padding: 18px;
    height: 100%;
}

.empty-state,
.premium-note {
    background: var(--primary-soft);
    border: 1px solid rgba(23, 48, 92, 0.12);
    color: var(--primary-color);
    padding: 16px 18px;
}

.info-pair {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(19, 37, 58, 0.06);
}

.info-pair span {
    color: var(--text-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.info-pair strong {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-strong);
}

.form-section {
    padding: 22px;
    margin-bottom: 20px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid rgba(19, 37, 58, 0.08);
}

.section-label {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-color);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-title {
    margin-bottom: 16px;
    font-size: 1rem;
    font-weight: 700;
}

.premium-progress {
    height: 10px;
    background: #dbe4f0;
    border-radius: 999px;
}

.status-row:last-child .premium-progress {
    margin-bottom: 0 !important;
}

.cursor-pointer {
    cursor: pointer;
}

.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(8, 17, 31, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.password-toggle {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 40px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
}

@media (max-width: 991px) {
    .sidebar {
        width: 100%;
        position: static;
        min-height: auto;
    }

    .main-content {
        margin-left: 0;
        padding: 18px;
    }

    .page-hero,
    .top-header {
        flex-direction: column;
        align-items: start;
    }
}

@media (max-width: 576px) {
    .auth-card-body,
    .card-body,
    .card-header,
    .page-hero {
        padding: 18px;
    }
}
