/* ============================================================
   Monte Alto Aljarafe
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;0,14..32,800&display=swap');

:root {
    --bg:           #F4F2EE;
    --surface:      #FFFFFF;
    --surface-2:    #EEECe8;
    --border:       #DDD9D3;
    --border-hover: #B8B3AC;

    --text:         #18110A;
    --text-2:       #574E44;
    --text-3:       #A09990;

    --primary:      #C2410C;
    --primary-h:    #9A3414;
    --primary-soft: #FEF0E8;

    --blue:         #1D4ED8;
    --blue-soft:    #EFF6FF;

    --green:        #166534;
    --green-soft:   #DCFCE7;

    --amber:        #92400E;
    --amber-soft:   #FEF3C7;

    --red:          #991B1B;
    --red-soft:     #FEE2E2;

    --radius-sm:    6px;
    --radius:       10px;
    --radius-lg:    16px;

    --shadow-xs:    0 1px 3px rgba(0,0,0,0.07);
    --shadow-sm:    0 2px 6px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md:    0 8px 24px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);

    --nav-h:        64px;
    --bottom-nav-h: 66px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navbar ── */
.navbar {
    background: var(--surface);
    height: var(--nav-h);
    position: sticky;
    top: 0;
    z-index: 200;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 var(--border);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 20px;
}

.navbar-logo {
    height: 38px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    flex: 1;
}

.navbar-links a {
    color: var(--text-2);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 6px 11px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.navbar-links a:hover  { background: var(--bg); color: var(--text); }
.navbar-links a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border-radius: 99px;
    background: var(--bg);
    border: 1px solid var(--border);
    text-decoration: none;
}

.user-chip:hover { border-color: var(--border-hover); text-decoration: none; }

.user-avatar {
    width: 30px;
    height: 30px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.user-name { font-size: 0.82rem; font-weight: 600; color: var(--text); }

.badge-admin {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--amber);
    background: var(--amber-soft);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ── Bottom nav ── */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    z-index: 200;
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-inner {
    display: flex;
    width: 100%;
    height: 64px;
    align-items: stretch;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.bottom-nav-inner::-webkit-scrollbar { display: none; }

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: var(--text-3);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    transition: color 0.15s;
    padding: 8px 2px 6px;
    min-width: 56px;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.bnav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 28px;
    border-radius: 8px;
    transition: background 0.15s;
}

.bottom-nav-item svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    stroke-width: 1.6;
    transition: transform 0.15s;
}

.bottom-nav-item span {
    line-height: 1;
}

.bottom-nav-item:hover { color: var(--text-2); text-decoration: none; }

.bottom-nav-item.active {
    color: var(--primary);
    text-decoration: none;
}

.bottom-nav-item.active .bnav-icon {
    background: var(--primary-soft);
}

.bottom-nav-item.active svg {
    stroke-width: 2.2;
}

button.bottom-nav-item {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.bnav-admin-panel {
    position: fixed;
    bottom: calc(64px + env(safe-area-inset-bottom));
    left: 0; right: 0;
    background: #fff;
    border-top: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
    z-index: 201;
    padding: 8px 0 4px;
}

.bnav-admin-panel-inner {
    display: flex;
    flex-direction: column;
}

.bnav-admin-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    text-decoration: none;
    color: var(--text-1);
    font-size: 0.95rem;
    font-weight: 500;
    border-bottom: 1px solid var(--border);
}
.bnav-admin-link:last-child { border-bottom: none; }
.bnav-admin-link:hover { background: var(--bg-2); text-decoration: none; color: var(--text-1); }

.bnav-icon {
    width: 40px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: background 0.15s;
}

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
main { flex: 1; padding: 28px 0 48px; }

/* ── Hero ── */
.hero {
    background: #18110A url('/assets/img/fondo.jpg') center 40%/cover no-repeat;
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 44px 36px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    align-items: flex-end;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(18,8,2,0.88) 0%,
        rgba(18,8,2,0.55) 50%,
        rgba(18,8,2,0.25) 100%
    );
}

