.card h1,
.card h2,
.card h3,
.card h4,
.card h5,
.card h6 {
    color: var(--gray-900);
}
:root {
    --primary-50: #e4f8ff;
    --primary-100: #c3efff;
    --primary-500: #0dbdfe;
    --primary-600: #0aa4db;
    --primary-700: #0878a3;
    --accent-500: #ff4d4f;
    --gray-50: #f5f6f8;
    --gray-100: #eceef2;
    --gray-200: #d9dde4;
    --gray-300: #c2c8d3;
    --gray-500: #565f6d;
    --gray-700: #2f3541;
    --gray-900: #121417;
    --success-500: #0f9d58;
    --warning-500: #fbbf24;
    --danger-500: #ff4d4f;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 30px 70px rgba(15, 23, 42, 0.12);
    --max-width: 1280px;
}

:root[data-theme="dark"] {
    --primary-50: #0b2c44;
    --primary-100: #0f3a58;
    --primary-500: #0dbdfe;
    --primary-600: #0aa4db;
    --primary-700: #73d4ff;
    --gray-50: #0f1722;
    --gray-100: #1a2332;
    --gray-200: #243044;
    --gray-300: #314054;
    --gray-500: #9aaec9;
    --gray-700: #d9e3f6;
    --gray-900: #f8fbff;
    --success-500: #34d399;
    --warning-500: #facc6b;
    --danger-500: #ff6b6b;
    --shadow-sm: 0 6px 18px rgba(7, 12, 20, 0.55);
    --shadow-md: 0 24px 55px rgba(7, 12, 20, 0.55);
    --shadow-lg: 0 38px 90px rgba(7, 12, 20, 0.6);
}

* {
    box-sizing: border-box;
}

html {
    font-size: 84%;
}

@media (max-width: 992px) {
    html {
        font-size: 83%;
    }
}

@media (min-width: 1600px) {
    html {
        font-size: 86%;
    }
}

body {
    font-family: 'Manrope', sans-serif;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.08) 0%, rgba(15, 23, 42, 0.03) 70%);
    min-height: 100vh;
    color: var(--gray-900);
    display: flex;
    flex-direction: column;
}

html[data-theme="dark"] body {
    background: radial-gradient(circle at top, rgba(17, 24, 39, 0.95), rgba(11, 18, 27, 1));
    color: #e5edf7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    color: var(--gray-900);
    letter-spacing: -0.015em;
}

h1 {
    font-size: clamp(1.55rem, 2.2vw, 2rem);
}

h2 {
    font-size: clamp(1.35rem, 1.9vw, 1.7rem);
}

h3 {
    font-size: clamp(1.15rem, 1.5vw, 1.4rem);
}

main.container-fluid {
    max-width: var(--max-width);
}

.app-shell {
    flex: 1 1 auto;
    width: 100%;
    padding: 2rem clamp(1rem, 3vw, 2.5rem);
}

@media (max-width: 768px) {
    .app-shell {
        padding: 1.5rem 1rem;
    }
}

.navbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(24px);
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    padding-block: 0.85rem;
    position: relative;
    z-index: 1200;
}

.navbar .container-fluid {
    position: relative;
}

@media (max-width: 991.98px) {
    .navbar .navbar-collapse {
        position: absolute;
        top: calc(100% + 0.5rem);
        left: 0.75rem;
        right: 0.75rem;
        background: rgba(255, 255, 255, 0.97);
        border-radius: var(--radius-xl);
        box-shadow: var(--shadow-lg);
        padding: 1.2rem;
        z-index: 2000;
        animation: nav-fade-in 0.2s ease;
    }

    .navbar .navbar-nav {
        flex-direction: column;
        gap: 0.25rem;
    }

    .navbar .navbar-text {
        margin-top: 1rem;
        display: block;
    }

    .navbar form {
        margin-top: 0.75rem;
        width: 100%;
    }

    .navbar form .btn {
        width: 100%;
    }
}

