:root {
    --bs-body-font-family: 'Inter', sans-serif;
    --bs-body-bg: #f5f6f8;
    --bs-body-color: #253247;
    --bs-primary: #142b45;
    --bs-primary-rgb: 20, 43, 69;
    --bs-secondary: #66758a;
    --bs-secondary-rgb: 102, 117, 138;
    --bs-success: #27836b;
    --bs-success-rgb: 39, 131, 107;
    --bs-danger: #c45c5c;
    --bs-danger-rgb: 196, 92, 92;
    --bs-warning: #c39a4a;
    --bs-warning-rgb: 195, 154, 74;
    --bs-info: #64849b;
    --bs-info-rgb: 100, 132, 155;
    --bs-light: #f5f6f8;
    --bs-dark: #142b45;
    --bs-border-color: #e2e6eb;
    --bs-border-radius: 0.45rem;
    --bs-border-radius-sm: 0.3rem;
    --bs-border-radius-lg: 0.65rem;
    --bs-box-shadow: 0 4px 18px rgba(20, 43, 69, 0.06);
    --bs-box-shadow-sm: 0 2px 8px rgba(20, 43, 69, 0.05);
    --bs-link-color: #27836b;
    --bs-link-hover-color: #1d6653;
}

body {
    font-family: var(--bs-body-font-family);
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-size: 0.94rem;
    line-height: 1.65;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--bs-primary);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.2;
}

h1, h2.display-1, h2.display-2, h2.display-3 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-weight: 400;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 4vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 2.5vw, 2.2rem); }
h3 { font-size: 1.3rem; }

p { color: #59687a; }

a {
    text-decoration: none;
    transition: color 0.2s ease;
}

small, .small {
    letter-spacing: 0.01em;
}

.text-muted {
    color: #8793a2 !important;
}

.bg-white {
    background-color: #fff !important;
}

.bg-light {
    background-color: #f5f6f8 !important;
}

.bg-dark {
    background-color: #142b45 !important;
}

.text-primary {
    color: #142b45 !important;
}

.text-success {
    color: #27836b !important;
}

.text-danger {
    color: #c45c5c !important;
}

.text-warning {
    color: #b58a39 !important;
}

/* Navigation */

.navbar {
    background-color: #fff;
    border-bottom: 1px solid var(--bs-border-color);
}

.navbar-brand {
    color: #142b45;
    font-weight: 800;
    letter-spacing: -0.045em;
}

.navbar .nav-link {
    color: #59687a;
    font-size: 0.86rem;
    font-weight: 600;
    padding: 0.8rem 1rem;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: #27836b;
}

/* Cards and content surfaces */

.card {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius-lg);
    background: #fff;
    box-shadow: var(--bs-box-shadow-sm);
}

.card-header,
.card-footer {
    background-color: #fff;
    border-color: var(--bs-border-color);
}

.card-title {
    color: #142b45;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.card-body {
    color: #59687a;
}

/* Buttons */

.btn {
    font-weight: 600;
    font-size: 0.88rem;
    border-radius: 0.4rem;
    padding: 0.6rem 1rem;
    transition: all 0.2s ease;
}

.btn-primary {
    --bs-btn-bg: #142b45;
    --bs-btn-border-color: #142b45;
    --bs-btn-hover-bg: #203d5d;
    --bs-btn-hover-border-color: #203d5d;
    --bs-btn-active-bg: #102238;
    --bs-btn-active-border-color: #102238;
    --bs-btn-color: #fff;
}

.btn-success {
    --bs-btn-bg: #27836b;
    --bs-btn-border-color: #27836b;
    --bs-btn-hover-bg: #1d6653;
    --bs-btn-hover-border-color: #1d6653;
}

.btn-outline-primary {
    --bs-btn-color: #142b45;
    --bs-btn-border-color: #cbd3dc;
    --bs-btn-hover-bg: #142b45;
    --bs-btn-hover-border-color: #142b45;
}

.btn-link {
    color: #27836b;
    text-decoration: none;
}

/* Tables */

.table {
    --bs-table-color: #39495d;
    --bs-table-bg: transparent;
    --bs-table-border-color: #e9edf1;
    font-size: 0.88rem;
    vertical-align: middle;
}

.table thead th {
    color: #8793a2;
    background-color: #f8f9fb;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border-bottom-width: 1px;
    padding: 0.85rem 0.75rem;
}

.table tbody td {
    padding: 0.85rem 0.75rem;
}

.table-hover > tbody > tr:hover > * {
    --bs-table-bg-state: #f6f8fa;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-bg-type: #fafbfc;
}

/* Badges */

.badge {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.035em;
    padding: 0.4em 0.65em;
    border-radius: 0.25rem;
}

.bg-success {
    background-color: #27836b !important;
}

.bg-danger {
    background-color: #c45c5c !important;
}

.bg-warning {
    background-color: #e9d7ae !important;
    color: #6e5424 !important;
}

/* Forms */

.form-control,
.form-select {
    border-color: #dce2e8;
    border-radius: 0.4rem;
    font-size: 0.9rem;
    padding: 0.65rem 0.85rem;
    color: #253247;
}

.form-control:focus,
.form-select:focus {
    border-color: #64849b;
    box-shadow: 0 0 0 0.2rem rgba(100, 132, 155, 0.15);
}

.form-label {
    color: #39495d;
    font-size: 0.82rem;
    font-weight: 600;
}

/* Dividers and separators */

hr {
    border-color: #e2e6eb;
    opacity: 1;
}

/* Pagination */

.pagination {
    gap: 0.25rem;
}

.page-link {
    color: #142b45;
    border-color: #e2e6eb;
    border-radius: 0.35rem;
    font-size: 0.85rem;
}

.page-item.active .page-link {
    background-color: #142b45;
    border-color: #142b45;
}

/* Dropdowns */

.dropdown-menu {
    border: 1px solid #e2e6eb;
    border-radius: 0.55rem;
    box-shadow: 0 8px 24px rgba(20, 43, 69, 0.1);
    padding: 0.4rem;
}

.dropdown-item {
    color: #39495d;
    font-size: 0.88rem;
    border-radius: 0.3rem;
    padding: 0.55rem 0.75rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: #142b45;
    background-color: #f2f5f7;
}

/* Blockquotes */

blockquote {
    border-left: 3px solid #c39a4a;
    padding-left: 1rem;
    color: #59687a;
}

/* Responsive adjustments */

@media (max-width: 767.98px) {
    body {
        font-size: 0.9rem;
    }

    .navbar .nav-link {
        padding: 0.65rem 0;
    }

    .card-body {
        padding: 1rem;
    }

    .table {
        font-size: 0.82rem;
    }

    .btn {
        font-size: 0.84rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
