* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0f5bd3;
    --primary-dark: #0b3d91;
    --primary-soft: #e8f0ff;
    --secondary-color: #0f9f73;
    --danger-color: #dc2626;
    --warning-color: #d97706;
    --accent-color: #06b6d4;
    --page-bg: #eef4fb;
    --surface-bg: rgba(255, 255, 255, 0.9);
    --surface-strong: #ffffff;
    --border-color: rgba(148, 163, 184, 0.22);
    --text-dark: #132238;
    --text-light: #607089;
    --text-muted: #8a97ab;
    --shadow: 0 18px 45px rgba(15, 34, 56, 0.08);
    --shadow-lg: 0 28px 70px rgba(15, 34, 56, 0.15);
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
}

html {
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(15, 91, 211, 0.16), transparent 32%),
        radial-gradient(circle at top right, rgba(6, 182, 212, 0.18), transparent 28%),
        linear-gradient(180deg, #f7fbff 0%, var(--page-bg) 100%);
}

body {
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    background: transparent;
}

a {
    color: inherit;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(6, 182, 212, 0.24), transparent 30%),
        radial-gradient(circle at bottom right, rgba(15, 91, 211, 0.26), transparent 34%),
        linear-gradient(140deg, #071224 0%, #0b3d91 45%, #0e7490 100%);
}

.login-box {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 430px;
    padding: 42px;
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: "";
    position: absolute;
    inset: 0 0 auto auto;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(15, 91, 211, 0.16), transparent 70%);
    pointer-events: none;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
    position: relative;
}

.login-brand-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 18px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    box-shadow: 0 18px 38px rgba(15, 91, 211, 0.3);
}

.login-header h1 {
    font-size: 30px;
    line-height: 1.2;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-light);
    font-size: 15px;
}

.login-footer {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    text-align: center;
}

.login-demo {
    font-size: 13px;
    color: var(--text-light);
    background: var(--primary-soft);
    border: 1px solid rgba(15, 91, 211, 0.12);
    border-radius: 18px;
    padding: 14px 16px;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), transparent 28%),
        linear-gradient(180deg, #071224 0%, #0b3d91 50%, #0f5bd3 100%);
    color: white;
    padding: 26px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Firefox scrollbar */
.sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) rgba(0, 0, 0, 0.1);
}

.sidebar .logo {
    padding: 0 22px 22px;
    margin: 0 16px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.sidebar .logo h2 {
    font-size: 22px;
    margin-bottom: 6px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.sidebar .logo p {
    font-size: 13px;
    opacity: 0.78;
}

.sidebar ul {
    list-style: none;
    padding: 0 14px;
}

.sidebar ul li {
    margin: 0 0 6px;
}

.menu-divider {
    padding: 15px 22px 5px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 700;
}

.sidebar ul li a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    border-radius: 16px;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateX(4px);
}

.sidebar ul li a .icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 18px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    flex-shrink: 0;
}

.main-content {
    margin-left: 280px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.navbar {
    margin: 18px 22px 0;
    padding: 18px 24px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.navbar h2 {
    margin: 0;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar .user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar .user-name {
    font-weight: 700;
    color: var(--text-dark);
}

.navbar .user-role {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.page-content {
    flex: 1;
    padding: 30px 22px 28px;
    overflow-y: auto;
}

.page-header {
    margin-bottom: 28px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
}

.page-header h1 {
    font-size: 34px;
    line-height: 1.15;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-light);
    font-size: 15px;
    max-width: 700px;
}

.page-title {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.page-title i {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(15, 91, 211, 0.14), rgba(6, 182, 212, 0.12));
    box-shadow: inset 0 0 0 1px rgba(15, 91, 211, 0.1);
}

.header-actions,
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.card {
    background: var(--surface-bg);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 20px 22px;
}

.card-header h2,
.card-header h3 {
    font-size: 18px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 22px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.96));
    border-radius: 22px;
    padding: 22px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.85);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: "";
    position: absolute;
    inset: auto -28px -42px auto;
    width: 110px;
    height: 110px;
    border-radius: 999px;
    background: rgba(15, 91, 211, 0.08);
}

.stat-card.success::after {
    background: rgba(15, 159, 115, 0.1);
}

.stat-card.warning::after {
    background: rgba(217, 119, 6, 0.12);
}

.stat-card.danger::after {
    background: rgba(220, 38, 38, 0.12);
}

.stat-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 22px;
    margin-bottom: 18px;
    color: var(--primary-color);
    background: rgba(15, 91, 211, 0.12);
}

.stat-card.success .stat-card-icon {
    color: var(--secondary-color);
    background: rgba(15, 159, 115, 0.12);
}