@keyframes nav-fade-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar .navbar-brand {
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.02em;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.navbar .brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 12px;
    border: 2px solid var(--primary-100);
    background: white;
    padding: 4px;
    box-shadow: var(--shadow-sm);
}

.brand-logo {
    display: inline-block;
}

.navbar-nav {
    gap: 0.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--gray-700);
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: var(--primary-600);
    background: var(--primary-50);
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    color: var(--primary-600);
    background: var(--primary-100);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.15);
}

.navbar .btn-outline-light {
    color: var(--gray-700);
    border-color: rgba(148, 163, 184, 0.4);
    background: white;
    font-weight: 500;
}

.navbar .btn-outline-light:hover {
    background: var(--primary-500);
    border-color: var(--primary-500);
    color: #fff;
}

.user-menu {
    position: relative;
}

.user-menu__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    padding-inline: 1rem;
    font-weight: 600;
    color: var(--gray-700);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.user-menu__toggle:hover,
.user-menu__toggle:focus {
    background: rgba(13, 189, 254, 0.12);
    border-color: rgba(13, 189, 254, 0.6);
    color: var(--primary-700);
}

.user-menu__menu {
    min-width: 220px;
    border: none;
    border-radius: 14px;
    padding: 0.6rem 0;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: var(--shadow-lg);
}

.user-menu__menu .dropdown-header {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray-500);
}

.user-menu__menu .dropdown-header .fw-semibold {
    font-size: 0.85rem;
    letter-spacing: 0;
    color: var(--gray-700);
}

.user-menu__menu .dropdown-divider {
    margin: 0.5rem 0.85rem;
    border-top-color: rgba(148, 163, 184, 0.2);
}

.user-menu__menu .dropdown-item {
    font-size: 0.85rem;
    padding: 0.55rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-menu__menu .dropdown-item:hover,
.user-menu__menu .dropdown-item:focus {
    background: rgba(13, 189, 254, 0.12);
    color: var(--primary-700);
}

.user-menu__menu form {
    margin: 0;
}

.lang-menu__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding-inline: 0.9rem;
    font-weight: 600;
    color: var(--gray-700);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.lang-menu__toggle:hover,
.lang-menu__toggle:focus {
    background: rgba(13, 189, 254, 0.12);
    border-color: rgba(13, 189, 254, 0.6);
    color: var(--primary-700);
}

.lang-menu__menu {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 0.3rem 0;
}

.lang-menu__menu .dropdown-item.active,
.lang-menu__menu .dropdown-item:active {
    background: rgba(13, 189, 254, 0.15);
    color: var(--primary-700);
}

.navbar-light .navbar-toggler {
    border-color: rgba(148, 163, 184, 0.35);
}

.navbar-light .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(38, 63, 99, 0.7)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.page-header,
.d-flex.justify-content-between.align-items-center.mb-4 {
    gap: 1rem;
}

.page-header h1,
.d-flex.justify-content-between.align-items-center.mb-4 h1 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-header p,
.d-flex.justify-content-between.align-items-center.mb-4 p {
    color: var(--gray-500);
}

.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
}

.card .card-header,
.card .card-footer {
    border: none;
    background: transparent;
}

.stat-card {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 1rem;
    padding: 1.4rem 1.6rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(13, 189, 254, 0.16), rgba(13, 189, 254, 0.04));
}

.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    font-weight: 700;
    letter-spacing: 0.05em;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
}

.stat-icon-primary {
    background: linear-gradient(135deg, rgba(13, 189, 254, 0.25), rgba(13, 189, 254, 0.08));
    color: var(--primary-700);
}

.stat-icon-success {
    background: linear-gradient(135deg, rgba(15, 157, 88, 0.22), rgba(15, 157, 88, 0.08));
    color: var(--success-500);
}

