/* ════════════════════════════════════════════════════════════════════════
   LAYOUT ADMIN · SIE · Tesorería Municipal de Puebla
   ────────────────────────────────────────────────────────────────────────
   Contiene la base institucional: variables, reset, topbar, navbar,
   footer, botones, toasts, tipografía y el contenedor .content.

   NO INCLUIR aquí estilos de módulos (kanban, kardex, etc).
   Esos van en archivos por módulo (assets/css/<modulo>.css).

   Paleta oficial:
     Vino  #7D2447   Gris  #636569
     Verde #41504D   Beige #DBC6B3
   Secundarios: #671C33  #6F1728  #861943  #C2BA98
   Tipografía: Poppins
   ════════════════════════════════════════════════════════════════════════ */

:root {
    --vino: #7D2447;
    --vino-osc: #671C33;
    --vino-2: #861943;
    --vino-light: #f5eaef;
    --gris: #636569;
    --verde: #41504D;
    --beige: #DBC6B3;
    --beige-2: #C2BA98;

    --bg: #e1dfdc;
    --surface: #ffffff;
    --border: #e7e2dd;
    --text: #2c2a2b;
    --text-soft: #636569;
    --text-faint: #9a9598;

    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(45, 42, 43, .06), 0 4px 16px rgba(45, 42, 43, .05);
    --shadow-lg: 0 10px 40px rgba(45, 42, 43, .16);




    --color-header-footer: #7D2447;
    --color-menu: #41504D;
    --color-contenido: #cdcdcd;
    --color-acento: #cdcdcd;
    /* DBC6B3  */
    --color-subtitulo: #671C33;
    --color-subtitulo-2: #6F1728;
    --color-texto: #000000;
    --hover-color: #fffefe;
    --hover-color-2: #bb0d4f;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-transform: uppercase !important;
}

html,
body {
    min-height: 100%;
}

body {
    font-family: 'Poppins', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
}

body>.main-footer {
    margin-top: auto;
}

/* ─── TOPBAR (franja vino superior) ─────────────────────────────────── */
.topbar {
    background: var(--vino);
    color: #fff;
    padding: 0 28px;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    letter-spacing: .5px;
}

.topbar-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.topbar-badge {
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .25);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.topbar-user {
    font-size: 13px;
    opacity: .95;
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-user .avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--beige);
    color: var(--vino);
    display: grid;
    place-items: center;
    font-weight: 600;
}

/* ─── NAVBAR DINÁMICO (Bootstrap, lo rellena MenuContenido.js) ──────── */
.navbar {
    background: var(--verde) !important;
    padding: 0 28px !important;
    min-height: 46px;
    box-shadow: var(--shadow);
}

.navbar .container-fluid {
    padding: 0;
}

.navbar .navbar-brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #fff !important;
    letter-spacing: .3px;
}

.navbar .nav-link {
    font-family: 'Poppins', sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, .9) !important;
    padding: 13px 14px !important;
    transition: background .15s, color .15s;
}

.navbar .nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, .1);
}

.navbar .dropdown-toggle::after {
    margin-left: 6px;
    opacity: .8;
}

.navbar .dropdown-menu {
    border: none;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    margin-top: 2px;
    min-width: 220px;
}

.navbar .dropdown-item {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: var(--text);
    border-radius: 6px;
    padding: 8px 12px;
    transition: background .12s, color .12s;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    background: #f4eef1;
    color: var(--vino);
}

.navbar .dropdown-menu hr {
    margin: 6px 4px;
    border-color: var(--border);
    opacity: 1;
}

.navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, .3);
    padding: 4px 9px;
}

.navbar .navbar-toggler:focus {
    box-shadow: none;
}

/* ─── CONTENIDO PRINCIPAL ───────────────────────────────────────────── */
.content {
    max-width: 99%;
    width: 100%;
    margin: 0 auto;
    padding: 28px 24px 60px;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.page-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
}

