/* ============================================================
   HOMEHUB UNIFIED THEME
   Shared base styles applied across all pages.
   Page-specific overrides remain in each HTML file's <style>.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Inter+Tight:wght@500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

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

/* ── Base ─────────────────────────────────────────────────── */
body {
    font-family: 'Inter', sans-serif;
    color: #1a1a1a;
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, .display-font {
    font-family: 'Inter Tight', sans-serif;
    letter-spacing: -0.02em;
}
.mono-font {
    font-family: 'JetBrains Mono', monospace;
}

/* ── Scrollbars ───────────────────────────────────────────── */
.custom-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.custom-scroll::-webkit-scrollbar-track { background: transparent; }
.custom-scroll::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 4px; }
.custom-scroll:hover::-webkit-scrollbar-thumb { background: #9ca3af; }

.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* ── Animations ───────────────────────────────────────────── */
.slide-in { animation: slideIn 0.15s ease-out; }
@keyframes slideIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.2s ease-out forwards; }
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.panel-enter { animation: slideUp 0.2s ease-out forwards; }
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Modal ────────────────────────────────────────────────── */
.modal-backdrop {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
}

/* ── Card interactions ────────────────────────────────────── */
.app-card { transition: all 0.1s ease-in-out; }
.app-card:active { transform: scale(0.99); background-color: #f9fafb; }

.account-card { transition: all 0.1s ease-in-out; }
.account-card:active { transform: scale(0.99); background-color: #f9fafb; }

/* ── Tag / Badge ──────────────────────────────────────────── */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Row interactions ─────────────────────────────────────── */
.shift-row,
.contact-row,
.driver-row { transition: background 0.1s; }

.shift-row:hover,
.contact-row:hover { background: #f9fafb; }

.driver-row:hover { background: #f9fafb; cursor: pointer; }

/* ── Progress ─────────────────────────────────────────────── */
.progress-bar { transition: width 0.4s ease; }
.step-check   { transition: all 0.1s; }

/* ── Navigation items ─────────────────────────────────────── */
.nav-item { border-left: none; border-radius: 6px; }
.nav-item.active { background-color: #000; color: #fff; }

/* ── Messaging bubbles ────────────────────────────────────── */
.msg-sent {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border-radius: 18px 18px 4px 18px;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.15);
}
.msg-received {
    background: #f9fafb;
    color: #1e293b;
    border: 1px solid #e5e7eb;
    border-radius: 18px 18px 18px 4px;
}

/* ── Heatmap ──────────────────────────────────────────────── */
.heatmap-scroll { overflow-x: auto; padding-bottom: 10px; }
.heatmap-grid {
    display: inline-grid;
    grid-template-rows: repeat(7, 14px);
    grid-auto-flow: column;
    gap: 4px;
}
.day-cell {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    background-color: #f3f4f6;
    transition: all 0.1s ease;
}
.day-cell:hover { border: 1px solid #000; }
.level-0 { background-color: #f3f4f6; }
.level-1 { background-color: #d1d5db; }
.level-2 { background-color: #9ca3af; }
.level-3 { background-color: #4b5563; }
.level-4 { background-color: #000000; }

/* ── Zone map ─────────────────────────────────────────────── */
.zone-poly {
    transition: filter 0.25s, opacity 0.25s, stroke-width 0.15s, fill 0.25s, stroke 0.25s;
    cursor: pointer;
}
.zone-poly:hover { filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1)); }
.zone-label { pointer-events: none; user-select: none; transition: opacity 0.25s; }
.zone-label rect,
.zone-label text { transition: fill 0.25s, stroke 0.25s, color 0.25s, font-size 0.2s; }

/* ── Layout utilities ─────────────────────────────────────── */
.day-col { min-width: 180px; }
