html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 15px;
    }
}

body {
    margin-bottom: 60px;
    background-color: #f6f7fb;
    color: #212529;
}

/* Focus states */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem #fff, 0 0 0 0.25rem rgba(37, 140, 251, 0.25);
}

/* Navbar */
.navbar {
    min-height: 64px;
}

.navbar-brand {
    font-size: 1.1rem;
    letter-spacing: 0.2px;
}

.navbar .nav-link {
    font-weight: 500;
    color: #495057 !important;
}

    .navbar .nav-link:hover {
        color: #111827 !important;
    }

    /* Active navigation */

    .navbar .nav-link.active {
        color: #111827 !important;
        font-weight: 600;
        position: relative;
    }

        .navbar .nav-link.active::after {
            content: "";
            position: absolute;
            left: 8px;
            right: 8px;
            bottom: -10px;
            height: 3px;
            border-radius: 2px;
            background: #0d6efd;
        }

/* Breadcrumbs */
.breadcrumb {
    margin-bottom: 1rem;
    background: transparent;
}

.breadcrumb-item a {
    text-decoration: none;
    color: #6c757d;
}

    .breadcrumb-item a:hover {
        color: #212529;
    }

.breadcrumb-item.active {
    color: #212529;
    font-weight: 600;
}

/* Cards */
.card {
    border-radius: 14px;
}

    .card.shadow-sm {
        box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.05) !important;
    }

.card-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-text {
    line-height: 1.5;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    color: #1f2937;
    font-weight: 700;
}

    h1.mb-1,
    .h4.mb-1,
    .h5.mb-3 {
        letter-spacing: -0.01em;
    }

/* Buttons */
.btn {
    border-radius: 10px;
    font-weight: 500;
}

.btn-sm {
    border-radius: 8px;
}

.btn-group .btn {
    border-radius: 8px;
}

/* Forms */
.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
}

.form-control,
.form-select {
    border-radius: 10px;
    min-height: 42px;
    border-color: #d1d5db;
}

    .form-control::placeholder {
        color: #9ca3af;
    }

.form-text {
    color: #6b7280;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Tables */
.table {
    --bs-table-bg: transparent;
}

    .table thead th {
        font-size: 0.9rem;
        font-weight: 700;
        color: #374151;
        border-bottom-width: 1px;
    }

    .table td,
    .table th {
        vertical-align: middle;
    }

.table-responsive {
    border-radius: 12px;
}

/* Alerts */
.alert {
    border-radius: 12px;
    border: none;
}

/* Badges */
.badge {
    font-weight: 600;
    border-radius: 999px;
    padding: 0.45em 0.7em;
}

/* Footer */
.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    line-height: 60px;
    background-color: #fff;
}

    .footer a {
        text-decoration: none;
        color: #6c757d;
    }

        .footer a:hover {
            color: #212529;
        }

/* Utility polish */
.text-muted {
    color: #6c757d !important;
}

.font-monospace {
    font-size: 0.92rem;
}

/* Empty states */
.text-center.py-5 .fw-semibold {
    font-size: 1.05rem;
}

/* Dropdown menu polish */
.dropdown-menu {
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
}

.dropdown-item {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

/* Responsive spacing */
@media (max-width: 767.98px) {
    .container,
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
    }
}
