:root {
    --red: #ed1c24;
    --red-dark: #b80f16;
    --black: #0b0b0f;
    --white: #ffffff;
    --gray: #f5f6fa;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
}

* {
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #f7f8fb 0%, #eef0f5 100%);
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--text);
}

/* Navbar */
.navbar {
    background: var(--black) !important;
    padding: 14px 24px;
    box-shadow: 0 8px 25px rgba(0,0,0,.12);
}

.navbar-brand {
    font-weight: 800;
    letter-spacing: .4px;
    color: var(--white) !important;
}

.navbar-brand::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 28px;
    background: var(--red);
    border-radius: 20px;
    margin-right: 10px;
    vertical-align: middle;
}

/* Main container */
.container,
.container-fluid {
    max-width: 1320px;
}

/* Cards */
.card {
    border: 1px solid rgba(229,231,235,.9) !important;
    border-radius: 20px;
    overflow: hidden;
    background: var(--white);
    box-shadow: 0 12px 35px rgba(15, 23, 42, .08) !important;
}

.card-header {
    background: var(--white) !important;
    color: var(--black) !important;
    border-bottom: 1px solid var(--border);
    padding: 22px 26px;
}

.card-header h4,
.card-header h5 {
    font-weight: 800;
    margin: 0;
}

.card-body {
    padding: 26px;
}

/* Form */
.form-label {
    font-size: 13px;
    font-weight: 800;
    color: var(--black);
    margin-bottom: 8px;
}

.form-control,
.form-select {
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background-color: #fbfbfd;
    padding: 12px 15px;
    font-size: 15px;
}

.form-control:focus,
.form-select:focus {
    background: var(--white);
    border-color: var(--red);
    box-shadow: 0 0 0 4px rgba(237, 28, 36, .12);
}

/* Conditional fields */
.border.rounded {
    border: 1px solid rgba(237, 28, 36, .18) !important;
    background: linear-gradient(180deg, #fff 0%, #fff7f7 100%);
    border-left: 5px solid var(--red) !important;
    border-radius: 18px !important;
}

.border.rounded h6 {
    color: var(--red);
    font-weight: 900;
    margin-bottom: 18px;
}

/* Buttons */
.btn {
    min-height: 42px;
    border-radius: 13px;
    font-weight: 800;
    padding-left: 18px;
    padding-right: 18px;
}

.btn-dark {
    background: var(--black);
    border-color: var(--black);
}

.btn-dark:hover {
    background: var(--red);
    border-color: var(--red);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--red);
    border-color: var(--red);
}

.btn-danger:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
}

.btn-secondary {
    background: #6b7280;
    border-color: #6b7280;
}

.btn-outline-light {
    border-color: rgba(255,255,255,.35);
    color: var(--white);
}

.btn-outline-light:hover {
    background: var(--red);
    border-color: var(--red);
}

/* Dashboard cards */
.row.g-3 .card {
    position: relative;
    transition: .2s ease;
}

.row.g-3 .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, .12) !important;
}

.row.g-3 .card::before {
    content: "";
    position: absolute;
    top: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
    background: rgba(237, 28, 36, .10);
    border-radius: 14px;
}

.card-body small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .6px;
    text-transform: uppercase;
}

.card-body h3 {
    color: var(--black);
    font-size: 34px;
    font-weight: 900;
    margin-top: 8px;
    margin-bottom: 0;
}

/* Page title */
h3.mb-4,
h3 {
    font-weight: 900;
    color: var(--black);
}

/* Table */
.table-responsive {
    border-radius: 0 0 20px 20px;
}

.table {
    margin: 0;
}

.table thead th {
    background: #fafafa;
    color: var(--black);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .4px;
    border-bottom: 1px solid var(--border);
    padding: 15px;
}

.table tbody td {
    padding: 15px;
    vertical-align: middle;
    color: #374151;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: #fcfcfd;
}

.table tbody tr:hover td {
    background: #fff5f5;
}

/* Badge */
.badge {
    border-radius: 999px;
    padding: 7px 11px;
    font-weight: 900;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 16px;
    font-weight: 700;
}

/* Links */
a {
    color: var(--red);
    text-decoration: none;
    font-weight: 800;
}

a:hover {
    color: var(--black);
}

/* Login page improvement */
body.bg-dark {
    background:
        radial-gradient(circle at top left, rgba(237,28,36,.28), transparent 35%),
        linear-gradient(135deg, #050505 0%, #15151b 100%) !important;
}

body.bg-dark .card {
    margin-top: 70px;
}

/* Mobile */
@media (max-width: 768px) {
    .card-body {
        padding: 20px;
    }

    .navbar {
        padding: 12px 16px;
    }

    .card-body h3 {
        font-size: 28px;
    }
}