:root {
    --orange-50: #fff6ed;
    --orange-100: #ffe8d6;
    --orange-200: #ffd0ad;
    --orange-500: #ff7a18;
    --orange-600: #ff6a00;
    --orange-700: #e05600;
    --gray-25: #f9fbff;
    --gray-50: #f5f6fa;
    --gray-700: #3c4257;
    --gray-900: #1f1f24;
    --card-radius: 1.125rem;
    --shadow-sm: 0 6px 20px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 24px 45px rgba(255, 110, 0, 0.18);
    --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: #ffffff;
    color: var(--gray-900);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

body.modal-open {
    overflow: hidden;
}

.app-header {
    background: linear-gradient(120deg, var(--orange-600), #ff914d);
    box-shadow: 0 10px 30px rgba(255, 112, 34, 0.35);
    padding: 1.75rem 0;
}

.app-header__container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 2rem;
}

.app-header__brand {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.app-header__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.01em;
}

.app-header__subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
    font-weight: 500;
}

.app-header__nav {
    display: flex;
    gap: 0.5rem;
}

.app-header__nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.app-header__nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: translateY(-1px);
}

.app-header__nav-link--active {
    background: #ffffff;
    color: var(--orange-600);
    border-color: #ffffff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.app-header__nav-icon {
    width: 18px;
    height: 18px;
}

.app-header__user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-header__username {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.app-header__logout {
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--orange-600);
    background: #ffffff;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.app-header__logout:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    color: var(--orange-700);
}

@media (max-width: 991px) {
    .app-header__container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .app-header__brand {
        align-items: center;
    }

    .app-header__nav {
        justify-content: center;
        flex-wrap: wrap;
    }

    .app-header__user {
        justify-content: center;
    }
}

@media (max-width: 991px) {
    .app-header__container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .app-header__brand {
        align-items: center;
    }

    .app-header__nav {
        justify-content: center;
        flex-wrap: wrap;
    }

    .app-header__user {
        justify-content: center;
    }
}

.bg-gradient {
    background: linear-gradient(120deg, var(--orange-600), #ff914d);
    box-shadow: 0 10px 30px rgba(255, 112, 34, 0.35);
}

main.container-fluid {
    max-width: 1180px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.page-heading .h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: 3rem;
}

.page-heading p {
    font-size: 1.05rem;
    color: rgba(60, 66, 87, 0.7);
}
.metric-grid {
    margin-top: 0.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.metric-grid .metric-card {
    height: 100%;
}

.metric-card {
    background: #f4f4f6;
    border-radius: 1.5rem;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    box-shadow: inset 0 -6px 18px rgba(15, 23, 42, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

.metric-card--active {
    background: linear-gradient(135deg, rgba(255, 106, 0, 0.15), rgba(255, 145, 77, 0.08));
    border: 2px solid var(--orange-600);
    box-shadow: 0 8px 24px rgba(255, 106, 0, 0.25);
}

.metric-card--accent {
    background: linear-gradient(135deg, #fff1e0, #ffdab1);
    box-shadow: 0 18px 36px rgba(255, 110, 0, 0.18);
}

.metric-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--orange-700);
}

.metric-subtitle {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(60, 66, 87, 0.65);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.metric-value {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--orange-600);
}

.metric-foot {
    margin-top: auto;
    font-size: 0.85rem;
    color: rgba(60, 66, 87, 0.7);
}

.metric-split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 1.1rem;
}

.metric-split-item {
    background: rgba(255, 255, 255, 0.55);
    border-radius: 1rem;
    padding: 0.7rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.metric-card--accent .metric-split-item {
    background: rgba(255, 255, 255, 0.65);
    box-shadow: inset 0 -4px 12px rgba(255, 106, 0, 0.08);
}

.metric-split-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(60, 66, 87, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.metric-split-value {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--orange-700);
}

.text-orange {
    color: var(--orange-600) !important;
}

.btn {
    border-radius: 0.75rem;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.25s ease;
}

.btn-orange {
    color: #fff;
    background: linear-gradient(135deg, var(--orange-600), var(--orange-700));
    border: none;
    box-shadow: var(--shadow-sm);
}

.btn-orange:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-add {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--orange-600), var(--orange-700));
    border: none;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(255, 106, 0, 0.25);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add svg {
    width: 18px;
    height: 18px;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 106, 0, 0.35);
}

.btn-add:active {
    transform: translateY(0);
}

.btn-outline-orange {
    color: var(--orange-600);
    border: 1px solid rgba(255, 106, 0, 0.4);
    background-color: transparent;
}

.btn-outline-orange:hover {
    color: #fff;
    background: var(--orange-600);
    border-color: var(--orange-600);
    box-shadow: var(--shadow-sm);
}

.table-actions {
    display: flex;
    gap: 0.35rem;
    justify-content: flex-end;
    align-items: center;
}

.btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
}

