/* ═══════════════════════════════════════════════════════════════
   mude. Calendário Editorial
   Fonte: Lato | Tema: Light com sidebar dark
   Mobile-first responsive
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&display=swap');

:root {
    --yellow:       #FFE600;
    --yellow-soft:  #FFFBE6;
    --yellow-dim:   rgba(255,230,0,.12);
    --sidebar-bg:   #1A1A2E;
    --sidebar-b:    #262640;
    --sidebar-txt:  #8888AA;
    --bg:           #F4F4F7;
    --surface:      #FFFFFF;
    --surface2:     #F8F8FB;
    --border:       #E6E6EF;
    --text:         #1A1A2E;
    --text2:        #54546E;
    --muted:        #9898B0;
    --red:          #EF4444;
    --green:        #22C55E;
    --sidebar-w:    220px;
    --header-h:     56px;
    --bottom-nav-h: 60px;
    --radius:       10px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    min-height: 100vh;
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR — desktop
   ═══════════════════════════════════════════════════════════════ */

.sidebar {
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--sidebar-bg);
    position: fixed;
    top: 0; left: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform .25s ease;
}

.sidebar-logo {
    padding: 20px 18px 16px;
    border-bottom: 1px solid var(--sidebar-b);
    flex-shrink: 0;
}

.logo-text {
    font-family: 'Lato', sans-serif;
    font-weight: 900;
    font-size: 22px;
    color: #fff;
    display: block;
    letter-spacing: -0.5px;
}

.logo-sub {
    font-size: 9px;
    font-weight: 700;
    color: var(--yellow);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-top: 2px;
}

.sidebar-nav {
    padding: 10px 10px 4px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--sidebar-txt);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: all .12s;
}

.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: var(--yellow); color: var(--sidebar-bg); }
.nav-item.active svg { stroke: var(--sidebar-bg); }

.sidebar-section {
    padding: 8px 10px;
    border-top: 1px solid var(--sidebar-b);
    margin-top: 6px;
}

.sidebar-label {
    font-size: 9px;
    font-weight: 900;
    color: #44446A;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 0 4px 8px;
}

.client-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 7px;
    color: var(--sidebar-txt);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    transition: all .12s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.client-filter-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.client-filter-item.active { background: var(--yellow-dim); color: var(--yellow); }

.client-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.sidebar-export {
    margin-top: auto;
    padding: 12px 10px;
    border-top: 1px solid var(--sidebar-b);
    flex-shrink: 0;
}

.btn-export {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px;
    background: var(--yellow-dim);
    border: 1px solid rgba(255,230,0,.2);
    border-radius: 8px;
    color: var(--yellow);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    transition: all .15s;
}

.btn-export:hover { background: var(--yellow); color: var(--sidebar-bg); }

/* Overlay para fechar sidebar mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 199;
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE TOP BAR
   ═══════════════════════════════════════════════════════════════ */

.mobile-topbar {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: var(--sidebar-bg);
    z-index: 150;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
}

.mobile-logo {
    font-family: 'Lato', sans-serif;
    font-weight: 900;
    font-size: 18px;
    color: #fff;
    flex: 1;
}

.mobile-logo span { color: var(--yellow); }

.btn-hamburger, .btn-icon-top {
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.08);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: background .12s;
    text-decoration: none;
    flex-shrink: 0;
}

.btn-hamburger:hover, .btn-icon-top:hover { background: rgba(255,255,255,.15); }

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════ */

.main-content {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    padding: 22px 24px 32px;
    display: flex;
    flex-direction: column;
}

/* ═══════════════════════════════════════════════════════════════
   CLIENT TABS
   ═══════════════════════════════════════════════════════════════ */

.client-tabs {
    display: flex;
    gap: 3px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.client-tabs::-webkit-scrollbar { display: none; }

.client-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px 10px;
    border-radius: 8px 8px 0 0;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    border: 1px solid transparent;
    border-bottom: none;
    transition: all .12s;
    position: relative;
    bottom: -1px;
    white-space: nowrap;
    flex-shrink: 0;
}

.client-tab:hover { color: var(--text); background: var(--surface); border-color: var(--border); }

.client-tab.active {
    color: var(--text);
    background: var(--bg);
    border-color: var(--border);
    border-bottom-color: var(--bg);
}

.tab-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.tab-count {
    background: var(--border);
    color: var(--text2);
    font-size: 10px;
    font-weight: 900;
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.client-tab.active .tab-count { background: var(--text); color: #fff; }

/* ═══════════════════════════════════════════════════════════════
   CALENDAR HEADER
   ═══════════════════════════════════════════════════════════════ */

.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 12px;
    flex-wrap: wrap;
}

.cal-header-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.client-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
}