.stat-icon-info {
    background: linear-gradient(135deg, rgba(13, 189, 254, 0.25), rgba(13, 189, 254, 0.1));
    color: var(--primary-700);
}

.stat-icon-danger {
    background: linear-gradient(135deg, rgba(229, 57, 53, 0.22), rgba(229, 57, 53, 0.08));
    color: #c62828;
}

.stat-card .badge {
    border-radius: 50px;
    padding: 0.5rem 1rem;
    font-weight: 600;
}

table {
    border-collapse: separate;
    border-spacing: 0;
}

table thead th {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(37, 99, 235, 0.06);
    border-bottom: 2px solid rgba(148, 163, 184, 0.25);
    color: var(--gray-500);
}

table tbody tr {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

table tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: inset 0 0 0 999px rgba(37, 99, 235, 0.04);
}

table tbody td {
    vertical-align: middle;
    color: var(--gray-700);
    font-size: 0.88rem;
}

.table-sticky thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
}

.table-stack tbody td[data-label]::before {
    content: attr(data-label);
    font-weight: 600;
    margin-right: 1rem;
    color: var(--gray-500);
    min-width: 120px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.7rem;
}

.badge {
    border-radius: 999px;
    font-weight: 600;
    padding: 0.45rem 0.9rem;
    letter-spacing: 0.02em;
}

.badge-success,
.badge.bg-success {
    background: rgba(34, 197, 94, 0.15) !important;
    color: var(--success-500);
}

.badge-secondary,
.badge.bg-secondary {
    background: rgba(100, 116, 139, 0.15) !important;
    color: var(--gray-700);
}