.btn-icon--edit {
    color: var(--orange-600);
    background: rgba(255, 106, 0, 0.08);
    border-color: rgba(255, 106, 0, 0.15);
}

.btn-icon--edit:hover {
    background: var(--orange-600);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255, 106, 0, 0.25);
}

.btn-icon--delete {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.15);
}

.btn-icon--delete:hover {
    background: #dc2626;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.25);
}

.btn-icon--archive {
    color: #059669;
    background: rgba(5, 150, 105, 0.08);
    border-color: rgba(5, 150, 105, 0.15);
}

.btn-icon--archive:hover {
    background: #059669;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25);
}

.btn-icon--reactivate {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.15);
}

.btn-icon--reactivate:hover {
    background: #2563eb;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.btn-table {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-table--edit {
    color: var(--orange-600);
    background: rgba(255, 106, 0, 0.08);
    border: 1px solid rgba(255, 106, 0, 0.2);
}

.btn-table--edit:hover {
    background: var(--orange-600);
    color: #ffffff;
    border-color: var(--orange-600);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 106, 0, 0.25);
}

.btn-table--delete {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.btn-table--delete:hover {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.card {
    border-radius: var(--card-radius);
    border: none;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.summary-card {
    border: 1px solid rgba(255, 106, 0, 0.12);
    background: linear-gradient(135deg, rgba(255, 243, 232, 0.65), #fff 65%);
    box-shadow: 0 18px 35px rgba(255, 111, 0, 0.12);
}

.summary-card .badge {
    border-radius: 999px;
    padding: 0.45rem 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.summary-card .progress {
    height: 0.55rem;
    background: rgba(255, 106, 0, 0.12);
}

.summary-card .progress-bar {
    background: linear-gradient(120deg, rgba(255, 118, 0, 0.95), rgba(255, 84, 0, 0.95));
}

.content-card {
    padding: 1.75rem;
    background: #f7f8fb;
    border-radius: 1.8rem;
}

.table-modern {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.table-modern thead {
    background: rgba(255, 118, 0, 0.08);
    color: var(--gray-700);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.table-modern thead th {
    padding: 0.85rem 0.75rem;
    font-weight: 600;
}

.table-modern tbody tr {
    background: #ffffff;
    transition: background 0.2s ease, transform 0.2s ease;
}

.table-modern tbody tr:hover {
    background: var(--orange-50);
}

.table-modern tbody td {
    padding: 0.75rem;
    vertical-align: middle;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.table-modern tbody tr:first-child td {
    border-top: none;
}

.badge.bg-orange-soft {
    background: rgba(255, 106, 0, 0.12);
    color: var(--orange-600);
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    font-weight: 600;
}

.badge.bg-danger-subtle {
    background: rgba(220, 38, 38, 0.12) !important;
    color: #b91c1c !important;
}

.badge.bg-success-subtle {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #059669 !important;
}

.badge.bg-warning-subtle {
    background: rgba(245, 158, 11, 0.12) !important;
    color: #d97706 !important;
}

.app-alert {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.app-alert--success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.04));
    border-color: rgba(16, 185, 129, 0.2);
}

.app-alert--danger {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.08), rgba(220, 38, 38, 0.04));
    border-color: rgba(220, 38, 38, 0.2);
}

.app-alert__icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-alert--success .app-alert__icon {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.app-alert--danger .app-alert__icon {
    background: rgba(220, 38, 38, 0.15);
    color: #dc2626;
}

.app-alert__icon svg {
    width: 22px;
    height: 22px;
}

.app-alert__content {
    flex: 1;
    display: flex;
    align-items: center;
}

.app-alert__message {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray-900);
}

.app-alert__close {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(60, 66, 87, 0.06);
    color: rgba(60, 66, 87, 0.65);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.app-alert__close:hover {
    background: rgba(60, 66, 87, 0.12);
    color: rgba(60, 66, 87, 0.85);
}

.app-alert__close svg {
    width: 18px;
    height: 18px;
}

.alert {
    border-radius: 0.9rem;
    border: none;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.form-control,
.form-select {
    border-radius: 0.8rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 0.75rem 1rem;
    background-color: rgba(255, 255, 255, 0.95);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.search-form__control {
    flex: 1 1 320px;
    min-width: 240px;
}

.search-form__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    margin-left: auto;
}

.search-form .form-control {
    border-radius: 999px;
    background: #f2f3f7;
    border: none;
    box-shadow: inset 0 4px 8px rgba(15, 23, 42, 0.05);
}

.search-form .form-label {
    font-weight: 600;
    color: rgba(60, 66, 87, 0.75);
}

.search-form .btn-outline-orange,
.search-form .btn-orange {
    border-radius: 999px;
    padding-inline: 1.8rem;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(255, 106, 0, 0.65);
    box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.15);
}

.form-text {
    color: rgba(60, 66, 87, 0.65);
}

.modal-content {
    border-radius: 1.25rem;
    border: none;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25);
    background: linear-gradient(135deg, #ffffff 0%, #f7f8fc 100%);
    border: 1px solid rgba(15, 23, 42, 0.04);
}

.modal {
    display: none;
}

.modal-header {
    border-bottom: none;
    padding: 1.5rem 1.75rem 1rem;
}

.modal-header__icon {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.modal-header__icon svg {
    width: 24px;
    height: 24px;
}

.modal-header__icon--danger {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
}

.modal-header__icon--primary {
    background: rgba(255, 106, 0, 0.12);
    color: var(--orange-600);
}

.modal-header__text {
    flex: 1;
}

.modal-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.modal-subtitle {
    font-size: 0.85rem;
    color: rgba(60, 66, 87, 0.65);
    margin: 0.25rem 0 0;
}

.modal-content--danger .modal-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.modal-content .modal-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.modal-message {
    font-size: 0.95rem;
    color: rgba(60, 66, 87, 0.85);
    margin: 0;
}

.modal-footer {
    border-top: none;
    padding: 1.25rem 1.75rem 1.5rem;
    gap: 0.75rem;
}

.modal-btn {
    padding: 0.7rem 1.75rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.modal-btn--secondary {
    color: rgba(60, 66, 87, 0.85);
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.12);
}

.modal-btn--secondary:hover {
    background: rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}

.modal-btn--primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange-600), var(--orange-700));
    box-shadow: 0 4px 12px rgba(255, 106, 0, 0.25);
}

.modal-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 106, 0, 0.35);
}

.modal-btn--danger {
    color: #ffffff;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.modal-btn--danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.35);
}

.bg-orange-soft {
    background: rgba(255, 229, 205, 0.45) !important;
}

.modal.modal--visible {
    display: flex !important;
    position: fixed;
    inset: 0;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(16, 24, 40, 0.55);
    backdrop-filter: blur(6px);
    z-index: 1055;
    overflow-y: auto !important;
}

.modal.modal--visible .modal-dialog {
    width: 100%;
    max-width: 720px;
    max-height: calc(100vh - 3rem);
    display: flex;
    flex-direction: column;
    margin: auto;
    overflow: visible;
}

.modal.modal--visible .modal-dialog.modal-dialog-scrollable {
    max-height: calc(100vh - 3rem);
}

.modal.modal--visible .modal-dialog.modal-dialog-scrollable .modal-content {
    max-height: calc(100vh - 3rem);
    display: flex;
    flex-direction: column;
}

.modal.modal--visible .modal-dialog.modal-dialog-scrollable .modal-body {
    overflow-y: auto;
    flex: 1 1 auto;
}

.modal.modal--visible .modal-content {
    display: flex;
    flex-direction: column;
    animation: modalIn 0.24s ease;
    max-height: none;
}

.modal .modal-body {
    padding: 1.5rem 1.75rem 1.5rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(247, 248, 252, 0.96) 100%);
    overflow-y: auto;
    flex: 1 1 auto;
    max-height: calc(90vh - 200px);
}

