/* ============================================================
   Reusable Material Design primitives for modals, buttons and
   tables used across the Informe wizard (Hermanos Diezmantes,
   Egresos, etc.) and the Configuración module. Shares the same
   color tokens (--md-primary, --md-elevation-*) defined in
   material-navbar.css, which is loaded globally via _Layout.
   ============================================================ */

.md-modal .modal-content {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--md-elevation-8, 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12), 0 5px 5px -3px rgba(0,0,0,.2));
}

.md-modal .modal-header {
    background: var(--md-primary, #0082c6);
    color: #fff;
    border: none;
    padding: 18px 24px;
}

.md-modal .modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: .85;
}

.md-modal .modal-title {
    font-weight: 500;
    font-size: 19px;
    letter-spacing: .1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.md-modal .modal-body {
    padding: 22px 24px;
}

.md-modal .modal-footer {
    border-top: 1px solid rgba(0, 0, 0, .08);
    padding: 14px 24px;
}

/* ---------- Material buttons (contained / outlined / text) ---------- */
.md-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Roboto', 'Open Sans', sans-serif;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    overflow: hidden;
    transition: box-shadow .2s ease, background-color .2s ease, transform .1s ease;
}

.md-btn:active {
    transform: translateY(1px);
}

.md-btn-primary {
    background: var(--md-primary, #0082c6);
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 130, 198, .35);
}

.md-btn-primary:hover {
    background: var(--md-primary-dark, #005a8c);
    color: #fff;
}

.md-btn-success {
    background: #1e8e3e;
    color: #fff;
    box-shadow: 0 2px 4px rgba(30, 142, 62, .35);
}

.md-btn-success:hover {
    background: #166d30;
    color: #fff;
}

.md-btn-outline {
    background: transparent;
    color: var(--md-primary, #0082c6);
    border: 1px solid rgba(0, 130, 198, .4);
}

.md-btn-outline:hover {
    background: rgba(0, 130, 198, .08);
    color: var(--md-primary-dark, #005a8c);
}

.md-btn-text {
    background: transparent;
    color: var(--md-on-surface-muted, #5f6368);
    box-shadow: none;
}

.md-btn-text:hover {
    background: rgba(0, 0, 0, .05);
}

.md-btn-danger-text {
    background: transparent;
    color: #c0392b;
}

.md-btn-danger-text:hover {
    background: rgba(192, 57, 43, .08);
}

.md-btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    color: #c0392b;
}

.md-btn-icon:hover {
    background: rgba(192, 57, 43, .1);
}

/* ---------- Material table ---------- */
.md-table {
    width: 100%;
    border-collapse: collapse;
}

.md-table thead th {
    background: #f5f7fa;
    color: var(--md-on-surface-muted, #5f6368);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid rgba(0, 0, 0, .06);
}

.md-table tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
    vertical-align: middle;
}

.md-table tbody tr:hover {
    background-color: rgba(0, 130, 198, .04);
}

.md-table .form-control,
.md-table .form-select {
    font-size: 13px;
    padding: 6px 10px;
}

/* ---------- Summary / total chip ---------- */
.md-total-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #eef6fc;
    border: 1px solid rgba(0, 130, 198, .25);
    border-radius: 8px;
    padding: 12px 18px;
}

.md-total-chip__label {
    font-size: 13px;
    color: var(--md-on-surface-muted, #5f6368);
    font-weight: 600;
}

.md-total-chip__value {
    font-size: 20px;
    font-weight: 700;
    color: var(--md-primary-dark, #005a8c);
}

/* Empty-state placeholder for tables with no rows yet */
.md-empty-row td {
    text-align: center;
    padding: 28px 12px;
    color: var(--md-on-surface-muted, #5f6368);
    font-size: 13px;
}

/* ---------- Elevated card (Step 3 "Total General", Step 4 Egresos, etc.) ---------- */
.md-elevated-card {
    background: #fff;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--md-elevation-4, 0 2px 4px -1px rgba(0,0,0,.2), 0 4px 5px 0 rgba(0,0,0,.14), 0 1px 10px 0 rgba(0,0,0,.12));
}

.md-elevated-card__header {
    background: var(--md-primary, #0082c6);
    color: #fff;
    font-weight: 500;
    font-size: 15px;
    letter-spacing: .1px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.md-elevated-card__body {
    padding: 20px;
}