.btn {
    --btn-radius: var(--radius-sm);
    border-radius: var(--btn-radius);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.42rem 0.85rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.btn:focus {
    box-shadow: 0 0 0 3px rgba(13, 189, 254, 0.25);
}

.btn-primary {
    background: linear-gradient(140deg, #0dbdfe, #0a8ac4);
    border: 1px solid rgba(13, 189, 254, 0.8);
    color: #fff;
    box-shadow: 0 10px 20px rgba(13, 189, 254, 0.25);
}

.btn-primary:hover,
.btn-primary:focus {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(13, 189, 254, 0.32);
}

.btn-xs {
    padding: 0.35rem 0.65rem;
    font-size: 0.72rem;
}

.btn-success,
.btn-checkout {
    background: linear-gradient(140deg, #0c8c59, #0a6b44);
    border: 1px solid rgba(12, 140, 89, 0.85);
    color: #fff;
    box-shadow: 0 10px 20px rgba(12, 140, 89, 0.22);
}

.btn-success:hover,
.btn-success:focus,
.btn-checkout:hover,
.btn-checkout:focus {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(12, 140, 89, 0.3);
}

.btn-warning,
.btn-edit {
    background: linear-gradient(140deg, #f29900, #d88400);
    border: 1px solid rgba(242, 153, 0, 0.75);
    color: #1a1a1a;
    box-shadow: 0 10px 20px rgba(242, 153, 0, 0.2);
}

.btn-warning:hover,
.btn-warning:focus,
.btn-edit:hover,
.btn-edit:focus {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(242, 153, 0, 0.28);
}

.btn-danger,
.btn-delete {
    background: linear-gradient(140deg, #e53935, #c62828);
    border: 1px solid rgba(229, 57, 53, 0.8);
    color: #fff;
    box-shadow: 0 10px 20px rgba(229, 57, 53, 0.22);
}

.btn-danger:hover,
.btn-danger:focus,
.btn-delete:hover,
.btn-delete:focus {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(229, 57, 53, 0.3);
}

.btn-outline-primary {
    border: 2px solid rgba(13, 189, 254, 0.45);
    color: var(--primary-600);
    background: transparent;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: rgba(13, 189, 254, 0.12);
    color: var(--primary-700);
}

.btn-outline-secondary {
    border: 2px solid rgba(12, 27, 51, 0.15);
    color: var(--gray-700);
    background: rgba(255, 255, 255, 0.85);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    border-color: rgba(12, 27, 51, 0.28);
    background: rgba(12, 27, 51, 0.08);
}

.actions-group form {
    display: inline-flex;
}

.actions-group form .btn {
    width: 100%;
}

.signature-pad {
    position: relative;
    border: 1.5px dashed rgba(12, 27, 51, 0.25);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.75);
    overflow: hidden;
    min-height: 180px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.signature-pad.is-active {
    border-color: rgba(13, 189, 254, 0.6);
    box-shadow: 0 0 0 3px rgba(13, 189, 254, 0.15);
    background: rgba(255, 255, 255, 0.9);
}

.signature-pad canvas {
    width: 100%;
    height: 200px;
    display: block;
    touch-action: none;
}

.signature-pad__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(148, 163, 184, 0.7);
    font-size: 0.85rem;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.signature-pad__placeholder.is-hidden {
    opacity: 0;
}

.signature-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.signature-existing img {
    max-width: 100%;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.form-section,
form.card,
.card.p-4 {
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 2vw, 2.25rem);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-md);
}

.form-label {
    font-weight: 600;
    color: #000000;
}

.form-control,
.form-select {
    border-radius: var(--radius-sm);
    border: 1px solid rgba(148, 163, 184, 0.4);
    padding: 0.55rem 0.75rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(37, 99, 235, 0.75);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.alert {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger-500);
    border: none;
}

.alert-success {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success-500);
    border: none;
}

.avatar-preview {
    width: 160px;
    height: 160px;
    border-radius: 28px;
    border: 3px solid rgba(37, 99, 235, 0.2);
    object-fit: cover;
    box-shadow: var(--shadow-md);
}

.table-responsive {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.96);
    padding: 0.5rem;
    max-height: 70vh;
    overflow: auto;
}

.table-responsive::-webkit-scrollbar {
    height: 6px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.5);
    border-radius: 4px;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
}

.breadcrumb-nav a {
    color: var(--primary-600);
    text-decoration: none;
}

.breadcrumb-nav span {
    color: var(--gray-700);
    font-weight: 600;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(18, 20, 23, 0.35);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1100;
}

.is-loading .loading-overlay {
    display: flex;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    animation: spin 0.9s linear infinite;
}

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

.pagination .page-link {
    border-radius: var(--radius-sm) !important;
    border: none;
    color: var(--gray-700);
    font-weight: 600;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.25);
}

.badge-card {
    width: 320px;
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 2px solid rgba(15, 23, 42, 0.08);
    box-shadow: var(--shadow-sm);
}

.badge-card img {
    width: 120px;
    height: auto;
}

.login-layout {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
    background: linear-gradient(160deg, rgba(37, 99, 235, 0.12), rgba(79, 70, 229, 0.12));
}

.login-card {
    width: min(420px, 100%);
    padding: 3rem 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
}

footer {
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray-500);
}

.camera-preview {
    aspect-ratio: 3 / 2;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px dashed rgba(37, 99, 235, 0.25);
}

.camera-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-preview canvas {
    display: none;
}

.page-hero {
    position: relative;
    border-radius: var(--radius-xl);
    padding: clamp(1.6rem, 2vw, 2.5rem) clamp(1.4rem, 3vw, 2.8rem);
    margin-bottom: 2.5rem;
    background: linear-gradient(135deg, rgba(13, 189, 254, 0.16), rgba(15, 157, 88, 0.08));
    box-shadow: 0 24px 40px rgba(13, 189, 254, 0.12);
    overflow: hidden;
}

.page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(13, 189, 254, 0.35), transparent 55%);
    opacity: 0.45;
    pointer-events: none;
}

.page-hero__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.page-hero__breadcrumb {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 500;
}

.page-hero__breadcrumb a {
    color: var(--primary-700);
    text-decoration: none;
}

