  :root {
    --bg: #141414;
    --surface: #1C1C1C;
    --surface2: #242424;
    --border: #303030;
    --gold: #1d5fa0;
    --gold-light: #2d7bc4;
    --text: #EAE8F5;
    --text-muted: #ABABAB;
    --text-soft: #808080;
    --green: #3D9970;
    --red: #C94F4F;
    --amber: #C8893A;
    --blue: #7C4DFF;
    --convert: #60a5fa;
    --font-display: 'DM Sans', system-ui, sans-serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
  }

  :root[data-theme="light"] {
    --bg: #F2F2F2;
    --surface: #FFFFFF;
    --surface2: #E8E8E8;
    --border: #D0D0D0;
    --text: #141414;
    --text-muted: #6E6E6E;
    --text-soft: #9A9A9A;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }
  html { touch-action: pan-x pan-y; zoom: 1.0; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    letter-spacing: 0.01em;
  }

  /* ── Layout ── */
  .layout { display: flex; min-height: 100vh; }

  /* Mobile/iPad: trava o layout em 100vh e deixa só o .main rolar */
  @media (max-width: 1024px) {
    html, body { height: 100%; overflow: hidden; }
    .layout { height: 100vh; overflow: hidden; }
    .main {
      height: 100vh;
      overflow-y: auto;
      overflow-x: hidden;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior: contain;
    }
    /* Agenda e Kanban já têm overflow:hidden próprio — respeitar */
    .main.agenda-active,
    .main.kanban-active {
      overflow: hidden;
    }
  }

  .sidebar {
    width: 200px;
    background: var(--bg);
    border-right: 1px solid var(--border);
    padding: 28px 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: width 0.2s ease;
    overflow: hidden;
  }

  /* ── Sidebar collapse button ── */
  .sidebar-collapse-btn {
    position: absolute;
    top: 12px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    z-index: 10;
    transition: all 0.15s;
    flex-shrink: 0;
  }
  .sidebar-collapse-btn:hover { color: var(--text); background: var(--surface2); }

  /* ── Sidebar collapsed state ── */
  .sidebar.collapsed {
    width: 56px;
  }
  .sidebar.collapsed .sidebar-label { display: none; }
  .sidebar.collapsed .logo { display: none; }
  .sidebar.collapsed .sidebar-footer .sidebar-user-name { display: none; }
  .sidebar.collapsed .sidebar-legal { display: none !important; }
  .sidebar.collapsed .btn-logout-mobile { font-size: 0; padding: 10px 12px; justify-content: center; }
  .sidebar.collapsed .btn-logout-mobile i { font-size: 16px; margin: 0; }
  .sidebar.collapsed nav a { padding: 10px 12px; font-size: 0; gap: 0; justify-content: center; }
  .sidebar.collapsed nav a .icon { font-size: 16px; width: auto; }
  .sidebar.collapsed .sidebar-collapse-btn { right: 50%; transform: translateX(50%); top: 8px; }
  .sidebar.collapsed #sidebar-collapse-icon { transform: rotate(180deg); }
  .sidebar.collapsed .sidebar-footer { padding: 12px 8px; }

  /* ── Sidebar footer ── */
  .sidebar-footer {
    margin-top: auto;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    min-width: 0;
    transition: padding 0.2s ease;
  }
  .sidebar-user-name {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* main adjusts when sidebar collapses */
  .sidebar.collapsed ~ .main { margin-left: 56px; }

  /* ── Bottom Nav (mobile only, hidden on desktop) ── */
  .bottom-nav { display: none; }
  .bottom-nav-more { display: none; }
  .bottom-nav-more-grid { display: none; }

  .logo {
    padding: 0 20px 28px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
  }

  .logo h1 {
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--text);
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.3;
  }

  .logo img {
    max-width: 100%;
    max-height: 72px;
    border-radius: 4px;
    margin-bottom: 8px;
  }

  .logo span {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    transition: all 0.15s;
    border-left: 2px solid transparent;
    letter-spacing: 0.01em;
  }

  nav a:hover {
    color: var(--text-soft);
    background: rgba(255,255,255,0.03);
  }

  nav a.active {
    color: var(--text);
    background: var(--surface);
    border-left-color: var(--gold);
  }

  nav a .icon { font-size: 14px; width: 16px; text-align: center; flex-shrink: 0; }

  .main {
    margin-left: 200px;
    flex: 1;
    padding: 28px 28px 28px 32px;
  }

  .main.agenda-active {
    padding: 10px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
  }

  .main.kanban-active {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    padding-bottom: 12px;
  }

  .main.kanban-active #page-sessions.active {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .main.kanban-active #all-sessions-kanban {
    flex: 1 !important;
    min-height: 0;
    align-items: stretch !important;
  }

  .main.kanban-active .kanban-col {
    max-height: none;
    height: 100%;
  }

  .main.agenda-active #page-agenda {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  /* ── Toggle switch ── */
  .toggle { position:relative; display:inline-block; width:42px; height:22px; flex-shrink:0; }
  .toggle input { opacity:0; width:0; height:0; }
  .toggle-slider { position:absolute; cursor:pointer; inset:0; background:var(--border); border-radius:22px; transition:.2s; }
  .toggle-slider:before { position:absolute; content:""; height:16px; width:16px; left:3px; bottom:3px; background:white; border-radius:50%; transition:.2s; }
  .toggle input:checked + .toggle-slider { background:var(--green); }
  .toggle input:checked + .toggle-slider:before { transform:translateX(20px); }

  .sch-row { display:flex; align-items:center; gap:14px; padding:14px 0; border-bottom:1px solid var(--border); }
  .sch-row:last-of-type { border-bottom:none; }
  .sch-row label.toggle { cursor:pointer; }
  .sch-label { flex:1; }
  .sch-label strong { display:block; font-size:14px; font-weight:500; }
  .sch-label span { font-size:12px; color:var(--text-muted); }
  .sch-time { padding:6px 10px; background:var(--surface2); border:1px solid var(--border); border-radius:8px; color:var(--text); font-size:13px; width:90px; font-family: var(--font-body); }

  .wa-status-box { display:flex; align-items:center; gap:12px; padding:14px 16px; border-radius:10px; }
  .wa-status-box.connected { background:rgba(61,153,112,.1); border:1px solid rgba(61,153,112,.3); }
  .wa-status-box.disconnected { background:rgba(201,79,79,.1); border:1px solid rgba(201,79,79,.3); }
  .wa-dot { width:10px; height:10px; border-radius:50%; flex-shrink:0; }

  .tpl-card { padding:14px; background:var(--surface2); border:1px solid var(--border); border-radius:10px; margin-bottom:10px; }
  .tpl-card-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
  .tpl-card-text { font-size:13px; color:var(--text-muted); white-space:pre-line; max-height:80px; overflow:hidden; }

  /* ── Toast Notifications ── */
  .toast {
    position:fixed; top:50%; left:50%; transform:translate(-50%,-50%);
    background:var(--surface); border:1px solid var(--border); border-radius:12px;
    padding:24px 32px; min-width:320px; max-width:500px;
    box-shadow:0 20px 60px rgba(0,0,0,.5); z-index:9999;
    animation:slideIn .25s ease-out;
  }
  .toast.success { border-color:rgba(61,153,112,.4); background:rgba(61,153,112,.07); }
  .toast.error { border-color:rgba(201,79,79,.4); background:rgba(201,79,79,.07); }
  .toast.info { border-color:rgba(232,131,58,.4); background:rgba(232,131,58,.07); }
  .toast-content { display:flex; align-items:center; gap:12px; }
  .toast-icon { font-size:22px; flex-shrink:0; }
  .toast-text { flex:1; }
  .toast-title { font-weight:600; font-size:14px; margin-bottom:3px; }
  .toast-message { font-size:13px; color:var(--text-muted); }
  @keyframes slideIn { from { opacity:0; transform:translate(-50%,-50%) scale(.95); } to { opacity:1; transform:translate(-50%,-50%) scale(1); } }
  @keyframes slideOut { from { opacity:1; transform:translate(-50%,-50%) scale(1); } to { opacity:0; transform:translate(-50%,-50%) scale(.95); } }
  .toast.out { animation:slideOut .25s ease-in forwards; }

  /* ── Header ── */
  .page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 32px;
  }

  .page-title {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0.01em;
    line-height: 1.2;
  }

  .page-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 5px;
    font-weight: 400;
  }

  /* ── Cards ── */
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 32px;
  }

  .stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px 20px 18px;
    position: relative;
    overflow: hidden;
    transition: background 0.15s;
  }

  .stat-card:hover { background: var(--surface2); }

  .stat-card.alert { border-color: rgba(201,79,79,0.4); }

  .stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
    font-weight: 500;
  }

  .stat-value {
    font-family: var(--font-display);
    font-size: 34px;
    color: var(--text);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.01em;
  }

  .stat-card.alert .stat-value { color: var(--red); }

  #stats-grid {
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 28px;
  }

  #stats-grid .stat-card { padding: 16px 14px; }
  #stats-grid .stat-value { font-size: 28px; }
  #stats-grid .stat-label { font-size: 10px; }

  @media (max-width: 1100px) {
    #stats-grid { grid-template-columns: repeat(4, 1fr); }
  }
  @media (max-width: 700px) {
    #stats-grid { grid-template-columns: repeat(2, 1fr); }
  }

  /* ── Sections ── */
  .section { margin-bottom: 36px; }

  .section-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
  }

  /* ── Session List ── */
  .sessions-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
  }

  .session-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.12s;
    min-width: 0;
  }

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

  .session-row-date {
    width: 76px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
  }
  .session-row-date .date-day {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -0.01em;
  }
  .session-row-date .date-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
  }

  .session-row-badge {
    flex-shrink: 0;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.02em;
  }

  .session-row-title {
    flex: 2;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }

  .session-number-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: var(--gold);
    margin-right: 4px;
    opacity: 0.8;
  }

  .session-row-package {
    flex: 1.2;
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .session-delivery-tag {
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 3px;
    background: var(--surface2);
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
  }

  .session-row-financials {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
  }

  .fin-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 60px;
  }
  .fin-label { font-size: 10px; color: var(--text-muted); font-weight: 500; letter-spacing: 0.05em; }
  .fin-val   { font-size: 12px; font-weight: 600; color: var(--text); }

  .session-row-actions {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
    align-items: center;
  }

  .session-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font-size: 13px;
    line-height: 1;
    transition: background 0.12s;
    color: var(--text-muted);
  }
  .session-action-btn:hover { background: var(--border); color: var(--text); }

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

  .badge {
    font-size: 10px;
    padding: 2px 9px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.04em;
  }

  .badge-agendada   { background: rgba(90,134,174,0.12); color: #7AADCC; }
  .badge-confirmada, .badge-entregue { background: rgba(61,153,112,0.12); color: #5DB891; }
  .badge-realizada, .badge-fotos_enviadas { background: rgba(200,137,58,0.12); color: #C8893A; }
  .badge-edicao     { background: rgba(160,110,180,0.12); color: #B07AC8; }
  .badge-album      { background: rgba(61,153,112,0.12); color: #3D9970; }
  .badge-cancelada  { background: rgba(201,79,79,0.12); color: #C97070; }

  .delivery-info {
    font-size: 12px;
    color: var(--text-muted);
    min-width: 130px;
    text-align: right;
  }

  .delivery-info.urgent { color: var(--red); }
  .delivery-info.soon { color: var(--amber); }

  /* ── Buttons ── */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    border-radius: 7px;
    padding: 9px 17px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    letter-spacing: 0.01em;
  }

  .btn-primary {
    background: var(--gold);
    color: #FFFFFF;
  }

  .btn-primary:hover {
    background: var(--gold-light);
    box-shadow: 0 2px 10px rgba(232,131,58,0.25);
  }

  .btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: none;
  }

  .btn-ghost:hover { background: rgba(255,255,255,0.05); color: var(--text); }

  .btn-sm { padding: 5px 12px; font-size: 12px; }

  /* ── Modal ── */
  .modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
  }

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

  .modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px 32px;
    width: 560px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body:has(.modal-overlay.open) {
    overflow: hidden;
  }

  @media (max-width: 1024px) {
    /* No mobile/iPad o scroll está no .main — bloquear ele quando modal abrir */
    body:has(.modal-overlay.open) .main {
      overflow: hidden;
    }
  }

  /* Lightbox: imagem centralizada, não esticada */
  #modal-lightbox {
    align-items: center;
    justify-content: center;
  }

  /* Scrollbar estilizada */
  ::-webkit-scrollbar { width: 5px; height: 5px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
  ::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

  .modal-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 22px;
    color: var(--text);
    letter-spacing: 0.01em;
    line-height: 1.2;
  }

  /* ── Forms ── */
  .form-group { margin-bottom: 16px; }

  .form-group label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
    font-weight: 600;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    width: 100%;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
  }

  .form-group input:focus,
  .form-group select:focus,
  .form-group textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(232,131,58,0.1);
  }

  input[type="date"],
  input[type="time"] { color-scheme: dark; }

  input:-webkit-autofill,
  input:-webkit-autofill:hover,
  input:-webkit-autofill:focus,
  input:-webkit-autofill:active,
  textarea:-webkit-autofill,
  textarea:-webkit-autofill:hover,
  textarea:-webkit-autofill:focus,
  select:-webkit-autofill,
  select:-webkit-autofill:hover,
  select:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--surface2) inset !important;
    box-shadow: 0 0 0 1000px var(--surface2) inset !important;
    -webkit-text-fill-color: var(--text) !important;
    caret-color: var(--text);
    border-color: var(--border) !important;
    transition: background-color 9999s ease-in-out 0s;
  }

  .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

  .modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 22px;
    position: sticky;
    bottom: 0;
    background: var(--surface);
    margin-inline: -32px;
    padding: 16px 32px 20px;
    border-top: 1px solid var(--border);
    z-index: 1;
  }

  /* ── Empty state ── */
  .empty {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 13px;
  }

  /* ── Tabs ── */
  .tabs { display: flex; gap: 4px; margin-bottom: 18px; flex-wrap: wrap; }

  .tab {
    padding: 6px 15px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    font-family: var(--font-body);
    transition: all 0.15s;
    font-weight: 400;
  }

  .tab.active {
    background: var(--surface);
    border-color: var(--tab-color, var(--border));
    color: var(--tab-color, var(--text));
    box-shadow: 0 0 0 1px var(--tab-color, transparent) inset;
    font-weight: 500;
  }

  .tab .tab-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--tab-color, var(--text-muted));
    margin-right: 6px;
    vertical-align: middle;
  }

  /* ── Detail panel ── */
  .detail-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; }

  .detail-block {
    background: var(--surface2);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
  }

  .editor-section {
    margin-bottom: 8px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px;
  }

  .session-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 14px;
    margin-bottom: 12px;
  }

  .session-editor-layout .editor-section {
    margin-bottom: 0;
  }

  .editor-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-soft);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }

  .selection-card {
    margin-top: 10px;
    padding: 12px 14px;
    background: rgba(232,131,58,0.06);
    border: 1px solid rgba(232,131,58,0.25);
    border-radius: 10px;
  }

  .selection-card-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
  }

  .selection-card-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    word-break: break-word;
  }

  .editor-textarea {
    min-height: 110px;
    resize: vertical;
    line-height: 1.5;
  }

  .extras-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .extra-item-card {
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 90px 110px 44px;
    gap: 10px;
    align-items: end;
  }

  .extra-item-field label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  .extra-item-field input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 13px;
    outline: none;
  }

  .extra-item-field select,
  .extra-item-field textarea {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 13px;
    outline: none;
  }

  .extra-item-field input:focus,
  .extra-item-field select:focus,
  .extra-item-field textarea:focus {
    border-color: var(--gold);
  }

  /* ── Modal Nova Sessão — Layout editorial com painel lateral ── */
  .ns-modal {
    max-width: 720px;
    width: min(720px, 96vw);
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    min-height: 480px;
    border-radius: 16px;
  }

  /* Painel lateral esquerdo */
  .ns-side {
    width: 180px;
    flex-shrink: 0;
    background: var(--gold);
    display: flex;
    flex-direction: column;
    padding: 28px 20px;
    position: relative;
    overflow: hidden;
  }
  .ns-side::before {
    content: '';
    position: absolute;
    bottom: -60px;
    right: -60px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
  }
  .ns-side::after {
    content: '';
    position: absolute;
    top: -40px;
    left: -40px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
  }
  .ns-side-top { flex: 1; position: relative; z-index: 1; }
  .ns-side-icon {
    font-size: 28px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 16px;
  }
  .ns-side-title {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -0.02em;
  }
  .ns-side-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
  }
  .ns-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    font-weight: 500;
    letter-spacing: 0.04em;
    transition: color 0.2s;
  }
  .ns-step span {
    font-size: 10px;
    font-weight: 700;
    opacity: 0.7;
  }
  .ns-step.ns-step-active { color: rgba(255,255,255,0.95); }
  .ns-step.ns-step-active span { opacity: 1; }
  .ns-side-bottom {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    position: relative;
    z-index: 1;
  }

  /* Corpo do formulário */
  .ns-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
    padding: 24px 28px 20px;
    min-width: 0;
  }

  .ns-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-soft);
    font-size: 16px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    z-index: 2;
  }
  .ns-close-btn:hover { background: var(--surface2); color: var(--text); }

  /* Seções numeradas */
  .ns-section {
    margin-bottom: 22px;
  }
  .ns-section-last { margin-bottom: 16px; flex: 1; }
  .ns-section-num {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.1em;
    margin-bottom: 2px;
  }
  .ns-section-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 14px;
    letter-spacing: -0.01em;
  }

  .ns-fields { display: flex; flex-direction: column; gap: 14px; }
  .ns-fields-row { flex-direction: row; gap: 16px; }

  /* Inputs com linha inferior (estilo editorial) */
  .ns-field-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
  }
  .ns-field-full { width: 100%; }
  .ns-field-grow { flex: 1; min-width: 0; }

  .ns-line-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1.5px solid var(--border);
    border-radius: 0;
    padding: 8px 0 6px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
  }
  .ns-line-input:focus {
    border-bottom-color: var(--gold);
  }
  .ns-line-input:focus ~ .ns-float-label,
  .ns-line-input:not(:placeholder-shown) ~ .ns-float-label {
    transform: translateY(-18px) scale(0.82);
    color: var(--gold);
  }
  .ns-line-readonly {
    color: var(--text-muted);
    cursor: default;
  }
  .ns-line-select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23808080'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 2px center;
    padding-right: 20px;
  }
  .ns-line-date {
    color-scheme: dark;
  }
  .ns-line-textarea {
    resize: none;
    overflow: hidden;
    min-height: 52px;
    line-height: 1.5;
  }

  /* Floating label */
  .ns-float-label {
    position: absolute;
    bottom: 8px;
    left: 0;
    font-size: 13px;
    color: var(--text-muted);
    pointer-events: none;
    transform-origin: left bottom;
    transition: transform 0.18s ease, color 0.18s ease;
    white-space: nowrap;
  }
  .ns-float-up {
    transform: translateY(-18px) scale(0.82);
    color: var(--text-soft);
  }

  /* Autocomplete */
  .ns-autocomplete {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 100;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  }

  /* Botões de ação */
  .ns-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    margin-top: auto;
  }
  .ns-btn-cancel {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 13px;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
  }
  .ns-btn-cancel:hover { background: var(--surface2); color: var(--text); }
  .ns-btn-create {
    background: var(--gold);
    color: #fff;
    border: none;
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 9px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.15s, transform 0.1s;
    letter-spacing: 0.01em;
  }
  .ns-btn-create:hover { opacity: 0.88; }
  .ns-btn-create:active { transform: scale(0.97); }

  @media (max-width: 600px) {
    .ns-modal { flex-direction: column; border-radius: 0; width: 100%; max-width: 100%; min-height: 100vh; }
    .ns-side { width: 100%; min-height: unset; padding: 20px 24px; flex-direction: row; align-items: center; gap: 16px; }
    .ns-side::before, .ns-side::after { display: none; }
    .ns-side-top { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; margin-bottom: 0; }
    .ns-side-icon { font-size: 20px; margin-bottom: 0; }
    .ns-side-title { font-size: 20px; }
    .ns-side-steps { flex-direction: row; margin-bottom: 0; gap: 12px; }
    .ns-side-bottom { display: none; }
    .ns-body { padding: 20px 18px 16px; }
    .ns-fields-row { flex-direction: column; }
  }

  #es-extra-items input,
  #es-extra-items select {
    width: 100%;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 7px 10px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 13px;
    outline: none;
  }

  #es-extra-items input:focus,
  #es-extra-items select:focus {
    border-color: var(--gold);
  }

  .extra-item-remove {
    width: 44px;
    height: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--red);
  }

  @media (max-width: 900px) {
    .session-editor-layout {
      grid-template-columns: 1fr;
    }
  }

  .detail-block-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 600;
  }

  .detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    min-height: 36px;
  }

  .detail-row:last-child { border-bottom: none; }

  .detail-row span {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
    flex-shrink: 0;
  }

  .detail-row strong {
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
    text-align: right;
  }

  /* ── Loading ── */
  .loading { text-align: center; padding: 60px; color: var(--text-muted); }
  .spinner {
    width: 28px; height: 28px;
    border: 2px solid var(--border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
  }

  @keyframes spin { to { transform: rotate(360deg); } }

  .page { display: none; }
  .page.active { display: block; }
  #page-agenda.active { display: flex; }

  /* Agenda: hover to reveal + button */
  .agenda-plus-btn { opacity: 0 !important; transition: opacity .2s; }
  #agenda-calendar > div:hover .agenda-plus-btn,
  #agenda-calendar button:hover { opacity: 1 !important; }

  /* ── Font Awesome Icons ── */
  i.fas, i.fab { font-size: 18px; margin-right: 5px; margin-left: 5px; vertical-align: -3px; }
  nav a i { font-size: 14px; margin-right: 0; color: inherit; }
  .btn i { font-size: 14px; margin-right: 0; vertical-align: -2px; color: inherit; }
  .tab i { font-size: 14px; margin-right: 6px; color: inherit; }
  .detail-block-title i { font-size: 16px; margin-right: 8px; color: inherit; }
  .section-title i { font-size: 14px; margin-right: 6px; color: inherit; }
  .toast-icon i { font-size: 22px; margin-right: 10px; }

  /* ── Mobile puro (≤768px): sidebar some, bottom nav aparece ── */
  @media (max-width: 768px) {
    .sidebar { display: none !important; }
    .sidebar-collapse-btn { display: none !important; }

    .main {
      margin-left: 0 !important;
      padding: 16px 12px 72px 12px; /* espaço para bottom nav */
    }

    /* Bottom Nav */
    .bottom-nav {
      display: flex;
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      height: 60px;
      background: var(--surface);
      border-top: 1px solid var(--border);
      z-index: 200;
      padding-bottom: env(safe-area-inset-bottom);
    }
    .bottom-nav-item {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 3px;
      color: var(--text-muted);
      text-decoration: none;
      font-size: 10px;
      font-weight: 500;
      transition: color 0.15s;
      padding: 6px 0;
      -webkit-tap-highlight-color: transparent;
    }
    .bottom-nav-item i { font-size: 18px; }
    .bottom-nav-item.active { color: var(--gold); }
    .bottom-nav-item:active { opacity: 0.7; }

    /* Bottom Nav More drawer */
    .bottom-nav-more {
      position: fixed;
      bottom: 60px;
      left: 0;
      right: 0;
      background: var(--surface);
      border-top: 1px solid var(--border);
      z-index: 199;
      transform: translateY(100%);
      transition: transform 0.22s ease;
    }
    .bottom-nav-more.open {
      display: block;
      transform: translateY(0);
    }
    .bottom-nav-more-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 0;
      padding: 12px 8px;
    }
    .bottom-nav-more-grid a {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 4px;
      color: var(--text-muted);
      text-decoration: none;
      font-size: 10px;
      font-weight: 500;
      padding: 12px 4px;
      border-radius: 10px;
      transition: all 0.15s;
      -webkit-tap-highlight-color: transparent;
    }
    .bottom-nav-more-grid a i { font-size: 20px; }
    .bottom-nav-more-grid a:active { background: var(--surface2); color: var(--text); }

    /* Overlay para fechar o drawer */
    .bottom-nav-overlay {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 198;
    }
    .bottom-nav-overlay.open { display: block; }
  }

  /* ── iPad/Tablet Responsivo (769px–1024px): sidebar estreita, sem bottom nav ── */
  @media (max-width: 1024px) and (min-width: 769px) {
    .sidebar-label { display: none; }
    .btn-logout-mobile { font-size: 0; padding: 10px 12px; justify-content: center; }
    .btn-logout-mobile i { font-size: 16px; margin: 0; }
    .sidebar-collapse-btn { display: none; } /* não mostrar em tablet — já está estreita */

    .sidebar {
      width: 56px;
      padding: 16px 0;
    }

    .logo {
      padding: 0 12px 16px;
      margin-bottom: 16px;
      display: none;
    }

    .logo span { display: none; }

    nav a {
      padding: 10px 12px;
      font-size: 0;
      gap: 0;
      justify-content: center;
    }

    nav a .icon {
      font-size: 16px;
      width: auto;
    }

    .main {
      margin-left: 56px;
      padding: 20px 16px;
    }
  }

  /* ── Mobile/iPad Responsivo (legado — tudo ≤1024px) ── */
  @media (max-width: 1024px) {
    .sidebar-legal { display: none !important; }
    .sidebar-footer { padding: 12px 8px; }

    .page-header {
      flex-direction: column;
      gap: 16px;
    }

    .page-header > div:last-child {
      flex-direction: column;
      width: 100%;
      gap: 12px;
    }

    .btn {
      padding: 8px 12px;
      font-size: 12px;
    }

    .tabs {
      gap: 2px;
      overflow-x: auto;
      margin-bottom: 16px;
    }

    .tab {
      padding: 6px 12px;
      font-size: 11px;
      white-space: nowrap;
    }

    .detail-block {
      padding: 16px;
    }

    .detail-block-title {
      font-size: 14px;
    }

    .sch-row {
      flex-wrap: wrap;
      gap: 8px;
      padding: 12px;
    }

    .sch-label {
      flex: 1;
      min-width: 150px;
    }

    .sch-time {
      width: 100%;
    }

    /* Mobile - todos os modais: full-screen */
    .modal-overlay:not(.modal-overlay--compact) {
      align-items: stretch;
    }
    .modal-overlay:not(.modal-overlay--compact) .modal {
      padding: 16px;
      min-width: 0;
      max-width: 100% !important;
      width: 100%;
      border-radius: 0;
      margin: 0 !important;
      height: 100dvh;
      max-height: 100dvh !important;
      box-sizing: border-box;
    }
    /* Modal compacto (confirmações simples) — não ocupa tela inteira */
    .modal-overlay--compact {
      align-items: center;
      padding: 16px;
    }
    .modal-overlay--compact .modal {
      width: 100%;
      max-width: 400px !important;
      border-radius: 14px;
    }
    .modal-actions {
      margin-inline: -16px;
      padding: 12px 16px;
      padding-bottom: max(12px, env(safe-area-inset-bottom));
    }

    /* Mobile - Modal Nova Sessão: handled by ns-modal @media above */

    .sessions-list {
      display: grid;
      grid-template-columns: 1fr;
    }

    .session-card {
      padding: 12px;
    }

    .session-card-header {
      flex-direction: column;
      gap: 8px;
    }

    .session-info {
      flex-direction: column;
      gap: 8px;
    }

    .detail-block {
      max-width: 100% !important;
    }

    [style*="max-width:560px"],
    [style*="max-width:520px"],
    [style*="max-width:600px"] {
      max-width: 100% !important;
    }

    input[type="text"],
    input[type="email"],
    input[type="date"],
    input[type="time"],
    textarea,
    select {
      font-size: 16px;
      padding: 10px;
    }

    .tpl-card {
      padding: 12px;
    }

    .tpl-card-header {
      flex-direction: column;
      gap: 8px;
    }

    .btn-group {
      gap: 6px;
    }
  }

  @media (max-width: 480px) {
    .session-row { margin-bottom: 2px; }
    #agenda-view-btns { margin-left: 0; width: 100%; justify-content: center; }

    .sidebar {
      width: 48px;
    }

    .main {
      margin-left: 48px;
      padding: 16px 12px;
    }

    .page-title {
      font-size: 24px;
      text-align: center;
    }

    .page-subtitle {
      font-size: 12px;
      text-align: center;
    }

    .stats-grid { grid-template-columns: repeat(2, 3fr) !important; }

    .page-header { flex-direction: column; align-items: stretch; text-align: center; gap: 10px; }
    .page-header > div:first-child { text-align: center; }
    .page-header > div:last-child { justify-content: center; }

    /* Pacotes e Itens - mobile */
    .detail-block > div[style*="flex-direction:column"] > div[style*="display:flex"][style*="align-items:center"] {
      flex-direction: column;
      align-items: stretch !important;
    }
.detail-block > div[style*="flex-direction:column"] > div[style*="display:flex"][style*="gap"] > div {
      flex-wrap: wrap;
    }

.btn {
      padding: 6px 10px;
      font-size: 11px;
    }

  @media (max-width: 600px) {
    /* WhatsApp mobile - lista de conversas */
    #page-whatsapp > div { flex-direction: column; }
    #whatsapp-chats-list { flex: 1 !important; width: 100% !important; border-right: none !important; border-bottom: 1px solid var(--border); }
    #page-whatsapp > div > div:last-child { display: none !important; }

    /* WhatsApp mobile - com chat aberto */
    #page-whatsapp.chat-open > div { position: relative; }
    #page-whatsapp.chat-open > div > div:first-child { display: none !important; }
    #page-whatsapp.chat-open > div > div:last-child { display: flex !important; }

    /* WhatsApp mobile - header simplificado */
    #whatsapp-header-sessions { display: none !important; }
    #whatsapp-registered-banner,
    #whatsapp-unregistered-banner { flex-direction: column !important; align-items: stretch !important; gap: 8px !important; }
    #whatsapp-registered-banner > div { flex-direction: column !important; }

    /* Financeiro mobile - tabelas */
    #fin-incomes-list .fin-table th:nth-child(3),
    #fin-incomes-list .fin-table td:nth-child(3),
    #fin-incomes-list .fin-table th:nth-child(4),
    #fin-incomes-list .fin-table td:nth-child(4),
    #fin-incomes-list .fin-table th:nth-child(6),
    #fin-incomes-list .fin-table td:nth-child(6) { display: none !important; }
    #fin-expenses-list .fin-table th:nth-child(3),
    #fin-expenses-list .fin-table td:nth-child(3),
    #fin-expenses-list .fin-table th:nth-child(5),
    #fin-expenses-list .fin-table td:nth-child(5) { display: none !important; }

    /* Relatório mobile - detail-grid em coluna única */
    .detail-grid { grid-template-columns: 1fr !important; }

    /* Relatório mobile - setas e ano na mesma linha */
    #page-reports .page-header > div:last-child { flex-direction: row !important; justify-content: center; align-items: center; }

    /* Relatório mobile - ocultar gráfico e compactar botões de mês */
    #report-chart-wrap { display: none !important; }
    #report-month-btns { gap: 3px !important; }
    #report-month-btns button { padding: 4px 2px !important; font-size: 10px !important; border-radius: 14px !important; }
  }

  @media (max-width: 1024px) {
    /* Clients - tabela responsiva */
    #clients-list-table table {
      font-size: 12px;
    }
    #clients-list-table th,
    #clients-list-table td {
      padding: 8px 6px !important;
    }
    #clients-list-table th:nth-child(n+4),
    #clients-list-table td:nth-child(n+4) {
      display: none;
    }
  }

  @media (max-width: 480px) {
    /* Clients - só nome e telefone visíveis */
    #clients-list-table th:nth-child(3),
    #clients-list-table td:nth-child(3) {
      display: none;
    }
  }

  .modal {
      min-width: 90vw;
    }

    .tab {
      padding: 4px 8px;
      font-size: 10px;
    }

    .detail-block {
      padding: 12px;
    }

    input[type="text"],
    input[type="email"],
    input[type="date"],
    input[type="time"],
    textarea,
    select {
      font-size: 16px;
      padding: 8px;
    }

    /* Mobile - Session List */
    .sessions-list {
      font-size: 12px;
      display: flex;
      flex-direction: column;
      gap: 0px;
    }
    .session-row {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 1px;
      padding: 8px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
    }
    .session-row-date {
      width: auto;
      flex-direction: row;
      gap: 6px;
      align-items: center;
      justify-content: space-between;
    }
    .session-row-date .date-day { font-size: 14px; }
    .session-row-badge { align-self: flex-start; }
    .session-row-title { font-size: 14px; white-space: normal; }
    .session-row-package {
      font-size: 11px;
      flex-wrap: wrap;
    }
    .session-row-financials {
      border-top: 1px solid var(--border);
      padding-top: 8px;
      margin-top: 4px;
      justify-content: space-between;
      gap: 4px;
    }
    .fin-col { align-items: center; min-width: 0; flex: 1; }
    .fin-label { font-size: 10px; }
    .fin-val   { font-size: 13px; }
    .session-row-actions {
      border-top: 1px solid var(--border);
      padding-top: 8px;
      margin-top: 4px;
      justify-content: space-evenly;
      gap: 4px;
    }
    .session-action-btn { padding: 8px 10px; font-size: 14px; }

    /* Mobile - Modal de Edição */
    #modal-edit-session {
      max-width: 100vw;
      width: 100%;
      margin: 0;
      border-radius: 0;
      min-height: 100dvh;
    }
    #modal-edit-session .modal-content {
      padding: 12px;
      overflow-y: auto;
      max-height: calc(100vh - 60px);
    }
    #modal-edit-session .detail-row {
      flex-direction: column;
      gap: 4px;
    }
    #modal-edit-session .detail-label {
      font-size: 10px;
    }
    #modal-edit-session .detail-value {
      font-size: 13px;
    }
    #modal-edit-session .tabs {
      flex-wrap: wrap;
    }
    #modal-edit-session .tab {
      flex: 1 1 auto;
      min-width: 70px;
      text-align: center;
    }

    /* Mobile - Stats Grid */
    #stats-grid {
      grid-template-columns: 1fr;
      gap: 8px;
    }
    #stats-grid .stat-card {
      padding: 12px 8px;
    }
    #stats-grid .stat-value {
      font-size: 22px;
    }

    /* Mobile - Modal Edit Sessão */
    #modal-edit-session .modal {
      max-width: 100%;
      width: 100%;
      margin: 0;
      border-radius: 0;
      min-height: 100dvh;
      max-height: 100dvh;
    }
    #modal-edit-session [style*="grid"] {
      grid-template-columns: 1fr !important;
      gap: 6px !important;
      margin-bottom: 6px !important;
    }
    #modal-edit-session [style*="display:flex"] {
      gap: 6px !important;
    }

    /* Mobile - Formulários */
    .form-row {
      grid-template-columns: 1fr !important;
      gap: 6px;
      margin-bottom: 6px;
    }
    .form-group {
      margin-bottom: 10px;
    }

    /* Mobile - Footer do modal */
    #modal-edit-session .modal-footer {
      position: sticky;
      bottom: 0;
      background: var(--surface);
      padding: 10px;
      border-top: 1px solid var(--border);
      display: flex;
      gap: 8px;
    }
    #modal-edit-session .modal-footer .btn {
      flex: 1;
      padding: 10px;
      font-size: 13px;
    }

    /* Mobile - Ações da sessão */
    .es-actions {
      flex-wrap: wrap;
    }
    .es-action-btn {
      flex: 1 1 calc(50% - 4px);
      min-width: 100px;
      font-size: 11px;
      padding: 8px 6px;
    }

    /* Mobile - Gallery */
    .es-gallery-link-row,
    .es-gallery-selection {
      padding: 8px 10px;
      font-size: 11px;
    }
    .es-gallery-selection .edit-list-row,
    .es-gallery-selection .print-list-row {
      font-size: 10px;
    }
  }

  /* ── Auth Screen ── */
  #auth-screen {
    display: none;
    min-height: 100vh;
    background: var(--bg);
  }
  #auth-screen.visible { display: flex; }

  /* ── Left hero panel ── */
  .auth-left {
    width: 55%;
    min-height: 100vh;
    background: #05080f;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 64px;
  }

  /* Ambient orbs */
  .auth-bg-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
  }
  .auth-bg-orb-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(29,95,160,.18) 0%, transparent 65%);
    top: -120px; left: -80px;
    animation: orb-drift 12s ease-in-out infinite alternate;
  }
  .auth-bg-orb-2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(45,123,196,.12) 0%, transparent 65%);
    bottom: -60px; right: -40px;
    animation: orb-drift 16s ease-in-out infinite alternate-reverse;
  }
  .auth-bg-orb-3 {
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(124,77,255,.08) 0%, transparent 65%);
    top: 55%; left: 65%;
    animation: orb-drift 20s ease-in-out infinite alternate;
  }
  @keyframes orb-drift {
    from { transform: translate(0, 0); }
    to   { transform: translate(30px, 20px); }
  }

  /* Grain overlay */
  .auth-grain {
    position: absolute;
    inset: 0;
    opacity: .035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    pointer-events: none;
    z-index: 0;
  }

  /* Horizontal grid lines decoration */
  .auth-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 79px,
      rgba(255,255,255,.025) 79px,
      rgba(255,255,255,.025) 80px
    );
    pointer-events: none;
    z-index: 0;
  }

  /* Hero content wrapper */
  .auth-hero {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 480px;
    width: 100%;
    animation: auth-hero-in 1.2s cubic-bezier(.22,1,.36,1) both;
  }
  @keyframes auth-hero-in {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* Logo mark */
  .auth-logo-mark {
    width: 52px; height: 52px;
    animation: auth-logo-in 1s .1s cubic-bezier(.22,1,.36,1) both;
  }
  .auth-logo-mark svg { width: 100%; height: 100%; }
  @keyframes auth-logo-in {
    from { opacity: 0; transform: scale(.5) rotate(-30deg); }
    to   { opacity: 1; transform: scale(1) rotate(0deg); }
  }

  /* Eyebrow + headline */
  .auth-hero-text { display: flex; flex-direction: column; gap: 10px; }

  .auth-eyebrow {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--gold);
    opacity: .8;
    animation: auth-fadein 1s .2s both;
  }

  .auth-headline {
    display: flex;
    flex-direction: column;
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(52px, 5.5vw, 76px);
    line-height: .92;
    color: #e8e6f0;
    letter-spacing: -.02em;
    animation: auth-fadein 1s .3s both;
  }
  .auth-headline-italic {
    font-style: italic;
    color: rgba(232,230,240,.65);
  }

  .auth-tagline {
    font-size: 14px;
    color: rgba(171,171,171,.6);
    font-weight: 300;
    line-height: 1.6;
    margin-top: 4px;
    animation: auth-fadein 1s .4s both;
  }

  /* Feature list */
  .auth-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: auth-fadein 1s .5s both;
  }

  .auth-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
  }

  .auth-feature-icon {
    flex-shrink: 0;
    width: 36px; height: 36px;
    border-radius: 8px;
    background: rgba(29,95,160,.15);
    border: 1px solid rgba(29,95,160,.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 14px;
    margin-top: 1px;
  }

  .auth-feature-item div {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .auth-feature-item strong {
    font-size: 13px;
    font-weight: 500;
    color: rgba(232,230,240,.85);
    letter-spacing: .01em;
  }
  .auth-feature-item span {
    font-size: 12px;
    color: rgba(171,171,171,.5);
  }

  /* Bottom footer bar */
  .auth-hero-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10px;
    color: rgba(171,171,171,.3);
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 500;
    animation: auth-fadein 1s .7s both;
  }
  .auth-dot-sep {
    display: inline-block;
    width: 3px; height: 3px;
    border-radius: 50%;
    background: rgba(29,95,160,.5);
  }

  @keyframes auth-fadein {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* ── Right form panel ── */
  .auth-right {
    flex: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 44px;
    background: var(--bg);
    position: relative;
  }

  /* Subtle top accent line */
  .auth-right::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: .25;
  }

  .auth-card {
    width: 100%;
    max-width: 380px;
    animation: auth-card-in 1s .4s cubic-bezier(.22,1,.36,1) both;
  }
  @keyframes auth-card-in {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
  }

  /* Card header */
  .auth-card-header { margin-bottom: 32px; }

  .auth-card-header h2 {
    font-family: var(--font-body);
    font-size: 36px;
    font-weight: 300;
    color: var(--text);
    line-height: 1;
    margin-bottom: 6px;
    letter-spacing: -.01em;
  }
  .auth-card-header p { font-size: 13px; color: var(--text-muted); }

  /* Tabs */
  .auth-tabs { display: flex; margin-bottom: 28px; border-bottom: 1px solid var(--border); gap: 4px; }
  .auth-tab {
    background: none; border: none;
    color: var(--text-muted); font-size: 13px;
    padding: 8px 18px; cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-family: var(--font-body);
    letter-spacing: .03em;
    transition: color .2s, border-color .2s;
    border-radius: 4px 4px 0 0;
  }
  .auth-tab:hover { color: var(--text); }
  .auth-tab.active { color: var(--gold); border-bottom-color: var(--gold); }

  /* Fields */
  .auth-field { margin-bottom: 16px; }
  .auth-field label {
    display: block; font-size: 10px;
    color: var(--text-muted); margin-bottom: 7px;
    text-transform: uppercase; letter-spacing: .1em; font-weight: 600;
  }

  /* Input with icon */
  .auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
  }
  .auth-input-wrap > i {
    position: absolute;
    left: 13px;
    font-size: 12px;
    color: rgba(171,171,171,.35);
    pointer-events: none;
    z-index: 1;
  }
  .auth-input-wrap input {
    width: 100%;
    padding: 11px 14px 11px 38px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-family: var(--font-body);
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
  }
  .auth-input-wrap input::placeholder { color: rgba(171,171,171,.25); }
  .auth-input-wrap input:focus {
    border-color: var(--gold);
    background: var(--surface2);
    box-shadow: 0 0 0 3px rgba(29,95,160,.12);
  }
  .auth-input-wrap input:focus ~ i,
  .auth-input-wrap:focus-within > i { color: var(--gold); opacity: .7; }

  /* Submit button */
  .auth-submit {
    width: 100%;
    padding: 13px 20px;
    background: var(--gold);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    margin-top: 10px;
    letter-spacing: .04em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .2s, box-shadow .2s, transform .1s;
  }
  .auth-submit:hover {
    background: var(--gold-light);
    box-shadow: 0 6px 24px rgba(29,95,160,.4);
    transform: translateY(-2px);
  }
  .auth-submit:active { transform: translateY(0); box-shadow: none; }
  .auth-submit i { font-size: 12px; transition: transform .2s; }
  .auth-submit:hover i { transform: translateX(3px); }

  /* Back + hint + error */
  .auth-back {
    background: none; border: none;
    color: var(--text-muted); font-size: 13px;
    cursor: pointer; font-family: var(--font-body);
    width: 100%; text-align: center;
    padding: 10px; margin-top: 4px;
    transition: color .15s;
  }
  .auth-back:hover { color: var(--text); }

  .auth-hint { font-size: 12px; color: var(--text-muted); margin: 0 0 16px; line-height: 1.5; }
  .auth-error { font-size: 12px; color: var(--red); margin-top: 12px; min-height: 18px; text-align: center; }

  /* Mobile */
  @media (max-width: 760px) {
    .auth-left { display: none; }
    .auth-right { padding: 40px 24px; min-height: 100svh; }
    .auth-right::before { display: none; }
  }

