body {
    background-color: #f5f7fb;
    color: #2c3e50;
}
.card {
    border: none;
}
.navbar {
    border-radius: 12px;
    margin: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.navbar-brand {
    font-weight: 700;
}
.page-title {
    letter-spacing: 0.02em;
}
.status-badge {
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}
.table thead th {
    border-bottom: 0;
}
.list-page .table thead th,
.list-page .table tbody td {
    white-space: normal;
}
.list-page .table th,
.list-page .table td {
    word-break: break-word;
}
.table-responsive {
    box-shadow: 0 0.8rem 1.5rem rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}
.file-list-container {
    max-width: 100%;
}
@media (max-width: 1200px) {
    .full-width-table {
        min-width: 860px;
    }
}
.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-warning {
    font-weight: 600;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dbeafe 0%, #f0f9ff 40%, #fffbeb 100%);
    padding: 2rem 1rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    border-radius: 28px;
    overflow: hidden;
    position: relative;
}

.login-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, #7dd3fc, #c4b5fd, #fbbf24);
}

.login-card-inner {
    background: rgba(255, 255, 255, 0.98);
    padding: 2.7rem 2.2rem;
    border-radius: 24px;
    box-shadow: 0 28px 70px rgba(56, 74, 129, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.12);
}

.login-logo {
    font-size: 2.1rem;
    letter-spacing: 0.08em;
    font-weight: 800;
    color: #334155;
}

.login-brand-image {
    display: block;
    width: 100%;
    height: 180px;
    max-width: 220px;
    object-fit: contain;
    overflow: hidden;
    margin: 0 auto 0.75rem;
}

.login-subtitle {
    color: #64748b;
    margin-bottom: 1rem;
}

.login-note {
    color: #475569;
}

.login-note a {
    color: #2563eb;
    text-decoration: none;
}

.login-note a:hover {
    text-decoration: underline;
}

.form-control:focus {
    border-color: #7dd3fc;
    box-shadow: 0 0 0 0.15rem rgba(125, 211, 252, 0.25);
}

.btn-primary {
    border-radius: 50px;
    padding: 0.95rem 1rem;
    background: #60a5fa;
    border-color: #60a5fa;
    box-shadow: 0 12px 24px rgba(96, 165, 250, 0.18);
}

.btn-primary:hover,
.btn-primary:focus {
    background: #3b82f6;
    border-color: #3b82f6;
}

.navbar-nav {
    justify-content: center;
    gap: 0.9rem;
}

.navbar-nav .nav-link,
.navbar .btn-light {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    padding: 0.6rem 1rem;
    transition: background 0.25s ease, transform 0.25s ease;
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff;
}

.navbar-nav .nav-link:hover,
.navbar .btn-light:hover,
.navbar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.35);
    color: #0d172a;
    transform: translateY(-1px);
}

.navbar .btn-light {
    color: #0d172a;
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(255, 255, 255, 0.7);
}

.navbar .btn-light.ms-2 {
    margin-left: 0.7rem !important;
}

.stat-card {
    border: none;
    color: #102a43;
    background: #f8fafc;
    border-radius: 22px;
}

.stat-card .card-body {
    padding: 1.9rem 1.5rem;
}

.metric-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
}

.mini-metric-card {
    position: relative;
    overflow: hidden;
    min-height: 150px;
}

.mini-metric-card .card-body {
    padding: 1.4rem 1.2rem;
}

.metric-icon,
.mini-metric-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.mini-metric-icon {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
    margin-bottom: 0.85rem;
}

.dashboard-page .card.shadow-sm {
    background: rgba(255,255,255,0.88);
    border: 1px solid rgba(255,255,255,0.75);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
    border-radius: 24px;
}

.dashboard-page .card.shadow-sm .card-body {
    position: relative;
    z-index: 1;
}

.dashboard-page .card.shadow-sm::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.15), transparent 60%);
    pointer-events: none;
    border-radius: 24px;
}

.dashboard-panel {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(51, 65, 85, 0.08);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
    border-radius: 24px;
}

.dashboard-panel .card-body {
    padding: 2rem;
}

