/* ===================================================================
   index.css — Funcionario | Responsivo para todos os dispositivos
   =================================================================== */

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

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

:root {
  --font:        'Geist', -apple-system, sans-serif;
  --yellow:      #f5c842;
  --yellow-soft: #e4e5e6;
  --black:       #111111;
  --white:       #ffffff;
  --sidebar-bg:    #fafaf8;
  --sidebar-border: #ebebeb;
  --cream:       #e7e7e7;
  --cream-hover: #e4e5e6;
  --border:      #ebebeb;
  --border-cell: #f0f0f0;
  --text-1:  #111111;
  --text-2:  #555555;
  --text-3:  #aaaaaa;
  --bg: linear-gradient(135deg, #f7f8e5 0%, #e4e5e6 30%, #e4e5e6 65%, #f7f8e5 100%);
  --c-approved: #22c55e;
  --c-pending:  #f5c842;
  --c-avail:    #e5e5e5;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,.08);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.14);
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   18px;
  --r-pill: 99px;
  --sidebar-w: 56px;
  --header-h:  56px;
  --mobile-nav-h: 60px;
}

html { font-size: 14px; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  background: var(--bg);
  background-attachment: fixed;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  color: var(--text-1);
  display: flex;
  gap: 10px;
  padding: 0 10px 0 0;
}

button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ===================================================================
   SIDEBAR — desktop flutuante
=================================================================== */
.icon-sidebar {
  width: 80px;
  min-width: 80px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  box-shadow:
    0 2px 16px rgba(0, 0, 0, 0.05),
    0 1px 4px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 18px;
  height: calc(100vh - 24px);
  margin: 12px 0 12px 10px;
  z-index: 20;
  flex-shrink: 0;
  overflow: hidden;
}
.icon-sidebar-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
}
.logo-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(0,0,0,.18);
  margin-bottom: 12px;
}
.dept-badge {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--black); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  letter-spacing: -0.02em;
}
.dept-badge-label {
  font-size: 8.5px; color: var(--text-3); font-weight: 600;
  margin-bottom: 12px; margin-top: 4px;
  text-align: center; max-width: 56px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 0 4px; opacity: 0.55;
}
.icon-nav {
  display: flex; flex-direction: column; gap: 1px;
  width: 100%; padding: 0 7px;
}
.icon-nav-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 4px; border-radius: 12px;
  color: rgba(0,0,0,.28);
  transition: all 0.16s cubic-bezier(0.4,0,0.2,1);
  width: 100%;
}
.icon-nav-btn:hover { background: rgba(0,0,0,.045); color: var(--text-1); }
.icon-nav-btn.active { background: var(--black); color: var(--white); box-shadow: 0 2px 10px rgba(0,0,0,.14); }
.icon-nav-btn svg { flex-shrink: 0; width: 16px; height: 16px; }
.icon-nav-label { font-size: 9px; font-weight: 700; letter-spacing: 0.01em; }
.icon-sidebar-bottom {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.trial-badge {
  position: relative; width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
}
.trial-ring { position: absolute; }
.trial-number { font-size: 14px; font-weight: 800; color: var(--text-1); line-height: 1; letter-spacing: -0.03em; }
.trial-label {
  font-size: 8px; color: var(--text-3); font-weight: 600;
  letter-spacing: 0.02em; opacity: 0.5;
  text-align: center; line-height: 1.3; max-width: 52px;
}
.avatar-small {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--black); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
  margin-top: 2px; box-shadow: 0 1px 5px rgba(0,0,0,.12);
}

/* ===================================================================
   HAMBURGER — mobile only
=================================================================== */
.hamburger-btn {
  display: none;
  flex-direction: column; align-items: center; justify-content: center;
  width: 36px; height: 36px; gap: 5px; padding: 6px;
  border-radius: var(--r-sm); transition: all .2s; z-index: 50; flex-shrink: 0;
}
.hamburger-btn:hover { background: var(--cream); }
.hamburger-line {
  display: block; width: 20px; height: 2px;
  background: var(--text-1); border-radius: 2px;
  transition: all .3s cubic-bezier(.4,0,.2,1); transform-origin: center;
}
.hamburger-btn.open .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.open .hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger-btn.open .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===================================================================
   GLASS MOBILE MENU