/* ── Kanban Board ─────────────────────────────────────────────────────────── */
.kanban-board {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  align-items: flex-start;
  padding-bottom: 16px;
  flex: 1;
  min-height: 0;
}
.kanban-board::-webkit-scrollbar { height: 5px; }
.kanban-board::-webkit-scrollbar-track { background: transparent; }
.kanban-board::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.kanban-col {
  flex: 1 1 200px;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 220px);
}

@media (max-width: 1280px) {
  .kanban-col {
    flex: 0 0 240px;
  }
}
.kanban-col-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 9px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.kanban-col-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.kanban-col-title { font-size: 12px; font-weight: 600; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }
.kanban-col-count { font-size: 11px; background: var(--surface2); color: var(--text-muted); border-radius: 10px; padding: 1px 7px; font-weight: 600; }
.kanban-col-toggle { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 12px; padding: 2px 4px; border-radius: 4px; line-height: 1; transition: color .15s; }
.kanban-col-toggle:hover { color: var(--text); }

.kanban-cards {
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
  min-height: 40px;
}
.kanban-cards::-webkit-scrollbar { width: 4px; }
.kanban-cards::-webkit-scrollbar-track { background: transparent; }
.kanban-cards::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.kanban-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 2px solid var(--kc-color, #5A86AE);
  border-radius: 8px;
  padding: 10px 11px;
  cursor: pointer;
  transition: box-shadow .15s, transform .1s;
  font-size: 13px;
}
.kanban-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,.3); transform: translateY(-1px); }
.kanban-card-client { font-weight: 600; font-size: 13px; margin-bottom: 3px; display: flex; align-items: center; gap: 4px; overflow: hidden; }
.kanban-card-client > :not(.kanban-delivery-tag) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.kanban-delivery-tag { margin-left: auto; font-size: 0.68rem; color: var(--amber); white-space: nowrap; padding-left: 4px; flex-shrink: 0; }
.kanban-card-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 6px; }
.kanban-card-meta { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.kanban-card-package { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.kanban-card-fin { display: flex; gap: 10px; font-size: 11px; margin-bottom: 7px; flex-wrap: wrap; justify-content: space-between;}
.kanban-card-fin-item { display: flex; flex-direction: column; gap: 1px; }
.kanban-card-fin-label { color: var(--text-muted); }
.kanban-card-fin-val { font-weight: 600; text-align: right;}
.kanban-card-alerts { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 7px; }
.kanban-alert-badge { font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.kanban-card-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 7px;
  margin-top: 2px;
  justify-content: space-between;
}
.kanban-card-actions .btn { font-size: 11px; padding: 3px 8px; flex-shrink: 0; }
.kanban-col-empty { font-size: 12px; color: var(--text-muted); text-align: center; padding: 20px 12px; font-style: italic; }

.kanban-col--collapsed {
  flex: 0 0 34px;
  width: 34px;
  min-width: 34px;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 0;
  cursor: pointer;
}
.kanban-col--collapsed .kanban-col-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 4px 0;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
}
.kanban-col--collapsed .kanban-col-toggle:hover { color: var(--text); }
.kanban-col-collapsed-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.3;
  user-select: none;
  letter-spacing: 0.05em;
}