.modal .modal-header {
    flex-shrink: 0;
}

.modal .modal-footer {
    flex-shrink: 0;
}

.modal-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem 1.5rem;
}

.modal-form-grid__item {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.modal-form-grid__item--full {
    grid-column: 1 / -1;
}

.modal .form-control,
.modal .form-select,
.modal textarea {
    border-radius: 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(135deg, rgba(245, 247, 252, 0.92), #ffffff);
    box-shadow: inset 0 6px 14px rgba(15, 23, 42, 0.05);
}

.modal .form-control::placeholder,
.modal textarea::placeholder {
    color: rgba(60, 66, 87, 0.55);
}

.modal .form-control:focus,
.modal .form-select:focus,
.modal textarea:focus {
    border-color: rgba(255, 106, 0, 0.7);
    box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.18);
}

.modal .form-select {
    min-height: 210px;
}

.modal .form-select-compact {
    min-height: 46px;
    max-height: 46px;
}

.modal .form-label {
    font-weight: 600;
    color: rgba(60, 66, 87, 0.85);
}

.modal textarea {
    resize: vertical;
    min-height: 130px;
}

.modal .btn-outline-secondary {
    border-radius: 999px;
    padding-inline: 1.4rem;
}

.modal .btn-orange {
    min-width: 130px;
}

.modal .form-hint {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(60, 66, 87, 0.65);
}

@keyframes modalIn {
    from {
        transform: translateY(18px) scale(0.98);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.search-form .btn-outline-orange {
    padding-inline: 1.75rem;
}

.search-form .btn-link {
    padding: 0;
    font-weight: 600;
    color: var(--orange-600);
}

.search-form .btn-link:hover {
    color: var(--orange-700);
    text-decoration: none;
}

.table-responsive {
    border-radius: 1.5rem;
    background: #f4f4f6;
    box-shadow: inset 0 -6px 14px rgba(15, 23, 42, 0.05);
    padding: 1.2rem 1rem;
}

.table-responsive::-webkit-scrollbar {
    height: 10px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.12);
    border-radius: 999px;
}

.flat-link {
    color: var(--gray-700);
    font-weight: 600;
}

.flat-link:hover {
    color: var(--orange-600);
}

@media (max-width: 991px) {
    main.container-fluid {
        padding: 2.5rem 1.25rem 3rem;
    }

    .card {
        box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12);
    }
}

@media (max-width: 575px) {
    .summary-card .badge {
        font-size: 0.72rem;
    }

    .table-responsive {
        padding-inline: 0.25rem;
    }
}

/* ========================================
   LOGIN PAGE
   ======================================== */

.login-page {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 460px;
}

.login-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.15);
    padding: 3rem 2.5rem;
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--orange-600), var(--orange-700));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(255, 106, 0, 0.3);
}