.page-hero__breadcrumb span {
    color: var(--gray-600);
}

.page-hero__content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.25rem;
    align-items: flex-end;
}

.page-hero__title {
    font-size: clamp(1.6rem, 2.2vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: #0c1b33;
}

.page-hero__subtitle {
    margin-bottom: 0;
    color: rgba(12, 27, 51, 0.72);
    font-size: 0.9rem;
}

.page-hero__actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

@media (max-width: 575px) {
    .page-hero {
        padding: 1.4rem 1.2rem;
    }

    .page-hero__content {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-hero__actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .page-hero__actions .btn {
        width: 100%;
    }
}

html[data-theme="dark"] .app-shell {
    background: linear-gradient(200deg, rgba(7, 12, 20, 0.9), rgba(14, 22, 36, 0.85));
}

html[data-theme="dark"] .navbar {
    background: rgba(17, 24, 39, 0.94);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 18px 40px rgba(7, 12, 20, 0.55);
}

html[data-theme="dark"] .navbar .nav-link {
    color: rgba(226, 232, 240, 0.85);
}

html[data-theme="dark"] .navbar .nav-link:hover,
html[data-theme="dark"] .navbar .nav-link:focus {
    color: #73d4ff;
    background: rgba(13, 189, 254, 0.12);
}

html[data-theme="dark"] .navbar .nav-link.active {
    background: rgba(13, 189, 254, 0.18);
    color: #ffffff;
}

html[data-theme="dark"] .user-menu__toggle {
    background: rgba(31, 41, 55, 0.85);
    color: rgba(226, 232, 240, 0.9);
    border-color: rgba(148, 163, 184, 0.35);
}

html[data-theme="dark"] .user-menu__toggle:hover,
html[data-theme="dark"] .user-menu__toggle:focus {
    background: rgba(13, 189, 254, 0.22);
    color: #ffffff;
    border-color: rgba(13, 189, 254, 0.6);
}

html[data-theme="dark"] .user-menu__menu {
    background: rgba(15, 23, 42, 0.94);
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.6);
}

html[data-theme="dark"] .user-menu__menu .dropdown-header {
    color: rgba(226, 232, 240, 0.6);
}

html[data-theme="dark"] .user-menu__menu .dropdown-header .fw-semibold {
    color: rgba(248, 250, 252, 0.92);
}

html[data-theme="dark"] .user-menu__menu .dropdown-divider {
    border-top-color: rgba(148, 163, 184, 0.25);
}

html[data-theme="dark"] .user-menu__menu .dropdown-item {
    color: rgba(226, 232, 240, 0.85);
}

html[data-theme="dark"] .user-menu__menu .dropdown-item:hover,
html[data-theme="dark"] .user-menu__menu .dropdown-item:focus {
    background: rgba(13, 189, 254, 0.18);
    color: #ffffff;
}

html[data-theme="dark"] .user-menu__menu .dropdown-item.text-danger {
    color: #fca5a5;
}

html[data-theme="dark"] .user-menu__menu .dropdown-item.text-danger:hover,
html[data-theme="dark"] .user-menu__menu .dropdown-item.text-danger:focus {
    color: #ffffff;
    background: rgba(229, 57, 53, 0.25);
}

html[data-theme="dark"] .lang-menu__toggle {
    background: rgba(31, 41, 55, 0.85);
    color: rgba(226, 232, 240, 0.9);
    border-color: rgba(148, 163, 184, 0.35);
}

html[data-theme="dark"] .lang-menu__toggle:hover,
html[data-theme="dark"] .lang-menu__toggle:focus {
    background: rgba(13, 189, 254, 0.22);
    border-color: rgba(13, 189, 254, 0.6);
    color: #ffffff;
}

html[data-theme="dark"] .lang-menu__menu {
    background: rgba(15, 23, 42, 0.94);
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.6);
}