/* ── Mini-Calendário (Agenda sidebar) ──────────────────────────────────────── */
.mc-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.mc-hd {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  padding: 6px 0 8px;
  letter-spacing: 0.05em;
}
.mc-cell {
  text-align: center;
  font-size: 13px;
  padding: 8px 0;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text);
  position: relative;
  line-height: 1.6;
  transition: background .1s;
}
.mc-cell:hover { background: var(--surface2); }
.mc-today {
  background: var(--surface2);
  color: var(--gold);
  font-weight: 700;
}
.mc-selected {
  background: var(--gold) !important;
  color: #FFFFFF !important;
  font-weight: 700;
}
.mc-dot {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
}
@media (max-width: 1024px) {
  #agenda-sidebar { display: none; }
}

/* ── Agenda Session Tooltip ─────────────────────────────────────────────── */
#agenda-session-tooltip {
  display: none;
  position: fixed;
  z-index: 9999;
  width: 250px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.45);
  pointer-events: none;
  animation: tooltip-in .12s ease;
}
@keyframes tooltip-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Financeiro ──────────────────────────────────────────────────────────── */
.fin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.fin-card {
  border-radius: 10px;
  padding: 18px 20px;
  color: #fff;
}
.fin-card-income  { background: linear-gradient(135deg, #1A4A6E, #1D5FA0); }
.fin-card-expense { background: linear-gradient(135deg, #6E1A1A, #A02020); }
.fin-card-profit  { background: linear-gradient(135deg, #1A4A35, #1A7A4A); }
.fin-card-label { font-size: 11px; opacity: .8; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .8px; font-weight: 600; }
.fin-card-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.fin-card-sub   { font-size: 12px; opacity: .7; }

.fin-chart-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 20px;
}
.fin-chart-title { font-size: 11px; color: var(--text-muted); margin-bottom: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
#fin-cashflow-canvas { width: 100%; display: block; }

.fin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.fin-tab {
  padding: 7px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  transition: color .15s, border-color .15s;
  margin-bottom: -1px;
  font-family: var(--font-body);
}
.fin-tab:hover  { color: var(--text); }
.fin-tab.active { color: var(--gold); border-bottom-color: var(--gold); }

.fin-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 16px;
}
.fin-form-title { font-size: 10px; font-weight: 600; color: var(--text-muted); margin-bottom: 14px; text-transform: uppercase; letter-spacing: .08em; }
.fin-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.fin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fin-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.fin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.fin-table tr:hover td { background: var(--surface2); }
.fin-amount-income  { color: var(--green); font-weight: 600; }
.fin-amount-expense { color: var(--red);   font-weight: 600; }
.fin-cat-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  flex-shrink: 0;
}
.fin-cat-row {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  gap: 8px;
  background: var(--surface2);
  margin-bottom: 6px;
  font-size: 13px;
}
.fin-cat-row button { margin-left: auto; }

/* ── Lista genérica (pacotes, itens, clientes, categorias) ── */
/* Mesmo padrão visual de .sessions-list / .session-row */
.catalog-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.catalog-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 7px;
}
.catalog-section-title i { color: var(--gold); font-size: 13px; }

.catalog-list {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.catalog-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
  min-width: 0;
  min-height: 44px;
}
.catalog-row:last-child { border-bottom: none; }
.catalog-row:hover { background: var(--surface2); }

.catalog-row-info { min-width: 0; flex: 1; }
.catalog-row-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.catalog-row-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}
.catalog-row-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.catalog-row-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 7px;
  border-radius: 5px;
  font-size: 12px;
  color: var(--text-muted);
  transition: background 0.12s, color 0.12s;
  line-height: 1;
}
.catalog-row-btn:hover { background: var(--border); color: var(--text); }
.catalog-row-btn.danger { color: var(--red); }
.catalog-row-btn.danger:hover { background: rgba(201,79,79,0.12); }

/* ── Clients Grid ──────────────────────────────────────────────────────────── */
.clients-grid {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 13px;
}
.clients-grid-header,
.clients-grid-row {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.5fr 1.3fr 1.8fr 70px 110px 120px;
  align-items: center;
  gap: 0;
}
.clients-grid-header {
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  padding: 0;
}
.clients-grid-header > span {
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.clients-grid-row {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .12s;
}
.clients-grid-row:last-child { border-bottom: none; }
.clients-grid-row:hover { background: var(--surface2); }
.clients-grid-name {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-weight: 500;
  overflow: hidden;
}
.clients-grid-name > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clients-grid-cell {
  padding: 10px 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clients-grid-actions {
  padding: 6px 8px 6px 32px;
  display: flex;
  gap: 2px;
  justify-content: flex-end;
}

.catalog-type-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
}

/* ── Generic data grid (packages, extra-items, categories) ───────────────── */
.data-grid {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 13px;
}
.data-grid-header,
.data-grid-row {
  display: grid;
  align-items: center;
}
.data-grid-header {
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.data-grid-header > span {
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.data-grid-row {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .12s;
}
.data-grid-row:last-child { border-bottom: none; }
.data-grid-row:hover { background: var(--surface2); }
.data-grid-cell {
  padding: 10px 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.data-grid-cell.name { font-weight: 500; }
.data-grid-cell.muted { color: var(--text-muted); }
.data-grid-cell.value { font-weight: 600; color: var(--gold); text-align: right; justify-content: flex-end; }
.data-grid-cell.center { text-align: center; }
.data-grid-cell.actions { display: flex; gap: 2px; justify-content: flex-end; padding: 6px 8px; }

/* ── Package modal: sticky footer ─────────────────────────────────────────── */
.pkg-modal {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
}
.pkg-modal-body {
  overflow-y: auto;
  flex: 1;
  padding-bottom: 8px;
  overscroll-behavior: contain;
}
.pkg-modal .modal-actions {
  flex-shrink: 0;
  margin-top: 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Coluna de stats nas linhas (ex: clientes) */
.catalog-row-stat {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 48px;
}
.catalog-row-stat-label { font-size: 10px; color: var(--text-muted); font-weight: 500; letter-spacing: 0.05em; }
.catalog-row-stat-value { font-size: 12px; font-weight: 600; color: var(--text); }

/* Dot colorido (categorias) */
.catalog-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sub-tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.sub-tab { background: transparent; border: none; color: var(--text-muted); padding: 7px 14px; cursor: pointer; font-size: 13px; border-radius: 6px 6px 0 0; transition: all 0.15s; display: flex; align-items: center; gap: 6px; font-family: var(--font-body); }
.sub-tab:hover { color: var(--text); background: var(--surface2); }
.sub-tab.active { color: var(--gold); background: var(--surface2); border-bottom: 2px solid var(--gold); }
.integracao-subtab { display: none; }
.google-sub-subtab { display: none; }

/* Package modal sections */
.pkg-section {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px 14px;
  margin-bottom: 10px;
}
.pkg-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.pkg-delivery-toggle {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pkg-delivery-btn {
  flex: 1;
  min-width: 140px;
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
  font-family: var(--font-body);
}
.pkg-delivery-btn:hover { border-color: var(--gold); color: var(--text); }
.pkg-delivery-btn.active {
  background: rgba(212,175,55,0.1);
  border-color: var(--gold);
  color: var(--gold);
}

/* ── Time Combobox ──────────────────────────────────────────── */
.time-combo-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.time-combo-input {
  flex: 1;
  min-width: 0;
  padding-right: 26px !important;
}
.time-combo-arrow {
  position: absolute;
  right: 8px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1;
  user-select: none;
  pointer-events: all;
}
.time-combo-arrow:hover { color: var(--text); }
.time-combo-drop {
  display: none;
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  z-index: 9999;
  max-height: 180px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.time-combo-drop.open { display: block; }
.time-combo-opt {
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
}
.time-combo-opt:hover { background: var(--surface2); }

/* ── Budget Type Toggle Buttons ─────────────────────────────── */
.budget-type-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: center;
  padding: 9px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.budget-type-btn:hover {
  border-color: var(--gold);
  color: var(--text);
}
.budget-type-btn.active {
  border-color: var(--gold);
  background: rgba(212,175,55,0.1);
  color: var(--gold);
  font-weight: 500;
}

/* ── Sessions grid: columns via class (overrideable by mobile media query) ── */
.sessions-data-grid-cols {
  grid-template-columns: 130px 110px 100px 2fr 1.6fr 100px 80px 100px 100px 120px;
}

.budgets-data-grid-cols {
  grid-template-columns: 80px 120px 2fr 1.2fr 110px 200px;
}

/* ── Mobile: listas com apenas colunas essenciais ── */
@media (max-width: 1024px) {
  /* Sessões: mostrar Data/Hora | Cliente | Ações */
  .sessions-data-grid-cols {
    grid-template-columns: 130px 1fr 44px;
  }
  .sessions-data-grid .data-grid-header > span:nth-child(2),
  .sessions-data-grid .data-grid-header > span:nth-child(3),
  .sessions-data-grid .data-grid-header > span:nth-child(5),
  .sessions-data-grid .data-grid-header > span:nth-child(6),
  .sessions-data-grid .data-grid-header > span:nth-child(7),
  .sessions-data-grid .data-grid-header > span:nth-child(8),
  .sessions-data-grid .data-grid-header > span:nth-child(9),
  .sessions-data-grid .data-grid-row > span:nth-child(2),
  .sessions-data-grid .data-grid-row > span:nth-child(3),
  .sessions-data-grid .data-grid-row > span:nth-child(5),
  .sessions-data-grid .data-grid-row > span:nth-child(6),
  .sessions-data-grid .data-grid-row > span:nth-child(7),
  .sessions-data-grid .data-grid-row > span:nth-child(8),
  .sessions-data-grid .data-grid-row > span:nth-child(9) {
    display: none !important;
  }

  /* Orçamentos: mostrar Título/Cliente | Valor | Ações */
  .budgets-data-grid-cols {
    grid-template-columns: 1fr 90px 44px;
  }
  .budgets-data-grid .data-grid-header > span:nth-child(1),
  .budgets-data-grid .data-grid-header > span:nth-child(2),
  .budgets-data-grid .data-grid-header > span:nth-child(4),
  .budgets-data-grid .data-grid-row > span:nth-child(1),
  .budgets-data-grid .data-grid-row > span:nth-child(2),
  .budgets-data-grid .data-grid-row > span:nth-child(4) {
    display: none !important;
  }

  /* Clientes: mostrar Nome | Ações */
  .clients-data-grid .clients-grid-header,
  .clients-data-grid .clients-grid-row {
    grid-template-columns: 1fr 44px !important;
  }
  .clients-data-grid .clients-grid-header > span:nth-child(2),
  .clients-data-grid .clients-grid-header > span:nth-child(3),
  .clients-data-grid .clients-grid-header > span:nth-child(4),
  .clients-data-grid .clients-grid-header > span:nth-child(5),
  .clients-data-grid .clients-grid-header > span:nth-child(6),
  .clients-data-grid .clients-grid-header > span:nth-child(7),
  .clients-data-grid .clients-grid-row > span:nth-child(2),
  .clients-data-grid .clients-grid-row > span:nth-child(3),
  .clients-data-grid .clients-grid-row > span:nth-child(4),
  .clients-data-grid .clients-grid-row > span:nth-child(5),
  .clients-data-grid .clients-grid-row > span:nth-child(6),
  .clients-data-grid .clients-grid-row > span:nth-child(7) {
    display: none !important;
  }

  /* Pacotes: mostrar Nome | Valor | Ações */
  .packages-data-grid .data-grid-header,
  .packages-data-grid .data-grid-row {
    grid-template-columns: 2fr 80px 44px !important;
  }
  .packages-data-grid .data-grid-header > span:nth-child(2),
  .packages-data-grid .data-grid-header > span:nth-child(3),
  .packages-data-grid .data-grid-header > span:nth-child(5),
  .packages-data-grid .data-grid-header > span:nth-child(6),
  .packages-data-grid .data-grid-header > span:nth-child(7),
  .packages-data-grid .data-grid-header > span:nth-child(8),
  .packages-data-grid .data-grid-header > span:nth-child(9),
  .packages-data-grid .data-grid-header > span:nth-child(10),
  .packages-data-grid .data-grid-header > span:nth-child(11),
  .packages-data-grid .data-grid-row > span:nth-child(2),
  .packages-data-grid .data-grid-row > span:nth-child(3),
  .packages-data-grid .data-grid-row > span:nth-child(5),
  .packages-data-grid .data-grid-row > span:nth-child(6),
  .packages-data-grid .data-grid-row > span:nth-child(7),
  .packages-data-grid .data-grid-row > span:nth-child(8),
  .packages-data-grid .data-grid-row > span:nth-child(9),
  .packages-data-grid .data-grid-row > span:nth-child(10),
  .packages-data-grid .data-grid-row > span:nth-child(11) {
    display: none !important;
  }

  /* Itens Adicionais: 3 colunas já existentes, apenas evitar scroll */
  .extra-items-data-grid {
    overflow-x: hidden;
  }
  .extra-items-data-grid .data-grid-header,
  .extra-items-data-grid .data-grid-row {
    grid-template-columns: 1fr 100px 44px !important;
  }
}


/* CKEditor — isolar do tema dark do app */
.ck-editor__editable.ck-content {
  color: #1a1a2e !important;
  background: #fff !important;
}
.ck-editor__editable.ck-content p,
.ck-editor__editable.ck-content span:not([style*="color"]),
.ck-editor__editable.ck-content li,
.ck-editor__editable.ck-content td,
.ck-editor__editable.ck-content th,
.ck-editor__editable.ck-content strong,
.ck-editor__editable.ck-content em {
  color: inherit;
}
