:root {
    --bg-gradient-start: #0f172a;
    --bg-gradient-end: #1e293b;
    --card-radius: 1.1rem;
    --card-border: rgba(148, 163, 184, 0.35);
    --card-bg: rgba(15, 23, 42, 0.96);
    --card-shadow: 0 24px 60px rgba(15, 23, 42, 0.65);
    --accent-primary: #38bdf8;
    --accent-secondary: #818cf8;
    --accent-soft: rgba(56, 189, 248, 0.16);
    --text-muted: #94a3b8;
    --text-soft: #cbd5f5;
    --surface-1: rgba(15, 23, 42, 0.98);
    --surface-2: rgba(15, 23, 42, 0.92);
    --surface-3: rgba(15, 23, 42, 0.86);
    --line-soft: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(148, 163, 184, 0.42);
}

/* Global */
body {
    background: radial-gradient(circle at top left, var(--bg-gradient-start), #020617 55%) fixed;
    color: #e5e7eb;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.container {
    max-width: 1180px;
}

a {
    color: #93c5fd;
}

a:hover {
    color: #bfdbfe;
}

hr {
    border-color: rgba(148, 163, 184, 0.18);
    opacity: 1;
}

/* Navbar */
.navbar {
    background: radial-gradient(circle at top, rgba(15,23,42,0.95), rgba(15,23,42,0.85));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(148,163,184,0.25);
}

.navbar-brand {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #e5e7eb !important;
}

.navbar-brand::before {
    content: "";
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    margin-right: 8px;
    background: radial-gradient(circle, var(--accent-primary), var(--accent-secondary));
    box-shadow: 0 0 14px rgba(56,189,248,0.7);
}

.navbar-nav .nav-link {
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #cbd5f5;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border-radius: 999px;
    padding-inline: 0.9rem;
    transition: all 0.18s ease-out;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.active {
    color: #e5e7eb;
    background: radial-gradient(circle at top left, var(--accent-soft), rgba(129,140,248,0.12));
}

.navbar-text {
    color: var(--text-muted);
}

/* Titles */
.section-title {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e5e7eb;
}

.section-title + .text-muted {
    color: var(--text-muted) !important;
}

/* Cards */
.card,
.card-soft,
.card.shadow-sm {
    border-radius: var(--card-radius);
    border: 1px solid var(--card-border);
    background: radial-gradient(circle at top left, var(--surface-1), var(--surface-2));
    box-shadow: var(--card-shadow);
    color: #e5e7eb;
    overflow: hidden;
}

.card-header,
.card-soft-header,
.modal-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    background: linear-gradient(
        120deg,
        rgba(56,189,248,0.17),
        rgba(129,140,248,0.10),
        rgba(15,23,42,0.55)
    );
    padding: 0.8rem 1.1rem;
}

.card-header .fw-semibold,
.card-soft-header .fw-semibold {
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: #e5e7eb;
}

.card-body,
.card-soft-body {
    padding: 1.1rem 1.25rem 1.3rem;
}

/* Buttons */
.btn,
.btn-soft {
    border-radius: 999px;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
}

.btn-primary:hover,
.btn-primary:focus {
    filter: brightness(1.08);
}

.btn-outline-primary {
    border-color: rgba(129,140,248,0.9);
    color: #c7d2fe;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: rgba(129,140,248,0.15);
    color: #e5e7eb;
}

.btn-outline-secondary {
    border-color: rgba(148,163,184,0.55);
    color: #cbd5e1;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    background: rgba(148,163,184,0.10);
    color: #f8fafc;
}

.table .btn,
.table .btn-soft {
    white-space: nowrap;
}

/* Pills, chips */
.pill-counter {
    border-radius: 999px;
    padding: 0.12rem 0.9rem;
    font-size: 0.7rem;
    border: 1px solid rgba(148, 163, 184, 0.8);
    color: var(--text-muted);
    background: rgba(15,23,42,0.85);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background-color: rgba(148, 163, 184, 0.16);
    font-size: 0.72rem;
    color: var(--text-soft);
}

.chip-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: radial-gradient(circle, var(--accent-primary), var(--accent-secondary));
}

/* List cards (mobile item rows) */
.list-card {
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.20);
    padding: 0.85rem 0.95rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(180deg, rgba(15,23,42,0.96), rgba(15,23,42,0.90));
    box-shadow: 0 12px 32px rgba(15,23,42,0.55);
}