.client-badge.all {
    background: var(--surface2);
    color: var(--muted);
    border: 1px solid var(--border);
}

.cal-month-title {
    font-size: 26px;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.5px;
}

.cal-month-title span { color: var(--muted); font-weight: 300; }

.cal-header-right { display: flex; align-items: center; gap: 7px; }

.nav-arrow {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text2);
    text-decoration: none;
    transition: all .12s;
}

.nav-arrow:hover { background: var(--sidebar-bg); color: #fff; border-color: var(--sidebar-bg); }

.btn-today {
    padding: 7px 13px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text2);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    transition: all .12s;
}

.btn-today:hover { background: var(--sidebar-bg); color: #fff; border-color: var(--sidebar-bg); }

.btn-add {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--yellow);
    color: var(--text);
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    text-decoration: none;
    transition: all .12s;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(255,230,0,.3);
}

.btn-add:hover { background: var(--sidebar-bg); color: #fff; box-shadow: none; }

/* Botão exportar PDF no header */
.btn-pdf {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text2);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    transition: all .12s;
    white-space: nowrap;
}

.btn-pdf:hover { background: var(--sidebar-bg); color: #fff; border-color: var(--sidebar-bg); }
.btn-pdf svg { flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════
   STATS PILLS
   ═══════════════════════════════════════════════════════════════ */

.month-stats {
    display: flex;
    gap: 7px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 400;
    color: var(--text2);
}

.stat-pill strong { color: var(--text); font-weight: 900; }
.stat-dot { width: 7px; height: 7px; border-radius: 50%; }

/* ═══════════════════════════════════════════════════════════════
   CALENDAR GRID
   ═══════════════════════════════════════════════════════════════ */

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--border);
    gap: 1px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
    flex: 1;
}

.cal-day-header {
    background: var(--sidebar-bg);
    padding: 9px 4px;
    text-align: center;
    font-size: 9px;
    font-weight: 900;
    color: #6666AA;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.cal-cell {
    background: var(--surface);
    padding: 7px 6px 5px;
    min-height: 100px;
    cursor: pointer;
    transition: background .08s;
    position: relative;
}

.cal-cell:hover { background: var(--yellow-soft); }
.cal-cell.empty { background: var(--surface2); cursor: default; }
.cal-cell.empty:hover { background: var(--surface2); }
.cal-cell.today { background: #FFFDF0; }
.cal-cell.today:hover { background: var(--yellow-soft); }

.cal-cell.today .cell-number {
    background: var(--yellow);
    color: var(--text);
    border-radius: 50%;
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    margin-left: auto;
    font-weight: 900;
}

.cell-number {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-align: right;
    margin-bottom: 4px;
}

.cell-events { display: flex; flex-direction: column; gap: 2px; }

.event-chip {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.45;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 3px;
    transition: opacity .1s;
}

.event-chip:hover { opacity: .82; }

.ev-start  { border-radius: 4px 0 0 4px; }
.ev-middle { border-radius: 0; opacity: .8; }
.ev-end    { border-radius: 0 4px 4px 0; }
.ev-single { border-radius: 4px; }

.chip-dot {
    width: 4px; height: 4px;
    border-radius: 50%;
    background: currentColor;
    opacity: .7;
    flex-shrink: 0;
}

.ev-arrow { font-size: 8px; margin-left: auto; opacity: .5; flex-shrink: 0; }

.event-more {
    font-size: 9px;
    color: var(--muted);
    padding-left: 4px;
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════
   LEGEND
   ═══════════════════════════════════════════════════════════════ */

.cal-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
    padding: 10px 14px;
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.legend-title {
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text2);
    font-weight: 400;
}

.legend-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════════ */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26,26,46,.55);
    z-index: 500;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.modal-overlay.open { display: flex; }

.modal-box {
    background: var(--surface);
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 600px;
    animation: modalUp .2s ease;
    box-shadow: 0 -8px 40px rgba(0,0,0,.15);
    overflow: hidden;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
}

@keyframes modalUp {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.modal-handle {
    width: 36px; height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 10px auto 0;
    flex-shrink: 0;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px 12px;
    border-bottom: 1px solid var(--border);
    background: var(--surface2);
    flex-shrink: 0;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 900;
    color: var(--text);
}

.modal-close {
    width: 30px; height: 30px;
    border: none;
    background: var(--border);
    border-radius: 8px;
    color: var(--text2);
    font-size: 18px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .12s;
}

.modal-close:hover { background: var(--sidebar-bg); color: #fff; }

.modal-scroll {
    overflow-y: auto;
    flex: 1;
}

/* ═══════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════ */

#eventForm, .form-card form { padding: 16px 20px; }

.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-top: 18px;
}

.form-card h2 {
    font-size: 15px;
    font-weight: 900;
    margin-bottom: 16px;
    color: var(--text);
}

.form-row { margin-bottom: 12px; }
.form-row.two   { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row.three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

.form-group { display: flex; flex-direction: column; gap: 5px; }

.form-group label {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    background: var(--surface2);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text);
    font-family: 'Lato', sans-serif;
    font-size: 13px;
    outline: none;
    transition: border-color .12s, box-shadow .12s;
    -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--yellow);
    box-shadow: 0 0 0 3px rgba(255,230,0,.15);
}