html[data-theme="dark"] .lang-menu__menu .dropdown-item {
    color: rgba(226, 232, 240, 0.85);
}

html[data-theme="dark"] .lang-menu__menu .dropdown-item.active,
html[data-theme="dark"] .lang-menu__menu .dropdown-item:active {
    background: rgba(13, 189, 254, 0.18);
    color: #ffffff;
}

html[data-theme="dark"] .navbar-text {
    color: rgba(226, 232, 240, 0.8);
}

html[data-theme="dark"] .navbar .btn-outline-light {
    color: rgba(226, 232, 240, 0.85);
    border-color: rgba(226, 232, 240, 0.28);
    background: transparent;
}

html[data-theme="dark"] .navbar .btn-outline-light:hover,
html[data-theme="dark"] .navbar .btn-outline-light:focus {
    background: rgba(226, 232, 240, 0.12);
    border-color: rgba(226, 232, 240, 0.4);
    color: #ffffff;
}

html[data-theme="dark"] .theme-toggle.btn {
    border-color: rgba(13, 189, 254, 0.45);
    color: #9ddcff;
}

html[data-theme="dark"] .theme-toggle.btn:hover,
html[data-theme="dark"] .theme-toggle.btn:focus {
    background: rgba(13, 189, 254, 0.2);
    color: #ffffff;
}

html[data-theme="dark"] .page-hero {
    background: linear-gradient(135deg, rgba(13, 189, 254, 0.14), rgba(12, 140, 89, 0.12));
    color: #e5edf7;
    border: 1px solid rgba(148, 163, 184, 0.12);
}

html[data-theme="dark"] .page-hero__breadcrumb a {
    color: #9ddcff;
}

html[data-theme="dark"] .page-hero__breadcrumb span {
    color: rgba(203, 213, 225, 0.75);
}

html[data-theme="dark"] .page-hero__title {
    color: #f6fbff;
}

html[data-theme="dark"] .page-hero__subtitle {
    color: rgba(226, 232, 240, 0.78);
}

html[data-theme="dark"] .card {
    background: rgba(18, 24, 36, 0.94);
    border: 1px solid rgba(148, 163, 184, 0.12);
    color: #e5edf7;
}

html[data-theme="dark"] .card h1,
html[data-theme="dark"] .card h2,
html[data-theme="dark"] .card h3,
html[data-theme="dark"] .card h4,
html[data-theme="dark"] .card h5,
html[data-theme="dark"] .card h6 {
    color: #f8fbff;
}

html[data-theme="dark"] .alert {
    background: rgba(24, 33, 49, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #e5edf7;
}

html[data-theme="dark"] .alert-warning {
    background: rgba(250, 204, 107, 0.15);
    color: #f8da8b;
}

html[data-theme="dark"] .alert-danger {
    background: rgba(229, 57, 53, 0.2);
    color: #fca5a5;
}

html[data-theme="dark"] table {
    color: #d8e3f8;
}

html[data-theme="dark"] table thead th {
    background: linear-gradient(180deg, rgba(13, 189, 254, 0.35), rgba(15, 23, 42, 0.88));
    color: #f8fbff;
    border-bottom: 1px solid rgba(148, 163, 184, 0.45);
    text-shadow: 0 1px 2px rgba(2, 6, 23, 0.5);
}

html[data-theme="dark"] table tbody td {
    color: #d8e3f8;
}

html[data-theme="dark"] table tbody tr:nth-child(odd) {
    background: rgba(15, 23, 42, 0.38);
}

html[data-theme="dark"] table tbody tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.55);
}

html[data-theme="dark"] table tbody tr:hover {
    box-shadow: inset 0 0 0 999px rgba(13, 189, 254, 0.08);
}

html[data-theme="dark"] .table-empty-state {
    color: #f1f5f9;
    background: rgba(15, 23, 42, 0.65);
    border-radius: 0.75rem;
}

