/* ============================================================
   TALARYS — Design System
   Tema: "ink & tide" — sidebar inchiostro, topbar chiara, blu marea
   Font: Plus Jakarta Sans (UI) · IBM Plex Mono (numeri)

   I nomi delle classi/variabili sono quelli storici (--navy, .card,
   .badge-*, .checker-*): le pagine li usano ovunque, quindi qui si
   cambiano i VALORI, non i nomi, e tutta l'app si riallinea da sola.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* Brand — blu "marea": più vivo del navy vecchio, stessa famiglia */
  --navy:       #2456C4;
  --navy-dark:  #1B3F97;
  --navy-light: #4C7BE0;
  --navy-tint:  #EEF3FE;   /* fondo tenue per stati attivi/selezionati */
  --steel:      #3E8FB0;
  --steel-light:#6FB6D2;

  /* Inchiostro e superfici */
  --ink:        #0F1729;   /* sidebar, testi forti */
  --ink-soft:   #1B2740;
  --text:       #1F2A3C;
  --grey:       #5B6478;
  --grey-light: #8B93A7;
  --grey-text:  #5B6478;
  --grey-bg:    #F4F6FB;   /* fondo pagina */
  --grey-border:#E4E8F1;
  --white:      #FFFFFF;

  /* Semantici */
  --success: #0E9F6E;
  --warning: #D97706;
  --danger:  #E02424;
  --info:    #0891B2;

  --sidebar-w: 236px;
  --sidebar-collapsed-w: 60px;
  --topbar-h:  64px;

  --radius:    10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(15,23,41,.06);
  --shadow:    0 1px 2px rgba(15,23,41,.05), 0 6px 16px -8px rgba(15,23,41,.14);
  --shadow-lg: 0 12px 32px -12px rgba(15,23,41,.28);
  --ring:      0 0 0 3px rgba(36,86,196,.18);

  --t-fast: .12s ease;
  --t:      .2s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

html, body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--grey-bg);
  height: 100%;
  -webkit-font-smoothing: antialiased;
}

/* Nessun scroll orizzontale della pagina: le tabelle larghe scrollano dentro la loro card */
body { overflow-x: hidden; }

h1, h2, h3, h4 { letter-spacing: -.015em; color: var(--ink); font-weight: 700; }

::selection { background: rgba(36,86,196,.18); }

/* Focus visibile e coerente su tutta l'app (accessibilità da tastiera) */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--radius);
}

/* ── LAYOUT ────────────────────────────────────────────────── */
.talarys-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── TOPBAR ───────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  color: var(--text);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 10px;
  z-index: 1000;
  border-bottom: 1px solid var(--grey-border);
}

.topbar-logo-wrap {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: var(--radius);
}

.topbar-logo { height: 40px; width: auto; display: block; }

.topbar-brand {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink);
  text-decoration: none;
}

.topbar-spacer { flex: 1; }

.topbar-actions { display: flex; align-items: center; gap: 4px; }

/* Il nome utente porta anche .btn-icon (40x40 fissi): senza width auto il nome
   viene tagliato via e resta un quadratino vuoto. */
.topbar-user {
  width: auto !important;
  height: auto !important;
  min-height: 36px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text) !important;
  padding: 6px 12px !important;
  border-radius: var(--radius-pill) !important;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-icon {
  background: none;
  border: none;
  color: var(--grey);
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast), color var(--t-fast);
}
.btn-icon:hover { background: var(--grey-bg); color: var(--navy); }

/* Hamburger: solo mobile — su desktop la sidebar si fissa/riduce col pin */
.topbar-hamburger { display: none; }

.notification-badge { position: relative; display: inline-flex; }

.notification-count {
  position: absolute;
  top: 4px; right: 4px;
  background: var(--danger);
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  min-width: 17px;
  height: 17px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--white);
}

/* ── LANGUAGE SELECTOR ────────────────────────────────────── */
.lang-overlay { position: fixed; inset: 0; z-index: 1100; }
.lang-selector { position: relative; z-index: 1101; }

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--grey-border);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-pill);
  padding: 6px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.lang-btn:hover { border-color: var(--navy-light); box-shadow: var(--shadow-xs); }
.lang-btn img { border-radius: 2px; display: block; }

.lang-chevron { font-size: 10px; color: var(--grey-light); }

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 150px;
  overflow: hidden;
  padding: 4px;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  background: none;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.lang-option:hover  { background: var(--grey-bg); }
.lang-option.active { background: var(--navy-tint); font-weight: 600; color: var(--navy); }
.lang-option img    { border-radius: 2px; flex-shrink: 0; }