.login-icon svg {
    width: 40px;
    height: 40px;
    color: #ffffff;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}

.login-subtitle {
    font-size: 0.95rem;
    color: rgba(60, 66, 87, 0.6);
    margin: 0;
}

.login-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.login-alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.login-alert--danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.login-alert--success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.login-form {
    margin-bottom: 2rem;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form .form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.login-form .form-label svg {
    width: 18px;
    height: 18px;
    color: var(--orange-600);
}

.login-form .form-control {
    width: 100%;
    padding: 0.875rem 1.125rem;
    border: 2px solid rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: #ffffff;
}

.login-form .form-control:focus {
    outline: none;
    border-color: var(--orange-600);
    box-shadow: 0 0 0 4px rgba(255, 106, 0, 0.1);
}

.login-form .form-control::placeholder {
    color: rgba(60, 66, 87, 0.4);
}

.btn-login {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--orange-600), var(--orange-700));
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(255, 106, 0, 0.3);
}

.btn-login svg {
    width: 20px;
    height: 20px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 106, 0, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.login-footer p {
    font-size: 0.85rem;
    color: rgba(60, 66, 87, 0.5);
    margin: 0;
}

.login-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.login-background__circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 106, 0, 0.15), rgba(255, 145, 77, 0.08));
    animation: float 20s infinite ease-in-out;
}

.login-background__circle--1 {
    width: 300px;
    height: 300px;
    top: -150px;
    left: -150px;
    animation-delay: 0s;
}

.login-background__circle--2 {
    width: 400px;
    height: 400px;
    bottom: -200px;
    right: -200px;
    animation-delay: 5s;
}

.login-background__circle--3 {
    width: 250px;
    height: 250px;
    top: 50%;
    right: -125px;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-30px) scale(1.05);
    }
}

@media (max-width: 575px) {
    .login-page {
        padding: 1.5rem;
    }

    .login-card {
        padding: 2.5rem 1.75rem;
    }

    .login-title {
        font-size: 1.5rem;
    }

    .login-icon {
        width: 70px;
        height: 70px;
    }

    .login-icon svg {
        width: 35px;
        height: 35px;
    }
}

/* Alert de clientes vencidos */

/* ========================================
   CORREÇÃO SCROLL MODAL BOOTSTRAP
   ======================================== */
.modal {
    overflow-y: auto !important;
}

.modal-dialog {
    margin: 1.75rem auto;
}

.modal.show .modal-dialog {
    transform: none !important;
}

.modal-dialog-scrollable {
    height: calc(100% - 3.5rem);
}

.modal-dialog-scrollable .modal-content {
    max-height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-dialog-scrollable .modal-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
}

/* Garante que o body do modal possa rolar */
body.modal-open {
    overflow: hidden;
    padding-right: 0 !important;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    background-color: #000;
}

.modal-backdrop.show {
    opacity: 0.5;
}
.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe5a0 100%);
    border: 2px solid #ffc107;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.15);
    font-size: 0.95rem;
}

.alert-warning strong {
    color: #997404;
}

.alert-warning .alert-link {
    color: #cc8500;
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.alert-warning .alert-link:hover {
    color: #b37700;
}

