  :root {
    --bg: #F7F6F3;
    --surface: #FFFFFF;
    --surface2: #F0EEE9;
    --border: rgba(0,0,0,0.09);
    --border-med: rgba(0,0,0,0.14);
    --text: #1A1A18;
    --text2: #6B6A65;
    --text3: #9E9D98;
    --accent: #1A1A18;
    --accent-bg: #1A1A18;
    --accent-text: #FFFFFF;
    --green: #3B6D11; --green-bg: #EAF3DE;
    --red: #A32D2D; --red-bg: #FCEBEB;
    --amber: #854F0B; --amber-bg: #FAEEDA;
    --blue: #185FA5; --blue-bg: #E6F1FB;
    --teal: #0F6E56; --teal-bg: #E1F5EE;
    --purple: #534AB7; --purple-bg: #EEEDFE;
    --orange: #C45700; --orange-bg: #FFF3E0;
    --radius: 10px; --radius-lg: 14px;
    --font: 'DM Sans', sans-serif;
    --mono: 'DM Mono', monospace;
    --nav-w: 220px;
    --shadow: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; min-height: 100vh; }
  
  /* LOGIN */
  #login-screen { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--bg); }
  .login-card { background: var(--surface); border: 0.5px solid var(--border-med); border-radius: var(--radius-lg); padding: 2rem; width: 380px; max-width: calc(100vw - 32px); box-shadow: var(--shadow); }
  .login-logo { display: flex; justify-content: center; margin-bottom: 1.5rem; }
  .login-logo img { display: block; width: 230px; max-width: 100%; height: auto; }
  .login-title { font-size: 22px; font-weight: 600; margin-bottom: 0.25rem; }
  .login-sub { font-size: 13px; color: var(--text2); margin-bottom: 1.5rem; }
  .form-group { margin-bottom: 12px; }
  .form-label { font-size: 12px; color: var(--text2); margin-bottom: 4px; display: block; font-weight: 500; }
  input, select, textarea { width: 100%; padding: 8px 10px; border: 0.5px solid var(--border-med); border-radius: var(--radius); font-family: var(--font); font-size: 13px; background: var(--surface); color: var(--text); outline: none; transition: border 0.15s; }
  input:focus, select:focus, textarea:focus { border-color: var(--text); }
  textarea { resize: vertical; min-height: 72px; }
  .btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius); border: 0.5px solid var(--border-med); font-family: var(--font); font-size: 13px; font-weight: 500; cursor: pointer; background: var(--surface); color: var(--text); transition: all 0.15s; white-space: nowrap; }
  .btn:hover { background: var(--surface2); }
  .btn:active { transform: scale(0.98); }
  .btn-primary { background: var(--accent-bg); color: var(--accent-text); border-color: var(--accent-bg); }
  .btn-primary:hover { opacity: 0.85; background: var(--accent-bg); }
  .btn-danger { background: var(--red, #e53e3e); color: #fff; border-color: var(--red, #e53e3e); }
  .btn-danger:hover { opacity: 0.85; }
  .btn-sm { padding: 5px 10px; font-size: 12px; }
  .btn:disabled, .btn[disabled] { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
  .zoho-invoice-actions { align-items: stretch; }
  .zoho-action-btn {
    min-height: 42px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
  }
  .zoho-workflow-modal {
    width: min(1280px, calc(100vw - 48px));
    max-height: calc(100dvh - 48px);
  }
  .zoho-modal-table {
    max-height: calc(100dvh - 260px);
    overflow: auto;
    border: 0.5px solid var(--border);
    border-radius: var(--radius);
  }
  .zoho-modal-table table { min-width: 980px; }
  .zoho-modal-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
  }
  .zoho-modal-footer {
    position: sticky;
    bottom: -1.5rem;
    background: var(--surface);
    border-top: 0.5px solid var(--border);
    margin: 1rem -1.5rem -1.5rem;
    padding: 12px 1.5rem;
    z-index: 2;
  }
  .btn-full { width: 100%; justify-content: center; }
  .err-msg { font-size: 12px; color: var(--red); margin-top: 6px; display: none; }
  .login-status { font-size: 12px; color: var(--text2); margin-top: 8px; min-height: 16px; line-height: 1.4; }
  .startup-screen { display:flex; align-items:center; justify-content:center; min-height:100vh; background:var(--bg); color:var(--text2); }
  .startup-card { background:var(--surface); border:0.5px solid var(--border-med); border-radius:var(--radius-lg); padding:1.5rem 2rem; box-shadow:var(--shadow); text-align:center; width:320px; max-width:calc(100vw - 32px); }
  .startup-card img { width:210px; max-width:100%; height:auto; margin-bottom:1rem; }
  .startup-text { font-size:13px; color:var(--text2); }

  /* APP SHELL */
  #app { display: none; min-height: 100vh; }
  #public-makeup-form { display:none; min-height:100vh; background:var(--bg); }
  .shell { display: flex; min-height: 100vh; }

  /* SIDEBAR */
  .sidebar { width: var(--nav-w); background: var(--surface); border-right: 0.5px solid var(--border); display: flex; flex-direction: column; position: fixed; top: 0; left: 0; height: 100vh; z-index: 10; transition: width 0.18s ease; overflow: hidden; }
  .sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.22); z-index: 8; }
  .sidebar-header { padding: 1rem 1rem 1.1rem; border-bottom: 0.5px solid var(--border); }
  .sidebar-brand { display: block; margin-bottom: 0.75rem; }
  .sidebar-logo { display: block; width: 168px; max-width: 100%; height: auto; }
  .sidebar-user { margin-top: 6px; display: flex; align-items: center; gap: 8px; }
  .avatar { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; background: var(--surface2); color: var(--text2); flex-shrink: 0; }
  .sidebar-name { font-size: 13px; font-weight: 500; }
  .sidebar-role { font-size: 11px; color: var(--text3); }
  .sidebar-nav { flex: 1; padding: 0.75rem 0.5rem; overflow-y: auto; }
  .nav-section { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text3); padding: 0.5rem 0.5rem 0.25rem; margin-top: 0.5rem; }
  .nav-section-hd { display: flex; align-items: center; justify-content: space-between; cursor: pointer; border-radius: var(--radius); padding-right: 6px; user-select: none; }
  .nav-section-hd:hover { color: var(--text2); }
  .nav-chevron { font-size: 8px; opacity: 0.55; margin-left: 4px; flex-shrink: 0; }
  .nav-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--radius); font-size: 13px; font-weight: 500; color: var(--text2); cursor: pointer; transition: all 0.12s; margin-bottom: 1px; }
  .nav-item:hover { background: var(--surface2); color: var(--text); }
  .nav-item.active { background: var(--text); color: #fff; }
  .nav-icon { font-size: 15px; width: 18px; text-align: center; }
  .nav-badge { margin-left: auto; min-width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; padding: 0 6px; border-radius: 99px; line-height: 1; }
  .sidebar-footer { padding: 0.75rem; border-top: 0.5px solid var(--border); }
  .sb-pin-btn { display:flex;align-items:center;justify-content:center;width:100%;gap:6px;padding:5px 8px;border:0.5px solid var(--border-med);border-radius:var(--radius);background:var(--surface);color:var(--text2);font-size:11px;font-weight:600;cursor:pointer;margin-top:6px;white-space:nowrap;overflow:hidden; }
  .sb-pin-btn:hover { background:var(--surface2);color:var(--text); }
  /* Collapsed sidebar */
  body.sb-collapsed .sidebar { width: 52px; }
  body.sb-collapsed .main    { margin-left: 52px; }
  body.sb-collapsed .sidebar-brand,
  body.sb-collapsed .sidebar-name,
  body.sb-collapsed .sidebar-role,
  body.sb-collapsed .nav-section,
  body.sb-collapsed .nav-badge,
  body.sb-collapsed .nav-label,
  body.sb-collapsed .sb-pin-label,
  body.sb-collapsed .sidebar-footer .btn { display: none; }
  body.sb-collapsed .sidebar-header { padding: 0.6rem 0.4rem; display:flex;align-items:center;justify-content:center; }
  body.sb-collapsed .sidebar-user   { justify-content:center; }
  body.sb-collapsed .sidebar-nav    { padding: 0.5rem 0.25rem; }
  body.sb-collapsed .nav-item       { padding: 8px 0; justify-content: center; gap: 0; }
  body.sb-collapsed .nav-icon       { width: 100%; text-align: center; font-size: 17px; }
  body.sb-collapsed .sidebar-footer { padding: 0.4rem; }
  body.sb-collapsed .sb-pin-btn     { padding: 6px 0; justify-content:center; }

  /* MAIN */
  .main { margin-left: var(--nav-w); flex: 1; display: flex; flex-direction: column; transition: margin-left 0.18s ease; }
  .topbar { height: 52px; background: var(--surface); border-bottom: 0.5px solid var(--border); display: flex; align-items: center; padding: 0 1.5rem; gap: 12px; position: sticky; top: 0; z-index: 5; }
  .topbar-title { font-size: 15px; font-weight: 600; flex: 1; display: flex; align-items: center; gap: 10px; }
  .save-status { min-width: 74px; min-height: 24px; display: none; align-items: center; justify-content: center; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; color: var(--text2); background: var(--surface2); white-space: nowrap; }
  .save-status.show { display: inline-flex; }
  .save-status.dirty { color: var(--amber); background: var(--amber-bg); }
  .save-status.saving { color: var(--blue); background: var(--blue-bg); }
  .save-status.saved { color: var(--green); background: var(--green-bg); }
  .save-status.error { color: var(--red); background: var(--red-bg); }
  .icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius); border: 0.5px solid var(--border-med); background: var(--surface); color: var(--text2); font-size: 16px; cursor: pointer; transition: all 0.12s; flex-shrink: 0; }
  .icon-btn:hover { background: var(--surface2); color: var(--text); }
  .back-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: var(--radius); border: 0.5px solid var(--border-med); background: var(--surface); color: var(--text2); font-size: 16px; cursor: pointer; transition: all 0.12s; padding: 0; line-height: 1; }
  .back-btn:hover { background: var(--surface2); color: var(--text); border-color: var(--border-med); }
  .back-btn:active { transform: scale(0.95); }
  .content { padding: 1.5rem; flex: 1; }
  .page-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 1rem; }
  .page-hero-main { min-width: 0; }
  .page-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text3); margin-bottom: 4px; }
  .page-title { font-size: 24px; line-height: 1.15; font-weight: 650; color: var(--text); letter-spacing: 0; }
  .page-subtitle { font-size: 13px; color: var(--text2); line-height: 1.45; margin-top: 6px; max-width: 760px; }
  .page-primary-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }

  /* CARDS */
  .card { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
  .card-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 1rem; }
  .card-sub { font-size: 12px; color: var(--text2); margin-top: -0.75rem; margin-bottom: 1rem; }
  .stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 1rem; }
  .stat-card { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius-lg); padding: 1rem; box-shadow: var(--shadow); }
  .stat-label { font-size: 11px; color: var(--text2); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
  .stat-val { font-size: 24px; font-weight: 600; }
  .stat-hint { font-size: 11px; color: var(--text3); margin-top: 2px; }
  .action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 1rem; }
  .action-card { border: 0.5px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); padding: 14px; box-shadow: var(--shadow); display: flex; align-items: flex-start; gap: 12px; min-height: 104px; }
  .action-card.urgent { border-color: var(--amber); background: var(--amber-bg); }
  .action-card.danger { border-color: var(--red); background: var(--red-bg); }
  .action-card.clear { border-color: var(--green); background: var(--green-bg); }
  .action-count { min-width: 38px; height: 38px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; background: var(--surface); color: var(--text); font-size: 18px; font-weight: 700; border: 0.5px solid var(--border-med); }
  .action-title { font-size: 13px; font-weight: 650; color: var(--text); margin-bottom: 3px; }
  .action-copy { font-size: 12px; color: var(--text2); line-height: 1.35; }
  .action-card .btn { margin-top: 9px; }
  .action-menu { position: relative; display: inline-block; }
  .action-menu > summary { list-style: none; }
  .action-menu > summary::-webkit-details-marker { display: none; }
  .action-menu[open] > summary { background: var(--surface2); }
  .action-menu-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 220px; padding: 6px; border: 0.5px solid var(--border-med); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 24px rgba(0,0,0,0.12); display: grid; gap: 3px; }
  .action-menu-panel .btn { justify-content: flex-start; width: 100%; border-color: transparent; background: transparent; }
  .action-menu-panel .btn:hover { background: var(--surface2); }
  .action-menu-panel .btn.danger-action { color: var(--red); }
  .action-menu-panel .btn.danger-action:hover { background: var(--red-bg); }
  .mobile-card-list { display: none; }
  .mobile-record-card { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius-lg); padding: 12px; box-shadow: var(--shadow); }
  .mobile-record-title { font-size: 14px; font-weight: 650; color: var(--text); line-height: 1.3; }
  .mobile-record-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; color: var(--text2); }
  .mobile-record-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
  .record-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
  .section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
  .section-title { font-size: 15px; line-height: 1.25; font-weight: 650; color: var(--text); }
  .section-subtitle, .help-text { font-size: 12px; color: var(--text2); line-height: 1.45; }
  .toolbar { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
  .toolbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-left: auto; }
  .record-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--text3); margin-top: 6px; }
  .status-stepper { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
  .status-step { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px; background: var(--surface2); color: var(--text3); font-size: 11px; font-weight: 650; }
  .status-step.done { background: var(--green-bg); color: var(--green); }
  .status-step.current { background: var(--blue-bg); color: var(--blue); }
  .status-step.rejected { background: var(--red-bg); color: var(--red); }
  .status-step-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .65; }
  .form-section { border: 0.5px solid var(--border); border-radius: var(--radius-lg); padding: 12px; background: var(--surface); margin-bottom: 12px; }
  .form-section-title { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
  .form-section-hint { font-size: 11px; color: var(--text2); line-height: 1.4; margin-top: -4px; margin-bottom: 10px; }
  .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

  /* TABLE */
  .tbl-wrap { overflow-x: auto; border-radius: var(--radius); }
  table { width: 100%; border-collapse: collapse; font-size: 13px; }
  th { text-align: left; font-size: 11px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: 0.05em; padding: 8px 10px; border-bottom: 0.5px solid var(--border-med); background: var(--surface); }
  .tbl-wrap th { position: sticky; top: 0; z-index: 1; }
  td { padding: 10px 10px; border-bottom: 0.5px solid var(--border); vertical-align: middle; }
  tr:last-child td { border-bottom: none; }
  tr:hover td { background: var(--bg); }

  /* BADGES */
  .badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; }
  .badge-green { background: var(--green-bg); color: var(--green); }
  .badge-red { background: var(--red-bg); color: var(--red); }
  .badge-amber { background: var(--amber-bg); color: var(--amber); }
  .badge-blue { background: var(--blue-bg); color: var(--blue); }
  .badge-teal { background: var(--teal-bg); color: var(--teal); }
  .badge-purple { background: var(--purple-bg); color: var(--purple); }
  .badge-orange { background: var(--orange-bg); color: var(--orange); }
  .badge-gray { background: var(--surface2); color: var(--text2); }
  .sched-tag-pill.badge-green { background: #1AA260 !important; border-color: #0F7A45 !important; color: #fff !important; }
  .sched-tag-pill.badge-red { background: #C62828 !important; border-color: #9F1F1F !important; color: #fff !important; }
  .sched-tag-pill.badge-amber { background: #F5B400 !important; border-color: #C78900 !important; color: #16130A !important; }
  .sched-tag-pill.badge-blue { background: #1565C0 !important; border-color: #0D47A1 !important; color: #fff !important; }
  .sched-tag-pill.badge-teal { background: #00897B !important; border-color: #00695C !important; color: #fff !important; }
  .sched-tag-pill.badge-purple { background: #6A1B9A !important; border-color: #4A148C !important; color: #fff !important; }
  .sched-tag-pill.badge-orange { background: #EF6C00 !important; border-color: #BF4F00 !important; color: #fff !important; }
  .sched-tag-pill.badge-gray { background: #4B5563 !important; border-color: #374151 !important; color: #fff !important; }
  .danger-action { color: var(--red) !important; border-color: var(--red) !important; }
  .danger-action-soft { color: var(--red) !important; background: var(--red-bg) !important; border-color: var(--red) !important; }

  /* FORM ROW */
  .frow { margin-bottom: 10px; }
  .frow .form-label { margin-bottom: 3px; }
  .btn-row { display: flex; gap: 8px; margin-top: 4px; }
  .modal-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 1rem; padding-top: 12px; border-top: 0.5px solid var(--border); }
  .modal-footer .danger-zone { margin-right: auto; }

  /* ANNOUNCEMENT */
  .announce-item { padding: 12px 0; border-bottom: 0.5px solid var(--border); }
  .announce-item:last-child { border-bottom: none; }
  .announce-meta { font-size: 11px; color: var(--text3); margin-top: 4px; display: flex; gap: 8px; }
  .announce-tag { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; padding: 1px 6px; border-radius: 99px; }

  /* SLOT ROW */
  .slot-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 0.5px solid var(--border); }
  .slot-item:last-child { border-bottom: none; }

  /* ATTENDANCE */
  .att-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 0.5px solid var(--border); }
  .att-row:last-child { border-bottom: none; }

  /* MODAL */
  .modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.3); z-index: 100; align-items: flex-start; justify-content: center; padding: 24px 12px; overflow-y: auto; }
  .modal-overlay.open { display: flex; }
  .modal { background: var(--surface); border-radius: var(--radius-lg); padding: 1.5rem; width: 440px; max-width: calc(95vw - 2px); max-height: calc(100dvh - 48px); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; border: 0.5px solid var(--border-med); box-shadow: 0 8px 32px rgba(0,0,0,0.12); box-sizing: border-box; }
  .modal.modal-wide { width: min(1400px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); }
  .modal.modal-wide .tbl-wrap { max-width: 100%; overflow: auto; }
  .modal.group-session-preview-modal { width: min(1600px, calc(100vw - 24px)); max-width: calc(100vw - 24px); }
  .modal.group-session-preview-modal table { min-width: 1120px; }
  .modal.group-session-preview-modal .grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .modal.pm-link-missing-modal-shell { width: min(1500px, calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
  .modal.pm-link-missing-modal-shell .pm-link-missing-scroll { max-height: calc(100dvh - 260px); }
  .google-reg-import-modal { min-height: calc(100dvh - 112px); display: flex; flex-direction: column; }
  .google-reg-import-modal #google-registration-import-body { flex: 1; min-height: 0; overflow: hidden; }
  .google-reg-import-modal #google-registration-import-body .tbl-wrap { max-height: calc(100dvh - 260px); overflow: auto; }
  .google-reg-import-modal table { min-width: 1100px; }
  .modal-title { font-size: 16px; font-weight: 600; margin-bottom: 1rem; }
  .modal-close { float: right; cursor: pointer; font-size: 18px; color: var(--text3); background: none; border: none; }
  .modal:focus { outline: none; }
  .btn, button, .icon-btn, .back-btn, .nav-item, summary { min-height: 34px; }
  button:focus-visible, .btn:focus-visible, .icon-btn:focus-visible, .back-btn:focus-visible, .nav-item:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [role="button"]:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

  /* TOAST */
  .toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 999; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
  .toast-item { max-width: 100%; background: var(--text); color: #fff; padding: 11px 14px; border-radius: var(--radius); font-size: 13px; line-height: 1.38; opacity: 0; transform: translateY(8px); transition: opacity 0.2s ease, transform 0.2s ease; pointer-events: none; font-weight: 600; box-shadow: 0 10px 28px rgba(0,0,0,0.16); overflow-wrap: anywhere; }
  .toast-item.show { opacity: 1; transform: translateY(0); }
  .toast-success { background: var(--green); }
  .toast-error { background: var(--red); }
  .toast-warn, .toast-warning { background: var(--amber); color: #fff; }

  /* EMPTY */
  .empty { text-align: center; padding: 2.5rem 1rem; color: var(--text3); font-size: 13px; line-height: 1.45; }
  .empty-icon { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 10px; background: var(--surface2); color: var(--text2); }

  /* PAGE SECTIONS */
  .page-section { display: none; }
  .page-section.active { display: block; }

  /* LEAVE CALENDAR STRIP */
  .leave-strip { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 1rem; }
  .leave-day { font-size: 11px; padding: 4px 8px; border-radius: var(--radius); background: var(--surface2); color: var(--text2); font-family: var(--mono); }
  .public-shell { max-width: 1040px; margin: 0 auto; padding: 2rem 1rem; }
  .public-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; margin-bottom:1.25rem; }
  .public-title { font-size:24px; font-weight:600; }
  .slot-picker { display:grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap:10px; }
  .pick-slot { text-align:left; border:0.5px solid var(--border-med); border-radius:var(--radius); background:var(--surface); padding:12px; cursor:pointer; transition:all 0.12s; }
  .pick-slot:hover { border-color:var(--text); background:var(--surface2); }
  .pick-slot.active { border-color:var(--green); background:var(--green-bg); box-shadow: inset 0 0 0 1px var(--green); }

  /* RESPONSIVE HINT */
  @media (max-width: 700px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.18s ease; box-shadow: 8px 0 24px rgba(0,0,0,0.12); }
    body.sidebar-open .sidebar { transform: translateX(0); }
    body.sidebar-open .sidebar-backdrop { display: block; }
    body.sb-collapsed .sidebar { width: var(--nav-w); }
    body.sb-collapsed .main { margin-left: 0; }
    body.sb-collapsed .sidebar-brand,
    body.sb-collapsed .sidebar-name,
    body.sb-collapsed .sidebar-role,
    body.sb-collapsed .nav-section,
    body.sb-collapsed .nav-badge,
    body.sb-collapsed .nav-label,
    body.sb-collapsed .sb-pin-label,
    body.sb-collapsed .sidebar-footer .btn { display: initial; }
    body.sb-collapsed .sidebar-brand { display: block; }
    body.sb-collapsed .sidebar-header { padding: 1rem 1rem 1.1rem; display: block; }
    body.sb-collapsed .sidebar-user { justify-content: flex-start; }
    body.sb-collapsed .sidebar-name,
    body.sb-collapsed .sidebar-role { display: block; }
    body.sb-collapsed .nav-section { display: flex; }
    body.sb-collapsed .nav-label { display: inline; }
    body.sb-collapsed .nav-badge { display: inline-flex; }
    body.sb-collapsed .sidebar-footer .btn,
    body.sb-collapsed .sb-pin-label { display: inline-flex; }
    body.sb-collapsed .nav-item { padding: 7px 10px; justify-content: flex-start; gap: 8px; }
    body.sb-collapsed .nav-icon { width: 18px; font-size: 15px; }
    body.sb-collapsed .sidebar-footer { padding: 0.75rem; }
    body.sb-collapsed .sb-pin-btn { padding: 5px 8px; justify-content: center; }
    .main { margin-left: 0; }
    .topbar { height: auto; min-height: 52px; padding: 0.6rem 0.75rem; flex-wrap: wrap; align-items: center; gap: 8px; }
    .topbar-title { min-width: 0; flex: 1 1 calc(100% - 96px); }
    .topbar-title span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    #topbar-actions { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
    #topbar-actions > div { flex-wrap: nowrap !important; }
    #topbar-actions .btn { flex: 0 0 auto; }
    .content { padding: 0.75rem; }
    .page-hero { flex-direction: column; gap: 10px; }
    .page-title { font-size: 21px; }
    .page-primary-actions { width: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
    .page-primary-actions .btn { flex: 0 0 auto; }
    .zoho-invoice-actions { width: 100%; overflow-x: auto; padding-bottom: 2px; }
    .zoho-action-btn { min-height: 40px; padding: 9px 12px; font-size: 13px; flex: 0 0 auto; }
    .zoho-workflow-modal { width: 100%; max-height: 100dvh; }
    .zoho-modal-table { max-height: calc(100dvh - 220px); }
    .zoho-modal-footer { bottom: -1rem; margin: 1rem -1rem -1rem; padding: 10px 1rem; }
    .action-menu-panel { left: 0; right: auto; min-width: min(260px, calc(100vw - 32px)); }
    .action-grid, .grid2, .grid3, .stat-grid { grid-template-columns: 1fr; }
    .desktop-table { display: none !important; }
    .mobile-card-list { display: grid; gap: 10px; }
    .card { padding: 1rem; }
    .modal-overlay { align-items: stretch; justify-content: stretch; padding: 0; }
    .modal { width: 100%; max-width: 100%; min-height: 100dvh; max-height: 100dvh; border-radius: 0; border: none; padding: 1rem; }
    .modal.pm-link-missing-modal-shell { width: 100%; max-width: 100%; max-height: 100dvh; }
    .modal.pm-link-missing-modal-shell .pm-link-missing-scroll { max-height: calc(100dvh - 230px); }
    .modal .btn-row:last-child { position: sticky; bottom: -1rem; background: var(--surface); border-top: 0.5px solid var(--border); margin: 1rem -1rem -1rem; padding: 10px 1rem; justify-content: flex-end; z-index: 2; }
    .modal .modal-footer:last-child { position: sticky; bottom: -1rem; background: var(--surface); margin: 1rem -1rem -1rem; padding: 10px 1rem; z-index: 2; }
    .modal .grid2, .modal .grid3 { grid-template-columns: 1fr; }
  }

/* ── Billing toggle buttons (lesson days + discounts) ─────────────────────────
   Used in the student profile form AND the invoice tracker day picker.
   Defined globally so the buttons are styled even when the invoice tracker
   page hasn't been visited yet (previously only injected lazily by 14-invoice.js). */
.inv-day-btn {
  padding: 6px 12px;
  border: 1.5px solid var(--border-med);
  border-radius: 6px;
  background: var(--surface2);
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: filter .1s;
}
.inv-day-btn.inv-day-on {
  background: var(--green-bg, #f0fdf4);
  color: var(--green);
  border-color: var(--green);
}
.inv-day-btn:hover { filter: brightness(0.94); }