.form-group textarea { resize: vertical; min-height: 60px; }

.color-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.color-row input[type="color"] {
    width: 44px; height: 44px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    padding: 2px;
    background: var(--surface2);
    flex-shrink: 0;
}

.color-presets { display: flex; flex-wrap: wrap; gap: 5px; }

.preset-dot {
    width: 22px; height: 22px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform .1s;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

.preset-dot:hover { transform: scale(1.2); }

.color-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface2);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 5px 12px;
}

.color-input-wrap input[type="color"] {
    width: 30px; height: 30px;
    border: none; background: none; cursor: pointer; padding: 0;
}

.color-input-wrap span { font-size: 12px; color: var(--text2); }

.modal-footer, .form-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px 20px;
    border-top: 1px solid var(--border);
    background: var(--surface2);
    flex-shrink: 0;
}

.btn-save {
    padding: 11px 22px;
    background: var(--yellow);
    color: var(--text);
    border: none;
    border-radius: 8px;
    font-family: 'Lato', sans-serif;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    transition: all .12s;
    box-shadow: 0 2px 8px rgba(255,230,0,.3);
}

.btn-save:hover { background: var(--sidebar-bg); color: #fff; }

.btn-cancel {
    padding: 11px 16px;
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    color: var(--text2);
    font-family: 'Lato', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all .12s;
}

.btn-cancel:hover { border-color: var(--text2); color: var(--text); }

.btn-delete {
    padding: 11px 16px;
    background: transparent;
    border: 1.5px solid rgba(239,68,68,.25);
    border-radius: 8px;
    color: var(--red);
    font-family: 'Lato', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all .12s;
}

.btn-delete:hover { background: rgba(239,68,68,.06); }

/* ═══════════════════════════════════════════════════════════════
   ALERTS
   ═══════════════════════════════════════════════════════════════ */

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert.success { background: rgba(34,197,94,.08); border: 1px solid rgba(34,197,94,.25); color: #16A34A; }
.alert.error   { background: rgba(239,68,68,.08);  border: 1px solid rgba(239,68,68,.25);  color: #DC2626; }

/* ═══════════════════════════════════════════════════════════════
   PAGE HEADER
   ═══════════════════════════════════════════════════════════════ */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 900;
    color: var(--text);
}

/* ═══════════════════════════════════════════════════════════════
   CLIENTS GRID
   ═══════════════════════════════════════════════════════════════ */

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.client-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform .12s, box-shadow .12s;
}

.client-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.client-card.inactive { opacity: .55; }

.client-card-header {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.client-logo-preview { max-height: 48px; max-width: 80%; object-fit: contain; }

.client-logo-placeholder {
    font-weight: 900;
    font-size: 22px;
}

.inactive-badge {
    position: absolute; top: 8px; right: 8px;
    background: rgba(0,0,0,.3);
    color: #fff;
    font-size: 9px; font-weight: 900;
    letter-spacing: 1px; text-transform: uppercase;
    padding: 2px 7px; border-radius: 20px;
}

.client-card-body { padding: 12px 14px; }

.client-name { font-weight: 900; font-size: 13px; margin-bottom: 7px; color: var(--text); }

.client-colors { display: flex; gap: 4px; margin-bottom: 12px; }

.color-swatch {
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 2px solid var(--bg);
    box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}

.client-actions { display: flex; gap: 5px; flex-wrap: wrap; }

.btn-sm {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all .12s;
    font-family: 'Lato', sans-serif;
}

.btn-sm.primary { background: var(--yellow); color: var(--text); }
.btn-sm.primary:hover { background: var(--sidebar-bg); color: #fff; }
.btn-sm.secondary { background: var(--surface2); color: var(--text2); border: 1px solid var(--border); }
.btn-sm.secondary:hover { background: var(--border); }
.btn-sm.danger { background: transparent; color: var(--red); border: 1px solid rgba(239,68,68,.2); }
.btn-sm.danger:hover { background: rgba(239,68,68,.06); }

/* ═══════════════════════════════════════════════════════════════
   CATEGORIES
   ═══════════════════════════════════════════════════════════════ */

.categories-list {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.category-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
    transition: background .08s;
}

.category-row:last-child { border-bottom: none; }
.category-row:hover { background: var(--surface2); }

.cat-color-bar { width: 4px; align-self: stretch; flex-shrink: 0; }
.cat-info { flex: 1; padding: 12px 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cat-name { font-weight: 700; font-size: 13px; color: var(--text); }

.cat-scope {
    font-size: 10px; font-weight: 700; color: var(--muted);
    background: var(--surface2);
    padding: 2px 8px; border-radius: 20px;
    border: 1px solid var(--border);
}

.cat-actions { padding: 8px 14px; }

/* ═══════════════════════════════════════════════════════════════
   BOTTOM NAV — mobile only
   ═══════════════════════════════════════════════════════════════ */

.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--bottom-nav-h);
    background: var(--sidebar-bg);
    border-top: 1px solid var(--sidebar-b);
    z-index: 150;
    align-items: stretch;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--sidebar-txt);
    text-decoration: none;
    font-size: 10px;
    font-weight: 700;
    transition: color .12s;
    padding: 6px 0;
}

.bottom-nav-item:hover, .bottom-nav-item.active { color: var(--yellow); }

.bottom-nav-item.active svg { stroke: var(--yellow); }

.bottom-nav-fab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.fab-btn {
    width: 44px; height: 44px;
    background: var(--yellow);
    border: none;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(255,230,0,.4);
    transition: all .12s;
    margin-top: -16px;
}

.fab-btn:hover { background: #fff; }

.fab-label {
    font-size: 9px;
    font-weight: 700;
    color: var(--sidebar-txt);
    margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════════ */

.empty-state {
    grid-column: 1/-1;
    text-align: center;
    padding: 56px 20px;
    color: var(--muted);
    font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    :root { --sidebar-w: 200px; }
    .cal-cell { min-height: 88px; }
    .event-chip { font-size: 9px; padding: 2px 5px; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

    /* Sidebar como drawer */
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 4px 0 24px rgba(0,0,0,.3);
    }

    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.open { display: block; }

    /* Top bar mobile */
    .mobile-topbar { display: flex; }

    /* Main content */
    .main-content {
        margin-left: 0;
        padding: 12px 12px 80px;
        margin-top: var(--header-h);
    }

    /* Tabs */
    .client-tabs { margin-bottom: 12px; }
    .client-tab  { padding: 7px 10px 9px; font-size: 11px; }
    .tab-count   { padding: 1px 5px; font-size: 9px; }

    /* Header */
    .cal-header { margin-bottom: 10px; gap: 8px; }

    .cal-month-title { font-size: 20px; }

    .btn-today { display: none; } /* esconde no mobile, economiza espaço */

    /* PDF button — fica no header */
    .btn-pdf span { display: none; } /* só ícone no mobile */
    .btn-pdf { padding: 8px 10px; }

    /* Stats */
    .month-stats { margin-bottom: 10px; }
    .stat-pill   { font-size: 10px; padding: 4px 10px; }

    /* Grid */
    .cal-grid { border-radius: 8px; }

    .cal-day-header {
        font-size: 8px;
        padding: 7px 2px;
        letter-spacing: .5px;
    }

    .cal-cell {
        min-height: 64px;
        padding: 5px 3px 3px;
    }

    .cell-number {
        font-size: 10px;
        margin-bottom: 3px;
    }

    .cal-cell.today .cell-number {
        width: 20px; height: 20px;
        font-size: 10px;
    }

    .event-chip {
        font-size: 8.5px;
        padding: 1px 4px;
        gap: 2px;
    }

    .ev-arrow { display: none; }

    .event-more { font-size: 8px; }

    /* Legend */
    .cal-legend { display: none; } /* esconde no mobile */

    /* Bottom nav */
    .bottom-nav { display: flex; }

    /* Modal — tela cheia no mobile */
    .modal-box {
        max-height: 96vh;
        border-radius: 16px 16px 0 0;
    }

    .form-row.two   { grid-template-columns: 1fr; }
    .form-row.three { grid-template-columns: 1fr 1fr; }

    /* Clients */
    .clients-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

    .client-card-header { height: 60px; }
    .client-logo-placeholder { font-size: 16px; }
    .client-name { font-size: 12px; }

    /* Page header */
    .page-header h1 { font-size: 20px; }
    .page-header .btn-add span { display: none; }
    .page-header .btn-add { padding: 8px 10px; }
}

@media (max-width: 400px) {
    .client-tab { padding: 6px 8px 8px; font-size: 10px; }
    .cal-cell { min-height: 54px; padding: 4px 2px 2px; }
    .event-chip { font-size: 8px; padding: 1px 3px; }
    .clients-grid { grid-template-columns: 1fr; }
}