.stat-card.warning .stat-card-icon {
    color: var(--warning-color);
    background: rgba(217, 119, 6, 0.12);
}

.stat-card.danger .stat-card-icon {
    color: var(--danger-color);
    background: rgba(220, 38, 38, 0.12);
}

.stat-card-value {
    font-size: 34px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 6px 0;
    position: relative;
    z-index: 1;
}

.stat-card-label {
    color: var(--text-light);
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--text-dark);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-dark);
    background: rgba(248, 250, 252, 0.8);
    transition: all 0.25s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(15, 91, 211, 0.35);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(15, 91, 211, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.btn {
    padding: 11px 18px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: none;
}

.btn i {
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #2977f5);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15, 91, 211, 0.24);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.85);
    color: var(--text-dark);
    border: 1px solid rgba(148, 163, 184, 0.24);
}

.btn-secondary:hover {
    background: white;
    border-color: rgba(15, 91, 211, 0.2);
}

.btn-success {
    background: linear-gradient(135deg, var(--secondary-color), #14b884);
    color: white;
}

.btn-success:hover {
    box-shadow: 0 14px 28px rgba(15, 159, 115, 0.24);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #ef4444);
    color: white;
}

.btn-danger:hover {
    box-shadow: 0 14px 28px rgba(220, 38, 38, 0.24);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #f59e0b);
    color: white;
}

.btn-warning:hover {
    box-shadow: 0 14px 28px rgba(217, 119, 6, 0.24);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 12px;
}

.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.table-container {
    overflow-x: auto;
    margin-top: 8px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

table thead {
    background: transparent;
}

table thead th {
    padding: 14px 15px;
    text-align: left;
    font-weight: 700;
    color: var(--text-light);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

table tbody tr {
    transition: all 0.25s ease;
}

table tbody tr:hover {
    background: rgba(232, 240, 255, 0.45);
}

table tbody td {
    padding: 16px 15px;
    color: var(--text-dark);
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    vertical-align: top;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status-badge.active {
    background: #dcfce7;
    color: #166534;
}

.status-badge.inactive {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.completed,
.status-badge.delivered,
.status-badge.reviewed {
    background: #dbeafe;
    color: #0c4a6e;
}

.status-badge.expired {
    background: #fecaca;
    color: #7c2d12;
}

.alert {
    padding: 14px 18px;
    border-radius: 18px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    font-size: 14px;
}

.alert-error {
    background: #fff1f2;
    color: #9f1239;
    border-color: rgba(220, 38, 38, 0.16);
}

.alert-success {
    background: #ecfdf5;
    color: #166534;
    border-color: rgba(15, 159, 115, 0.16);
}

.alert-warning {
    background: #fff7ed;
    color: #9a3412;
    border-color: rgba(217, 119, 6, 0.16);
}

.alert-info {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: rgba(15, 91, 211, 0.16);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    padding: 24px;
    background: rgba(7, 18, 36, 0.58);
    backdrop-filter: blur(6px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 24px;
    width: min(96%, 760px);
    max-height: 86vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.14);
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: rotate(90deg);
}

.modal-body {
    padding: 28px 24px;
}

.modal-footer {
    padding: 12px 0 0;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

.section-title {
    margin: 0 0 15px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.detail-item {
    padding: 16px;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.detail-label {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    font-weight: 700;
}

.detail-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    word-break: break-word;
}

.inline-note {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(15, 159, 115, 0.08);
    border: 1px solid rgba(15, 159, 115, 0.14);
    color: #166534;
}

@media (max-width: 992px) {
    .sidebar {
        width: 84px;
    }

    .sidebar .logo {
        padding: 0 10px 18px;
        margin: 0 10px 18px;
    }

    .sidebar .logo h2,
    .sidebar .logo p,
    .sidebar ul li a span:not(.icon) {
        display: none;
    }

    .sidebar ul {
        padding: 0 10px;
    }

    .sidebar ul li a {
        justify-content: center;
        padding: 12px;
    }

    .main-content {
        margin-left: 84px;
    }
}

@media (max-width: 768px) {
    .navbar {
        margin: 14px 14px 0;
        padding: 16px 18px;
        flex-direction: column;
        align-items: flex-start;
    }

    .page-content {
        padding: 22px 14px 20px;
    }

    .page-header h1 {
        font-size: 28px;
    }

    .stats-grid,
    .form-row,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .login-box {
        padding: 32px 24px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.d-flex {
    display: flex;
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-10 {
    gap: 10px;
}

.hidden {
    display: none;
}

.w-100 {
    width: 100%;
}