/* ── SIDEBAR ──────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--ink);
  color: #A9B3C7;
  border-right: 1px solid rgba(255,255,255,.06);
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 900;
  padding: 10px 8px 0;
  display: flex;
  flex-direction: column;
  transition: width var(--t), transform var(--t);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.18) transparent;
}
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 8px; }

.sidebar-section { padding: 4px 0; }

.sidebar-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: #6B7690;
  padding: 12px 12px 6px;
  white-space: nowrap;
}

.sidebar-divider {
  height: 1px;
  background: rgba(255,255,255,.07);
  margin: 6px 10px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 9px 12px;
  margin: 1px 0;
  color: #A9B3C7;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: var(--radius);
  transition: background var(--t-fast), color var(--t-fast);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}

.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }

/* Attivo: pillola blu piena — leggibile anche a colpo d'occhio sul dark */
.nav-link.active {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 16px -8px rgba(36,86,196,.9);
}
.nav-link.active:hover { background: var(--navy-light); }

.nav-link .nav-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: inherit;
}

.sidebar-pin {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  background: var(--ink);
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 6px 0;
}
.sidebar-pin-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  width: 100%;
  background: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: #7C879E;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar-pin-btn:hover { color: #fff; background: rgba(255,255,255,.06); }

/* Sidebar ridotta: icone sole, si espande in hover */
.sidebar-collapsed .sidebar { width: var(--sidebar-collapsed-w); }
.sidebar-collapsed .sidebar:hover {
  width: var(--sidebar-w);
  box-shadow: var(--shadow-lg);
  z-index: 950;
}
.sidebar-collapsed .sidebar:not(:hover) .nav-text,
.sidebar-collapsed .sidebar:not(:hover) .sidebar-label { display: none; }
.sidebar-collapsed .sidebar:not(:hover) .nav-link,
.sidebar-collapsed .sidebar:not(:hover) .sidebar-pin-btn { justify-content: center; padding: 9px 0; }
.sidebar-collapsed .main-content,
.sidebar-collapsed .app-footer { margin-left: var(--sidebar-collapsed-w); }

/* Impersonazione: la banda arancione sta sopra tutto, quindi topbar e sidebar
   scendono di 40px — altrimenti la topbar ci finisce sotto e sparisce. */
.impersonating .topbar  { top: 40px; }
.impersonating .sidebar { top: calc(var(--topbar-h) + 40px); }

/* Velo scuro dietro il drawer su mobile */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,41,.45);
  backdrop-filter: blur(2px);
  z-index: 890;
  border: none;
  cursor: pointer;
  animation: fade-in .18s ease;
}

/* ── MAIN + FOOTER ────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  margin-top: var(--topbar-h);
  padding: 24px 28px;
  flex: 1 0 auto;
  min-width: 0;
  animation: page-in .28s ease both;
}

.app-footer {
  margin-left: var(--sidebar-w);
  flex-shrink: 0;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--grey-light);
  border-top: 1px solid var(--grey-border);
  background: var(--white);
}

@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── CARDS ────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin-bottom: 18px;
  min-width: 0;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--grey-border);
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
}

/* ── STAT CARDS ───────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px 18px 16px 20px;
  overflow: hidden;
  transition: transform var(--t), box-shadow var(--t);
}
.stat-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--navy);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-card.success::before { background: var(--success); }
.stat-card.warning::before { background: var(--warning); }
.stat-card.danger::before  { background: var(--danger); }
.stat-card.info::before    { background: var(--info); }

.stat-label {
  font-size: 11px;
  color: var(--grey-light);
  text-transform: uppercase;
  letter-spacing: .07em;
  font-weight: 700;
}

.stat-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--ink);
  margin-top: 6px;
}

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }

.btn-primary   { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-primary:hover { background: var(--navy-dark); border-color: var(--navy-dark); }
.btn-secondary { background: var(--white); color: var(--navy); border-color: var(--grey-border); }
.btn-secondary:hover { background: var(--navy-tint); border-color: var(--navy-light); }
.btn-danger    { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-success   { background: var(--success); color: #fff; border-color: var(--success); }
.btn-sm        { min-height: 30px; padding: 5px 11px; font-size: 12px; }

.btn-link {
  font-family: inherit;
}

/* ── BADGES ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge-draft     { background: #F1F3F8; color: #59627A; border-color: #E4E8F1; }
.badge-submitted { background: #E8F0FE; color: #1B3F97; border-color: #CFE0FC; }
.badge-approved  { background: #E3F7EF; color: #076C4B; border-color: #C4EEDD; }
.badge-rejected  { background: #FDE8E8; color: #9B1C1C; border-color: #FACDCD; }
.badge-purple    { background: #F0EBFE; color: #5B21B6; border-color: #DDD1FB; }
.badge-pending   { background: #FDF3DA; color: #92400E; border-color: #FBE3AE; }

/* ── TABELLE (le pagine usano <table> "nude") ─────────────── */
.card table { border-collapse: collapse; width: 100%; }
.card table thead th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--grey-light);
  background: transparent;
}
.card table tbody tr { transition: background var(--t-fast); }
.card table tbody tr:hover { background: var(--navy-tint); }