.list-card-title {
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 0.2rem;
}

.list-card-sub {
    font-size: 0.8rem;
    color: #cbd5e1;
    margin-bottom: 0.18rem;
}

.list-card-meta {
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.45;
}

.list-card a {
    color: #f9fafb;
    text-decoration: none;
}

.list-card a:hover {
    text-decoration: underline;
}

/* Tables */
.table-responsive {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(148,163,184,0.14);
    background: rgba(15,23,42,0.82);
}

.table {
    margin-bottom: 0;
    color: #e5e7eb;
}

.table thead {
    background: linear-gradient(120deg, rgba(15,23,42,0.8), rgba(15,23,42,0.7));
}

.table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: linear-gradient(120deg, rgba(15,23,42,0.98), rgba(15,23,42,0.92)) !important;
    border-bottom-color: rgba(148,163,184,0.42) !important;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted) !important;
    white-space: nowrap;
}

.table tbody tr {
    background-color: rgba(15,23,42,0.96);
    border-color: rgba(55,65,81,0.7);
    transition: background-color 0.15s ease;
}

.table tbody tr:hover {
    background: rgba(15,23,42,0.88);
}

.table tbody td {
    border-color: rgba(51,65,85,0.8);
    font-size: 0.84rem;
    padding: 0.8rem 0.72rem;
    vertical-align: middle;
}

.table td.text-end,
.table th.text-end {
    white-space: nowrap;
}

/* FORCE dark tables inside cards */
.card-soft .table,
.card-soft .table > :not(caption) > * > *,
.card .table,
.card .table > :not(caption) > * > * {
    background-color: rgba(15,23,42,0.96) !important;
    color: #e5e7eb !important;
}

.card-soft .table thead > tr > th,
.card .table thead > tr > th {
    background: linear-gradient(120deg, rgba(15,23,42,0.95), rgba(15,23,42,0.85)) !important;
    color: #9ca3af !important;
    border-bottom-color: rgba(148,163,184,0.6) !important;
}

.card-soft .table tbody > tr > *,
.card .table tbody > tr > * {
    border-color: rgba(51,65,85,0.85) !important;
}

.card-soft .table tbody > tr:hover > *,
.card .table tbody > tr:hover > * {
    background-color: rgba(15,23,42,0.9) !important;
}

/* Forms */
.form-control,
.form-select {
    background-color: rgba(15,23,42,0.9);
    border-color: rgba(148,163,184,0.6);
    color: #e5e7eb;
    font-size: 0.9rem;
    border-radius: 12px;
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(15,23,42,0.98);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 1px rgba(56,189,248,0.6);
    color: #f9fafb;
}

.form-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.card-soft .form-control[readonly],
.card-soft .form-control:disabled,
.card-soft .form-select:disabled,
.card .form-control[readonly],
.card .form-control:disabled,
.card .form-select:disabled {
    background-color: rgba(15,23,42,0.92) !important;
    color: #9ca3af !important;
    border-color: rgba(148,163,184,0.6) !important;
    opacity: 1;
}

.card-soft .form-control::placeholder,
.card .form-control::placeholder,
.modal-content .form-control::placeholder {
    color: #cbd5f5 !important;
    opacity: 0.85;
}

.card-soft .form-control::-webkit-input-placeholder,
.card .form-control::-webkit-input-placeholder,
.modal-content .form-control::-webkit-input-placeholder {
    color: #cbd5f5 !important;
    opacity: 0.85;
}

.card-soft .form-control:-ms-input-placeholder,
.card .form-control:-ms-input-placeholder,
.modal-content .form-control:-ms-input-placeholder {
    color: #cbd5f5 !important;
}

.card-soft .form-control::-ms-input-placeholder,
.card .form-control::-ms-input-placeholder,
.modal-content .form-control::-ms-input-placeholder {
    color: #cbd5f5 !important;
}

