/* RESET TOTAL */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
    --primary: #f97316; --blue: #3b82f6; --success: #10b981;
    --bg: #f1f5f9; --white: #ffffff; --text: #1e293b;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
}

body {
    background-color: var(--bg) !important; /* Si no ves gris claro, el CSS no cargó */
    font-family: 'Segoe UI', system-ui, sans-serif;
    color: var(--text);
    line-height: 1.4;
}

.main-container { max-width: 500px; margin: 0 auto; padding: 20px; }

/* NAVBAR */
.top-nav {
    background: #0f172a; color: white;
    padding: 15px 20px; display: flex;
    justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 1000;
}
.nav-title { font-weight: 800; letter-spacing: 1px; }

/* TITULOS */
.page-header { margin: 20px 0; }
.title { font-size: 24px; font-weight: 800; }
.subtitle { color: #64748b; font-size: 14px; }

/* TARJETAS HORIZONTALES (HOME) */
.tool-card {
    background: var(--white);
    display: flex !important; /* Fuerza horizontal */
    align-items: center;
    padding: 18px;
    border-radius: 16px;
    margin-bottom: 12px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    border-left: 6px solid #cbd5e1;
}
.tool-card.orange { border-left-color: var(--primary); }
.tool-card.blue { border-left-color: var(--blue); }
.tool-card.green { border-left-color: var(--success); }

.icon-box {
    width: 50px; height: 50px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; margin-right: 15px; flex-shrink: 0;
}
.bg-o { background: #fff7ed; color: var(--primary); }
.bg-b { background: #eff6ff; color: var(--blue); }
.bg-g { background: #ecfdf5; color: var(--success); }

.tool-info { display: flex; flex-direction: column; }
.tool-val { font-size: 18px; font-weight: 800; }
.tool-lbl { font-size: 11px; color: #94a3b8; font-weight: bold; text-transform: uppercase; }

/* CALENDARIO (REJILLA 7 COLUMNAS) */
.calendar-card { background: white; border-radius: 20px; padding: 15px; box-shadow: var(--shadow); }
.cal-grid {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important; /* OBLIGA A 7 COLUMNAS */
    gap: 8px;
    margin-top: 15px;
}
.cal-day {
    aspect-ratio: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: #f8fafc; border-radius: 10px; font-size: 13px; font-weight: 600;
    cursor: pointer; border: 1px solid transparent;
}
.cal-day.today { border: 2px solid var(--primary); color: var(--primary); }
.cal-day.recorded { background: #d1fae5; color: #065f46; border-color: #34d399; }
.day-h { font-size: 9px; margin-top: 2px; opacity: 0.8; }

/* STATS (HORAS EXTRAS) */
.stats-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 15px; }
.mini-card { background: white; padding: 15px; border-radius: 15px; box-shadow: var(--shadow); }
.mini-card .val { display: block; font-size: 18px; font-weight: 800; }
.mini-card .lbl { font-size: 10px; color: #94a3b8; font-weight: bold; }

/* MODALES */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: none; align-items: flex-end; z-index: 2000; }
.modal.active { display: flex; }
.modal-content { background: white; width: 100%; border-radius: 20px 20px 0 0; padding: 25px; animation: slideUp 0.3s; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

input.modern { width: 100%; padding: 12px; margin: 10px 0; border: 1px solid #e2e8f0; border-radius: 10px; font-size: 16px; }
.btn-p { background: var(--primary); color: white; border: none; padding: 15px; border-radius: 10px; width: 100%; font-weight: bold; }
