:root {
    --brand: #6e1d32;
    --brand-dark: #541626;
    --brand-soft: rgba(110, 29, 50, 0.12);
    --gold: #c4a15a;
    --gold-soft: #f3e6c4;
    --ink: #2a1218;
    --muted: #6d5d58;
    --cream: #f6f1ea;
    --line: #eadfd4;
    --card: #ffffff;
}

.content-wrapper {
    background: var(--cream) !important;
}

.main-header.navbar {
    border-bottom: 3px solid var(--gold);
}

.page-header-title,
.content-header h1 {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
}

.content-header {
    padding: 1rem 0.25rem 0.35rem;
}

.content-header .breadcrumb {
    background: transparent;
    margin-bottom: 0;
}

.card-custom {
    background: var(--card);
    border-radius: 12px;
    border: 1px solid var(--line);
    box-shadow: 0 4px 12px rgba(42, 18, 24, 0.04);
    padding: 24px;
}

.listing-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.listing-toolbar h2 {
    margin: 0;
}

.btn.btn-brand,
.btn-primary {
    background-color: var(--brand);
    border-color: var(--brand);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn.btn-brand {
    padding: 10px 20px;
    border: none;
}

.btn.btn-brand:hover,
.btn.btn-brand:focus,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active {
    background-color: var(--brand-dark);
    border-color: var(--brand-dark);
    color: #fff;
    box-shadow: 0 4px 10px rgba(110, 29, 50, 0.25);
}

.btn.btn-outline-brand {
    color: var(--brand) !important;
    background-color: transparent !important;
    border: 1.5px solid var(--brand) !important;
    border-radius: 8px;
    font-weight: 600;
    padding: 6px 14px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn.btn-outline-brand:hover,
.btn.btn-outline-brand:focus {
    background-color: var(--brand) !important;
    color: #fff !important;
}

.btn.btn-outline-brand:disabled,
.btn.btn-outline-brand.disabled {
    opacity: 0.45;
}

.btn.rounded-pill {
    border-radius: 8px !important;
}

.info-box.info-box-outline-brand,
a .info-box-outline-brand {
    background-color: #fff !important;
    border: 1.5px solid var(--brand) !important;
    border-radius: 8px;
    box-shadow: none !important;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.info-box-outline-brand .info-box-icon,
.info-box-outline-brand .info-box-icon i,
a .info-box-outline-brand .info-box-icon,
a .info-box-outline-brand .info-box-icon i {
    background-color: transparent !important;
    color: var(--brand) !important;
    box-shadow: none !important;
}

.info-box-outline-brand .info-box-text,
.info-box-outline-brand .info-box-number,
a .info-box-outline-brand .info-box-text,
a .info-box-outline-brand .info-box-number {
    color: var(--brand) !important;
    font-weight: 600;
}

a:hover .info-box-outline-brand,
.info-box-outline-brand:hover {
    background-color: var(--brand) !important;
}

a:hover .info-box-outline-brand .info-box-icon,
a:hover .info-box-outline-brand .info-box-icon i,
a:hover .info-box-outline-brand .info-box-text,
a:hover .info-box-outline-brand .info-box-number,
.info-box-outline-brand:hover .info-box-icon,
.info-box-outline-brand:hover .info-box-icon i,
.info-box-outline-brand:hover .info-box-text,
.info-box-outline-brand:hover .info-box-number {
    color: #fff !important;
}

.table-custom thead th,
table.table thead th {
    background-color: #fbf7f2;
    color: #5c463f;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px solid var(--line);
    white-space: nowrap;
}

.table-custom tbody td,
table.table tbody td {
    vertical-align: middle;
    font-size: 0.95rem;
    color: #3b2a2e;
}

.table-custom,
table#tabla {
    background: #fff;
}

.ficha-table th {
    width: 34%;
    color: var(--muted);
    font-weight: 600;
    background: #fbf7f2;
}

.ficha-table td {
    color: var(--ink);
}

.dt-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dt-buttons .btn {
    border-radius: 8px !important;
    margin: 0;
    font-weight: 600;
    padding: 6px 14px;
}

.form-card {
    background: var(--card);
    border-radius: 12px;
    border: 1px solid var(--line);
    box-shadow: 0 4px 12px rgba(42, 18, 24, 0.04);
    padding: 24px;
}

.form-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
    border-bottom: 2px solid #f3ebe3;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

.form-section-title i,
.content-header h1 i {
    color: var(--gold);
}

.form-card .form-control,
.form-card .custom-select,
.form-card select.form-control,
.form-control,
.custom-select,
select.form-control {
    border-radius: 8px !important;
    border: 1.5px solid #d9cfc6 !important;
    min-height: 42px;
}

.form-card .form-control:focus,
.form-card .custom-select:focus,
.form-control:focus,
.custom-select:focus {
    border-color: var(--brand) !important;
    box-shadow: 0 0 0 3px var(--brand-soft) !important;
}

.form-card label,
.form-card .form-label,
.form-group > label {
    font-weight: 600;
    color: var(--ink);
    font-size: 0.85rem;
}

.btn-submit-custom,
button[type="submit"].btn-primary {
    background-color: var(--brand);
    color: #fff;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 8px;
    border: none;
}

.btn-submit-custom:hover,
button[type="submit"].btn-primary:hover {
    background-color: var(--brand-dark);
    color: #fff;
    box-shadow: 0 4px 12px rgba(110, 29, 50, 0.25);
}

.btn.btn-light-success,
a.btn.btn-light-success {
    background-color: #e8f5e9 !important;
    color: #2e7d32 !important;
    border: 1.5px solid #a5d6a7 !important;
}

.btn.btn-light-danger,
a.btn.btn-light-danger {
    background-color: #fdecea !important;
    color: #c62828 !important;
    border: 1.5px solid #ef9a9a !important;
}

.ficha-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.ficha-actions .btn {
    margin: 0;
}

.badge-brand {
    background: var(--gold-soft);
    color: var(--brand);
    border-radius: 999px;
    font-weight: 700;
    padding: 0.35rem 0.7rem;
}

@media (max-width: 767.98px) {
    .card-custom,
    .form-card {
        padding: 14px;
        border-radius: 10px;
    }

    .page-header-title,
    .content-header h1 {
        font-size: 1.35rem;
    }

    .listing-toolbar {
        align-items: stretch;
    }

    .listing-toolbar .btn,
    .ficha-actions .btn {
        width: 100%;
        text-align: center;
    }

    .content-header .breadcrumb {
        float: none !important;
        padding-left: 0;
        justify-content: flex-start;
    }

    .table-custom thead th,
    table.table thead th,
    .table-custom tbody td,
    table.table tbody td {
        font-size: 0.82rem;
    }

    .dataTables_wrapper .dt-buttons .btn {
        margin-bottom: 0.35rem;
    }

    .ficha-table th,
    .ficha-table td {
        display: block;
        width: 100%;
    }

    .ficha-table th {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .form-inline,
    .form-inline .form-group,
    .form-inline .form-control,
    .alert .d-flex {
        display: block !important;
        width: 100%;
    }

    .card.shadow-sm {
        max-width: none !important;
    }
}
