/* ==========================================================================
   SIGEV TERRITORIO - APP MÓVIL ESTILOS CORE (COMPLETO)
   ========================================================================== */
:root {
    --bg-app: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --brand-blue: #0b438c;
    --border-color: #e2e8f0;
    --nav-height: 65px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body.login-bg {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

body.app-bg {
    background-color: var(--bg-app);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.mobile-container {
    width: 100%;
    max-width: 480px;
    background-color: var(--bg-app);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.05); /* Sombra para PC/Tablet view */
}

/* Espacio inferior para la barra de navegación */
.mobile-container.with-nav {
    padding-bottom: var(--nav-height);
}

.login-centered {
    padding: 24px;
    justify-content: center;
    background: transparent;
    box-shadow: none;
}

/* --- TARJETA DE LOGIN CENTRAL --- */
.login-card {
    background: var(--card-bg);
    width: 100%;
    padding: 40px 24px;
    border-radius: 24px;
    box-shadow: 0 20px 40px -10px rgba(11, 67, 140, 0.15);
    text-align: center;
}

.brand-logo {
    max-height: 70px;
    width: auto;
    margin: 0 auto 16px auto;
    display: block;
}

.login-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--brand-blue);
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 32px;
}

/* --- BOTÓN DE GOOGLE --- */
.btn-google {
    width: 100%;
    height: 56px;
    background: #ffffff;
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: 12px;
    font-size: 15.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.btn-google:active {
    background: #f8f9fa;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.google-icon {
    flex-shrink: 0;
}

.footer-text {
    margin-top: 32px;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 500;
}

/* ==========================================================================
   ESTILOS DEL DASHBOARD MÓVIL
   ========================================================================== */

/* --- HEADER --- */
.app-header {
    background: var(--card-bg);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e2e8f0;
    color: var(--brand-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    border: 2px solid #bfdbfe;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details .greeting {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 2px;
}

.user-details h2 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.btn-icon {
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    cursor: pointer;
}

.btn-icon:active {
    background: #f1f5f9;
}

/* --- MAIN CONTENT --- */
.app-content {
    padding: 24px;
    flex-grow: 1;
    overflow-y: auto;
}

.stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--brand-blue);
    padding: 16px;
    border-radius: 16px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 10px 20px -5px rgba(11, 67, 140, 0.2);
}

.stat-card:nth-child(2) {
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.stat-card:nth-child(2) .stat-lbl {
    color: var(--text-muted);
}

.stat-val {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-lbl {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.9;
}

.section-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

/* --- ACTION GRID --- */
.action-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.action-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.action-card:active {
    transform: scale(0.98);
    background: #f8fafc;
}

.icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.icon-wrapper.red { background: #fee2e2; color: #ef4444; }
.icon-wrapper.blue { background: #e0e7ff; color: #4338ca; }
.icon-wrapper.green { background: #dcfce7; color: #10b981; }

.action-card h4 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
}

.action-card p {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* --- BOTTOM NAV --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 480px; /* Igual al mobile-container */
    height: var(--nav-height);
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom); /* Para iPhone Notch */
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #94a3b8;
    text-decoration: none;
    width: 33.33%;
    height: 100%;
    transition: color 0.2s;
}

.nav-item.active {
    color: var(--brand-blue);
}

.nav-item span {
    font-size: 10.5px;
    font-weight: 700;
}

.nav-item svg {
    transition: transform 0.2s;
}

.nav-item.active svg {
    transform: translateY(-2px);
}