:root {
    --bg: #0f172a;
    --bg-soft: #111827;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-strong: rgba(255, 255, 255, 0.9);
    --border: rgba(148, 163, 184, 0.18);
    --text: #0f172a;
    --text-soft: #475569;
    --sidebar-text: rgba(255, 255, 255, 0.88);
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.18);
    --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.12);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

button {
    font: inherit;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 30%),
        radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.18), transparent 30%),
        linear-gradient(135deg, #eff6ff 0%, #f8fafc 45%, #eef2ff 100%);
}

/* Login page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px;
}

.login-container {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 28px;
    padding: 32px;
    box-shadow: var(--shadow-lg);
}

.login-container form {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.login-container h2 {
    text-align: center;
    margin-bottom: 24px;
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
}

.login-btn {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    cursor: pointer;
    transition: all 0.2s ease;
}

.login-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, var(--primary-hover), #2563eb);
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #334155;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
select,
.form-control,
.form-select {
    width: 100%;
    border-radius: 14px !important;
    border: 1px solid #dbe3ee !important;
    background: rgba(255, 255, 255, 0.92) !important;
    padding: 12px 14px !important;
    box-shadow: none !important;
    transition: all 0.2s ease;
}

input:focus,
select:focus,
.form-control:focus,
.form-select:focus {
    border-color: rgba(37, 99, 235, 0.45) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12) !important;
}

.btn {
    border-radius: 14px !important;
    font-weight: 600 !important;
    border: none !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #3b82f6) !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), #2563eb) !important;
}

.btn-success {
    background: linear-gradient(135deg, #16a34a, #22c55e) !important;
}

.btn-warning {
    color: #111827 !important;
    background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
}

.btn-sm {
    padding: 10px 14px !important;
    border-radius: 12px !important;
}

.error,
.alert {
    border-radius: 16px !important;
    border: none !important;
    box-shadow: var(--shadow-md);
}

.alert-success {
    background: rgba(34, 197, 94, 0.12) !important;
    color: #166534 !important;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #991b1b !important;
}

/* Dashboard layout */
.container-fluid {
    padding: 0;
}

.sidebar {
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.96));
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 8px 0 30px rgba(15, 23, 42, 0.12);
    padding: 28px 20px !important;
}

.sidebar h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 28px;
    color: #ffffff;
}

.sidebar .nav-link {
    color: var(--sidebar-text) !important;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff !important;
    transform: translateX(3px);
}

.content {
    padding: 32px !important;
}

.content h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 24px !important;
    color: #0f172a;
}

.card {
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
    background: var(--surface) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-lg) !important;
    overflow: hidden;
    margin-bottom: 24px !important;
}

.card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--border) !important;
    padding: 20px 24px !important;
}

.card-header h5 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.card-body {
    padding: 22px 24px !important;
}

.table-responsive {
    border-radius: 18px;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
    vertical-align: middle;
}

.table thead th {
    background: rgba(248, 250, 252, 0.92);
    color: #334155;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 16px 14px !important;
}

.table tbody td {
    padding: 16px 14px !important;
    border-color: rgba(226, 232, 240, 0.8) !important;
    color: #0f172a;
}

.table-striped>tbody>tr:nth-of-type(odd)>* {
    background-color: rgba(248, 250, 252, 0.72) !important;
}

.table-hover tbody tr:hover>* {
    background-color: rgba(219, 234, 254, 0.45) !important;
}

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

.form-text {
    color: #64748b;
    margin-top: 8px;
}

.modal-content {
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    border-radius: 24px !important;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: var(--shadow-lg);
}

.modal-header,
.modal-footer {
    border-color: var(--border) !important;
}

.modal-header {
    padding: 20px 24px !important;
}

.modal-body {
    padding: 24px !important;
}

.modal-title {
    font-weight: 700;
    color: #0f172a;
}

.btn-close {
    box-shadow: none !important;
}

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

    .content {
        padding: 20px !important;
    }

    .card-header,
    .card-body,
    .modal-body,
    .modal-header {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .content h1 {
        font-size: 1.55rem;
    }
}