.card-soft .form-control:-webkit-autofill,
.card-soft .form-control:-webkit-autofill:hover,
.card-soft .form-control:-webkit-autofill:focus,
.card-soft .form-control:-webkit-autofill:active,
.card .form-control:-webkit-autofill,
.card .form-control:-webkit-autofill:hover,
.card .form-control:-webkit-autofill:focus,
.card .form-control:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px rgba(15,23,42,0.96) inset !important;
    box-shadow: 0 0 0 1000px rgba(15,23,42,0.96) inset !important;
    -webkit-text-fill-color: #e5e7eb !important;
    border-color: rgba(148,163,184,0.7) !important;
}

.card-soft input[type="password"]:-webkit-autofill,
.card input[type="password"]:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px rgba(15,23,42,0.96) inset !important;
    -webkit-text-fill-color: #e5e7eb !important;
}

/* Alerts */
.alert {
    border-radius: 0.8rem;
    border: 1px solid transparent;
}

.alert-success {
    background-color: rgba(22,163,74,0.1);
    border-color: rgba(22,163,74,0.3);
    color: #bbf7d0;
}

.alert-danger {
    background-color: rgba(220,38,38,0.08);
    border-color: rgba(220,38,38,0.35);
    color: #fecaca;
}

/* Modal */
.modal-content {
    background: radial-gradient(circle at top left, rgba(15,23,42,0.98), rgba(15,23,42,0.90)) !important;
    border-radius: 1rem;
    border: 1px solid rgba(148,163,184,0.45);
    box-shadow: 0 22px 55px rgba(15,23,42,0.9);
    color: #e5e7eb;
}

.modal-header .modal-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #cbd5f5;
}

.modal-footer {
    border-top: 1px solid rgba(148,163,184,0.35);
    padding: 0.75rem 1rem;
    background: linear-gradient(120deg, rgba(15,23,42,0.96), rgba(15,23,42,0.90));
}

.btn-close {
    filter: invert(1) grayscale(1);
    opacity: 0.6;
}

.btn-close:hover {
    opacity: 1;
}

.modal-content .form-control,
.modal-content .form-select {
    background-color: rgba(15,23,42,0.95);
    border-color: rgba(148,163,184,0.6);
    color: #e5e7eb;
}

.modal-content .form-control:focus,
.modal-content .form-select:focus {
    background-color: rgba(15,23,42,0.98);
    border-color: #38bdf8;
    box-shadow: 0 0 0 1px rgba(56,189,248,0.6);
}

/* Login */
body.bg-light {
    background: radial-gradient(circle at top left, #020617, #0f172a);
}

/* Utilities */
.text-muted {
    color: var(--text-muted) !important;
}

/* Tablet / smaller desktop */
@media (max-width: 992px) {
    .table td .btn,
    .table td .btn-soft {
        margin-bottom: 4px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .container,
    .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }

    .navbar-brand {
        font-size: 1.2rem;
        letter-spacing: 0.08em;
    }

    .section-title {
        font-size: 1rem;
        line-height: 1.3;
    }

    .card,
    .card-soft,
    .list-card,
    .card.shadow-sm {
        border-radius: 16px;
    }

    .card-body,
    .card-soft-body {
        padding: 14px;
    }

    .card-header,
    .card-soft-header,
    .modal-header {
        padding: 12px 14px;
    }

    .form-control,
    .form-select,
    .btn,
    .btn-soft {
        min-height: 48px;
        font-size: 16px;
        border-radius: 12px;
    }

    .form-label {
        font-size: 11px;
        margin-bottom: 6px;
    }

    .btn-sm,
    .btn-soft.btn-sm {
        min-height: 42px;
        padding: 8px 12px;
    }

    .pill-counter {
        font-size: 12px;
        padding: 6px 10px;
    }

    .list-card {
        padding: 14px;
        margin-bottom: 10px;
        border-radius: 16px;
    }

    .list-card-title {
        font-size: 0.96rem;
        line-height: 1.35;
    }

    .list-card-sub,
    .list-card-meta {
        font-size: 0.78rem;
        line-height: 1.45;
    }

    .table-responsive {
        border-radius: 14px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        min-width: 640px;
    }

    .table thead th {
        font-size: 0.68rem;
    }

    .table tbody td {
        padding: 0.72rem 0.62rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .card-body,
    .card-soft-body {
        padding: 12px;
    }

    .card-header,
    .card-soft-header,
    .modal-header {
        padding: 11px 12px;
    }

    .btn,
    .btn-soft {
        width: auto;
        max-width: 100%;
    }
}