html[data-theme="dark"] .table-colored thead th:nth-child(6n + 1),
html[data-theme="dark"] .table-colored tbody td:nth-child(6n + 1) {
    background: rgba(13, 189, 254, 0.14);
}

html[data-theme="dark"] .table-colored thead th:nth-child(6n + 2),
html[data-theme="dark"] .table-colored tbody td:nth-child(6n + 2) {
    background: rgba(12, 140, 89, 0.12);
}

html[data-theme="dark"] .table-colored thead th:nth-child(6n + 3),
html[data-theme="dark"] .table-colored tbody td:nth-child(6n + 3) {
    background: rgba(242, 153, 0, 0.16);
}

html[data-theme="dark"] .table-colored thead th:nth-child(6n + 4),
html[data-theme="dark"] .table-colored tbody td:nth-child(6n + 4) {
    background: rgba(229, 57, 53, 0.14);
}

html[data-theme="dark"] .table-colored thead th:nth-child(6n + 5),
html[data-theme="dark"] .table-colored tbody td:nth-child(6n + 5) {
    background: rgba(12, 28, 48, 0.16);
}

html[data-theme="dark"] .table-colored thead th:nth-child(6n + 6),
html[data-theme="dark"] .table-colored tbody td:nth-child(6n + 6) {
    background: rgba(13, 189, 254, 0.18);
}

html[data-theme="dark"] .table-row-overdue td {
    box-shadow: inset 0 0 0 999px rgba(229, 57, 53, 0.12);
}

html[data-theme="dark"] .table-row-overdue td:first-child {
    border-left-color: rgba(229, 57, 53, 0.6);
}

html[data-theme="dark"] .badge-overdue {
    background: rgba(229, 57, 53, 0.28);
    color: #ffe0e0;
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
    background: #000000;
    color: #f8fbff;
    border: 1px solid rgba(148, 163, 184, 0.32);
}

html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus {
    border-color: rgba(13, 189, 254, 0.7);
    box-shadow: 0 0 0 3px rgba(13, 189, 254, 0.25);
}

html[data-theme="dark"] .form-control::placeholder {
    color: rgba(148, 163, 184, 0.45);
}

html[data-theme="dark"] .form-label {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(2, 6, 23, 0.45);
}

html[data-theme="dark"] .list-group-item {
    background: transparent;
    border-color: rgba(148, 163, 184, 0.16);
    color: #e5edf7;
}

html[data-theme="dark"] .text-muted {
    color: rgba(226, 232, 240, 0.6) !important;
}

html[data-theme="dark"] .badge-card {
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(18, 24, 36, 0.92);
    color: #e5edf7;
}

html[data-theme="dark"] .login-card {
    background: rgba(18, 26, 38, 0.96);
    color: #e5edf7;
}

html[data-theme="dark"] footer {
    color: rgba(226, 232, 240, 0.65);
}

html[data-theme="dark"] .breadcrumb-nav {
    color: rgba(226, 232, 240, 0.6);
}

html[data-theme="dark"] .breadcrumb-nav a {
    color: #73d4ff;
}

html[data-theme="dark"] .breadcrumb-nav span {
    color: rgba(226, 232, 240, 0.75);
}

@media (max-width: 992px) {
    .navbar .btn-outline-light {
        margin-top: 0.5rem;
    }

    .form-section,
    .card.p-4 {
        padding: 1.5rem;
    }
}