=================================================================== */
.glass-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.3);
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.glass-overlay.active { opacity: 1; visibility: visible; }
.glass-menu {
  position: absolute; top: 0; left: 0;
  width: 88%; max-width: 340px; height: 100%;
  background: rgba(250,250,248,.9);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border-right: 1px solid rgba(255,255,255,.6);
  box-shadow: 6px 0 48px rgba(0,0,0,.14);
  padding: 24px 20px 32px;
  display: flex; flex-direction: column; gap: 16px;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.glass-overlay.active .glass-menu { transform: translateX(0); }
.glass-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(0,0,0,.06); color: var(--text-1);
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.glass-close:hover { background: rgba(0,0,0,.12); }
.glass-profile-section {
  background: #b9bcc121; border-radius: 20px; padding: 18px;
  display: flex; flex-direction: column; gap: 14px; margin-top: 8px;
}
.glass-profile-top { display: flex; align-items: center; gap: 14px; }
.glass-avatar {
  width: 52px; height: 52px; border-radius: 14px;
  background: rgba(255,255,255,.12); border: 1.5px solid rgba(255,255,255,.2);
  color: var(--text-1); display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; flex-shrink: 0;
}
.glass-name { font-size: 16px; font-weight: 700; color: #2c2c2c; }
.glass-dept { font-size: 12px; color: #2c2c2c; margin-top: 2px; }
.glass-profile-role {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: rgba(255,255,255,.1); color: #2c2c2c;
  padding: 3px 10px; border-radius: var(--r-pill); margin-top: 4px; width: fit-content;
}
.glass-saldo-row {
  display: flex; align-items: center; gap: 16px;
  background: rgba(200,200,200,.696); border-radius: 14px; padding: 12px 14px;
}
.glass-saldo { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.glass-saldo-ring { position: absolute; inset: 0; }
.glass-saldo-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.glass-saldo-num { font-size: 18px; font-weight: 800; color: #2c2c2c; line-height: 1; }
.glass-saldo-label { font-size: 8px; color: #2c2c2c; font-weight: 600; }
.glass-saldo-details { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.glass-saldo-detail-row { display: flex; align-items: center; justify-content: space-between; }
.glass-saldo-detail-label { font-size: 11px; color: #2c2c2c; font-weight: 500; }
.glass-saldo-detail-value { font-size: 13px; color: #2c2c2c; font-weight: 700; }
.glass-info-rows {
  display: flex; flex-direction: column; gap: 0;
  background: rgba(255,255,255,.06); border-radius: 12px; overflow: hidden;
}
.glass-info-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-bottom: 1px solid rgba(0,0,0,.06);
}
.glass-info-row:last-child { border-bottom: none; }
.glass-info-row-label {
  font-size: 11px; color: #2c2c2c; font-weight: 500;
  display: flex; align-items: center; gap: 7px;
}
.glass-info-row-value { font-size: 12px; color: #2c2c2c; font-weight: 600; }
.glass-nav { display: flex; flex-direction: column; gap: 2px; }
.glass-nav-label {
  font-size: 10px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .06em; padding: 0 4px; margin-bottom: 4px;
}
.glass-nav-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 14px;
  font-size: 14px; font-weight: 600; color: var(--text-2); transition: all .15s;
}
.glass-nav-btn:hover { background: rgba(0,0,0,.05); color: var(--text-1); }
.glass-nav-btn.active { background: var(--text-1); color: var(--white); }
.glass-nav-btn svg { flex-shrink: 0; }
.glass-nav-btn .nav-label-sub { font-size: 11px; color: var(--text-3); font-weight: 400; margin-top: 1px; }
.glass-nav-logout { color: #dc2626; margin-top: 4px; }
.glass-nav-logout:hover { background: rgba(220,38,38,.08); }
.glass-next { border-top: 1px solid rgba(0,0,0,.07); padding-top: 14px; }
.glass-next-title { font-size: 10px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.glass-next-list { display: flex; flex-direction: column; gap: 5px; }
.glass-next-empty { font-size: 12px; color: var(--text-3); padding: 8px 0; }
.glass-next-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 12px;
  background: rgba(255,255,255,.5); border: 1px solid rgba(0,0,0,.05);
}
.glass-next-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.glass-next-info { flex: 1; min-width: 0; }
.glass-next-tipo { font-size: 12px; font-weight: 600; color: var(--text-1); }
.glass-next-dates { font-size: 11px; color: var(--text-3); }

/* ===================================================================
   MOBILE BOTTOM NAV
=================================================================== */
.mobile-bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--mobile-nav-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(0,0,0,.07);
  z-index: 80;
  padding: 0 8px env(safe-area-inset-bottom);
  align-items: center; justify-content: space-around;
}
.mobile-nav-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 8px 16px; border-radius: 12px;
  color: var(--text-3); font-size: 10px; font-weight: 700;
  letter-spacing: .01em; transition: all .15s; min-width: 56px;
  -webkit-tap-highlight-color: transparent;
}
.mobile-nav-btn.active { color: var(--text-1); background: rgba(0,0,0,.06); }
.mobile-nav-btn svg { width: 20px; height: 20px; }

/* ===================================================================
   MAIN LAYOUT
=================================================================== */
.main-layout {
  border-radius: 16px 16px 0 0;
  margin: 12px 0;
  flex: 1;
  display: flex; flex-direction: column;
  height: 100vh; height: 100dvh;
  overflow: hidden; min-width: 0;
}

/* ===================================================================
   TOP HEADER
=================================================================== */
.top-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px 0 16px;
  height: var(--header-h); min-height: var(--header-h);
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); flex-shrink: 0; gap: 8px;
}
.header-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.draft-badge {
  letter-spacing: 0.04em; font-size: 12px; font-weight: 700;
  background: var(--text-1); color: var(--white);
  padding: 4px 13px; border-radius: var(--r-pill); flex-shrink: 0;
}
.schedule-title {
  font-size: 14px; font-weight: 600; color: var(--text-1);
  letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.status-active {
  font-size: 11px; font-weight: 600;
  background: #dcfce7; color: #166534;
  padding: 3px 10px; border-radius: var(--r-pill); flex-shrink: 0;
}
.header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn-primary {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: var(--r-sm);
  background: var(--text-1); color: var(--white);
  font-weight: 700; font-size: 13px; transition: opacity .15s; white-space: nowrap;
}
.btn-primary:hover { opacity: .8; }
.btn-outline {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--r-sm); border: 1px solid var(--border);
  color: var(--text-2); font-weight: 600; font-size: 13px;
  background: var(--white); transition: all .15s;
}
.btn-outline:hover { background: var(--cream); }
.btn-sm { padding: 6px 14px; font-size: 12px; font-weight: 700; border-radius: var(--r-sm); transition: all .15s; }
.btn-request { background: var(--text-1); color: var(--white); }
.btn-request:hover { opacity: .8; }
.btn-list { background: #fcfcfc; color: var(--text-1); border: 1px solid var(--border); }
.btn-list:hover { background: var(--cream-hover); }
.btn-icon {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); border: 1px solid var(--border);
  color: var(--text-2); background: var(--white); transition: all .15s;
}
.btn-icon:hover { background: var(--cream); }
.btn-delete { color: #dc3545; }
.btn-delete:hover { background: #fff0f0; border-color: #dc3545; }

/* ===================================================================
   CONTENT AREA
=================================================================== */
.content-area {
  flex: 1; display: flex; overflow: hidden;
  padding: 12px 12px 12px 0; gap: 14px;
  background: var(--bg); background-attachment: fixed;
}

/* ===================================================================
   CALENDAR CARD
=================================================================== */
.calendar-area {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden; background: var(--white);
  border-radius: var(--r-lg); box-shadow: var(--shadow-md);
  border: 1px solid var(--border); min-width: 0;
}
.employee-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 12px; border-bottom: 1px solid var(--border);
  flex-shrink: 0; gap: 12px; flex-wrap: wrap;
}
.employee-header-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.employee-name {
  font-size: 20px; font-weight: 800; color: var(--text-1);
  letter-spacing: -.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.role-badge {
  font-size: 11px; font-weight: 600; background: #e4e5e6; color: var(--text-2);
  padding: 3px 10px; border-radius: var(--r-pill); white-space: nowrap;
}
.employee-header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.month-label {
  font-size: 14px; font-weight: 700; color: var(--text-1);
  min-width: 110px; text-align: center; letter-spacing: -.01em;
}
.month-nav-btn {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); border: 1px solid var(--border);
  color: var(--text-3); background: var(--white); transition: all .15s;
}
.month-nav-btn:hover { background: var(--text-1); color: var(--white); border-color: var(--text-1); }
.summary-bar { padding: 14px 22px 10px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.summary-progress {
  height: 8px; border-radius: var(--r-pill);
  overflow: hidden; display: flex; gap: 3px;
  margin-bottom: 12px; background: #f0f0f0;
}
.progress-segment {
  height: 100%; border-radius: var(--r-pill); min-width: 4px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
}
.summary-stats { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stat-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: var(--text-2);
  background: #fcfcfc; border-radius: var(--r-pill);
  padding: 4px 11px; border: 1px solid var(--border);
}
.stat-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.work-hours-info {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-2);
  padding: 10px 22px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.work-hours-info strong { color: var(--text-1); font-weight: 700; }
.action-row { display: flex; align-items: center; gap: 6px; margin: 0; flex-wrap: wrap; }
.legend-row {
  display: flex; gap: 16px; flex-wrap: wrap;
  padding: 10px 22px 8px; font-size: 11px; color: var(--text-2); font-weight: 600;
  align-items: center; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.legend-row span { display: flex; align-items: center; gap: 5px; }
.legend-dot-sq { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ===================================================================
   CALENDAR GRID
=================================================================== */
.calendar-container { flex: 1; display: flex; flex-direction: column; overflow-y: auto; }
.calendar-container::-webkit-scrollbar { width: 4px; }
.calendar-container::-webkit-scrollbar-thumb { background: rgba(0,0,0,.08); border-radius: 2px; }
.calendar-header-row {
  display: grid; grid-template-columns: repeat(7, 1fr);
  background: #fafaf8; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.cal-header-cell {
  padding: 10px 12px; font-size: 11px; font-weight: 700;
  color: var(--text-3); text-align: center;
  text-transform: uppercase; letter-spacing: .5px;
}
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); flex: 1; }
.cal-cell {
  min-height: 88px; border-right: 1px solid var(--border-cell);
  border-bottom: 1px solid var(--border-cell); padding: 8px 10px;
  position: relative; cursor: pointer; transition: background .12s; vertical-align: top;
}
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell:hover { background: #f2f7fd; }
.cal-cell.today { background: var(--yellow-soft); }
.cal-cell.other-month { opacity: .2; pointer-events: none; }
.cal-cell.selected { background: var(--yellow-soft); box-shadow: inset 0 0 0 2px var(--yellow); }
.cal-day-number {
  font-size: 12px; font-weight: 500; color: var(--text-3);
  margin-bottom: 4px; display: inline-block; line-height: 1;
}
.today-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; background: var(--text-1); color: var(--white);
  border-radius: 6px; font-size: 12px; font-weight: 800;
}
.cal-colleagues {
  position: absolute; top: 7px; right: 8px;
  font-size: 9px; font-weight: 700; color: var(--text-2);
  background: var(--cream); border-radius: var(--r-pill);
  min-width: 17px; height: 17px; padding: 0 5px;
  display: flex; align-items: center; justify-content: center; border: 1px solid var(--border);
}
.cal-event {
  font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 6px;
  margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-left: 3px solid; display: flex; align-items: center; gap: 4px;
}
.cal-event.aprovado,
.cal-event.full-day   { background: #e6f9ee; color: #166534; border-left-color: #22c55e; }
.cal-event.pendente   { background: var(--yellow-soft); color: #78580a; border-left-color: var(--yellow); border-left-style: dashed; }
.cal-event.half-day   { width: calc(50% - 2px); min-width: 0; }
.cal-event.half-manha { align-self: flex-start; margin-right: auto; }
.cal-event.half-tarde { align-self: flex-end; margin-left: auto; }
.cal-event.aniversario { background: #fef3c7; color: #92400e; border-left-color: #f59e0b; }
.cal-cell--holiday { background: #f0f6ff !important; }
.cal-cell--holiday .cal-day-number { color: #2563eb; font-weight: 700; }
.cal-cell.weekend { background: #f5f5f0; }
.cal-cell.weekend:hover { background: #efefea; }
.cal-feriado {
  font-size: 9.5px; font-weight: 600; color: #1d4ed8; background: #dbeafe;
  border-left: 2.5px solid #2563eb; border-radius: 3px; padding: 2px 5px;
  margin: 1px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%; display: block;
}

/* ===================================================================
   QUICK PANEL
=================================================================== */
.quick-panel {
  width: 260px; min-width: 260px; background: var(--white);
  border-radius: var(--r-lg); box-shadow: var(--shadow-md); border: 1px solid var(--border);
  display: flex; flex-direction: column; overflow-y: auto; padding: 20px 16px; gap: 18px;
}
.quick-panel::-webkit-scrollbar { width: 4px; }
.quick-panel::-webkit-scrollbar-thumb { background: rgba(0,0,0,.08); border-radius: 2px; }
.qp-profile-card { display: flex; align-items: center; gap: 12px; }
.qp-avatar {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--black); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; flex-shrink: 0;
}
.qp-profile-info { min-width: 0; }
.qp-profile-name { font-size: 14px; font-weight: 700; color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qp-profile-dept { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.qp-saldo-ring-wrapper { position: relative; width: 100px; height: 100px; margin: 0 auto; }
.qp-saldo-ring { position: absolute; inset: 0; }
.qp-saldo-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.qp-saldo-num { font-size: 26px; font-weight: 800; color: var(--text-1); }
.qp-saldo-label { font-size: 9px; color: var(--text-3); font-weight: 600; }
.qp-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.qp-stat-card {
  display: flex; flex-direction: column; align-items: center;
  background: #fcfcfc; border-radius: 10px; padding: 10px 6px; border: 1px solid var(--border);
}
.qp-stat-value { font-size: 18px; font-weight: 800; color: var(--text-1); }
.qp-stat-label { font-size: 10px; color: var(--text-3); font-weight: 600; margin-top: 2px; }
.qp-actions { display: flex; flex-direction: column; gap: 6px; }
.qp-action-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 10px;
  font-size: 13px; font-weight: 600;
  background: var(--black); color: var(--white); transition: all .15s;
}
.qp-action-btn:hover { opacity: .85; }
.qp-action-btn svg { flex-shrink: 0; }
.qp-action-outline { background: #fcfcfc; color: var(--text-1); border: 1px solid var(--border); }
.qp-action-outline:hover { background: var(--cream-hover); opacity: 1; }
.qp-next-section { margin-top: auto; }
.qp-next-title { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.qp-next-list { display: flex; flex-direction: column; gap: 6px; }
.qp-next-empty { font-size: 12px; color: var(--text-3); padding: 8px 0; }
.qp-next-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; background: #fcfcfc; border: 1px solid var(--border);
}
.qp-next-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.qp-next-info { flex: 1; min-width: 0; }
.qp-next-tipo { font-size: 12px; font-weight: 600; color: var(--text-1); }
.qp-next-dates { font-size: 11px; color: var(--text-3); }

/* ===================================================================
   MODALS
=================================================================== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.35);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; animation: fadeIn .15s; padding: 16px;
}
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
.modal {
  background: var(--white); border-radius: var(--r-lg);
  width: 100%; max-width: 460px; max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border); animation: slideUp .22s ease;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity:0; }
  to   { transform: translateY(0); opacity:1; }
}
.modal-wide { max-width: 580px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px 16px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; font-weight: 800; color: var(--text-1); letter-spacing: -.03em; }
.modal-close {
  width: 28px; height: 28px; border-radius: var(--r-sm);
  font-size: 16px; color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  background: var(--cream); transition: all .15s; border: 1px solid var(--border); flex-shrink: 0;
}
.modal-close:hover { background: var(--black); color: var(--white); border-color: var(--black); }
.modal-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.modal-body::-webkit-scrollbar { width: 4px; }
.modal-body::-webkit-scrollbar-thumb { background: rgba(0,0,0,.08); border-radius: 2px; }
.modal-footer {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 8px; padding: 14px 22px; border-top: 1px solid var(--border); flex-wrap: wrap;
}
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 11px; font-weight: 700; color: var(--text-3);
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: .06em;
}
.form-select {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: var(--r-sm); background: var(--cream); color: var(--text-1);
  outline: none; transition: all .15s;
}
.form-select:focus { border-color: var(--black); background: var(--white); box-shadow: 0 0 0 3px rgba(0,0,0,.06); }
.date-range-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.selected-dates {
  display: flex; flex-wrap: wrap; gap: 6px;
  min-height: 40px; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: var(--r-sm); background: var(--cream);
}
.date-chip {
  display: flex; align-items: center; gap: 5px; padding: 4px 12px;
  background: var(--black); color: var(--white); border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600;
}
.date-chip-remove { cursor: pointer; color: rgba(255,255,255,.5); }
.date-chip-remove:hover { color: var(--white); }
.no-dates { font-size: 12px; color: var(--text-3); padding: 2px; }

/* ===================================================================
   LIST TABS
=================================================================== */
.list-tabs {
  display: flex; gap: 4px; flex-wrap: wrap;
  margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.list-tab {
  padding: 6px 14px; border-radius: var(--r-sm);
  font-size: 12px; font-weight: 600; color: var(--text-2);
  background: var(--cream); border: 1px solid var(--border); transition: all .15s;
}
.list-tab:hover { background: var(--cream-hover); color: var(--text-1); }
.list-tab.active { background: var(--black); color: var(--white); border-color: var(--black); }
.list-tab[data-status="Pendente"].active  { background: var(--yellow); color: var(--black); border-color: var(--yellow); }
.list-tab[data-status="Aprovado"].active  { background: #16a34a; color: var(--white); border-color: #16a34a; }
.list-tab[data-status="Cancelado"].active { background: #dc2626; color: var(--white); border-color: #dc2626; }
.list-tab[data-status="Recusado"].active  { background: var(--black); color: var(--white); border-color: var(--black); }

/* ===================================================================
   VACATION LIST
=================================================================== */
.vacation-list { display: flex; flex-direction: column; gap: 6px; }
.vacation-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border: 1px solid var(--border);
  border-radius: var(--r-md); transition: all .15s; background: var(--white);
  gap: 10px; flex-wrap: wrap;
}
.vacation-item:hover { background: #fafaf8; border-color: rgba(0,0,0,.12); }
.vacation-item-left { display: flex; flex-direction: column; gap: 3px; }
.vacation-item-type { font-size: 13px; font-weight: 700; color: var(--text-1); }
.vacation-item-dates { font-size: 12px; color: var(--text-3); }
.vacation-item-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.status-badge { font-size: 11px; font-weight: 600; padding: 4px 11px; border-radius: var(--r-pill); }
.status-badge.pending,   .status-badge.pendente  { background: var(--yellow-soft); color: #78580a; border: 1px solid #f5c84240; }
.status-badge.approved,  .status-badge.aprovado  { background: #e6f9ee; color: #166534; border: 1px solid #22c55e30; }
.status-badge.cancelled, .status-badge.cancelado { background: var(--cream); color: var(--text-2); border: 1px solid var(--border); }
.status-badge.refused,   .status-badge.recusado  { background: #fef2f2; color: #991b1b; border: 1px solid #dc262620; }
.btn-cancel-vacation {
  font-size: 11px; font-weight: 600; color: var(--text-2);
  padding: 4px 11px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--cream); transition: all .15s;
}
.btn-cancel-vacation:hover { background: var(--black); color: var(--white); border-color: var(--black); }
.empty-list { text-align: center; padding: 36px; color: var(--text-3); font-size: 13px; }

/* ===================================================================
   TOAST
=================================================================== */
.toast {
  position: fixed; bottom: 96px; right: 22px;
  padding: 12px 20px; background: var(--black); color: var(--white);
  border-radius: var(--r-md); font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-lg); z-index: 2000;
  display: flex; align-items: center; gap: 10px;
  animation: slideUp .2s ease; max-width: 320px;
}
.toast.success { background: #111; }
.toast.error   { background: #222; }

/* ===================================================================
   TABLET — 768px a 1024px
=================================================================== */
@media (max-width: 1024px) {
  .employee-name { font-size: 17px; }
  .cal-cell { min-height: 72px; padding: 6px 7px; }
  .cal-event { font-size: 10px; padding: 3px 6px; }
  .work-hours-info { flex-wrap: wrap; gap: 6px; }
  .summary-bar { padding: 12px 16px 8px; }
  .employee-header { padding: 14px 16px 10px; }
  .quick-panel { width: 220px; min-width: 220px; padding: 16px 12px; }
}

/* ===================================================================
   MOBILE PORTRAIT — abaixo de 768px
   FIX: content-area scrollável + calendar-area com altura natural
=================================================================== */
@media (max-width: 768px) {
  body {
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100dvh !important;
    overflow: hidden !important;
    gap: 0 !important;
  }

  /* Esconde sidebar e quick panel */
  .icon-sidebar { display: none !important; }
  .quick-panel  { display: none !important; }

  /* Mostra hamburger e bottom nav */
  .hamburger-btn     { display: flex !important; }
  .mobile-bottom-nav { display: flex !important; }

  /* Main layout */
  .main-layout {
    flex: 1 !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
  }

  /* Header fixo */
  .top-header {
    padding: 0 12px !important;
    height: 50px !important;
    min-height: 50px !important;
    flex-shrink: 0 !important;
  }
  .draft-badge    { font-size: 11px; padding: 3px 11px; }
  .schedule-title { display: none !important; }
  .status-active  { display: none !important; }
  .btn-primary    { padding: 8px 12px; font-size: 12px; border-radius: 10px; }
  .btn-text       { display: none !important; }

  /* *** CHAVE DA CORREÇÃO ***
     content-area faz scroll vertical no mobile
     calendar-area expande naturalmente sem overflow hidden */
  .content-area {
    flex: 1 !important;
    min-height: 0 !important;
    display: block !important;         /* bloco normal, não flex */
    overflow-y: auto !important;       /* scroll vertical aqui */
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 8px 8px calc(var(--mobile-nav-h) + 12px) 8px !important;
    background: var(--bg) !important;
    background-attachment: fixed !important;
  }

  /* Calendar area: altura automática */
  .calendar-area {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    overflow: visible !important;
    border-radius: 14px !important;
    width: 100% !important;
  }

  /* Calendar container e grid: expandem naturalmente */
  .calendar-container {
    flex: none !important;
    overflow: visible !important;
    height: auto !important;
  }
  .calendar-grid { height: auto !important; }

  /* Cabeçalho calendário */
  .employee-header { padding: 12px 14px; gap: 8px; }
  .employee-name   { font-size: 16px; }
  .role-badge      { display: none; }
  .month-label     { font-size: 13px; min-width: 90px; }
  .month-nav-btn   { width: 32px; height: 32px; }

  /* Barra de resumo */
  .summary-bar  { padding: 10px 14px; }
  .summary-stats {
    gap: 5px; flex-wrap: nowrap; overflow-x: auto;
    padding-bottom: 2px; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .summary-stats::-webkit-scrollbar { display: none; }
  .stat-item { font-size: 11px; padding: 3px 9px; white-space: nowrap; flex-shrink: 0; }

  /* Work hours */
  .work-hours-info {
    flex-direction: column; align-items: flex-start;
    gap: 8px; padding: 10px 14px; font-size: 12px;
  }
  .action-row { width: 100%; flex-wrap: wrap; gap: 6px; }
  .btn-sm     { padding: 8px 14px; font-size: 12px; border-radius: 8px; min-height: 36px; }

  /* Legenda */
  .legend-row { padding: 8px 14px; gap: 10px; font-size: 11px; }

  /* Cabeçalho dos dias */
  .cal-header-cell { padding: 8px 2px; font-size: 10px; letter-spacing: 0; }

  /* Células */
  .cal-cell       { min-height: 64px; padding: 5px 4px; }
  .cal-day-number { font-size: 11px; }
  .today-dot      { width: 22px; height: 22px; font-size: 11px; border-radius: 6px; }
  .cal-colleagues { top: 4px; right: 4px; min-width: 15px; height: 15px; font-size: 8px; padding: 0 3px; }
  .cal-event      { font-size: 10px; padding: 3px 5px; border-radius: 5px; border-left-width: 2.5px; }
  .cal-feriado    { font-size: 9px; padding: 2px 4px; }

  /* Modais sobem desde baixo */
  .modal-overlay { padding: 0 !important; align-items: flex-end !important; }
  .modal {
    border-radius: 20px 20px 0 0 !important;
    max-width: 100% !important;
    max-height: 88dvh !important;
    width: 100% !important;
  }
  .modal-wide  { max-width: 100% !important; }
  .modal-header { padding: 18px 18px 14px; }
  .modal-body   { padding: 14px 18px; }
  .modal-footer { padding: 12px 18px; }
  .date-range-row { grid-template-columns: 1fr !important; gap: 10px; }

  /* Toast acima do bottom nav */
  .toast {
    bottom: calc(var(--mobile-nav-h) + 10px) !important;
    right: 10px !important; left: 10px !important; max-width: none !important;
  }
}

/* ===================================================================
   MOBILE LANDSCAPE — deitado abaixo de 900px
=================================================================== */
/* ===================================================================
   MOBILE LANDSCAPE — substituir bloco no index.css
   Apaga: @media (max-width: 900px) and (orientation: landscape) { ... }
   Cola este bloco no lugar
=================================================================== */

@media (orientation: landscape) and (max-height: 600px) {

  body {
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100dvh !important;
    overflow: hidden !important;
    gap: 0 !important;
  }

  .icon-sidebar      { display: none !important; }
  .mobile-bottom-nav { display: none !important; }
  .hamburger-btn     { display: flex !important; }

  .main-layout {
    flex: 1 !important;
    min-height: 0 !important;
    min-width: 0 !important;
    height: 100dvh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  /* HEADER: 40px */
  .top-header {
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 10px !important;
    flex-shrink: 0 !important;
  }
  .draft-badge    { font-size: 10px !important; padding: 2px 9px !important; }
  .schedule-title { display: none !important; }
  .status-active  { display: none !important; }
  .btn-text       { display: none !important; }
  .btn-primary    { padding: 6px 10px !important; border-radius: 8px !important; font-size: 11px !important; }

  /* CONTENT: calendário + painel lado a lado */
  .content-area {
    flex: 1 !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    overflow: hidden !important;
    padding: 6px 8px !important;
    align-items: stretch !important;
  }

  /* CALENDÁRIO */
  .calendar-area {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    display: flex !important;
    flex-direction: column !important;
  }
  .calendar-container {
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    height: auto !important;
  }
  .calendar-grid   { height: auto !important; }
  .summary-bar     { display: none !important; }
  .work-hours-info { display: none !important; }
  .legend-row      { display: none !important; }

  .employee-header { padding: 5px 10px !important; flex-wrap: nowrap !important; flex-shrink: 0 !important; }
  .employee-name   { font-size: 12px !important; }
  .role-badge      { display: none !important; }
  .month-label     { font-size: 11px !important; min-width: 68px !important; }
  .month-nav-btn   { width: 24px !important; height: 24px !important; }

  .cal-header-cell { padding: 4px 1px !important; font-size: 8px !important; letter-spacing: 0 !important; }
  .cal-cell        { min-height: 42px !important; padding: 3px 2px !important; }
  .cal-day-number  { font-size: 9px !important; margin-bottom: 1px !important; }
  .today-dot       { width: 16px !important; height: 16px !important; font-size: 8.5px !important; border-radius: 4px !important; }
  .cal-colleagues  { top: 2px !important; right: 2px !important; min-width: 11px !important; height: 11px !important; font-size: 6.5px !important; padding: 0 2px !important; }
  .cal-event       { font-size: 7.5px !important; padding: 1px 3px !important; margin-top: 1px !important; border-left-width: 2px !important; border-radius: 3px !important; }
  .cal-feriado     { font-size: 7px !important; padding: 1px 2px !important; border-left-width: 2px !important; }

  /* QUICK PANEL: coluna slim 160px */
  .quick-panel {
    display: flex !important;
    flex-direction: column !important;
    width: 160px !important;
    min-width: 150px !important;
    max-width: 170px !important;
    height: 100% !important;
    border-radius: 12px !important;
    padding: 10px 9px !important;
    gap: 6px !important;
    overflow-y: auto !important;
    flex-shrink: 0 !important;
  }
  .quick-panel::-webkit-scrollbar       { width: 3px; }
  .quick-panel::-webkit-scrollbar-thumb { background: rgba(0,0,0,.08); border-radius: 2px; }

  /* Avatar + nome: horizontal compacto */
  .qp-profile-card { gap: 7px !important; }
  .qp-avatar       { width: 28px !important; height: 28px !important; border-radius: 7px !important; font-size: 10px !important; flex-shrink: 0 !important; }
  .qp-profile-name { font-size: 10px !important; font-weight: 700 !important; }
  .qp-profile-dept { font-size: 9px !important; }

  /* Ring: miniaturizado para 64px e centralizado */
  .qp-saldo-ring-wrapper {
    width: 64px !important;
    height: 64px !important;
    margin: 0 auto !important;
    position: relative !important;
    flex-shrink: 0 !important;
  }
  .qp-saldo-ring {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }
  /* O SVG tem viewBox="0 0 100 100" e r=42 — escala automaticamente */
  .qp-saldo-center {
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .qp-saldo-num   { font-size: 18px !important; font-weight: 800 !important; line-height: 1 !important; }
  .qp-saldo-label { font-size: 7px !important; font-weight: 600 !important; margin-top: 1px !important; }

  /* Stats: 3 cartões em linha */
  .qp-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 4px !important;
  }
  .qp-stat-card {
    padding: 6px 3px !important;
    border-radius: 7px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }
  .qp-stat-value { font-size: 14px !important; font-weight: 800 !important; line-height: 1.1 !important; }
  .qp-stat-label { font-size: 7.5px !important; font-weight: 600 !important; margin-top: 1px !important; }

  /* Botões */
  .qp-actions    { gap: 4px !important; }
  .qp-action-btn { padding: 6px 8px !important; font-size: 10px !important; border-radius: 8px !important; gap: 5px !important; }
  .qp-action-btn svg { width: 12px !important; height: 12px !important; flex-shrink: 0 !important; }

  /* Próximas ausências */
  .qp-next-section { margin-top: 0 !important; }
  .qp-next-title   { font-size: 9px !important; margin-bottom: 4px !important; }
  .qp-next-empty   { font-size: 10px !important; }
  .qp-next-item    { padding: 5px 6px !important; border-radius: 7px !important; gap: 6px !important; }
  .qp-next-dot     { width: 6px !important; height: 6px !important; flex-shrink: 0 !important; }
  .qp-next-tipo    { font-size: 10px !important; font-weight: 600 !important; }
  .qp-next-dates   { font-size: 9px !important; }

  /* Modais */
  .modal-overlay { padding: 10px !important; align-items: center !important; }
  .modal         { border-radius: 16px !important; max-height: 94dvh !important; max-width: 440px !important; }
  .modal-wide    { max-width: 520px !important; }
  .modal-header  { padding: 14px 16px 12px !important; }
  .modal-body    { padding: 12px 16px !important; }
  .modal-footer  { padding: 10px 16px !important; }
  .date-range-row { grid-template-columns: 1fr 1fr !important; }

  .toast { bottom: 10px !important; right: 10px !important; left: auto !important; max-width: 260px !important; }
}

/* ===================================================================
   MOBILE PEQUENO — abaixo de 480px
=================================================================== */
@media (max-width: 480px) {
  .cal-cell       { min-height: 58px !important; padding: 4px 3px !important; }
  .cal-day-number { font-size: 10px !important; font-weight: 600 !important; margin-bottom: 2px !important; }
  .today-dot      { width: 20px !important; height: 20px !important; font-size: 10px !important; }
  .cal-colleagues { top: 3px !important; right: 3px !important; min-width: 14px !important; height: 14px !important; }
  .cal-event {
    display: block !important; font-size: 8.5px !important; font-weight: 700 !important;
    padding: 2px 4px !important; border-radius: 4px !important; border-left-width: 2px !important;
    margin-top: 1px !important; line-height: 1.4 !important;
    white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important;
  }
  .cal-feriado {
    font-size: 8px !important; padding: 1px 3px !important; border-left-width: 2px !important;
    white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important;
  }
  .cal-header-cell { font-size: 9px !important; padding: 7px 1px !important; letter-spacing: 0 !important; }
  .employee-name { font-size: 14px; }
  .draft-badge   { font-size: 10px; padding: 2px 9px; }
}

/* ===================================================================
   TOUCH OPTIMIZATIONS
=================================================================== */
@media (hover: none) and (pointer: coarse) {
  .cal-cell { -webkit-tap-highlight-color: transparent; }
  .cal-cell:active { background: var(--cream); }
  .btn-primary:active, .qp-action-btn:active { opacity: .7; }
  .month-nav-btn:active { background: var(--cream); }
  .modal-close   { width: 34px; height: 34px; }
  .list-tab      { padding: 8px 16px; }
  .month-nav-btn { width: 34px; height: 34px; }
  .btn-sm        { min-height: 40px; }
  .mobile-nav-btn { min-width: 60px; padding: 10px 16px; }
}

/* ===================================================================
   HIGH DPI
=================================================================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .cal-cell { border-right-width: 0.5px; border-bottom-width: 0.5px; }
  .summary-progress { height: 6px; }
}

/* ===================================================================
   REDUCED MOTION
=================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}