.stat-card-primary {
    background: linear-gradient(135deg, #93c5fd 0%, #bfdbfe 100%);
}

.stat-card-success {
    background: linear-gradient(135deg, #86efac 0%, #bbf7d0 100%);
}

.stat-card-warning {
    background: linear-gradient(135deg, #fef08a 0%, #fde68a 100%);
}

.stat-card-danger {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
}

.stat-card .card-subtitle {
    color: rgba(15, 23, 42, 0.8);
}

.stat-card .card-title {
    color: #102a43;
}

.dashboard-page {
    background: linear-gradient(135deg, #f8fbff 0%, #e0f2fe 45%, #faf5ff 100%);
    min-height: 100vh;
}

.dashboard-page .container {
    position: relative;
    z-index: 1;
}

.dashboard-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at top left, rgba(96, 165, 250, 0.15), transparent 25%),
                      radial-gradient(circle at bottom right, rgba(192, 132, 252, 0.14), transparent 20%);
    pointer-events: none;
    z-index: 0;
}

.add-page {
    background: linear-gradient(135deg, #f0fdfa 0%, #dcfce7 45%, #effaf0 100%);
    min-height: 100vh;
}

.add-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at top right, rgba(34, 197, 94, 0.14), transparent 20%),
                      radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.12), transparent 18%);
    pointer-events: none;
    z-index: 0;
}

.list-page {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 45%, #f8fafc 100%);
    min-height: 100vh;
}

.list-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at top left, rgba(139, 92, 246, 0.14), transparent 18%),
                      radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.12), transparent 22%);
    pointer-events: none;
    z-index: 0;
}

.edit-page {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 45%, #fef9c3 100%);
    min-height: 100vh;
}

.edit-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at top left, rgba(251, 191, 36, 0.14), transparent 18%),
                      radial-gradient(circle at bottom right, rgba(234, 179, 8, 0.12), transparent 20%);
    pointer-events: none;
    z-index: 0;
}

.scan-page {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 45%, #f5f3ff 100%);
    min-height: 100vh;
}

.scan-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at top right, rgba(167, 139, 250, 0.14), transparent 18%),
                      radial-gradient(circle at bottom left, rgba(192, 132, 252, 0.12), transparent 20%);
    pointer-events: none;
    z-index: 0;
}

.history-page {
    background: linear-gradient(135deg, #fdf2f8 0%, #fed7e2 45%, #fff1f2 100%);
    min-height: 100vh;
}

.history-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at top left, rgba(236, 72, 153, 0.14), transparent 18%),
                      radial-gradient(circle at bottom right, rgba(244, 114, 182, 0.12), transparent 20%);
    pointer-events: none;
    z-index: 0;
}

.view-page {
    background: linear-gradient(135deg, #f0fdfa 0%, #dcfce7 45%, #ecfdf5 100%);
    min-height: 100vh;
}

.view-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at top left, rgba(16, 185, 129, 0.14), transparent 18%),
                      radial-gradient(circle at bottom right, rgba(34, 197, 94, 0.12), transparent 20%);
    pointer-events: none;
    z-index: 0;
}

.profile-page {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 45%, #fef3c7 100%);
    min-height: 100vh;
}

.profile-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at top right, rgba(249, 115, 22, 0.14), transparent 18%),
                      radial-gradient(circle at bottom left, rgba(251, 191, 36, 0.12), transparent 20%);
    pointer-events: none;
    z-index: 0;
}

.users-page,
.add-user-page,
.edit-user-page {
    min-height: 100vh;
}

.users-page {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 45%, #e0f2fe 100%);
}

.users-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at top left, rgba(59, 130, 246, 0.14), transparent 18%),
                      radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.12), transparent 20%);
    pointer-events: none;
    z-index: 0;
}

.add-user-page {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 45%, #bbf7d0 100%);
}

.add-user-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at top left, rgba(34, 197, 94, 0.14), transparent 18%),
                      radial-gradient(circle at bottom right, rgba(5, 150, 105, 0.12), transparent 20%);
    pointer-events: none;
    z-index: 0;
}

.edit-user-page {
    background: linear-gradient(135deg, #fdf2f8 0%, #fbcfe8 45%, #fda4af 100%);
}

.edit-user-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at top right, rgba(236, 72, 153, 0.14), transparent 18%),
                      radial-gradient(circle at bottom left, rgba(244, 114, 182, 0.12), transparent 20%);
    pointer-events: none;
    z-index: 0;
}