@media (max-width: 575px) {
    .d-flex.gap-2 {
        flex-wrap: wrap;
}

.table-responsive {
        box-shadow: none;
        border-radius: var(--radius-sm);
    }

    .table-stack table,
    .table-stack thead,
    .table-stack tbody,
    .table-stack tr,
    .table-stack td,
    .table-stack th {
        display: block;
        width: 100%;
    }

    .table-stack thead {
        display: none;
    }

    .table-stack tbody tr {
        margin-bottom: 1rem;
        border: 1px solid rgba(148, 163, 184, 0.25);
        border-radius: var(--radius-md);
        padding: 1rem;
        box-shadow: var(--shadow-sm);
    }

    .table-stack tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.45rem 0;
        font-size: 0.9rem;
    }

    .table-stack tbody td.mobile-hidden,
    .table-stack thead th.mobile-hidden {
        display: none;
    }

    .table-stack tbody tr.is-expanded td.mobile-hidden {
        display: flex;
        align-items: center;
    }

    .table-stack tbody tr.is-expanded td.mobile-hidden > * {
        flex: 1;
        text-align: right;
    }

    .table-stack tbody td[data-label]::before {
        font-size: 0.75rem;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--gray-500);
        flex: 1 0 55%;
        text-align: left;
    }

    .table-stack tbody td > * {
        flex: 1;
        text-align: right;
    }

    .row-toggle-btn {
        border-width: 1px;
    }

    .row-toggle-btn[aria-expanded="true"] {
        background: rgba(13, 189, 254, 0.12);
        color: var(--primary-700);
    }

    .actions-group {
        width: 100%;
        margin-top: 0.75rem;
    }

    .actions-group > * {
        flex: 1 1 calc(50% - 0.5rem);
    }

    .actions-group > form {
        display: flex;
    }

    .actions-group .btn {
        width: 100%;
        justify-content: center;
    }
}

.table-colored thead th {
    border-bottom: none;
}

.table-colored thead th:nth-child(6n + 1),
.table-colored tbody td:nth-child(6n + 1) {
    background: rgba(13, 189, 254, 0.08);
}

.table-colored thead th:nth-child(6n + 2),
.table-colored tbody td:nth-child(6n + 2) {
    background: rgba(12, 140, 89, 0.08);
}

.table-colored thead th:nth-child(6n + 3),
.table-colored tbody td:nth-child(6n + 3) {
    background: rgba(242, 153, 0, 0.12);
}

.table-colored thead th:nth-child(6n + 4),
.table-colored tbody td:nth-child(6n + 4) {
    background: rgba(229, 57, 53, 0.1);
}

.table-colored thead th:nth-child(6n + 5),
.table-colored tbody td:nth-child(6n + 5) {
    background: rgba(12, 27, 51, 0.06);
}

.table-colored thead th:nth-child(6n + 6),
.table-colored tbody td:nth-child(6n + 6) {
    background: rgba(13, 189, 254, 0.12);
}

.table-row-overdue td {
    position: relative;
    box-shadow: inset 0 0 0 999px rgba(229, 57, 53, 0.06);
}

.table-row-overdue td:first-child {
    border-left: 4px solid rgba(229, 57, 53, 0.35);
}

.table-stack tbody tr.table-row-overdue {
    border: 1px solid rgba(229, 57, 53, 0.25);
    box-shadow: 0 18px 24px rgba(229, 57, 53, 0.08);
}

.table-stack tbody tr.table-row-overdue td {
    background: rgba(229, 57, 53, 0.04);
}

.badge-overdue {
    background: rgba(229, 57, 53, 0.18);
    color: #c62828;
    border-radius: 999px;
    padding: 0.3rem 0.65rem;
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.brand-alert {
    background: rgba(13, 189, 254, 0.12);
    border-left: 3px solid #0dbdfe;
    color: #031b2b;
}

code.token-display {
    display: inline-flex;
    padding: 0.35rem 0.6rem;
    border-radius: 0.35rem;
    background: rgba(0, 0, 0, 0.82);
    color: #0dbdfe;
    font-size: 0.75rem;
    word-break: break-all;
}

@media print {
    body {
        background: #fff;
    }

    .badge-card {
        width: 320px;
        padding: 24px;
        border: 2px solid #000;
        border-radius: 12px;
        text-align: center;
    }

    .badge-card img {
        max-width: 120px;
        margin-bottom: 16px;
    }

    .no-print {
        display: none !important;
    }
}