/* ── CHECKERBOARD GRID (timesheet/risorse) ────────────────── */
.checker-grid { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.checker-table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  width: 100%;
  min-width: 800px;
}

.checker-table th {
  background: var(--ink);
  color: #fff;
  padding: 9px 10px;
  text-align: center;
  font-weight: 600;
  font-size: 11px;
  position: sticky;
  top: 0;
  z-index: 3;
}

.checker-table th.user-col {
  text-align: left;
  min-width: 170px;
  position: sticky;
  left: 0;
  z-index: 4;
}

.checker-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--grey-border);
  border-right: 1px solid var(--grey-border);
  text-align: center;
  vertical-align: middle;
}

.checker-table td.user-col {
  text-align: left;
  font-weight: 600;
  position: sticky;
  left: 0;
  background: var(--white);
  z-index: 1;
}

.checker-table tr:hover td { background: var(--navy-tint); }

.checker-cell {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  cursor: pointer;
}

.checker-cell.has-hours { background: var(--navy-tint); color: var(--navy-dark); font-weight: 600; }
.checker-cell.holiday   { background: #FDF3DA; color: var(--warning); }
.checker-cell.weekend   { background: var(--grey-bg); color: var(--grey-light); }
.checker-cell.leave     { background: #E3F7EF; color: var(--success); }

.checker-cell.missing-hours { animation: blink-missing 1.4s ease-in-out infinite; color: #7F1D1D; font-weight: 700; }
.checker-cell.partial-hours { animation: blink-partial 1.8s ease-in-out infinite; color: #78350F; font-weight: 700; }

@keyframes blink-missing { 0%,100% { background: #FDE8E8; } 50% { background: #F8B4B4; } }
@keyframes blink-partial { 0%,100% { background: #FDF3DA; } 50% { background: #FCE96A; } }

/* Macro Planning — cartellini progetto/gate */
.macro-card { background: white; transition: box-shadow .15s ease; }
.macro-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.14) !important; }
.macro-card-overdue { animation: macro-overdue 1.3s ease-in-out infinite; }
@keyframes macro-overdue {
  0%,100% { background: #FDE8E8; border-color: #DC2626; }
  50%     { background: #F8B4B4; border-color: #B91C1C; }
}
.macro-swatch { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: middle; margin-right: 3px; }

.checker-legend { display: inline-block; padding: 3px 9px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 600; }
.checker-legend.has-hours            { background: var(--navy-tint); color: var(--navy); }
.checker-legend.missing-hours-legend { background: #FDE8E8; color: #7F1D1D; }
.checker-legend.partial-hours-legend { background: #FDF3DA; color: #78350F; }

.grid-row-user { background: var(--ink); }
.grid-row-user td.user-col { background: var(--ink) !important; color: #fff !important; }
.grid-row-user td.mono { color: #fff; }
.grid-row-user .checker-cell { color: rgba(255,255,255,.5); }
.grid-row-user .checker-cell.has-hours { background: rgba(255,255,255,.16); color: #fff; }
.grid-row-user .checker-cell.missing-hours { color: #7F1D1D; }
.grid-row-user .checker-cell.partial-hours { color: #78350F; }
.grid-row-user:hover td.user-col { background: var(--ink-soft) !important; }

.grid-row-project    { background: var(--navy-tint); }
.grid-row-project td { color: var(--navy-dark); }
.grid-row-project:hover { background: #E1EAFD; }

.grid-row-phase    { background: var(--white); }
.grid-row-phase td { color: var(--grey); }
.grid-row-phase:hover { background: var(--grey-bg); }

/* ── CALENDARIO ───────────────────────────────────────────── */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }

.cal-day-header {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  color: var(--grey-light);
  padding: 4px;
  text-transform: uppercase;
}

.cal-cell {
  position: relative;
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
  padding: 7px;
  min-height: 68px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}

.cal-cell:hover { border-color: var(--navy-light); box-shadow: var(--shadow-xs); transform: translateY(-1px); }
.cal-cell.today { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.cal-cell.selected { border-color: var(--navy); background: var(--navy-tint); box-shadow: var(--ring); }
.cal-cell.other-month { opacity: .38; }
.cal-cell.weekend { background: var(--grey-bg); }
.cal-cell.holiday { background: #FFFBEB; }

/* Pallino di quadratura: centrato in orizzontale nella cella, sulla riga del
   numero del giorno. In alto a destra finiva sopra al numero/totale ore. */
.cal-status-dot {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  width: 8px; height: 8px;
  border-radius: 50%;
}
.cal-status-dot.dot-ok      { background: var(--success); }
.cal-status-dot.dot-partial { background: var(--warning); }
.cal-status-dot.dot-missing { background: var(--danger); animation: blink-missing 1.4s ease-in-out infinite; }
.cal-expense-dot { display: inline-block; font-size: 10px; font-weight: 700; color: #076C4B; background: #E3F7EF; border-radius: 4px; padding: 0 4px; margin-top: 2px; }

.cal-date { font-size: 12px; font-weight: 700; color: var(--grey); margin-bottom: 4px; }

.cal-entry {
  background: var(--navy-tint);
  border-left: 3px solid var(--navy);
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 11px;
  margin-top: 3px;
  color: var(--navy-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-hours-total {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}

/* ============================================================
   CALENDARIO STILE iOS — mese, settimana, giorno
   Mese: celle senza bordi, numero del giorno, chip colorate per attività.
   Settimana/Giorno: griglia oraria con banda "tutto il giorno" per le voci
   dichiarate a ore senza orario, blocchi posizionati per le voci con fascia
   oraria, linea rossa dell'ora corrente.
   Il colore della chip viene dal progetto (c1..c6): stesso progetto, stesso
   colore in tutte e tre le viste.
   ============================================================ */

/* Colori per progetto — tinta chiara + accento saturo, come i "calendari" iOS */
.evt-c1 { --evt: #2456C4; --evt-bg: #E8F0FE; --evt-fg: #16357C; }
.evt-c2 { --evt: #0E9F6E; --evt-bg: #E3F7EF; --evt-fg: #076C4B; }
.evt-c3 { --evt: #D97706; --evt-bg: #FDF3DA; --evt-fg: #92400E; }
.evt-c4 { --evt: #9333EA; --evt-bg: #F3EAFE; --evt-fg: #5B21B6; }
.evt-c5 { --evt: #0891B2; --evt-bg: #E0F5FA; --evt-fg: #0B6479; }
.evt-c6 { --evt: #E02424; --evt-bg: #FDE8E8; --evt-fg: #9B1C1C; }

/* ── Mese ─────────────────────────────────────────────────── */
.ios-month .cal-cell {
  border: none;
  border-top: 1px solid var(--grey-border);
  border-radius: 0;
  background: transparent;
  padding: 4px 5px 5px;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ios-month .cal-cell:hover { background: var(--grey-bg); box-shadow: none; transform: none; }
.ios-month .cal-cell.today { border-top-color: var(--grey-border); box-shadow: none; }
.ios-month .cal-cell.selected { background: var(--navy-tint); box-shadow: inset 0 0 0 2px var(--navy); border-radius: 10px; }
.ios-month .cal-cell.weekend { background: transparent; }
.ios-month .cal-cell.weekend .cal-daynum { color: var(--grey-light); }

.cal-daynum {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
}
/* Oggi: pastiglia rossa piena, come iOS */
.cal-cell.today .cal-daynum { background: var(--danger); color: #fff; font-weight: 700; }

.cal-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--evt-bg, var(--navy-tint));
  color: var(--evt-fg, var(--navy-dark));
  border-radius: 5px;
  padding: 2px 5px;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.cal-chip::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--evt, var(--navy));
  flex-shrink: 0;
}
.cal-chip .chip-h { font-family: 'IBM Plex Mono', monospace; opacity: .85; }
.cal-chip-more { font-size: 10px; font-weight: 600; color: var(--grey-light); padding-left: 3px; }
.cal-chip.chip-exp { background: #FDF3DA; color: #92400E; }
.cal-chip.chip-exp::before { background: var(--warning); }

/* Assenze (ferie/permesso): approvate = verde (colpo d'occhio ok), richiesta in attesa = rossa "da approvare".
   Le classi impostano le variabili --evt* usate sia da .cal-chip sia da .ios-event. */
.chip-leave-approved { --evt: #0E9F6E; --evt-bg: #E3F7EF; --evt-fg: #076C4B; }
.cal-chip.chip-leave-pending { --evt: #E02424; --evt-bg: #FDE8E8; --evt-fg: #9B1C1C; font-style: italic; }

/* ── Griglia oraria (settimana + giorno) ──────────────────── */
.ios-grid {
  --gutter: 56px;
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.ios-head {
  display: grid;
  grid-template-columns: var(--gutter) repeat(var(--cols, 7), minmax(0, 1fr));
  border-bottom: 1px solid var(--grey-border);
  position: sticky;
  top: var(--topbar-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  z-index: 2;
}
.ios-head-day { padding: 8px 4px; text-align: center; border-left: 1px solid var(--grey-border); }
.ios-head-day:first-child { border-left: none; }
.ios-head-dow {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--grey-light);
}
.ios-head-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px; height: 28px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 2px;
}
.ios-head-day.today .ios-head-dow { color: var(--danger); }
.ios-head-day.today .ios-head-num { background: var(--danger); color: #fff; }
.ios-head-day.off .ios-head-num { color: var(--grey-light); font-weight: 600; }
.ios-head-tot { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 600; color: var(--success); }
.ios-head-missing { font-size: 10px; font-weight: 600; color: var(--danger); }

/* Banda "tutto il giorno": voci a ore senza fascia oraria + spese */
.ios-allday {
  display: grid;
  grid-template-columns: var(--gutter) repeat(var(--cols, 7), minmax(0, 1fr));
  border-bottom: 1px solid var(--grey-border);
  background: var(--grey-bg);
  min-height: 34px;
}
.ios-allday-label {
  font-size: 10px;
  color: var(--grey-light);
  text-align: right;
  padding: 6px 6px 0 0;
  line-height: 1.2;
}
.ios-allday-col { border-left: 1px solid var(--grey-border); padding: 4px; display: flex; flex-direction: column; gap: 3px; }

.ios-body {
  display: grid;
  grid-template-columns: var(--gutter) repeat(var(--cols, 7), minmax(0, 1fr));
  position: relative;
}

.ios-hours { border-right: 1px solid var(--grey-border); background: var(--white); }
.ios-hour-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  color: var(--grey-light);
  text-align: right;
  padding: 2px 6px 0 0;
  box-sizing: border-box;
  transform: translateY(-6px);
}

.ios-col {
  position: relative;
  border-left: 1px solid var(--grey-border);
  background:
    repeating-linear-gradient(to bottom,
      transparent, transparent calc(var(--hpx) - 1px),
      var(--grey-border) calc(var(--hpx) - 1px), var(--grey-border) var(--hpx));
}
.ios-col.off { background-color: #FAFBFE; }
.ios-slot { cursor: pointer; transition: background var(--t-fast); }
.ios-slot:hover { background: rgba(36,86,196,.06); }

.ios-event {
  position: absolute;
  left: 3px; right: 3px;
  background: var(--evt-bg, var(--navy-tint));
  border-left: 3px solid var(--evt, var(--navy));
  border-radius: 6px;
  padding: 3px 6px;
  overflow: hidden;
  cursor: pointer;
  box-sizing: border-box;
  box-shadow: var(--shadow-xs);
  transition: filter var(--t-fast);
}
.ios-event:hover { filter: brightness(.97); }
.ios-event .evt-time { font-family: 'IBM Plex Mono', monospace; font-size: 10px; font-weight: 600; color: var(--evt-fg, var(--navy-dark)); }
.ios-event .evt-title { font-size: 11px; font-weight: 600; color: var(--evt-fg, var(--navy-dark)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ios-event .evt-sub { font-size: 10px; color: var(--grey); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Linea dell'ora corrente */
.ios-now { position: absolute; left: 0; right: 0; height: 0; border-top: 1.5px solid var(--danger); z-index: 3; pointer-events: none; }
.ios-now::before {
  content: "";
  position: absolute;
  left: -4px; top: -4px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--danger);
}
.ios-now-label {
  position: absolute;
  right: 4px; top: -8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  color: var(--danger);
  background: var(--white);
  padding: 0 3px;
  border-radius: 3px;
}

/* ── Drag & drop delle attività (solo desktop) ─────────────
   Trascinando il blocco si sposta la fascia oraria; trascinando la maniglia
   (le tre righe in basso) se ne cambia la durata. Passo: 15 minuti. */
.ios-event.draggable { cursor: grab; touch-action: none; }
.ios-event.dragging {
  cursor: grabbing;
  z-index: 4;
  box-shadow: var(--shadow-lg);
  filter: brightness(1.02);
  user-select: none;
}

/* Maniglia: tre righe orizzontali (gradiente ripetuto: niente markup in più) */
.evt-handle {
  position: absolute;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
  width: 36px;
  height: 9px;
  cursor: ns-resize;
  opacity: 0;
  transition: opacity var(--t-fast);
  background-image: repeating-linear-gradient(
    to bottom,
    var(--evt, var(--navy)) 0 1.5px,
    transparent 1.5px 4px);
  background-size: 100% 12px;
  border-radius: 2px;
}
.ios-event:hover .evt-handle,
.ios-event.dragging .evt-handle { opacity: .8; }

/* Su telefono/tablet e su touch niente trascinamento: si modifica dal dialog */
@media (max-width: 900px), (pointer: coarse) {
  .ios-event.draggable { cursor: pointer; touch-action: auto; }
  .evt-handle { display: none; }
}

/* Tasto spese nella testata del giorno (settimana): "+ spesa" o il totale già speso */
.ios-exp-btn {
  margin-top: 4px;
  width: 100%;
  border: 1px dashed var(--grey-border);
  border-radius: var(--radius-pill);
  background: none;
  color: var(--grey-light);
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  cursor: pointer;
  white-space: nowrap;
}
.ios-exp-btn:hover:not(:disabled) { border-color: var(--warning); color: #92400E; background: #FDF3DA; }
.ios-exp-btn:disabled { opacity: .45; cursor: default; }
.ios-exp-btn.has-exp { border-style: solid; border-color: #FBE3AE; background: #FDF3DA; color: #92400E; }

/* Spesa su una singola attività: eredita progetto e fase di quel blocco */
.evt-exp {
  position: absolute;
  right: 3px;
  bottom: 3px;
  border: 1px solid var(--evt, var(--navy));
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.85);
  color: var(--evt-fg, var(--navy-dark));
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  padding: 2px 5px;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--t-fast);
}
.ios-event:hover .evt-exp,
.evt-exp:focus-visible { opacity: 1; }
.evt-exp:hover { background: #fff; }

/* Su touch non c'è hover: il tasto resta sempre visibile */
@media (hover: none) {
  .evt-exp { opacity: 1; }
}

.ios-add {
  width: 100%;
  border: 1px dashed var(--grey-border);
  border-radius: 6px;
  background: none;
  color: var(--grey-light);
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  padding: 4px;
  cursor: pointer;
}
.ios-add:hover { border-color: var(--navy-light); color: var(--navy); background: var(--navy-tint); }

/* ── SATURATION BAR ───────────────────────────────────────── */
.sat-bar-wrap { background: var(--grey-border); border-radius: var(--radius-pill); height: 8px; overflow: hidden; width: 100%; }
.sat-bar-fill { height: 100%; border-radius: var(--radius-pill); transition: width .4s cubic-bezier(.4,0,.2,1); }
.sat-bar-fill.ok   { background: var(--success); }
.sat-bar-fill.warn { background: var(--warning); }
.sat-bar-fill.over { background: var(--danger); }

/* ── NOTIFICHE ────────────────────────────────────────────── */
.notif-panel {
  position: fixed;
  top: var(--topbar-h);
  right: 12px;
  width: 370px;
  max-width: calc(100vw - 24px);
  background: var(--white);
  border: 1px solid var(--grey-border);
  box-shadow: var(--shadow-lg);
  z-index: 1100;
  max-height: calc(100vh - var(--topbar-h) - 16px);
  overflow-y: auto;
  border-radius: var(--radius-lg);
  animation: page-in .18s ease both;
}

.notif-item { padding: 12px 16px; border-bottom: 1px solid var(--grey-border); cursor: pointer; transition: background var(--t-fast); }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--grey-bg); }
.notif-item.unread { background: var(--navy-tint); }
.notif-item.unread .notif-title { font-weight: 700; }

.notif-title { font-size: 13px; color: var(--text); }
.notif-body  { font-size: 12px; color: var(--grey); margin-top: 2px; }
.notif-time  { font-size: 11px; color: var(--grey-light); margin-top: 4px; }

/* ── LOGIN ────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(76,123,224,.35), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, rgba(62,143,176,.35), transparent 55%),
    var(--ink);
}

.login-card {
  background: var(--white);
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.5);
  text-align: center;
  animation: page-in .35s ease both;
}

.login-logo { height: 60px; margin-bottom: 10px; }
.login-brand { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin-bottom: 26px; }

/* ── RADZEN ───────────────────────────────────────────────── */
.rz-button {
  font-family: inherit !important;
  font-weight: 600 !important;
  border-radius: var(--radius) !important;
}
.rz-button.rz-primary { background: var(--navy) !important; border-color: var(--navy) !important; }
.rz-button.rz-primary:hover { background: var(--navy-dark) !important; }

/* Input, dropdown, textarea, datepicker: stessa forma dei bottoni */
.rz-textbox, .rz-textarea, .rz-dropdown, .rz-numeric, .rz-datepicker,
.rz-inputtext, .rz-multiselect, .rz-lookup {
  font-family: inherit !important;
  border-radius: var(--radius) !important;
  border-color: var(--grey-border) !important;
  min-height: 38px;
}
.rz-textbox:focus, .rz-textarea:focus, .rz-inputtext:focus,
.rz-dropdown.rz-state-focused, .rz-numeric.rz-state-focused {
  box-shadow: var(--ring) !important;
  border-color: var(--navy-light) !important;
}
.rz-dropdown-panel, .rz-popup, .rz-autocomplete-panel {
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-lg) !important;
}
.rz-state-highlight, .rz-multiselect-item.rz-state-highlight { background: var(--navy-tint) !important; color: var(--navy-dark) !important; }

/* DataGrid */
.rz-grid-table th,
.rz-grid-table th .rz-column-title,
.rz-grid-table th .rz-column-header-title,
.rz-grid-table th span:not(.rz-sortable-column-icon),
.rz-grid-table thead tr th { background: var(--ink) !important; color: #fff !important; font-weight: 600 !important; }
.rz-grid-table th .rz-sortable-column-icon,
.rz-grid-table th i { color: rgba(255,255,255,.75) !important; }
.rz-datatable tbody tr:hover { background: var(--navy-tint) !important; }

/* Dialog */
.rz-dialog { border-radius: var(--radius-lg) !important; box-shadow: var(--shadow-lg) !important; overflow: hidden; }
.rz-dialog-titlebar { border-bottom: 1px solid var(--grey-border) !important; }
.rz-dialog-title { font-weight: 700 !important; letter-spacing: -.01em; }

/* Switch/checkbox nel blu di brand */
.rz-switch.rz-switch-checked .rz-switch-circle,
.rz-chkbox-box.rz-state-active { background: var(--navy) !important; border-color: var(--navy) !important; }

/* ── UTILITY ──────────────────────────────────────────────── */
.mono { font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; }
.text-navy { color: var(--navy); }
.text-grey { color: var(--grey); }
.text-muted { color: var(--grey-light); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.w-100 { width: 100%; }

/* Queste erano usate in decine di pagine ma non erano mai state definite: le toolbar non
   andavano a capo (e con overflow-x nascosto il contenuto in eccesso spariva) e i gruppi
   di bottoni azione restavano attaccati. */
.flex-wrap { flex-wrap: wrap; }
.flex-column { flex-direction: column; }
.gap-1 { gap: 4px; }
.gap-4 { gap: 24px; }
.mb-1 { margin-bottom: 4px; }

/* ============================================================
   RESPONSIVE
   Le pagine hanno molti stili inline (griglie a colonne fisse,
   min-width sui dialog): sotto i 900px vanno forzati a colonna
   singola, altrimenti su telefono sfondano lo schermo.
   ============================================================ */

/* Tablet */
@media (max-width: 1100px) {
  .main-content { padding: 20px; }
  .stat-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

/* Mobile */
@media (max-width: 900px) {
  :root { --topbar-h: 58px; }

  html, body { font-size: 15px; }

  /* La sidebar diventa un drawer a scomparsa */
  .sidebar {
    width: min(84vw, 300px) !important;
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  .sidebar-mobile-open .sidebar { transform: translateX(0); }
  .sidebar-collapsed .sidebar:hover { width: min(84vw, 300px) !important; }
  .sidebar-collapsed .sidebar:not(:hover) .nav-text,
  .sidebar-collapsed .sidebar:not(:hover) .sidebar-label { display: revert; }
  .sidebar-collapsed .sidebar:not(:hover) .nav-link { justify-content: flex-start; padding: 9px 12px; }
  .sidebar-pin { display: none; }          /* niente pin su mobile: c'è l'hamburger */
  .topbar-hamburger { display: inline-flex; }

  .main-content,
  .sidebar-collapsed .main-content { margin-left: 0; padding: 16px 12px; }
  .app-footer,
  .sidebar-collapsed .app-footer { margin-left: 0; }

  .topbar { padding: 0 8px; gap: 4px; }
  .topbar-logo { height: 32px; }
  .topbar-user { max-width: 96px; }

  .card { padding: 16px 14px; border-radius: 14px; overflow-x: auto; }
  .card-header { flex-wrap: wrap; }

  /* Griglie inline delle pagine (parametri, form, filtri) → una colonna.
     Restano fuori: i calendari (repeat(7,…): le settimane devono restare a 7 giorni)
     e le griglie già fluide (auto-fill/auto-fit), che si adattano da sole. */
  [style*="grid-template-columns"]:not([style*="repeat(7"]):not([style*="auto-fill"]):not([style*="auto-fit"]) {
    grid-template-columns: 1fr !important;
  }
  .cal-grid { gap: 3px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; }

  .cal-cell { min-height: 54px; padding: 4px; }
  .cal-entry { display: none; }            /* su telefono resta il totale ore + pallino */

  /* Timesheet: le azioni (chiudi mese / aggiungi ore / aggiungi spesa) vanno in una barra
     fissa in fondo, così il calendario si prende tutta la larghezza dello schermo. */
  .ts-actions {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 800;
    display: flex !important;
    justify-content: center;
    gap: 8px !important;
    flex-wrap: wrap;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--grey-border);
    box-shadow: 0 -6px 20px -12px rgba(15,23,41,.3);
  }
  .ts-actions { z-index: 1100; }   /* sopra il cronometro (fixed, z-index 1000), che copriva i tasti */
  .ts-actions .rz-button { flex: 1; min-width: 0; max-width: 180px; }
  /* spazio per non finire sotto la barra */
  .main-content { padding-bottom: 84px; }

  /* Timesheet: calendario e pannello del giorno impilati, altezza libera */
  .ts-shell { height: auto !important; }
  .ts-split { flex-direction: column !important; }
  .ts-side  { width: 100% !important; max-height: none !important; }
  .ts-split .cal-grid { min-height: 320px; }

  /* ── Calendario iOS su telefono ────────────────────────── */

  /* Mese: celle compatte, chip minuscole con solo il titolo (come iPhone) */
  .ios-month .cal-cell { min-height: 74px; padding: 3px 3px 4px; gap: 1px; }
  .cal-daynum { min-width: 21px; height: 21px; font-size: 12px; padding: 0 4px; }
  .ios-month .cal-hours-total { font-size: 10px; }
  .cal-chip { font-size: 9px; padding: 1px 3px; border-radius: 4px; gap: 3px; }
  .cal-chip .chip-h { display: none; }        /* niente ore nella chip: spazio per il titolo */
  .cal-chip::before { width: 4px; height: 4px; }
  /* NB: niente nth-of-type per limitare le chip — conta i div fratelli (pallino di quadratura,
     riga numero/ore) e faceva sparire tutte le chip nei giorni col pallino. Le chip stanno
     dentro la cella che scorre: si limitano dall'altezza, non dal CSS. */

  /* Settimana: la griglia oraria scorre in orizzontale, colonne leggibili
     (7 colonne su 390px sarebbero da 40px: illeggibili) */
  .ios-grid { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ios-grid > .ios-head,
  .ios-grid > .ios-allday,
  .ios-grid > .ios-body { min-width: calc(var(--gutter) + var(--cols) * 108px); }
  .ios-grid[style*="--cols:1"] > .ios-head,
  .ios-grid[style*="--cols:1"] > .ios-allday,
  .ios-grid[style*="--cols:1"] > .ios-body { min-width: 0; }   /* vista giorno: nessuno scroll */
  .ios-head { position: static; }              /* niente sticky dentro un contenitore che scorre */
  .ios-grid { --gutter: 44px; }
  .ios-head-num { min-width: 26px; height: 26px; font-size: 14px; }
  .ios-event { border-radius: 5px; padding: 2px 4px; }
  .ios-event .evt-sub { display: none; }

  /* Dialog → foglio a tutto schermo ancorato in basso (stile iOS).
     Radzen calcola left/top inline in JS sulla larghezza richiesta (es. 500px): se ci si
     limita a cambiare la larghezza, la finestra resta posizionata dove stava e finisce
     decentrata/fuori schermo. Quindi qui si sovrascrive anche la posizione. */
  .rz-dialog-wrapper { inset: 0 !important; }
  .rz-dialog {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: 0 !important;
    transform: none !important;
    margin: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    max-height: 92dvh !important;
    display: flex !important;
    flex-direction: column;
    border-radius: 18px 18px 0 0 !important;
  }
  .rz-dialog-titlebar { flex-shrink: 0; padding: 12px 14px !important; }
  .rz-dialog-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 14px calc(14px + env(safe-area-inset-bottom)) !important;
  }
  /* I dialog hanno larghezze/min-width fisse inline (es. 720px): sul telefono vanno liberate */
  .rz-dialog-content [style*="min-width"] { min-width: 0 !important; }
  .rz-dialog-content > div { width: auto !important; max-width: 100% !important; }

  /* Target touch */
  .btn, .rz-button { min-height: 42px; }
  .nav-link { min-height: 46px; }
}

@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr !important; }
  /* NB: solo i lati — con lo shorthand si azzerava il padding-bottom che tiene il contenuto
     sopra la barra azioni fissa, che finiva per coprire il fondo di ogni pagina. */
  .main-content { padding-left: 10px; padding-right: 10px; padding-top: 12px; }
  .notif-panel { right: 6px; width: calc(100vw - 12px); }
}