.hero-inner {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-text {}
.hero-text p { font-size: 0.95rem; color: rgba(255,255,255,0.75); margin-top: 6px; }

.hero-logo {
    height: 44px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
    margin-bottom: 2px;
}

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

/* ── Stats grid ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

@media (min-width: 700px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 16px;
    box-shadow: var(--shadow-xs);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--primary);
    opacity: 0.15;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-3);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
    color: var(--text);
}

.stat-sub {
    font-size: 0.75rem;
    color: var(--text-3);
    margin-top: 4px;
}

/* ── Page header ── */
.page-header {
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.page-header-text h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.page-header-text p {
    color: var(--text-2);
    margin-top: 3px;
    font-size: 0.875rem;
}

/* ── Section header ── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-3);
}

.section-header a { font-size: 0.8rem; font-weight: 500; }

/* ── Cards ── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.card-header {
    padding: 15px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-title { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.card-body  { padding: 18px; }

.card-footer {
    padding: 11px 18px;
    border-top: 1px solid var(--border);
    background: var(--bg);
    font-size: 0.8rem;
    color: var(--text-2);
}

/* ── Grids ── */
.grid-2    { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3    { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4    { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.12s, border-color 0.12s, transform 0.1s, box-shadow 0.12s;
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1.2;
    -webkit-tap-highlight-color: transparent;
    letter-spacing: -0.1px;
}

.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }

.btn-sm  { padding: 6px 12px; font-size: 0.8rem; }
.btn-lg  { padding: 12px 22px; font-size: 0.95rem; }
.btn-block { width: 100%; }

.btn-primary  { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 1px 3px rgba(194,65,12,0.3); }
.btn-primary:hover { background: var(--primary-h); border-color: var(--primary-h); }

.btn-secondary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-secondary:hover { background: #1e40af; }

.btn-success { background: var(--green); color: #fff; border-color: var(--green); }
.btn-danger  { background: var(--red); color: #fff; border-color: var(--red); }

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary-soft); }

.btn-ghost {
    background: transparent;
    color: var(--text-2);
    border-color: transparent;
}
.btn-ghost:hover { background: var(--bg); color: var(--text); }

.btn-light {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}
.btn-light:hover { background: var(--bg); border-color: var(--border-hover); }

.btn-white {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-color: rgba(255,255,255,0.3);
    backdrop-filter: blur(4px);
}
.btn-white:hover { background: rgba(255,255,255,0.25); }

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.badge-primary  { background: var(--primary-soft); color: var(--primary); }
.badge-blue     { background: var(--blue-soft);    color: var(--blue); }
.badge-green    { background: var(--green-soft);   color: var(--green); }
.badge-amber    { background: var(--amber-soft);   color: var(--amber); }
.badge-red      { background: var(--red-soft);     color: var(--red); }
.badge-muted    { background: var(--surface-2);    color: var(--text-2); }

/* ── Status dot ── */
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot-red   { background: #EF4444; }
.dot-amber { background: #F59E0B; }
.dot-green { background: #22C55E; }

/* ── Alerts ── */
.alert {
    padding: 12px 15px;
    border-radius: var(--radius);
    margin-bottom: 18px;
    font-size: 0.875rem;
    border-left: 3px solid;
    line-height: 1.5;
}

.alert-success { background: var(--green-soft); color: var(--green); border-left-color: var(--green); }
.alert-warning { background: var(--amber-soft); color: var(--amber); border-left-color: var(--amber); }
.alert-danger  { background: var(--red-soft);   color: var(--red);   border-left-color: var(--red); }
.alert-info    { background: var(--blue-soft);  color: var(--blue);  border-left-color: var(--blue); }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text);
    background: var(--surface);
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
    line-height: 1.5;
    -webkit-appearance: none;
    appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(194,65,12,0.1);
}

.form-control::placeholder { color: var(--text-3); }
textarea.form-control { resize: vertical; min-height: 96px; }
.form-text { font-size: 0.78rem; color: var(--text-3); margin-top: 4px; }

.form-row        { display: grid; gap: 14px; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

/* Tipo selector */
.tipo-selector { display: flex; gap: 8px; flex-wrap: wrap; }

.tipo-card {
    flex: 1;
    min-width: 100px;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
    user-select: none;
    background: var(--surface);
}

.tipo-card:hover    { border-color: var(--primary); }
.tipo-card.selected { border-color: var(--primary); background: var(--primary-soft); }
.tipo-card input    { display: none; }
.tipo-card-label    { font-size: 0.85rem; font-weight: 600; color: var(--text); display: block; }
.tipo-card.selected .tipo-card-label { color: var(--primary); }

/* ── Feed / Muro ── */
.feed {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.feed-item {
    padding: 14px 16px;
    display: flex;
    gap: 11px;
    border-bottom: 1px solid var(--border);
    transition: background 0.12s;
}

.feed-item:last-child { border-bottom: none; }
.feed-item:hover { background: var(--bg); }

.feed-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.feed-body  { flex: 1; min-width: 0; }

.feed-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
    flex-wrap: wrap;
}

.feed-author  { font-weight: 700; font-size: 0.85rem; color: var(--text); }
.feed-piso    { font-size: 0.72rem; color: var(--text-3); }
.feed-time    { font-size: 0.72rem; color: var(--text-3); margin-left: auto; white-space: nowrap; }
.feed-content { font-size: 0.875rem; line-height: 1.55; color: var(--text); word-break: break-word; }

.feed-actions { margin-top: 8px; display: flex; gap: 6px; }

.react-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.12s;
    font-family: inherit;
}

.react-btn:hover { border-color: #FDA4AF; color: #BE123C; background: #FFF1F2; }

/* ── Anuncio item ── */
.anuncio-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 15px 16px 14px 18px;
    border-left-width: 3px;
    transition: box-shadow 0.15s;
    box-shadow: var(--shadow-xs);
}

.anuncio-item:hover { box-shadow: var(--shadow-sm); }
.anuncio-item.tipo-urgente { border-left-color: var(--red); }
.anuncio-item.tipo-reunion { border-left-color: var(--blue); }
.anuncio-item.tipo-info    { border-left-color: var(--primary); }
.anuncio-item.tipo-obra    { border-left-color: var(--amber); }

.anuncio-title   { font-weight: 700; font-size: 0.925rem; margin-bottom: 4px; }
.anuncio-title a { color: var(--text); }
.anuncio-title a:hover { color: var(--primary); text-decoration: none; }
.anuncio-excerpt { font-size: 0.84rem; color: var(--text-2); margin-bottom: 8px; line-height: 1.5; }
.anuncio-meta    { display: flex; gap: 12px; font-size: 0.75rem; color: var(--text-3); flex-wrap: wrap; }

/* ── Evento card ── */
.evento-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    transition: box-shadow 0.15s, transform 0.15s;
}

.evento-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.evento-date-bar {
    background: var(--text);
    color: rgba(255,255,255,0.9);
    padding: 9px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.evento-date-bar.pasado { background: var(--text-3); }

.evento-body   { padding: 14px; }
.evento-title  { font-size: 0.925rem; font-weight: 700; margin-bottom: 5px; color: var(--text); line-height: 1.3; }
.evento-desc   { font-size: 0.82rem; color: var(--text-2); line-height: 1.5; margin-bottom: 8px; }

.evento-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 14px;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-2);
    background: var(--bg);
}

/* ── Favor card ── */
.favor-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px;
    border-top-width: 3px;
    box-shadow: var(--shadow-xs);
}

.favor-card.ofrezco  { border-top-color: var(--green); }
.favor-card.necesito { border-top-color: var(--blue); }

.favor-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 7px; }
.favor-title  { font-weight: 700; font-size: 0.9rem; color: var(--text); line-height: 1.3; }
.favor-desc   { font-size: 0.82rem; color: var(--text-2); margin-bottom: 11px; line-height: 1.5; }
.favor-meta   { font-size: 0.72rem; color: var(--text-3); display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Incidencia ── */
.incidencia-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 15px 16px;
    box-shadow: var(--shadow-xs);
}

/* ── Tabs ── */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab-link {
    padding: 9px 14px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-2);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.12s, border-color 0.12s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tab-link:hover { color: var(--text); text-decoration: none; }
.tab-link.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ── Progress bar ── */
.progress {
    height: 8px;
    background: var(--bg);
    border-radius: 99px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.progress-bar {
    height: 100%;
    border-radius: 99px;
    transition: width 0.5s ease;
    background: var(--primary);
}

/* ── Votación opciones ── */
.voto-opcion {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.12s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.voto-opcion:hover { border-color: var(--primary); background: var(--primary-soft); }
.voto-opcion input { accent-color: var(--primary); cursor: pointer; flex-shrink: 0; width: 16px; height: 16px; }
.voto-opcion label { cursor: pointer; font-weight: 500; font-size: 0.9rem; flex: 1; }

/* ── Table ── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow-xs); }

table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
thead { background: var(--bg); }
th {
    padding: 10px 14px;
    text-align: left;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-3);
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
}
td { padding: 13px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg); }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 56px 20px; }
.empty-icon {
    width: 52px; height: 52px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
}
.empty-icon svg { color: var(--text-3); }
.empty-state h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 5px; color: var(--text); }
.empty-state p  { font-size: 0.875rem; color: var(--text-2); max-width: 300px; margin: 0 auto; line-height: 1.5; }

/* ── Auth ── */
.auth-wrap { max-width: 400px; margin: 48px auto; }
.auth-wrap .card-header { padding: 28px 28px 0; border: none; display: block; }
.auth-wrap .card-body   { padding: 22px 28px 28px; }
.auth-wrap .card-footer { padding: 14px 28px; text-align: center; font-size: 0.85rem; }

.auth-logo {
    width: 46px; height: 46px;
    background: var(--primary);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
}

.auth-title { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.4px; margin-bottom: 3px; }
.auth-sub   { font-size: 0.875rem; color: var(--text-2); }

/* ── Divider ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 14px 0; }

/* ── Utilities ── */
.d-flex         { display: flex; }
.align-center   { align-items: center; }
.justify-between{ justify-content: space-between; }
.flex-wrap      { flex-wrap: wrap; }
.gap-1 { gap: 4px; }  .gap-2 { gap: 8px; }  .gap-3 { gap: 12px; }
.mt-2 { margin-top: 8px; }   .mt-3 { margin-top: 16px; }  .mt-4 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 16px; } .mb-4 { margin-bottom: 24px; }
.text-muted  { color: var(--text-2); }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-sm     { font-size: 0.82rem; }
.fw-700      { font-weight: 700; }
.w-full      { width: 100%; }

/* ── Footer ── */
footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 18px 0;
    font-size: 0.78rem;
    color: var(--text-3);
    text-align: center;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .container { padding: 0 16px; }
    main { padding: 20px 0 calc(var(--bottom-nav-h) + 16px + env(safe-area-inset-bottom)); }

    .navbar-links  { display: none; }
    .bottom-nav    { display: flex; }

    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .grid-auto { grid-template-columns: 1fr; }
    .form-row.cols-2, .form-row.cols-3 { grid-template-columns: 1fr; }

    .hero { padding: 28px 20px 24px; min-height: 160px; }
    .hero-logo { height: 36px; }

    .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .page-header-text h1 { font-size: 1.3rem; }

    .user-name, .badge-admin { display: none; }

    .tipo-selector { flex-direction: column; }
    .tipo-card { text-align: left; }

    .auth-wrap { margin: 20px auto; }
    .auth-wrap .card-header { padding: 22px 20px 0; }
    .auth-wrap .card-body   { padding: 18px 20px 22px; }
    .auth-wrap .card-footer { padding: 12px 20px; }
}

@media (max-width: 480px) {
    .tab-link { padding: 8px 10px; font-size: 0.78rem; }
}