.page-title em {
    font-style: normal;
    color: var(--vino);
}

.page-subtitle {
    color: var(--text-soft);
    font-size: 13.5px;
    margin-top: 2px;
}

.page-actions {
    display: flex;
    gap: 10px;
}

/* ─── BOTONES BASE ──────────────────────────────────────────────────── */
.btn {
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 9px 16px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all .15s ease;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-primary {
    background: var(--vino);
    color: #fff;
}

.btn-primary:hover {
    background: var(--vino-osc);
}

.btn-outline {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--vino);
    color: var(--vino);
}

.btn-ghost {
    background: transparent;
    color: var(--text-soft);
}

.btn-ghost:hover {
    color: var(--vino);
}

.btn-mini {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-soft);
    width: 30px;
    height: 30px;
    border-radius: 7px;
    cursor: pointer;
    margin-left: 4px;
    transition: all .12s;
}

.btn-mini:hover {
    border-color: var(--vino);
    color: var(--vino);
}

.btn-mini--danger:hover {
    border-color: var(--vino-osc);
    color: var(--vino-osc);
    background: #fbeef2;
}











.btn-icon {
    width: 45px;
    /* más compacto */
    height: 40px;
    padding: 6px;
    font-size: 16px;
    /* ajustable según tamaño de ícono */
    text-align: center;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 6px;
    white-space: nowrap;
    border: none;
    margin-right: 6px;
    /* agrega espacio entre botones */
}

.btn-icon i {
    font-size: 18px;
    /* tamaño del ícono */
    pointer-events: none;
    /* evitar que bloquee el clic */
}

/* .btn-icon.primary {
    background-color: var(--color-header-footer);
    color: white;
    border: 1px solid var(--color-header-footer);
} */

.btn-icon.primary:hover {
    background-color: var(--hover-color-2);
    border-color: var(--hover-color-2);
}


.btn {
    min-width: 150px;
    max-width: 100%;
    height: 40px;
    padding: 8px 12px;
    font-size: var(--font-base);
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    vertical-align: middle;
    border-radius: 6px;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--color-header-footer);
    border-color: var(--color-header-footer);
    font-size: var(--font-base);
}

.default-btn {
    background-color: var(--color-header-footer);
    color: white;
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 8px;
    font-size: var(--font-base);
    transition: background-color 0.3s ease;
}

.default-btn:hover {
    background-color: var(--hover-color-2);
}


/* ─── TOAST ─────────────────────────────────────────────────────────── */
#toastContainer {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--surface);
    border-left: 4px solid var(--verde);
    border-radius: var(--radius-sm);
    padding: 12px 18px;
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 240px;
    animation: slideIn .25s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(40px);
        opacity: 0;
    }

    to {
        transform: none;
        opacity: 1;
    }
}

.toast-success {
    border-left-color: var(--verde);
    color: var(--verde);
}

.toast-error {
    border-left-color: var(--vino);
    color: var(--vino);
}

/* ─── FOOTER INSTITUCIONAL ──────────────────────────────────────────── */
.main-footer {
    background: var(--vino);
    color: #fff;
    border-top: 5px solid var(--beige);
    margin-top: 48px;
    padding: 26px 28px;
}

.footer-content {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 180px;
}

.footer-section:first-child {
    align-items: flex-start;
}

.footer-section.footer-right {
    align-items: flex-end;
}

.footer-logo {
    height: 42px;
    width: auto;
    object-fit: contain;
}

.footer-section p {
    font-size: 13px;
    font-weight: 500;
    margin: 0;
    letter-spacing: .3px;
}

.footer-center {
    text-align: center;
}

.footer-center p {
    font-size: 13.5px;
    font-weight: 500;
}

.footer-center small {
    font-size: 11.5px;
    color: var(--beige);
    font-weight: 400;
}

@media (max-width: 720px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-section,
    .footer-section:first-child,
    .footer-section.footer-right {
        align-items: center;
    }
}