/* Booking CRM UI stylesheet.
   Legacy rules are retained above the canonical section temporarily so production
   remains stable during the domain migration. New visual work must target the
   CANONICAL UI SYSTEM section at the end. */
:root{
      --bg:#f6fbff; --card:#ffffff; --line:#e7eef6; --text:#18304b; --muted:#74869b;
      --blue:#4f9cf9; --blue-strong:#2f80ed; --blue-soft:#eaf4ff; --green:#24a66a; --green-bg:#e9f8f1;
      --amber:#d99a17; --amber-bg:#fff6da; --red:#d95c5c; --red-bg:#fff0f0; --shadow:0 10px 30px rgba(39,78,120,.08);
      --radius:18px;
    }
    *{box-sizing:border-box} body{margin:0;font-family:Inter,system-ui,sans-serif;background:linear-gradient(180deg,#f8fcff 0%,#f3f9ff 100%);color:var(--text)}
    button,input,select,textarea{font:inherit}.app{display:grid;grid-template-columns:230px minmax(0,1fr);min-height:100vh;transition:grid-template-columns .2s ease}.sidebar{background:rgba(255,255,255,.96);border-right:1px solid var(--line);padding:22px 16px;position:fixed;left:0;top:0;width:230px;height:100vh;overflow-y:auto;overflow-x:hidden;z-index:24;transition:width .2s ease,padding .2s ease}.brand{display:flex;align-items:center;gap:10px;font-weight:700;font-size:20px;margin:4px 10px 28px;white-space:nowrap;overflow:hidden;min-width:0;padding-right:30px}.brand-mark{flex:0 0 34px}#sidebarBrandName{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.main{grid-column:2;min-width:0;padding:24px 28px 40px}.brand-mark{width:34px;height:34px;border-radius:12px;background:linear-gradient(135deg,#bfe0ff,#5ea9ff);display:grid;place-items:center;color:white;font-weight:800;background-size:contain;background-position:center;background-repeat:no-repeat}.nav{display:grid;gap:8px}.nav button{border:0;background:transparent;padding:12px 14px;border-radius:12px;text-align:left;color:#5c6f84;cursor:pointer}.nav button.active{background:var(--blue-soft);color:var(--blue-strong);font-weight:600}.topbar{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:22px}.search{max-width:420px;flex:1}.search input{width:100%;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:white}.user{display:flex;align-items:center;gap:10px}.sync-control{display:flex;align-items:center;gap:8px;margin-left:auto}.sync-meta{font-size:11px;color:var(--muted);white-space:nowrap}.sync-btn{display:inline-flex;align-items:center;gap:7px}.sync-btn.syncing{opacity:.65;pointer-events:none}.avatar{width:34px;height:34px;border-radius:50%;background:#cfe7ff;color:#1e6fcb;display:grid;place-items:center;font-weight:700}.page{display:none}.page.active{display:block}.headline{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:18px}.headline h1{margin:0 0 6px;font-size:28px}.muted{color:var(--muted)}.btn{border:0;border-radius:12px;padding:11px 15px;cursor:pointer}.btn-primary{background:linear-gradient(135deg,#5aa8ff,#2f80ed);color:#fff;box-shadow:0 8px 18px rgba(47,128,237,.2)}.btn-soft{background:var(--blue-soft);color:var(--blue-strong)}.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:18px 0}.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}.metric{padding:18px}.metric .value{font-size:28px;font-weight:700;margin-top:8px}.section{padding:18px}.section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.section-head h2{font-size:18px;margin:0}.table{width:100%;border-collapse:collapse}.table th,.table td{padding:13px 10px;border-top:1px solid var(--line);text-align:left;font-size:14px}.table th{color:var(--muted);font-weight:600}.chip{padding:6px 9px;border-radius:999px;font-size:12px;font-weight:600;display:inline-block}.ok{background:var(--green-bg);color:var(--green)}.wait{background:var(--amber-bg);color:var(--amber)}.cancel{background:var(--red-bg);color:var(--red)}.done{background:#eef3f8;color:#607084}.grid-2{display:grid;grid-template-columns:1.3fr .7fr;gap:16px}.client-row{cursor:pointer}.client-row:hover{background:#f9fcff}.detail{padding:20px}.detail h3{margin:0 0 4px}.timeline{margin-top:16px;display:grid;gap:12px}.timeline-item{padding-left:14px;border-left:2px solid #cfe7ff}.toolbar{display:flex;gap:10px;flex-wrap:wrap}.toolbar input,.toolbar select{padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:white}.calendar-grid{display:grid;grid-template-columns:80px repeat(7,minmax(140px,1fr));border:1px solid var(--line);border-radius:16px;overflow:hidden;background:white}.cal-cell{min-height:74px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:8px;font-size:12px}.cal-head{font-weight:700;background:#f8fbff;min-height:auto}.event{background:var(--blue-soft);border-left:3px solid var(--blue);padding:8px;border-radius:10px;margin-top:4px;cursor:pointer;user-select:none;transition:.15s}.event:hover{transform:translateY(-1px);box-shadow:0 6px 14px rgba(47,128,237,.12)}.event[draggable="true"]{cursor:grab}.event.dragging{opacity:.45;cursor:grabbing}.cal-cell.drop-target{background:#eaf4ff;outline:2px dashed #78b9ff;outline-offset:-3px}.event-time{font-weight:700}.event-client{margin-top:2px}.event-service{font-size:10px;color:var(--muted);margin-top:2px}.settings-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.integration{padding:18px}.switch{width:46px;height:26px;border-radius:999px;background:#d9e4ef;padding:3px;cursor:pointer}.switch span{display:block;width:20px;height:20px;background:white;border-radius:50%;transition:.2s}.switch.on{background:var(--blue)}.switch.on span{transform:translateX(20px)}.rem-row{display:flex;justify-content:space-between;align-items:center;padding:14px;border:1px solid var(--line);border-radius:14px;background:white;margin-top:10px}.message-preview{padding:16px;background:#f7fbff;border:1px solid var(--line);border-radius:14px;margin-top:14px}.modal-backdrop{position:fixed;inset:0;background:rgba(20,40,60,.28);display:none;align-items:center;justify-content:center;padding:20px;z-index:30}.modal-backdrop.open{display:flex}.modal{width:min(560px,100%);background:white;border-radius:20px;box-shadow:0 20px 60px rgba(27,56,88,.22);padding:20px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.form-field{display:grid;gap:6px}.form-field.full{grid-column:1/-1}.form-field input,.form-field select,.form-field textarea{padding:11px 12px;border:1px solid var(--line);border-radius:12px;background:white}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}.mobile-nav{display:none}
    
.sidebar-toggle{position:absolute;right:8px;top:16px;width:30px;height:30px;border:1px solid var(--line);border-radius:10px;background:#fff;color:#5d7186;display:grid;place-items:center;cursor:pointer;box-shadow:0 4px 12px rgba(39,78,120,.08);z-index:2;transition:.2s}
.sidebar-toggle:hover{background:var(--blue-soft);color:var(--blue-strong)}
.sidebar-toggle svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s ease}
.nav button{display:flex;align-items:center;gap:11px;white-space:nowrap;overflow:hidden}
.nav-icon{width:20px;height:20px;display:grid;place-items:center;flex:0 0 20px}
.nav-icon svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.nav-label{overflow:hidden;text-overflow:ellipsis}
.sidebar-label{white-space:nowrap;overflow:hidden}
body.sidebar-collapsed .app{grid-template-columns:76px minmax(0,1fr)}
body.sidebar-collapsed .sidebar{width:76px;padding-left:10px;padding-right:10px}
body.sidebar-collapsed .sidebar-toggle{right:7px}
body.sidebar-collapsed .sidebar-toggle svg{transform:rotate(180deg)}
body.sidebar-collapsed .sidebar .brand{justify-content:center;margin:4px 0 28px;padding-right:0}
body.sidebar-collapsed .sidebar .brand #sidebarBrandName{display:none}
body.sidebar-collapsed .sidebar .brand-mark{flex:0 0 34px}
body.sidebar-collapsed .sidebar .nav button{justify-content:center;padding:12px 10px}
body.sidebar-collapsed .sidebar .nav-label{display:none}
body.sidebar-collapsed .sidebar .sidebar-sync{padding-left:4px;padding-right:4px}
body.sidebar-collapsed .sidebar .sync-btn{width:100%;padding-left:0;padding-right:0}
body.sidebar-collapsed .sidebar .sync-btn .sync-label{display:none}
body.sidebar-collapsed .sidebar .sync-meta{display:none}
body.sidebar-collapsed .sidebar .sidebar-user-main{justify-content:center}
body.sidebar-collapsed .sidebar .sidebar-user-copy{display:none}
body.sidebar-collapsed .sidebar .sidebar-logout{font-size:0;padding-left:0;padding-right:0}
body.sidebar-collapsed .sidebar .sidebar-logout:before{content:"↪";font-size:18px}
body.sidebar-collapsed .sidebar .avatar{flex:0 0 34px}

@media(max-width:980px){.cards{grid-template-columns:repeat(2,1fr)}.grid-2{grid-template-columns:1fr}.settings-grid{grid-template-columns:1fr}.app,body.sidebar-collapsed .app{grid-template-columns:1fr}.sidebar{display:none}.main{grid-column:1;padding:18px}.mobile-nav{display:flex;position:fixed;bottom:12px;left:12px;right:12px;background:white;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);padding:8px;z-index:20;justify-content:space-around}.mobile-nav button{border:0;background:transparent;color:#61758b;font-size:12px}.topbar{margin-bottom:14px}.calendar-grid{overflow:auto;grid-template-columns:70px repeat(5,180px)}}
    @media(max-width:620px){.cards{grid-template-columns:1fr}.main{padding:14px 14px 84px}.headline{align-items:center}.headline h1{font-size:24px}.search{display:none}.table-wrap{overflow:auto}.form-grid{grid-template-columns:1fr}.form-field.full{grid-column:auto}}
  
body.auth-locked .app,body.auth-locked .mobile-nav{display:none!important}
.auth-gate{display:none;min-height:100vh;padding:24px;align-items:center;justify-content:center;background:linear-gradient(180deg,#f8fcff,#eef7ff)}
body.auth-locked .auth-gate{display:flex}
.auth-card{width:min(460px,100%);background:#fff;border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow);padding:28px}
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;background:#f3f8fd;border-radius:12px;padding:4px;margin:18px 0}
.auth-tabs button{border:0;background:transparent;padding:10px;border-radius:9px;color:var(--muted)}
.auth-tabs button.active{background:#fff;color:var(--blue-strong);font-weight:600}
.auth-form{display:grid;gap:12px}.auth-form.hidden{display:none}.auth-form input{padding:12px;border:1px solid var(--line);border-radius:12px}
.auth-password-field{position:relative;width:100%}
.auth-password-field input{width:100%;padding-right:48px!important}
.auth-card .password-eye{position:absolute;right:5px;top:50%;transform:translateY(-50%);width:36px;height:36px;min-width:36px;min-height:36px;display:grid;place-items:center;padding:0;border:0;border-radius:9px;background:transparent;color:#6f8497;box-shadow:none;cursor:pointer}
.auth-card .password-eye:hover,.auth-card .password-eye.active{background:#eef5fb;color:var(--blue-strong)}
.auth-card .password-eye-icon,.auth-card .password-eye-icon svg{width:19px;height:19px;display:block}
.auth-card .password-eye-icon svg{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.auth-card .password-eye .eye-closed{display:none}.auth-card .password-eye.active .eye-open{display:none}.auth-card .password-eye.active .eye-closed{display:block}
.auth-forgot-btn{justify-self:center;border:0;background:transparent;color:var(--blue-strong);font:inherit;font-size:13px;font-weight:600;padding:4px 8px;cursor:pointer}
.auth-forgot-btn:hover{text-decoration:underline}.auth-forgot-btn:disabled{opacity:.55;cursor:wait;text-decoration:none}
.auth-reset-heading{display:grid;gap:5px;margin-bottom:2px}.auth-reset-heading strong{font-size:17px}.auth-reset-heading span{font-size:12px;line-height:1.45;color:var(--muted)}
.notice{padding:12px 14px;border-radius:12px;background:var(--blue-soft);color:#356b9f;font-size:13px;margin-top:12px}
.danger-notice{background:var(--red-bg);color:var(--red)}
.integration-status{font-size:12px;margin:10px 0 14px}.integration-actions{display:flex;gap:8px;flex-wrap:wrap}

.status-select{min-width:145px;border:1px solid var(--line);background:#f4f9ff;color:var(--text);padding:9px 34px 9px 11px;border-radius:10px;font:inherit;font-size:13px;cursor:pointer;outline:none}
.status-select:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(74,163,247,.12)}
.status-select:disabled{opacity:.6;cursor:wait}
.calendar-grid.half-hour .cal-cell{min-height:48px;padding:6px}.calendar-grid.half-hour .cal-head{min-height:auto;padding:9px 8px}

.btn-danger{background:#fff0f0;color:#c94f4f;border:1px solid #ffd6d6}.btn-danger:hover{background:#ffe6e6}
.btn-ghost-danger{background:transparent;color:#c94f4f;border:1px solid #f1caca}
.modal-actions.split{justify-content:space-between;align-items:center;border-top:1px solid var(--line);padding-top:16px;margin-top:18px}.modal-actions-left,.modal-actions-right{display:flex;gap:9px;flex-wrap:wrap;align-items:center}.modal-actions-right{margin-left:auto}.btn-danger{background:#fff4f4!important;color:#c74747!important;border:1px solid #ffd2d2!important;box-shadow:none!important}.btn-danger:hover{background:#ffeaea!important}.btn-ghost-danger{background:transparent!important;color:#b95c5c!important;border:0!important;padding-left:8px!important;padding-right:8px!important}.btn-ghost-danger:hover{background:#fff5f5!important}.modal-actions .btn{min-height:42px}
.calendar-grid.half-hour{overflow:visible}.calendar-grid.half-hour .cal-cell{position:relative}
.event{position:relative;z-index:2}.event.duration-60{min-height:90px}.event.duration-90{min-height:138px}.event.duration-45{min-height:66px}

.sidebar{display:flex;flex-direction:column}.sidebar-sync{margin-top:auto;padding:16px 14px 18px;border-top:1px solid var(--line)}.sidebar-sync .sync-btn{width:100%;justify-content:center}.sidebar-sync .sync-meta{margin-top:8px;text-align:center;white-space:normal;line-height:1.35}.overview-filters,.calendar-toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.overview-filters select,.calendar-toolbar select{min-width:180px}
.client-table-card{min-height:420px}
.client-table .client-row td{padding-top:14px;padding-bottom:14px}
.client-table .client-row:hover{background:#f7fbff}
.client-table .client-row strong{font-size:14px;color:#173651}
.clients-title-line{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.client-count-badge{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:4px 10px;border-radius:999px;background:var(--primary-soft,#eef4ff);color:var(--primary,#2563eb);font-size:13px;font-weight:800;line-height:1;white-space:nowrap}
.clients-toolbar input{min-width:280px;max-width:420px}
.client-detail-modal .modal{width:min(760px,calc(100vw - 32px));max-height:88vh;overflow:hidden;padding:0}
.client-detail-shell{display:flex;flex-direction:column;max-height:88vh}
.client-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:22px 24px 18px;border-bottom:1px solid var(--line)}
.client-detail-identity{min-width:0}.client-detail-identity h2{font-size:22px;line-height:1.2;margin:0 0 6px;color:#18304b;letter-spacing:-.02em}
.client-detail-contact{display:flex;gap:7px;flex-wrap:wrap;font-size:13px;color:#718398}
.client-detail-contact span+span:before{content:"·";margin-right:7px;color:#b3bec9}
.client-detail-close{width:38px;height:38px;border-radius:11px;background:#f5f9fd;color:#687b8f;display:grid;place-items:center;padding:0;font-size:17px;flex:0 0 38px}
.client-detail-body{padding:20px 24px 24px;overflow:auto}
.client-detail-stats{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:20px}
.client-detail-stat{border:1px solid var(--line);border-radius:15px;background:#fbfdff;padding:15px 16px}
.client-detail-stat-label{font-size:12px;color:#77899d;margin-bottom:6px}
.client-detail-stat-value{font-size:24px;line-height:1.1;font-weight:700;color:#173651}
.client-detail-stat-value.date{font-size:17px;padding-top:3px}
.client-history-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:2px 0 10px}
.client-history-head h3{font-size:15px;margin:0;color:#18304b}
.client-range-select{position:relative;min-width:164px}
.client-range-trigger{width:100%;height:40px;border:1px solid #dbe5ef;border-radius:11px;background:#fff;color:#40566d;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 12px;font-family:Inter,system-ui,sans-serif;font-size:13px;font-weight:500;cursor:pointer}
.client-range-trigger:hover,.client-range-select.open .client-range-trigger{border-color:#8cbdf4;box-shadow:0 0 0 3px rgba(79,156,249,.09)}
.client-range-trigger svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;transition:.15s}
.client-range-select.open .client-range-trigger svg{transform:rotate(180deg)}
.client-range-menu{display:none;position:absolute;right:0;top:calc(100% + 6px);z-index:40;width:100%;padding:5px;background:#fff;border:1px solid #dbe5ef;border-radius:11px;box-shadow:0 14px 30px rgba(25,56,88,.14)}
.client-range-select.open .client-range-menu{display:block}
.client-range-option{width:100%;border:0;background:transparent;border-radius:8px;padding:9px 10px;text-align:left;color:#40566d;font-family:Inter,system-ui,sans-serif;font-size:13px;cursor:pointer}
.client-range-option:hover{background:#f2f8ff}.client-range-option.active{background:var(--blue-soft);color:var(--blue-strong);font-weight:600}
.history-summary{display:flex;gap:10px;flex-wrap:wrap;margin:8px 0 13px}
.history-pill{background:var(--blue-soft);border-radius:999px;padding:6px 10px;font-size:11px;color:#3d77ad;font-weight:600}
.client-detail-timeline{display:grid;gap:8px}
.client-detail-timeline .timeline-item{border:1px solid var(--line);border-left:3px solid #86bfff;border-radius:11px;padding:11px 12px;background:#fff}
.client-detail-timeline .timeline-item strong{font-size:13px;color:#173651}
.client-detail-timeline .therapist-line{font-size:12px;color:#718398;margin-top:3px}
.client-detail-timeline .muted{font-size:11px;margin-top:2px}
.client-detail-info-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:16px}
.client-detail-info{border:1px solid var(--line);background:#f8fbff;border-radius:13px;padding:13px 14px}
.client-detail-info strong{display:block;font-size:12px;color:#39546d;margin-bottom:6px}
.client-detail-info p{margin:0;color:#4e6478;font-size:13px;line-height:1.5}
@media(max-width:620px){
  .clients-toolbar input{min-width:0;width:100%;max-width:none}
  .client-detail-modal .modal{width:calc(100vw - 20px);max-height:92vh}
  .client-detail-head{padding:18px 16px 14px}.client-detail-body{padding:16px}
  .client-detail-stats,.client-detail-info-grid{grid-template-columns:1fr}
  .client-history-head{align-items:flex-start;flex-direction:column}.client-range-select{width:100%}
}


.sidebar-user{margin-top:auto;padding:14px;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:10px}
.sidebar-user-main{display:flex;align-items:center;gap:10px}
.sidebar-user-copy{min-width:0;line-height:1.2}.sidebar-user-copy strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidebar-user-copy .muted{font-size:11px;margin-top:3px}
.sidebar-logout{width:100%;justify-content:center}
.sidebar-sync{margin-top:0}
.calendar-client-search{min-width:260px;max-width:360px}
@media(max-width:760px){.calendar-client-search{min-width:0;width:100%;max-width:none}.calendar-toolbar select{width:100%}}

/* Calendar toolbar polish */
.calendar-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:nowrap}
.calendar-client-search{flex:1 1 300px;min-width:220px;max-width:420px}
.calendar-toolbar .therapist-select{
  flex:0 0 190px;
  min-width:190px;
  color:#7a8798;
  appearance:none;
  -webkit-appearance:none;
  background-color:#fff;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23808da0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 12px center;
  background-size:16px;
  padding-right:38px;
}
.calendar-toolbar .therapist-select:focus{color:var(--text)}
.calendar-new-btn{flex:0 0 auto;white-space:nowrap;margin-left:0}

/* Sidebar sync sits directly below navigation */
.sidebar-sync{
  margin-top:10px;
  padding:14px 14px 12px;
  border-top:1px solid var(--line);
}
.sidebar-sync .sync-btn{width:100%;justify-content:center}
.sidebar-sync .sync-meta{margin-top:7px;text-align:center;white-space:normal;line-height:1.35}
.sidebar-user{
  margin-top:auto;
  border-top:1px solid var(--line);
}

/* Larger mobile bottom navigation icons */
.mobile-nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:64px;padding:7px 5px}
.mobile-nav-icon{display:flex;align-items:center;justify-content:center;width:28px;height:28px}
.mobile-nav-icon svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.mobile-nav button[data-page="dashboard"] .mobile-nav-icon svg{fill:currentColor;stroke:none}

@media(max-width:760px){
  .calendar-toolbar{flex-wrap:wrap}
  .calendar-client-search{order:1;flex:1 1 100%;width:100%;max-width:none}
  .calendar-toolbar .therapist-select{order:2;flex:1 1 calc(55% - 5px);min-width:0}
  .calendar-new-btn{order:3;flex:1 1 calc(45% - 5px);text-align:center;justify-content:center}
  .mobile-nav-icon svg{width:28px;height:28px}
  .mobile-nav button{font-size:11px;min-height:68px}
}


/* ===== Mobile responsive pass ===== */
html,body{max-width:100%;overflow-x:hidden}
.main{min-width:0}
.calendar-card{min-width:0;overflow:hidden}
.calendar-scroll{width:100%;overflow-x:auto;overflow-y:visible;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
.mobile-topbar{display:none}
.mobile-menu-wrap{position:relative;z-index:120}
.mobile-menu-trigger{
  width:42px;height:42px;border:1px solid var(--line);border-radius:12px;background:#fff;
  display:grid;place-items:center;color:#61758b;padding:0;cursor:pointer
}
.mobile-menu-trigger svg,
.mobile-menu-icon svg{
  width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round
}
.mobile-menu-popover{
  position:absolute;top:calc(100% + 7px);right:0;width:190px;padding:6px;
  display:none;gap:3px;border:1px solid #dce6ef;border-radius:13px;background:#fff;
  box-shadow:0 16px 38px rgba(31,65,98,.18)
}
.mobile-menu-wrap.open .mobile-menu-popover{display:grid}
.mobile-menu-popover button{
  width:100%;min-height:42px;display:flex;align-items:center;gap:9px;padding:0 10px;
  border:0;border-radius:9px;background:transparent;color:#405a72;
  font:600 12px Inter,system-ui,sans-serif;text-align:left;cursor:pointer
}
.mobile-menu-popover button:hover{background:#f2f7fb}
.mobile-menu-popover button.danger{color:#a64b4b}
.mobile-menu-icon{width:21px;height:21px;display:grid;place-items:center;flex:0 0 21px}

@media(max-width:980px){
  body{background:#f6fbff}
  .app{display:block;min-width:0}
  .sidebar{display:none!important}
  .main{width:100%;max-width:100%;padding:16px 16px 94px}
  .page{width:100%;max-width:100%;min-width:0}
  .mobile-topbar{
    display:flex;align-items:center;justify-content:space-between;
    margin:-2px 0 16px;padding:2px 0 10px;border-bottom:1px solid var(--line)
  }
  .mobile-brand{display:flex;align-items:center;gap:9px;font-size:16px}
  .mobile-brand .brand-mark{width:30px;height:30px;border-radius:10px;font-size:14px}
  .mobile-menu-trigger{width:42px;height:42px}
  .headline{align-items:center;margin-bottom:14px}
  .headline h1{font-size:24px;line-height:1.15}
  .headline .muted{font-size:13px}
  .cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .grid-2,.settings-grid{grid-template-columns:1fr!important}
  .card,.section,.detail,.integration{min-width:0}
  .section{padding:14px}
  .calendar-card{padding:8px}
  .calendar-scroll{border-radius:13px}
  .calendar-grid,
  .calendar-grid.half-hour{
    width:max-content;
    min-width:1112px;
    grid-template-columns:62px repeat(7,150px);
    overflow:visible!important;
  }
  .calendar-grid.half-hour .cal-cell{min-height:52px}
  .cal-cell{font-size:11px}
  .event{font-size:11px;min-width:0;overflow:hidden}
  .event-client,.event-service{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .calendar-toolbar{
    width:100%;display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,.65fr);gap:8px
  }
  .calendar-client-search{grid-column:1/-1;min-width:0!important;max-width:none!important;width:100%}
  .calendar-toolbar .therapist-select{min-width:0!important;width:100%!important;max-width:none;flex:none}
  .calendar-new-btn{width:100%;justify-content:center;min-height:44px}
  .overview-filters{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .overview-filters select{min-width:0!important;width:100%}
  .table-wrap{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .table{min-width:620px}
  #clients .grid-2{display:block}
  #clients .grid-2>.card:first-child{margin-bottom:12px}
  .detail{padding:16px}
  .client-history-tools{align-items:flex-start;gap:8px;flex-wrap:wrap}
  .client-history-tools select{width:100%;min-height:42px}
  .modal-backdrop{padding:10px;align-items:flex-end}
  .modal{
    width:100%;max-width:none;max-height:92dvh;overflow-y:auto;
    border-radius:20px 20px 0 0;padding:16px 16px calc(18px + env(safe-area-inset-bottom))
  }
  .form-grid{grid-template-columns:1fr 1fr}
  .form-field input,.form-field select,.form-field textarea{width:100%;min-width:0;font-size:16px}
  .modal-actions.split{gap:12px;align-items:stretch}
  .modal-actions-left,.modal-actions-right{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-left:0}
  .modal-actions .btn{width:100%;justify-content:center;min-height:46px}
  .mobile-nav{
    display:flex!important;position:fixed;left:10px;right:10px;bottom:calc(8px + env(safe-area-inset-bottom));
    height:72px;padding:4px 6px;border-radius:18px;z-index:50;
    background:rgba(255,255,255,.97);backdrop-filter:blur(16px);
    box-shadow:0 12px 34px rgba(39,78,120,.16)
  }
  .mobile-nav button{flex:1;min-width:0;color:#728399;border-radius:13px}
  .mobile-nav button.active{color:var(--blue-strong);background:var(--blue-soft)}
  .mobile-nav-icon{width:30px;height:30px}
  .mobile-nav-icon svg{width:28px;height:28px}
}

@media(max-width:620px){
  .main{padding:12px 10px 96px}
  .mobile-topbar{margin-bottom:12px}
  .headline{margin-bottom:12px}
  .headline h1{font-size:22px}
  .cards{grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}
  .metric{padding:13px}
  .metric .value{font-size:24px}
  .calendar-toolbar{grid-template-columns:minmax(0,1fr) minmax(125px,.8fr)}
  .toolbar input,.toolbar select,.calendar-new-btn{min-height:44px}
  .calendar-grid,
  .calendar-grid.half-hour{
    min-width:1071px;
    grid-template-columns:56px repeat(7,145px)
  }
  .cal-cell{padding:6px}
  .calendar-grid.half-hour .cal-cell{min-height:50px}
  .section{padding:10px}
  .calendar-card{padding:6px}
  .form-grid{grid-template-columns:1fr}
  .form-field.full{grid-column:auto}
  .modal-backdrop{padding:0}
  .modal{max-height:94dvh;border-radius:18px 18px 0 0}
  .modal .section-head{position:sticky;top:-16px;background:#fff;z-index:4;padding:14px 0 10px;margin-bottom:8px}
  .modal-actions.split{position:sticky;bottom:calc(-18px - env(safe-area-inset-bottom));background:#fff;padding-bottom:calc(14px + env(safe-area-inset-bottom));z-index:3}
  .settings-grid{gap:10px}
  .integration,.detail{padding:14px}
  .message-preview{padding:12px}
  .auth-gate{padding:12px}
  .auth-card{padding:20px;border-radius:18px}
  .mobile-nav{left:8px;right:8px;height:74px}
  .mobile-nav button{font-size:10px;gap:3px}
}


/* Reminder UX */
.reminder-settings-grid{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;gap:10px;align-items:end}
.reminder-choice{display:flex;gap:10px;align-items:flex-start;padding:12px;border:1px solid var(--line);border-radius:12px;background:#fff;min-height:66px}
.reminder-choice input{margin-top:3px}.reminder-choice span{display:grid;gap:3px}.reminder-choice small{color:var(--muted);font-size:11px}
.reminder-box{padding:12px;border:1px solid var(--line);border-radius:14px;background:#f8fbff}
.reminder-master{display:flex;align-items:center;gap:8px}
.appointment-reminder-options{display:grid;grid-template-columns:auto auto 1fr 1fr;gap:8px;align-items:center;margin-top:10px}
.appointment-reminder-options label{display:flex;gap:6px;align-items:center;white-space:nowrap;color:#566b81;font-size:13px}
.appointment-reminder-options select{min-width:0}
.appointment-reminder-options.is-disabled{opacity:.45;pointer-events:none}
.reminder-hint{font-size:11px;color:var(--muted);margin-top:8px;min-height:15px}
.notification-log-wrap{margin-top:14px;border-top:1px solid var(--line);padding-top:12px}
.notification-log-wrap summary{cursor:pointer;color:var(--muted);font-size:13px}
@media(max-width:980px){.reminder-settings-grid{grid-template-columns:1fr 1fr}.appointment-reminder-options{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.reminder-settings-grid{grid-template-columns:1fr}.appointment-reminder-options{grid-template-columns:1fr 1fr}.appointment-reminder-options select{width:100%}}



/* Client booking + flexible reminders */
.booking-settings-card .booking-toggle{display:flex;align-items:center;gap:10px;font-size:13px;font-weight:600}
.booking-settings-card .booking-toggle input{width:18px;height:18px;accent-color:var(--blue)}
.booking-link-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;align-items:center}
.booking-link-row input{min-width:0}
.booking-link-row .btn{text-decoration:none;text-align:center}
.booking-status{font-size:12px;color:var(--muted);margin-top:8px}
.reminder-offset-editor{display:grid;gap:9px;margin-top:10px}
.reminder-offset-row{display:grid;grid-template-columns:minmax(90px,120px) minmax(110px,150px) auto;gap:8px;align-items:center}
.reminder-offset-row input,.reminder-offset-row select{width:100%;padding:10px 11px;border:1px solid var(--line);border-radius:11px;background:white}
.reminder-offset-remove{background:#fff0f0;color:#c45151}
.reminder-offset-help{font-size:11px;color:var(--muted);margin-top:8px}
.reminder-schedule-summary{font-size:12px;color:#566b81;padding:8px 10px;border-radius:10px;background:#f7fbff;border:1px solid var(--line);grid-column:1/-1}
@media(max-width:620px){
  .booking-link-row{grid-template-columns:1fr 1fr}
  .booking-link-row input{grid-column:1/-1}
  .reminder-offset-row{grid-template-columns:1fr 1fr auto}
}

/* Studio 7 Billing */
.billing-toolbar{margin-bottom:14px;align-items:end}
.billing-month-wrap{display:grid;gap:5px;color:var(--muted);font-size:12px}
.billing-month-wrap input{min-width:170px}
.billing-table td,.billing-table th{white-space:nowrap}
.billing-usage{display:grid;gap:2px}.billing-usage small{color:var(--muted);font-size:10px}
.billing-cost-wait{color:var(--muted);font-size:12px}
.billing-over{color:var(--amber);font-weight:600}
.billing-zero{color:var(--muted)}
.platform-billing-link{border-style:dashed}
@media(max-width:980px){
  #billing .billing-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .billing-toolbar{display:grid;grid-template-columns:1fr auto}
  .billing-month-wrap input{width:100%;min-width:0}
}
@media(max-width:620px){
  #billing .billing-metrics{grid-template-columns:1fr 1fr}
  .billing-table{min-width:760px}
}


/* Calendar status colors match Overview */
.event.event-confirmed{background:var(--green-bg);border-left-color:var(--green)}
.event.event-pending{background:var(--amber-bg);border-left-color:var(--amber)}
.event.event-done{background:#eef3f8;border-left-color:#8b9caf}
.event.event-cancelled,.event.event-noshow{background:var(--red-bg);border-left-color:var(--red)}
.event.event-confirmed:hover{box-shadow:0 6px 14px rgba(35,160,105,.12)}
.event.event-pending:hover{box-shadow:0 6px 14px rgba(215,155,35,.13)}
.event.event-done:hover{box-shadow:0 6px 14px rgba(96,112,132,.11)}
.event.event-cancelled:hover,.event.event-noshow:hover{box-shadow:0 6px 14px rgba(210,80,80,.12)}


.event-status-tag{display:inline-flex;align-items:center;margin-top:6px;padding:3px 7px;border-radius:999px;font-size:9px;font-weight:700;line-height:1;white-space:nowrap}
.event-confirmed .event-status-tag{background:rgba(35,160,105,.12);color:var(--green)}
.event-pending .event-status-tag{background:rgba(215,155,35,.14);color:var(--amber)}
.event-done .event-status-tag{background:#dde5ed;color:#607084}
.event-cancelled .event-status-tag,.event-noshow .event-status-tag{background:rgba(210,80,80,.12);color:var(--red)}

/* Calendar week navigation */
.calendar-weekbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px}
.calendar-week-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.calendar-week-picker{height:42px;padding:0 12px;border:1px solid var(--line);border-radius:12px;background:#fff;color:#66778b;font:inherit}
.week-arrow{width:42px;height:42px;padding:0;font-size:24px;line-height:1}
.current-week-btn{min-height:42px}
.calendar-week-label{font-size:13px;font-weight:600;color:#607084;white-space:nowrap}
@media(max-width:620px){
  .calendar-weekbar{align-items:flex-start;flex-direction:column;gap:8px}
  .calendar-week-controls{width:100%;display:grid;grid-template-columns:42px minmax(0,1fr) 42px}
  .calendar-week-picker{width:100%;min-width:0}
  .current-week-btn{grid-column:1/-1;width:100%}
  .calendar-week-label{font-size:12px}
}


/* Consistent 24h time selector */
.time-select-24h{
  appearance:none;
  -webkit-appearance:none;
  width:100%;
  min-height:44px;
  padding:11px 40px 11px 12px!important;
  border:1px solid var(--line)!important;
  border-radius:12px!important;
  background-color:#fff!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2378899c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")!important;
  background-repeat:no-repeat!important;
  background-position:right 12px center!important;
  background-size:16px!important;
  color:var(--text)!important;
  font-family:inherit!important;
  font-size:14px!important;
  font-weight:600!important;
  line-height:1.3!important;
  letter-spacing:.01em;
  cursor:pointer;
}
.time-select-24h:focus{
  outline:none;
  border-color:#8fc6ff!important;
  box-shadow:0 0 0 3px rgba(74,163,247,.12);
}


.org-user-invite{grid-template-columns:1.1fr 1.4fr .8fr auto}
.invite-user-action{min-width:150px}
@media(max-width:980px){.org-user-invite{grid-template-columns:1fr 1fr}.invite-user-action{min-width:0}}
@media(max-width:620px){.org-user-invite{grid-template-columns:1fr}}


/* Compact Settings typography */
#settings .headline h1{font-size:25px;letter-spacing:-.02em}
#settings .headline .muted{font-size:12px}
#settings .section{padding:14px}
#settings h2{font-size:16px;line-height:1.2;margin-bottom:4px}
#settings .form-field label{font-size:11px;font-weight:600;color:#52667b}
#settings .form-field input,
#settings .form-field select,
#settings .form-field textarea{font-size:13px;min-height:40px;padding-top:9px;padding-bottom:9px}
#settings .muted,#settings .integration-status,#settings .message-preview{font-size:11.5px}
#settings .btn{font-size:12.5px;min-height:38px}
#settings .reminder-choice{min-height:58px;padding:10px}
#settings .reminder-choice strong{font-size:12px}
#settings .reminder-choice small{font-size:10px}
#settings .card{border-radius:14px}
#settings .settings-grid{gap:10px}
#settings .integration{padding:13px}
.platform-client-grid{grid-template-columns:1fr 1fr}
@media(max-width:620px){
  #settings .headline h1{font-size:22px}
  .platform-client-grid{grid-template-columns:1fr}
}



/* Generic booking business settings */
.org-branding-grid{align-items:start}
.org-logo-settings{display:flex;align-items:center;gap:12px;min-height:64px}
.org-logo-preview{width:58px;height:58px;border-radius:13px;border:1px solid var(--line);object-fit:contain;background:#fff;padding:5px}
.org-logo-placeholder{width:58px;height:58px;border-radius:13px;border:1px dashed #cbd9e7;background:#f8fbff;display:grid;place-items:center;color:var(--muted);font-size:10px;font-weight:700;text-align:center}
.org-logo-actions{display:flex;gap:8px;flex-wrap:wrap}
.org-logo-file{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
@media(max-width:620px){.org-logo-settings{align-items:flex-start}.org-logo-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}}



/* Canonical CRM native-control fallback.
   JavaScript upgrades ordinary selects/date inputs to .crm-control.
   These rules keep the same visible chevron/calendar icon even before upgrade. */
select:not(.crm-native-source):not(.settings-native-select-source):not([multiple]){
  appearance:none;
  -webkit-appearance:none;
  padding-right:42px;
  background-color:#fff;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26'%3E%3Crect x='1' y='1' width='24' height='24' rx='7' fill='%23f5f9fd' stroke='%23e0e8f0'/%3E%3Cpath d='m9.5 11 3.5 3.5 3.5-3.5' fill='none' stroke='%236a8095' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 6px center;
  background-size:26px 26px;
}
input[type="date"]:not(.crm-native-source){
  appearance:none;
  -webkit-appearance:none;
  padding-right:42px;
  background-color:#fff;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26'%3E%3Crect x='1' y='1' width='24' height='24' rx='7' fill='%23f5f9fd' stroke='%23e0e8f0'/%3E%3Cpath d='M8 7v3M18 7v3M6 11h14M7 8.5h12a1 1 0 0 1 1 1V19a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V9.5a1 1 0 0 1 1-1Z' fill='none' stroke='%236a8095' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 6px center;
  background-size:26px 26px;
}
input[type="date"]:not(.crm-native-source)::-webkit-calendar-picker-indicator{
  opacity:0;
  cursor:pointer;
}
.crm-control.is-disabled{opacity:.58}
.crm-control.is-disabled .crm-control-trigger{cursor:not-allowed;background:#f5f7f9}

/* Appointment modal custom controls — no browser-native dropdown/calendar UI */
.appointment-detail-modal .modal{overflow:visible}
.crm-native-source{display:none!important}
.crm-control{position:relative;width:100%;min-width:0}
.crm-control-trigger{
  width:100%;
  min-height:42px;
  border:1px solid var(--ui-line);
  border-radius:10px;
  background:#fff;
  color:var(--ui-text);
  padding:0 11px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-family:var(--ui-font);
  font-size:13px;
  font-weight:500;
  line-height:1.2;
  text-align:left;
  cursor:pointer;
  outline:none;
  transition:border-color .14s,box-shadow .14s,background .14s;
}
.crm-control-trigger:hover{border-color:#c4d5e4;background:#fcfdff}
.crm-control.open>.crm-control-trigger,
.crm-control-trigger:focus-visible{
  border-color:#86baf0;
  box-shadow:0 0 0 3px rgba(47,128,237,.09);
}
.crm-control-trigger svg{
  width:16px;height:16px;
  flex:0 0 16px;
  fill:none;stroke:#7f91a3;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;
}
.crm-control-value{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.crm-control-popover{
  display:none;
  position:absolute;
  z-index:90;
  left:0;
  top:calc(100% + 6px);
  width:100%;
  background:#fff;
  border:1px solid #d8e4ee;
  border-radius:12px;
  box-shadow:0 16px 38px rgba(25,56,87,.18);
}
.crm-control.open>.crm-control-popover{display:block}

/* Custom select */
.crm-select-popover{
  max-height:250px;
  overflow:auto;
  padding:5px;
  scrollbar-width:thin;
}
.crm-select-option{
  width:100%;
  min-height:36px;
  padding:0 9px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#40576d;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-family:var(--ui-font);
  font-size:12.5px;
  font-weight:500;
  text-align:left;
  cursor:pointer;
}
.crm-select-option:hover{background:#f2f7fc;color:#254d73}
.crm-select-option.selected{background:var(--ui-primary-soft);color:#246fb7;font-weight:650}
.crm-select-option:disabled,.crm-select-option.disabled{opacity:.48;cursor:not-allowed;background:transparent!important;color:#7f8e9b!important}
.crm-select-check{font-size:12px;color:var(--ui-primary)}
.crm-select-control.open .crm-select-trigger svg{transform:rotate(180deg)}

/* Custom calendar */
.crm-date-control .crm-control-popover{width:286px}
.crm-calendar-popover{padding:11px}
.crm-calendar-head{
  display:grid;
  grid-template-columns:34px 1fr 34px;
  align-items:center;
  gap:5px;
  margin-bottom:9px;
}
.crm-calendar-head strong{
  text-align:center;
  color:#29465f;
  font-size:12.5px;
  font-weight:700;
}
.crm-calendar-nav{
  width:32px;height:32px;
  border:1px solid transparent;
  border-radius:8px;
  background:#f5f8fb;
  color:#5f758a;
  display:grid;place-items:center;
  cursor:pointer;
  font-size:20px;
  line-height:1;
}
.crm-calendar-nav:hover{background:var(--ui-primary-soft);color:var(--ui-primary)}
.crm-calendar-weekdays,
.crm-calendar-grid{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:3px;
}
.crm-calendar-weekdays{margin-bottom:4px}
.crm-calendar-weekdays span{
  display:grid;place-items:center;
  height:24px;
  color:#8a99a8;
  font-size:9.5px;
  font-weight:650;
}
.crm-calendar-day,
.crm-calendar-empty{
  min-width:0;
  aspect-ratio:1;
}
.crm-calendar-day{
  border:0;
  border-radius:8px;
  background:transparent;
  color:#435a70;
  font-family:var(--ui-font);
  font-size:11.5px;
  font-weight:550;
  cursor:pointer;
}
.crm-calendar-day:hover{background:#f0f6fc;color:#235f97}
.crm-calendar-day.today{box-shadow:inset 0 0 0 1px #9fc7ee}
.crm-calendar-day.selected{
  background:var(--ui-primary);
  color:#fff;
  box-shadow:none;
  font-weight:700;
}

/* Confirmation deadline = calendar + custom 24h time list */
.crm-deadline-control .crm-control-popover{
  width:calc(200% + 12px);
  max-width:510px;
  left:0;
  right:auto;
  top:auto;
  bottom:calc(100% + 6px);
}
.crm-deadline-popover{padding:12px;max-height:min(390px,calc(100vh - 110px));overflow:hidden}
.crm-deadline-layout{
  display:grid;
  grid-template-columns:1fr 170px;
  gap:12px;
}
.crm-deadline-calendar{
  min-width:0;
  padding-right:11px;
  border-right:1px solid #e6edf4;
}
.crm-deadline-time{min-width:0}
.crm-deadline-time-title{
  height:32px;
  display:flex;
  align-items:center;
  color:#5b7085;
  font-size:10.5px;
  font-weight:700;
}
.crm-time-grid{
  max-height:220px;
  overflow:auto;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:4px;
  padding-right:3px;
  scrollbar-width:thin;
}
.crm-time-option{
  height:31px;
  border:1px solid transparent;
  border-radius:7px;
  background:#f7f9fb;
  color:#4b6075;
  font-family:var(--ui-font);
  font-size:11.5px;
  font-weight:600;
  cursor:pointer;
}
.crm-time-option:hover{background:#edf5fd;color:#2669a8}
.crm-time-option.selected{
  border-color:#a6cef4;
  background:var(--ui-primary-soft);
  color:#246fb7;
}
.crm-deadline-actions{
  display:flex;
  justify-content:flex-end;
  gap:7px;
  margin-top:11px;
  padding-top:10px;
  border-top:1px solid #edf2f6;
}
.crm-deadline-actions .btn{min-height:35px;height:35px;font-size:11.5px;padding:0 11px}

/* Keep menus above lower panels/actions. */
.appointment-detail-modal .form-field{position:relative}
.appointment-detail-modal .appointment-confirmation-panel{z-index:12}
.appointment-detail-modal .form-field:has(.crm-control.open){z-index:40}

@media(max-width:620px){
  .appointment-detail-modal .modal{overflow:auto}
  .crm-control-popover{position:fixed;left:12px!important;right:12px!important;top:auto!important;bottom:84px;width:auto!important;max-height:62vh}
  .crm-select-popover{max-height:52vh}
  .crm-date-control .crm-calendar-popover{padding:14px}
  .crm-deadline-layout{grid-template-columns:1fr;gap:10px}
  .crm-deadline-calendar{padding-right:0;padding-bottom:10px;border-right:0;border-bottom:1px solid #e6edf4}
  .crm-time-grid{max-height:150px;grid-template-columns:repeat(4,1fr)}
  .crm-deadline-actions{position:sticky;bottom:0;background:#fff;padding-bottom:2px}
}



/* Mobile modal contract — full-height sheets, no bottom-nav overlap */
@media(max-width:760px){
  body.modal-open{overflow:hidden!important}
  body.modal-open .mobile-nav{display:none!important}

  .appointment-detail-modal,
  .edit-slot-picker-modal{
    padding:0!important;
    align-items:stretch!important;
    justify-content:stretch!important;
  }

  .appointment-detail-modal .modal{
    width:100%!important;
    max-width:none!important;
    height:100dvh!important;
    max-height:100dvh!important;
    margin:0!important;
    padding:0!important;
    border-radius:0!important;
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }
  .appointment-detail-modal .appointment-detail-head{
    position:relative!important;
    top:auto!important;
    flex:0 0 auto;
    min-height:68px;
    margin:0!important;
    padding:13px 14px 11px!important;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    border-bottom:1px solid var(--ui-line);
    background:#fff;
    z-index:10;
  }
  .appointment-detail-modal .appointment-detail-head>div{min-width:0;padding-top:1px}
  .appointment-detail-modal .appointment-detail-head h2{
    margin:0!important;
    font-size:18px!important;
    line-height:1.18!important;
    letter-spacing:-.018em!important;
    color:var(--ui-text)!important;
  }
  .appointment-detail-modal .appointment-detail-head .muted{
    margin-top:4px!important;
    font-size:11px!important;
    line-height:1.3!important;
    white-space:normal!important;
  }
  .appointment-detail-modal .appointment-close-btn{
    width:38px!important;
    min-width:38px!important;
    height:38px!important;
    min-height:38px!important;
    padding:0!important;
    border-radius:10px!important;
    flex:0 0 38px;
  }
  .appointment-detail-modal .form-grid{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    padding:13px 14px 18px!important;
    align-content:start;
  }
  .appointment-detail-modal .appointment-actionbar{
    position:relative!important;
    bottom:auto!important;
    flex:0 0 auto;
    margin:0!important;
    padding:10px 12px calc(10px + env(safe-area-inset-bottom))!important;
    border-top:1px solid var(--ui-line)!important;
    background:#fff!important;
    z-index:12!important;
  }

  .edit-slot-picker-modal{z-index:2100!important}
  .edit-slot-picker-dialog{
    width:100%!important;
    max-width:none!important;
    height:100dvh!important;
    max-height:100dvh!important;
    margin:0!important;
    border-radius:0!important;
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }
  .edit-slot-picker-head{
    flex:0 0 auto;
    min-height:68px;
    padding:13px 14px 11px!important;
    align-items:flex-start!important;
    border-bottom:1px solid var(--ui-line)!important;
    background:#fff;
  }
  .edit-slot-picker-head>div{min-width:0;padding-top:1px}
  .edit-slot-picker-head h2{
    margin:0!important;
    font-size:18px!important;
    line-height:1.18!important;
    letter-spacing:-.018em!important;
  }
  .edit-slot-picker-head .muted{
    margin-top:4px!important;
    font-size:11px!important;
    line-height:1.3!important;
    white-space:normal!important;
  }
  .edit-slot-picker-head .appointment-close-btn{
    width:38px!important;
    min-width:38px!important;
    height:38px!important;
    min-height:38px!important;
    padding:0!important;
    border-radius:10px!important;
    flex:0 0 38px;
  }
  .edit-slot-picker-toolbar{
    flex:0 0 auto;
    padding:8px 10px 5px!important;
    gap:7px!important;
  }
  .edit-slot-picker-toolbar strong{
    flex:1 0 100%!important;
    order:-1!important;
    min-width:0!important;
    font-size:12.5px!important;
  }
  .edit-slot-picker-toolbar .btn{
    min-height:36px!important;
    height:36px!important;
    font-size:11.5px!important;
  }
  .edit-slot-picker-legend{
    flex:0 0 auto;
    padding:3px 10px 8px!important;
    gap:10px!important;
    font-size:10px!important;
    flex-wrap:wrap;
  }
  .edit-slot-calendar-scroll{
    flex:1 1 auto;
    min-height:0!important;
    max-height:none!important;
    margin:0 8px calc(8px + env(safe-area-inset-bottom))!important;
    overflow:auto!important;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;
    touch-action:pan-x pan-y;
  }
  .edit-calendar-grid{
    grid-template-columns:58px repeat(7,154px)!important;
    min-width:1136px!important;
  }
  .edit-cal-cell{
    min-height:64px!important;
    padding:7px!important;
  }
  .edit-cal-head{
    min-height:48px!important;
    padding:7px!important;
  }
  .edit-cal-time-head,
  .edit-cal-time{
    z-index:24!important;
  }
  .edit-calendar-slot.free{
    touch-action:manipulation;
    cursor:pointer;
  }
  .edit-free-slot-label{
    opacity:1!important;
    min-height:20px;
    font-size:9px;
    background:#f4f9ff;
  }
  .edit-calendar-event{
    min-height:50px!important;
    padding:7px 8px!important;
  }
  .edit-calendar-event-time{font-size:10.5px!important}
  .edit-calendar-event-client{
    margin-top:3px!important;
    font-size:11.5px!important;
    line-height:1.18!important;
    white-space:normal!important;
    overflow:hidden!important;
    text-overflow:clip!important;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
  }
  .edit-calendar-event-service,
  .edit-calendar-event-status{
    display:none!important;
  }
}


/* Platform admin */
.admin-tenant-banner{display:none;align-items:center;justify-content:space-between;gap:16px;margin:0 0 14px;padding:12px 14px;border:1px solid #a9cff8;border-radius:13px;background:linear-gradient(135deg,#edf6ff,#f7fbff);color:#2d587f;font-size:13px;box-shadow:0 6px 18px rgba(47,128,237,.07)}
.admin-mode-content{display:flex;align-items:center;gap:12px;min-width:0}
.admin-mode-badge{display:inline-flex;align-items:center;min-height:28px;padding:0 9px;border-radius:8px;background:#2f80ed;color:#fff;font-size:10.5px;font-weight:800;letter-spacing:.055em;white-space:nowrap}
.admin-mode-copy{min-width:0}.admin-mode-title{font-size:13px;font-weight:600;color:#173d60}.admin-mode-title strong{font-weight:800}
.admin-mode-note{margin-top:2px;color:#627c94;font-size:11.5px;line-height:1.35}.admin-mode-note strong{color:#255f96}
.admin-tenant-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.admin-tenant-actions .btn{white-space:nowrap;min-height:38px}
.admin-tenant-price-btn{box-shadow:none}
.client-readonly-badge{display:inline-flex;align-items:center;min-height:27px;padding:0 9px;border:1px solid #d8e5f1;border-radius:999px;background:#f7faff;color:#60788f;font-size:11px;font-weight:700;white-space:nowrap}
.client-plan-head-actions{display:flex;align-items:center;gap:9px}
.admin-toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:14px}
.admin-search-wrap{position:relative;flex:1 1 360px;min-width:280px}
.admin-search-icon{position:absolute;left:14px;top:50%;width:17px;height:17px;transform:translateY(-50%);pointer-events:none;color:#8a9aad}
.admin-search-icon svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.admin-toolbar .admin-search-input,.admin-toolbar .admin-filter-select{height:44px;border:1px solid #dbe6f1;border-radius:12px;background:#fff;color:#29445e;font-family:Inter,system-ui,sans-serif;font-size:13px;font-weight:500;outline:none;transition:border-color .15s,box-shadow .15s}
.admin-toolbar .admin-search-input{width:100%;padding:0 14px 0 42px}
.admin-toolbar .admin-search-input::placeholder{color:#92a1b1;font-weight:400}
.admin-toolbar .admin-filter-select{min-width:210px;padding:0 36px 0 13px;cursor:pointer}
.admin-toolbar .admin-search-input:focus,.admin-toolbar .admin-filter-select:focus{border-color:#8bbcf4;box-shadow:0 0 0 3px rgba(79,156,249,.10)}
.admin-toolbar .btn{min-height:44px;font-size:13px;font-weight:600;padding-left:16px;padding-right:16px}
.admin-plan-cell{display:grid;gap:3px;justify-items:start}
.admin-price-edit{border:0;background:transparent;color:var(--blue-strong);font:inherit;font-size:11px;font-weight:600;padding:3px 0;cursor:pointer}
.admin-price-edit:hover{text-decoration:underline}
.business-preset-preview{border:1px solid #dce8f3;background:#f8fbff;border-radius:14px;padding:13px 14px}
.business-preset-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.business-preset-head strong{font-size:13px;color:#29445e}.business-preset-meta{font-size:11px;color:#788b9f}
.business-preset-services{display:flex;gap:6px;flex-wrap:wrap}
.business-preset-chip{display:inline-flex;align-items:center;border:1px solid #dce8f3;background:#fff;border-radius:999px;padding:5px 8px;font-size:10.5px;color:#50677e}
.admin-price-modal .modal{width:min(500px,100%)}
.service-settings-card .section-head{align-items:flex-start;gap:14px}
.service-add-grid{display:grid;grid-template-columns:minmax(200px,1fr) 120px 135px 135px minmax(180px,auto) auto;gap:9px;align-items:end;padding:12px;border:1px solid #e2ebf4;border-radius:13px;background:#f9fcff;margin-bottom:12px}
.service-manage-list{display:grid;gap:8px}
.service-manage-row{display:grid;grid-template-columns:minmax(220px,1fr) 120px 145px 110px auto;gap:8px;align-items:end;padding:10px 11px;border:1px solid #e2ebf4;border-radius:12px;background:#fff}
.service-manage-row.inactive{background:#f8fafc;opacity:.72}
.service-manage-row .form-field{gap:4px}.service-manage-row .form-field label,.service-add-grid .form-field label{font-size:10.5px;color:#6e8297;font-weight:600}
.service-manage-row input,.service-add-grid input{min-height:40px}
.service-active-toggle{height:40px;display:flex;align-items:center;gap:7px;padding:0 10px;border:1px solid #dfe8f1;border-radius:11px;background:#f8fbff;color:#536b82;font-size:11px;font-weight:600;white-space:nowrap}
.service-active-toggle input{width:16px;height:16px;min-height:0}
.service-online-toggle{align-self:end}
.client-consent-options{display:grid;gap:8px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:#f8fbff}
.client-consent-options label{display:flex;align-items:center;gap:9px;font-size:12px;font-weight:600;color:#50677e}
.client-consent-options input{width:17px;height:17px;min-height:0}
.booking-entry-mode{margin:4px 0 14px;padding:12px;border:1px solid var(--line);border-radius:13px;background:#f8fbff}
.series-modal .modal{width:min(720px,100%);max-height:92dvh;overflow:auto}
.series-base-grid{margin-bottom:14px}
.series-quick-count{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:4px 0 10px}
.series-quick-count>span{font-size:12px;font-weight:700;color:#4f657a}
.series-quick-count>div{display:flex;gap:6px;flex-wrap:wrap}
.series-quick-count button{border:1px solid var(--line);background:#fff;border-radius:9px;min-width:38px;height:34px;padding:0 10px;color:#42627f;font-weight:700;cursor:pointer}
.series-dates{display:grid;gap:9px;margin-bottom:12px}
.series-date-row{
  display:grid;
  gap:9px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#f9fbfd;
}
.series-date-top{
  display:grid;
  grid-template-columns:minmax(0,1fr) 40px;
  gap:8px;
  align-items:end;
}
.series-date-top .form-field{margin:0}
.series-remove-row{width:40px;height:40px;padding:0}
.series-row-slot-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.series-row-slot-head>span{
  color:#48637b;
  font-size:10.5px;
  font-weight:750;
}
.series-row-slot-head>small{
  color:#8191a1;
  font-size:9px;
  text-align:right;
}
.series-row-slots,
.appointment-availability-slots{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.series-slot-btn,
.appointment-availability-slot{
  min-width:58px;
  height:34px;
  padding:0 10px;
  border:1px solid #d5e2ed;
  border-radius:9px;
  background:#fff;
  color:#49677f;
  font:750 11px Inter,system-ui,sans-serif;
  cursor:pointer;
  transition:.14s ease;
}
.series-slot-btn:hover,
.appointment-availability-slot:hover{
  border-color:#9fc6ea;
  background:#f2f8fe;
  color:#2c72b2;
}
.series-slot-btn.active,
.appointment-availability-slot.active{
  border-color:var(--ui-primary,#2f80ed);
  background:var(--ui-primary-soft,#eaf4ff);
  color:var(--ui-primary,#2f80ed);
  box-shadow:0 0 0 2px rgba(var(--theme-rgb),.07);
}
.series-slots-empty,
.appointment-availability-empty{
  width:100%;
  padding:10px 11px;
  border:1px dashed #d8e4ed;
  border-radius:9px;
  background:#fff;
  color:#7f90a0;
  font-size:10px;
  line-height:1.4;
}
.series-help{margin-top:10px;padding:10px 12px;border-radius:11px;background:#f3f8fd;color:#5d7186;font-size:11.5px;line-height:1.45}
.client-series-action{border-color:#d7e8f7;background:#fbfdff}
.service-capacity-field small{display:block;margin-top:4px;color:var(--muted);font-size:9.5px;font-weight:600}
.appointment-capacity-hint{padding:10px 12px;border:1px solid #cfe7d8;border-radius:12px;background:#f3fbf6;color:#4c6f5b}
.appointment-capacity-hint strong,.appointment-capacity-hint span{display:block}
.appointment-capacity-hint strong{font-size:12px;color:#2e7850}.appointment-capacity-hint span{margin-top:3px;font-size:11px;line-height:1.45}
.appointment-capacity-panel{padding:12px;border:1px solid #cfe3f3;border-radius:13px;background:#f7fbff}
.appointment-capacity-panel>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:10px}
.appointment-capacity-panel>div:first-child strong{font-size:13px;color:#315f83}
.appointment-capacity-panel>div:first-child span{font-size:11px;font-weight:700;color:#5e7488}
.appointment-capacity-edit{display:grid;grid-template-columns:1fr 100px auto;gap:8px;align-items:end;margin-top:10px}
.appointment-capacity-edit label{font-size:11px;font-weight:700;color:#586f84}
.appointment-capacity-edit input{height:40px}
.appointment-capacity-panel>small{display:block;margin-top:8px;color:var(--muted);font-size:10.5px;line-height:1.45}
.appointment-visit-services{padding:12px;border:1px solid #dfe7ee;border-radius:13px;background:#fbfcfd}
.appointment-visit-services-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px}
.appointment-visit-services-head strong{font-size:13px;color:#334e67}
.appointment-visit-services-head span{font-size:10.5px;color:var(--muted);text-align:right}
.appointment-visit-services-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.visit-service-option{display:flex;align-items:center;gap:9px;min-height:48px;padding:8px 10px;border:1px solid var(--line);border-radius:11px;background:#fff;cursor:pointer}
.visit-service-option.primary{border-color:#cfe1f1;background:#f5faff}
.visit-service-option input{width:17px;height:17px;min-height:0;flex:0 0 17px}
.visit-service-option span,.visit-service-option strong,.visit-service-option small{display:block}
.visit-service-option strong{font-size:11.5px;color:#405a72}.visit-service-option small{margin-top:2px;color:var(--muted);font-size:9.5px}
.visit-service-historical{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 10px;border:1px dashed #d8e0e7;border-radius:10px;color:#607487;font-size:11px}
.visit-service-historical small{font-size:9px;color:var(--muted)}
.appointment-visit-services>small{display:block;margin-top:9px;color:var(--muted);font-size:10.5px;line-height:1.45}

/* Platform package controls */
.plan-feature-section{padding:11px 12px;border:1px solid var(--line);border-radius:13px;background:#f8fbfd}
.plan-feature-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:7px}
.plan-feature-grid label{display:flex;align-items:flex-start;gap:9px;min-height:54px;padding:9px 10px;border:1px solid #e1e9f0;border-radius:11px;background:#fff;cursor:pointer}
.plan-feature-grid label:has(input:checked){border-color:#bdd8ed;background:#f4f9fd}
.plan-feature-grid label:has(input:disabled){cursor:default}
.plan-feature-grid input{width:17px;height:17px;min-height:0;flex:0 0 17px;margin-top:1px}
.plan-feature-grid span,.plan-feature-grid strong,.plan-feature-grid small{display:block}
.plan-feature-grid strong{font-size:11.5px;color:#405b73}.plan-feature-grid small{margin-top:2px;color:var(--muted);font-size:9.5px;line-height:1.35}
.plan-feature-help{margin-top:7px;font-size:9.5px!important;line-height:1.4}
@media(max-width:620px){.plan-feature-grid{grid-template-columns:1fr}}

/* Messaging channels */
.messaging-channel-status{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:2px 0 13px}
.messaging-channel-state{padding:11px 12px;border:1px solid var(--line);border-radius:12px;background:#f8fafc}
.messaging-channel-state strong,.messaging-channel-state span,.messaging-channel-state small{display:block}
.messaging-channel-state strong{font-size:12px;color:#425d74}
.messaging-channel-state span{margin-top:3px;font-size:10.5px;font-weight:800;color:#8796a5}
.messaging-channel-state small{margin-top:5px;color:var(--muted);font-size:9.5px;line-height:1.4}
.messaging-channel-state.active{border-color:#cde5d7;background:#f5fbf7}
.messaging-channel-state.active span{color:#2f8359}
.messaging-channel-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.messaging-provider-note{margin:11px 0}
#clientPreferredChannelHelp{display:block;margin-top:4px;color:var(--muted);font-size:9.5px;line-height:1.35}
.client-whatsapp-consent{align-self:end;padding-bottom:7px}
@media(max-width:760px){.messaging-channel-grid{grid-template-columns:1fr}.messaging-channel-status{grid-template-columns:1fr}}

/* CRM automation */
.campaign-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(300px,.8fr);gap:14px;margin-bottom:14px}
.campaign-builder-card,.birthday-automation-card,.campaign-history-card{margin-bottom:0}
.campaign-form-grid{margin-top:4px}
.campaign-filter-check{display:flex;align-items:center;gap:10px;align-self:end;min-height:42px;padding:9px 11px;border:1px solid var(--line);border-radius:11px;background:#f8fbfd;cursor:pointer}
.campaign-filter-check input{width:17px;height:17px;min-height:0;flex:0 0 17px}
.campaign-filter-check span,.campaign-filter-check strong,.campaign-filter-check small{display:block}
.campaign-filter-check strong{font-size:11.5px;color:#456078}.campaign-filter-check small{margin-top:2px;color:var(--muted);font-size:9.5px;line-height:1.35}
.campaign-placeholders{font-size:10.5px;color:var(--muted);line-height:1.45}
.campaign-placeholders code{padding:2px 5px;border-radius:6px;background:#eef4f8;color:#3c617d;font-family:Inter,sans-serif;font-size:10px;font-weight:700}
.campaign-preview-box{margin-top:12px;padding:12px;border:1px solid var(--line);border-radius:13px;background:#f8fbfd;min-height:68px}
.campaign-preview-empty{color:var(--muted);font-size:11.5px}
.campaign-preview-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.campaign-preview-metrics>div{padding:10px;border:1px solid #deebf4;border-radius:11px;background:#fff}
.campaign-preview-metrics small,.campaign-preview-metrics strong{display:block}
.campaign-preview-metrics small{color:var(--muted);font-size:9.5px}.campaign-preview-metrics strong{margin-top:3px;color:#315f83;font-size:17px}
.campaign-preview-summary p,.campaign-preview-box p{margin:9px 0 0;color:var(--muted);font-size:10.5px;line-height:1.45}
.campaign-preview-samples{display:grid;gap:6px;margin-top:10px}
.campaign-sample-title{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:#718397}
.campaign-sample{display:grid;grid-template-columns:150px minmax(0,1fr) auto;gap:8px;align-items:center;padding:8px 10px;border:1px solid #e3ebf1;border-radius:10px;background:#fff}
.campaign-sample strong{font-size:10.5px}.campaign-sample span{font-size:10.5px;color:#526a80;line-height:1.35}.campaign-sample small{font-size:9px;color:var(--muted)}
.campaign-builder-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}
.birthday-toggle{display:flex;align-items:center;gap:10px;padding:11px 12px;border:1px solid #dce9e1;border-radius:12px;background:#f6fbf8;margin-bottom:12px}
.birthday-toggle input{width:18px;height:18px;min-height:0}.birthday-toggle span,.birthday-toggle strong,.birthday-toggle small{display:block}
.birthday-toggle strong{font-size:12px;color:#3d6651}.birthday-toggle small{margin-top:2px;color:var(--muted);font-size:10px}
.birthday-grid{grid-template-columns:120px 1fr}.birthday-grid .full{grid-column:1/-1}
.birthday-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:12px}
.birthday-actions .muted{font-size:10px}
.campaign-history-list{display:grid;gap:7px}
.campaign-history-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;border:1px solid var(--line);border-radius:12px;background:#fff}
.campaign-history-main strong,.campaign-history-main span,.campaign-history-side strong,.campaign-history-side span{display:block}
.campaign-history-main strong{font-size:12.5px}.campaign-history-main span{margin-top:3px;color:var(--muted);font-size:10.5px}
.campaign-history-side{text-align:right}.campaign-history-side strong{font-size:12px;color:#405b73}
.campaign-status{margin-top:4px;font-size:9.5px;font-weight:800;color:#60778c}
.campaign-status.completed{color:#2f8359}.campaign-status.cancelled{color:#aa4d4d}.campaign-status.queued,.campaign-status.sending{color:#a36b1d}
@media(max-width:1050px){.campaign-grid{grid-template-columns:1fr}}
@media(max-width:620px){
  .campaign-preview-metrics{grid-template-columns:1fr}
  .campaign-sample{grid-template-columns:1fr}
  .campaign-builder-actions{flex-direction:column}.campaign-builder-actions .btn{width:100%}
  .birthday-grid{grid-template-columns:1fr}.birthday-grid .full{grid-column:auto}
  .birthday-actions,.campaign-history-row{align-items:stretch;flex-direction:column}
  .birthday-actions .btn{width:100%}.campaign-history-side{text-align:left}
  .mobile-nav button{flex:1;min-width:0;padding:4px 2px;font-size:10px}
}
@media(max-width:620px){.appointment-visit-services-list{grid-template-columns:1fr}.appointment-visit-services-head{flex-direction:column}.appointment-visit-services-head span{text-align:left}}
@media(max-width:620px){.appointment-capacity-edit{grid-template-columns:1fr 90px}.appointment-capacity-edit .btn{grid-column:1/-1;width:100%}}
.followup-due-btn{display:inline-flex;align-items:center;gap:7px;white-space:nowrap}
.followup-due-btn span{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;border-radius:999px;background:#edf3f8;color:#5c7186;font-size:10.5px;font-weight:800}
.followup-due-btn.has-due{border-color:#e8c7a5;background:#fff9f1;color:#9a5a1a}
.followup-due-btn.has-due span{background:#f4d7b8;color:#87480e}
.followup-queue-modal .modal{width:min(760px,100%);max-height:92dvh;overflow:auto}
.followup-queue-summary{display:flex;align-items:center;gap:8px;margin:2px 0 12px}
.followup-queue-summary strong,.followup-queue-summary span{display:inline-flex;align-items:center;border-radius:999px;padding:6px 9px;font-size:11px}
.followup-queue-summary strong{background:var(--blue-soft);color:var(--blue-strong)}.followup-queue-summary span{background:#fff2e7;color:#9b5a1b}
.followup-queue-list{display:grid;gap:8px}
.followup-queue-row{display:grid;grid-template-columns:minmax(170px,.8fr) minmax(220px,1.2fr) auto;gap:10px;align-items:center;padding:11px;border:1px solid var(--line);border-radius:13px;background:#fff}
.followup-queue-row.overdue{border-color:#efd5bb;background:#fffaf5}
.followup-client-link{border:0;background:transparent;padding:0;text-align:left;cursor:pointer;color:inherit}
.followup-client-link strong,.followup-client-link span,.followup-queue-copy strong,.followup-queue-copy span{display:block}
.followup-client-link strong{font-size:13px}.followup-client-link span,.followup-queue-copy span{margin-top:3px;color:var(--muted);font-size:11px}
.followup-queue-copy strong{font-size:12px;color:#51687d}.followup-queue-row.overdue .followup-queue-copy strong{color:#a55c18}
.followup-queue-actions{display:flex;gap:6px}
.client-followup-create{padding:13px;border:1px solid var(--line);border-radius:13px;background:#f9fbfd}
.client-followup-quick{display:flex;gap:6px;flex-wrap:wrap;margin:11px 0}
.client-followup-quick button{height:34px;border:1px solid var(--line);border-radius:9px;background:#fff;color:#49657f;padding:0 10px;font:inherit;font-size:11px;font-weight:700;cursor:pointer}
.client-followup-form{grid-template-columns:150px 1fr}
.client-followup-create-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px}
.client-followup-list{display:grid;gap:8px;margin-top:12px}
.client-followup-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;border:1px solid var(--line);border-radius:12px;background:#fff}
.client-followup-row.done{opacity:.72;background:#f8fafc}
.client-followup-row>div:first-child strong,.client-followup-row>div:first-child span{display:block}
.client-followup-row>div:first-child strong{font-size:12px}.client-followup-row>div:first-child span{margin-top:3px;color:var(--muted);font-size:11.5px}
.client-followup-row-side{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}
@media(max-width:760px){.followup-queue-row{grid-template-columns:1fr}.followup-queue-actions .btn{flex:1}.client-followup-form{grid-template-columns:1fr}.client-followup-create-actions,.client-followup-row{align-items:stretch;flex-direction:column}.client-followup-row-side{justify-content:flex-start}.clients-toolbar{display:flex;gap:8px;align-items:center}.clients-toolbar input{flex:1}.followup-due-btn{flex:0 0 auto}}
@media(max-width:620px){.series-modal{padding:10px}.series-modal .modal{padding:16px}.series-base-grid{grid-template-columns:1fr}.series-quick-count{align-items:flex-start;flex-direction:column}.series-date-row{grid-template-columns:1fr 40px}}
.service-save-btn{min-height:40px;white-space:nowrap}
.service-settings-status{font-size:11px;color:var(--muted);margin-top:9px}
@media(max-width:900px){.service-add-grid,.service-manage-row{grid-template-columns:1fr 1fr}.service-add-grid .form-field:first-child,.service-manage-row .form-field:first-child{grid-column:1/-1}}
@media(max-width:620px){.service-add-grid,.service-manage-row{grid-template-columns:1fr}.service-add-grid .form-field:first-child,.service-manage-row .form-field:first-child{grid-column:auto}.service-save-btn{width:100%}}
@media(max-width:760px){.admin-search-wrap{min-width:0;width:100%;flex-basis:100%}.admin-toolbar .admin-filter-select{flex:1;min-width:0}.admin-toolbar .btn{flex:0 0 auto}}
.admin-client-logo{width:38px;height:38px;border-radius:10px;object-fit:contain;background:#fff;border:1px solid var(--line);padding:3px}
.admin-client-fallback{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;background:var(--blue-soft);color:var(--blue-strong);font-weight:800}
.admin-client-name{display:flex;align-items:center;gap:10px}.admin-actions{display:flex;gap:7px;flex-wrap:wrap}
.admin-status{display:inline-flex;align-items:center;padding:5px 8px;border-radius:999px;font-size:11px;font-weight:700;background:#eef7f1;color:#2e7a4d}
.admin-status.off{background:#f3f4f6;color:#6f7781}.admin-status.booking{background:#eef5ff;color:#326fa6}
.admin-empty{padding:24px;text-align:center;color:var(--muted)}
.admin-new-client-modal{z-index:48}
.admin-new-client-dialog{
  width:min(820px,100%);
  max-height:min(88dvh,860px);
  overflow:auto;
  padding:22px;
}
.admin-new-client-head{
  position:sticky;
  top:-22px;
  z-index:3;
  margin:-22px -22px 18px;
  padding:20px 22px 16px;
  background:#fff;
  border-bottom:1px solid var(--line);
}
.admin-new-client-head h2{margin:0 0 3px;font-size:20px}
.admin-new-client-content{display:grid;gap:14px}
.admin-new-client-dialog .platform-client-grid{grid-template-columns:1fr 1fr;gap:12px}
.admin-new-client-dialog .business-preset-preview{margin-top:2px}
.admin-new-client-status{margin:2px 0 0}
.admin-new-client-actions{
  position:sticky;
  bottom:-22px;
  z-index:3;
  margin:18px -22px -22px;
  padding:14px 22px 20px;
  background:#fff;
  border-top:1px solid var(--line);
}
@media(max-width:720px){
  .admin-new-client-modal{padding:10px}
  .admin-new-client-dialog{max-height:94dvh;padding:18px;border-radius:18px}
  .admin-new-client-head{top:-18px;margin:-18px -18px 16px;padding:16px 18px 14px}
  .admin-new-client-dialog .platform-client-grid{grid-template-columns:1fr}
  .admin-new-client-dialog .form-field.full{grid-column:auto}
  .admin-new-client-actions{bottom:-18px;margin:16px -18px -18px;padding:12px 18px calc(16px + env(safe-area-inset-bottom))}
  .admin-new-client-actions .btn{flex:1}
}
@media(max-width:760px){.admin-tenant-banner{align-items:flex-start;flex-direction:column}.admin-mode-content{align-items:flex-start}.admin-tenant-actions{width:100%;flex-wrap:wrap}.admin-tenant-actions .btn{flex:1 1 auto}.admin-actions{min-width:190px}.admin-toolbar input{min-width:0;width:100%}}

/* Google Calendar client import */
.google-calendar-integration{grid-column:1/-1}
.calendar-import-panel{margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}
.calendar-import-title{display:flex;justify-content:space-between;gap:12px;margin-bottom:10px}
.calendar-import-title strong{font-size:13px}
.calendar-import-controls{display:flex;align-items:end;gap:10px;max-width:520px}
.calendar-import-controls .form-field{flex:1}
.calendar-import-controls .btn{min-width:150px}
.calendar-import-result{margin-top:10px;font-size:12px;color:var(--muted)}
.calendar-import-result.success{padding:10px 12px;border-radius:11px;background:#eefaf4;color:#267a57}
.calendar-review-wrap{margin-top:12px;border-top:1px solid var(--line);padding-top:11px}
.calendar-review-wrap summary{cursor:pointer;font-size:12px;font-weight:700;color:#556b82}
.review-count{display:inline-grid;place-items:center;min-width:22px;height:22px;margin-left:6px;padding:0 6px;border-radius:999px;background:var(--amber-bg);color:var(--amber);font-size:10px}
.review-help{margin:8px 0 10px}
.calendar-review-list{display:grid;gap:9px}
.calendar-review-item{padding:11px;border:1px solid var(--line);border-radius:12px;background:#f9fbfd}
.review-event-meta{display:flex;justify-content:space-between;gap:10px;margin-bottom:8px}
.review-event-title{font-size:12px;font-weight:700;color:var(--text)}
.review-event-date{font-size:10px;color:var(--muted);white-space:nowrap}
.review-fields{display:grid;grid-template-columns:1fr .9fr 1.2fr auto;gap:7px;align-items:end}
.review-fields input{min-width:0}
.review-fields .btn{white-space:nowrap}
@media(max-width:760px){
  .calendar-import-controls{display:grid;grid-template-columns:1fr}
  .calendar-import-controls .btn{width:100%}
  .review-event-meta{display:block}
  .review-event-date{margin-top:3px}
  .review-fields{grid-template-columns:1fr}
}


/* Client billing */
.client-billing-month{width:auto;min-width:155px}
.client-billing-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:12px}
.client-billing-box{padding:13px;border:1px solid var(--line);border-radius:12px;background:#f9fbfd}
.client-billing-box small{display:block;font-size:10px;color:var(--muted);margin-bottom:4px}
.client-billing-box strong{font-size:17px;color:var(--text)}
.client-billing-total{background:#eef7ff;border-color:#d7eaff}
.sms-only-reminders{grid-template-columns:minmax(0,1fr)}
@media(max-width:760px){.client-billing-metrics{grid-template-columns:1fr 1fr}.client-billing-month{width:100%}}
@media(max-width:480px){.client-billing-metrics{grid-template-columns:1fr}}

/* Dashboard + appointment modal visual polish */
#dashboard .headline{margin-bottom:13px}
#dashboard .headline h1{font-size:26px;letter-spacing:-.025em;line-height:1.15}
#dashboard .headline .muted{font-size:12.5px;margin-top:2px}
#dashboard .overview-controlbar{gap:9px;margin-top:4px}
#dashboard .overview-controlbar select,
.appointment-detail-modal select{
  appearance:none;
  -webkit-appearance:none;
  min-height:42px;
  border:1px solid #dce6f0;
  border-radius:11px;
  background-color:#fff;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2375899d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 12px center;
  background-size:15px;
  padding:0 38px 0 13px;
  color:#233d58;
  font-family:Inter,system-ui,sans-serif;
  font-size:13px;
  font-weight:500;
  line-height:1.2;
  outline:none;
  cursor:pointer;
  transition:border-color .15s,box-shadow .15s,background-color .15s;
}
#dashboard .overview-controlbar select{min-width:190px;height:42px}
#dashboard .overview-controlbar select:hover,
.appointment-detail-modal select:hover{border-color:#b9cee2}
#dashboard .overview-controlbar select:focus,
.appointment-detail-modal select:focus{
  border-color:#82bafa;
  box-shadow:0 0 0 3px rgba(79,156,249,.10);
}
#dashboard .overview-table-card{padding:16px 18px;border-radius:16px}
#dashboard .overview-table-card .section-head{margin-bottom:5px}
#dashboard .overview-table-card .section-head h2{font-size:16px;letter-spacing:-.01em}
#dashboard .overview-table-card .section-head .muted{font-size:12px}
#dashboard .overview-table th{font-size:11px;text-transform:none;letter-spacing:0;color:#7c8da0;padding-top:11px;padding-bottom:11px}
#dashboard .overview-table td{font-size:13px;padding-top:12px;padding-bottom:12px}
#dashboard .overview-table td strong{font-weight:650}
#dashboard .overview-table .btn{
  min-height:34px;
  padding:7px 12px;
  border-radius:9px;
  font-size:12px;
  font-weight:600;
  box-shadow:none;
}
#dashboard .headline>.btn{
  min-height:40px;
  padding:0 15px;
  border-radius:11px;
  font-size:13px;
  font-weight:600;
}

.appointment-detail-modal{background:rgba(23,43,64,.30);backdrop-filter:blur(2px)}
.appointment-detail-modal .modal{
  width:min(610px,calc(100vw - 28px));
  padding:0;
  border-radius:19px;
  overflow:hidden;
  box-shadow:0 28px 75px rgba(21,51,82,.24);
}
.appointment-detail-head{
  margin:0;
  padding:19px 20px 15px;
  border-bottom:1px solid #edf2f7;
  align-items:flex-start;
}
.appointment-detail-head h2{
  margin:0;
  color:#18304b;
  font-size:19px;
  line-height:1.2;
  letter-spacing:-.02em;
}
.appointment-detail-head #editApptSyncState{
  margin-top:4px!important;
  font-size:11.5px!important;
  line-height:1.3;
  color:#8292a4;
}
.appointment-close-btn{
  width:36px;height:36px;min-height:36px;
  padding:0;
  display:grid;place-items:center;
  border-radius:10px;
  background:#f4f7fa;
  color:#65788c;
  font-size:16px;
  flex:0 0 36px;
}
.appointment-close-btn:hover{background:#eaf1f7;color:#344f69}
.appointment-detail-modal .form-grid{
  padding:17px 20px 2px;
  gap:11px 12px;
}
.appointment-detail-modal .form-field{gap:5px}
.appointment-detail-modal .form-field label{
  color:#435d75;
  font-size:11.5px;
  font-weight:600;
  line-height:1.3;
}
.appointment-detail-modal .form-field input,
.appointment-detail-modal .form-field textarea{
  width:100%;
  min-height:42px;
  border:1px solid #dce6f0;
  border-radius:11px;
  background:#fff;
  padding:10px 12px;
  color:#233d58;
  font-family:Inter,system-ui,sans-serif;
  font-size:13px;
  font-weight:500;
  line-height:1.35;
  outline:none;
  transition:border-color .15s,box-shadow .15s;
}
.appointment-detail-modal .form-field input:focus,
.appointment-detail-modal .form-field textarea:focus{
  border-color:#82bafa;
  box-shadow:0 0 0 3px rgba(79,156,249,.10);
}
.appointment-detail-modal textarea{min-height:78px!important;resize:vertical}
.appointment-detail-modal .reminder-box{
  border:1px solid #dfe9f3;
  border-radius:13px;
  background:#f8fbfe;
  padding:11px 12px 10px;
  margin-top:1px;
}
.appointment-detail-modal .reminder-master{
  display:flex;align-items:center;gap:8px;
  color:#26425e;
  font-size:12px!important;
}
.appointment-detail-modal .reminder-master input{min-height:auto;width:15px;height:15px;margin:0;accent-color:var(--blue)}
.appointment-detail-modal .reminder-schedule-summary{
  margin-top:8px;
  padding:8px 10px;
  border-radius:9px;
  border:1px solid #e5edf5;
  background:#fff;
  color:#667d92;
  font-size:11px;
}
.appointment-detail-modal .reminder-hint{
  margin-top:7px;
  color:#8493a3;
  font-size:10.5px;
}
.appointment-actionbar{
  margin:15px 20px 0!important;
  padding:14px 0 18px!important;
  border-top:1px solid #edf2f7!important;
  gap:12px;
}
.appointment-actionbar .modal-actions-left,
.appointment-actionbar .modal-actions-right{gap:8px;flex-wrap:nowrap}
.appointment-actionbar .btn{
  min-height:39px!important;
  height:39px;
  border-radius:10px;
  padding:0 13px;
  font-family:Inter,system-ui,sans-serif;
  font-size:12px;
  font-weight:600;
  white-space:nowrap;
}
.appointment-actionbar .btn-primary{
  min-width:136px;
  box-shadow:0 6px 14px rgba(47,128,237,.17);
}
.appointment-secondary-btn{background:#f3f6f9;color:#53697e}
.appointment-secondary-btn:hover{background:#e9eef3}
.appointment-actionbar .btn-danger{
  background:#fff7f7!important;
  border:1px solid #ffd7d7!important;
  color:#c84f4f!important;
}
.appointment-actionbar .btn-ghost-danger{
  color:#a86a6a!important;
  background:transparent!important;
  padding-left:8px!important;
  padding-right:8px!important;
}
.appointment-actionbar .btn-ghost-danger:hover{background:#fff6f6!important;color:#c34b4b!important}

@media(max-width:620px){
  #dashboard .overview-controlbar{display:grid;grid-template-columns:1fr 1fr;width:100%}
  #dashboard .overview-controlbar select{min-width:0;width:100%}
  .appointment-detail-modal .modal{width:calc(100vw - 16px);max-height:94vh;overflow:auto}
  .appointment-detail-modal .form-grid{grid-template-columns:1fr;padding:15px 14px 2px}
  .appointment-detail-modal .form-field.full{grid-column:auto}
  .appointment-detail-head{padding:16px 14px 13px}
  .appointment-actionbar{margin:13px 14px 0!important;flex-direction:column-reverse;align-items:stretch}
  .appointment-actionbar .modal-actions-left,.appointment-actionbar .modal-actions-right{width:100%}
  .appointment-actionbar .modal-actions-right .btn{flex:1}
  .appointment-actionbar .modal-actions-left{justify-content:space-between}
}


/* ===== Calendar viewport + typography normalization ===== */
@media(min-width:981px){
  body.calendar-mode{overflow:hidden}
  body.calendar-mode .main{
    height:100vh;
    overflow:hidden;
    display:flex;
    flex-direction:column;
    padding-bottom:18px;
  }
  body.calendar-mode .admin-tenant-banner{
    flex:0 0 auto;
    margin-bottom:12px;
  }
  body.calendar-mode #calendar.page.active{
    display:flex;
    flex:1 1 auto;
    min-height:0;
    flex-direction:column;
  }
  body.calendar-mode #calendar .headline,
  body.calendar-mode #calendar .calendar-toolbar,
  body.calendar-mode #calendar .calendar-weekbar{
    flex:0 0 auto;
  }
  body.calendar-mode #calendar .calendar-card{
    flex:1 1 auto;
    min-height:0;
    margin-bottom:0;
    overflow:hidden;
    padding:10px;
  }
  body.calendar-mode #calendar .calendar-scroll{
    height:100%;
    min-height:0;
    overflow:auto;
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
  }
  body.calendar-mode #calendar .calendar-grid{
    border-radius:12px;
  }
  body.calendar-mode #calendar .cal-head{
    position:sticky;
    top:0;
    z-index:8;
    background:#f7faff;
    box-shadow:0 1px 0 var(--line);
  }
}

/* One type scale for the calendar screen */
#calendar{
  --cal-title:24px;
  --cal-control:12.5px;
  --cal-meta:11px;
  --cal-grid:10.5px;
  --cal-event:10.5px;
}
#calendar .headline{margin-bottom:10px}
#calendar .headline h1{
  margin:0 0 3px;
  font-size:var(--cal-title);
  line-height:1.16;
  letter-spacing:-.025em;
  font-weight:700;
}
#calendar .headline .muted{
  font-size:var(--cal-meta);
  line-height:1.35;
}
#calendar .calendar-toolbar{
  gap:8px;
  margin-bottom:10px!important;
}
#calendar .calendar-toolbar input,
#calendar .calendar-toolbar select{
  height:39px;
  min-height:39px;
  border-radius:10px;
  padding-top:0;
  padding-bottom:0;
  font-family:Inter,system-ui,sans-serif;
  font-size:var(--cal-control);
  font-weight:500;
  color:#4d6278;
}
#calendar .calendar-toolbar .therapist-select{
  flex-basis:180px;
  min-width:180px;
  padding-right:34px;
  background-size:14px;
  background-position:right 11px center;
}
#calendar .calendar-new-btn{
  min-height:39px;
  height:39px;
  border-radius:10px;
  padding:0 14px;
  font-family:Inter,system-ui,sans-serif;
  font-size:var(--cal-control);
  font-weight:600;
}
#calendar .calendar-weekbar{
  margin:0 0 9px;
  gap:10px;
}
#calendar .calendar-week-controls{gap:7px}
#calendar .calendar-week-picker{
  height:37px;
  min-height:37px;
  border-radius:10px;
  padding:0 10px;
  font-family:Inter,system-ui,sans-serif;
  font-size:12px;
  font-weight:500;
  color:#607387;
}
#calendar .week-arrow{
  width:37px;
  height:37px;
  min-height:37px;
  border-radius:10px;
  font-size:20px;
}
#calendar .current-week-btn{
  min-height:37px;
  height:37px;
  border-radius:10px;
  padding:0 12px;
  font-family:Inter,system-ui,sans-serif;
  font-size:12px;
  font-weight:600;
}
#calendar .calendar-week-label{
  font-size:10.5px;
  font-weight:600;
  color:#708196;
}
#calendar .calendar-card{
  border-radius:14px;
}
#calendar .calendar-grid,
#calendar .calendar-grid.half-hour{
  font-family:Inter,system-ui,sans-serif;
}
#calendar .calendar-grid.half-hour .cal-cell{
  min-height:48px;
  padding:6px 7px;
  font-size:var(--cal-grid);
  line-height:1.25;
  color:#385069;
}
#calendar .calendar-grid.half-hour .cal-head{
  min-height:34px;
  padding:9px 7px;
  font-size:10.5px;
  font-weight:650;
  color:#52677c;
}
#calendar .cal-cell>strong{
  font-size:10.5px;
  font-weight:650;
  color:#3b5269;
}
#calendar .event{
  padding:7px 8px;
  border-radius:9px;
  font-size:var(--cal-event);
  line-height:1.25;
}
#calendar .event-time{
  font-size:10.5px;
  font-weight:700;
  line-height:1.2;
}
#calendar .event-client{
  margin-top:2px;
  font-size:10.5px;
  font-weight:600;
  line-height:1.2;
}
#calendar .event-service{
  margin-top:2px;
  font-size:9.5px;
  line-height:1.2;
  color:#6e7e8f;
}
#calendar .event-status-tag{
  margin-top:5px;
  padding:3px 6px;
  font-size:8.5px;
  font-weight:700;
}
body.calendar-mode .admin-tenant-banner{
  font-size:11px;
  line-height:1.3;
  padding:8px 12px;
  border-radius:11px;
}
body.calendar-mode .admin-mode-badge{min-height:24px;font-size:9px;padding:0 7px}
body.calendar-mode .admin-mode-title{font-size:11.5px}
body.calendar-mode .admin-mode-note{font-size:9.5px}
body.calendar-mode .admin-tenant-banner .btn{
  min-height:34px;
  padding:0 11px;
  border-radius:9px;
  font-size:10.5px;
}

@media(max-width:980px){
  #calendar .headline h1{font-size:22px}
  #calendar .calendar-toolbar input,
  #calendar .calendar-toolbar select,
  #calendar .calendar-new-btn{height:44px;min-height:44px;font-size:13px}
  #calendar .calendar-week-picker,
  #calendar .week-arrow,
  #calendar .current-week-btn{height:42px;min-height:42px}
}


/* Last-minute / confirmation */
.smart-settings-card select,.smart-settings-card input{font-family:Inter,system-ui,sans-serif}
.preset-row{display:flex;gap:7px;flex-wrap:wrap;margin:2px 0 14px}
.preset-row button{border:1px solid #dce6f0;background:#fff;color:#5d7084;border-radius:10px;padding:8px 12px;font:600 12px Inter,system-ui;cursor:pointer}
.preset-row button.active{background:var(--blue-soft);border-color:#a8d0ff;color:var(--blue-strong)}
.confirmation-grid,.last-minute-config-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.unit-input{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;border:1px solid var(--line);border-radius:11px;background:#fff;overflow:hidden}
.unit-input input{border:0!important;border-radius:0!important;min-width:0}.unit-input span{padding:0 11px;color:#79899a;font-size:11px;white-space:nowrap}
.safety-row{display:flex;align-items:flex-start;gap:8px;margin:12px 0;color:#54697d;font-size:11.5px}.safety-row input{width:16px;height:16px;margin:0;accent-color:var(--blue)}
.appointment-confirmation-panel{border:1px solid #dfe9f3;border-radius:13px;background:#f9fbfd;padding:12px}
.appointment-panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.appointment-panel-head strong{font-size:12px;color:#304b65}
.mini-grid{grid-template-columns:1fr 1fr!important}.readonly-status{min-height:42px;display:flex;align-items:center;padding:9px 11px;border:1px solid var(--line);border-radius:11px;background:#fff;color:#607589;font-size:11.5px}
.delivery-alert{margin-top:9px;padding:9px 10px;border-radius:10px;background:#fff1f1;color:#9e4848;font-size:10.5px;line-height:1.4}
.waitlist-preview{margin-top:9px;font-size:11px;color:#5f7286}.waitlist-preview .waiter{display:flex;justify-content:space-between;gap:8px;padding:6px 0;border-top:1px solid #e7edf3}
.waitlist-badge{display:inline-flex;padding:4px 7px;border-radius:999px;background:#fff4d8;color:#9a7114;font-size:9px;font-weight:700}
.event-extra-tags{display:flex;gap:4px;flex-wrap:wrap;margin-top:4px}.event-mini-tag{display:inline-flex;padding:2px 5px;border-radius:999px;background:rgba(255,255,255,.7);font-size:7.5px;font-weight:700;color:#687b8f}
.released-slot-event{background:#eef7ff!important;border-left-color:#4c99ee!important}.released-slot-event .event-client{color:#326fa6}
.last-minute-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.lm-metric{padding:11px 12px;border:1px solid var(--line);border-radius:12px;background:#fafcff}.lm-metric small{display:block;color:#7a8b9c;font-size:10px}.lm-metric strong{display:block;margin-top:4px;font-size:18px;color:#1d3852}.last-minute-value-line{margin-top:10px;padding:10px 12px;border-radius:11px;background:#f5faff;color:#46637e;font-size:11.5px}
.last-minute-value-line strong{color:#245f96}
.last-minute-quick{padding:10px;border:1px solid #e0eaf3;border-radius:12px;background:#f8fbff}.last-minute-quick label{display:flex;gap:8px;align-items:flex-start}
.client-lm-card{margin-top:14px;border:1px solid #dfe9f2;border-radius:14px;background:#f9fbfd;padding:13px}.client-lm-head{display:flex;justify-content:space-between;align-items:center;gap:10px}.client-lm-head strong{font-size:13px;color:#304b65}.client-lm-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:11px}.client-lm-grid .form-field label{font-size:10.5px}.client-lm-services{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}.service-check{display:inline-flex;gap:5px;align-items:center;padding:6px 8px;border:1px solid #dfe8ef;border-radius:9px;background:#fff;font-size:10px}
.client-lm-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-top:10px}.client-lm-stat{background:#fff;border:1px solid #e3ebf2;border-radius:10px;padding:8px}.client-lm-stat small{display:block;color:#8492a0;font-size:9px}.client-lm-stat strong{font-size:14px}
.candidate-list{display:grid;gap:8px;max-height:52vh;overflow:auto}.candidate-row{display:flex;align-items:flex-start;gap:10px;border:1px solid var(--line);border-radius:12px;padding:10px;background:#fff}.candidate-row input{margin-top:3px}.candidate-copy{min-width:0}.candidate-copy strong{display:block;font-size:12px}.candidate-copy span{display:block;color:#78899a;font-size:10.5px;margin-top:2px}
@media(max-width:760px){.confirmation-grid,.last-minute-config-grid,.mini-grid,.client-lm-grid{grid-template-columns:1fr!important}.last-minute-metrics{grid-template-columns:1fr 1fr}.client-lm-stats{grid-template-columns:1fr 1fr}}


/* Settings dashboard density + readability pass — 2026-09-27 */
#settings.page.active{
  display:grid;
  grid-template-columns:repeat(12,minmax(0,1fr));
  gap:12px;
  align-items:start;
  max-width:1540px;
  margin:0 auto;
}
#settings > .headline{grid-column:1/-1;margin:0 0 2px}
#settings > .client-plan-card,
#settings > #organizationUsersCard,
#settings > .service-settings-card,
#settings > .booking-settings-card,
#settings > .settings-grid{grid-column:1/-1}
#settings > .business-settings-card,
#settings > .system-access-card,
#settings > .confirmation-settings-card,
#settings > .last-minute-settings-card{grid-column:span 6}
#settings > .reminder-settings-card{grid-column:span 8}
#settings > .security-settings-card{grid-column:span 4}
#settings > .card,
#settings > .settings-grid{margin-bottom:0!important;min-width:0}

#settings{font-size:14px;line-height:1.45}
#settings .headline h1{font-size:28px;line-height:1.12;letter-spacing:-.025em;margin-bottom:4px}
#settings .headline .muted{font-size:13px}
#settings .section{padding:16px}
#settings .section-head{margin-bottom:10px;gap:12px}
#settings h2{font-size:17px;line-height:1.22;margin:0 0 3px;font-weight:700;letter-spacing:-.01em}
#settings .section-head > div > .muted,
#settings .card > .muted{font-size:12.5px;line-height:1.45}
#settings .form-grid{gap:10px 12px}
#settings .form-field{gap:5px}
#settings .form-field label{font-size:12.5px;font-weight:600;color:#4f657b;line-height:1.25}
#settings input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
#settings select,
#settings textarea{
  width:100%;
  min-height:42px;
  padding:0 12px;
  border:1px solid #dbe5ef;
  border-radius:11px;
  background:#fff;
  color:#263f58;
  font-family:Inter,system-ui,sans-serif;
  font-size:13.5px;
  font-weight:500;
  line-height:1.25;
  outline:none;
  box-shadow:none;
  transition:border-color .15s ease,box-shadow .15s ease,background .15s ease;
}
#settings textarea{padding:10px 12px;min-height:82px;resize:vertical}
#settings select{
  appearance:none;
  -webkit-appearance:none;
  padding-right:38px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2375899d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 11px center;
  background-size:15px;
}
#settings input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus,
#settings select:focus,
#settings textarea:focus{
  border-color:#86b9f3;
  box-shadow:0 0 0 3px rgba(79,156,249,.10);
}
#settings input::placeholder,#settings textarea::placeholder{color:#96a5b4;font-weight:400}
#settings input[type="checkbox"]{width:17px;height:17px;accent-color:var(--blue);flex:0 0 17px}
#settings .btn{
  min-height:40px;
  padding:9px 14px;
  border-radius:11px;
  font-family:Inter,system-ui,sans-serif;
  font-size:13px;
  font-weight:600;
  line-height:1.15;
}
#settings .muted,
#settings .integration-status,
#settings .booking-status,
#settings .reminder-offset-help,
#settings .service-settings-status{font-size:12.5px;line-height:1.45}
#settings .card{border-radius:14px;box-shadow:0 7px 22px rgba(39,78,120,.055)}
#settings .client-billing-metrics{gap:8px;margin-top:9px}
#settings .client-billing-box{padding:10px 12px;border-radius:11px}
#settings .client-billing-box small{font-size:11.5px;margin-bottom:3px}
#settings .client-billing-box strong{font-size:18px;line-height:1.15}
#settings .client-billing-month{width:auto;min-width:168px;font-size:13px}
#settings .org-logo-settings{gap:10px;min-height:56px}
#settings .org-logo-preview,#settings .org-logo-placeholder{width:52px;height:52px;border-radius:11px}
#settings .org-logo-placeholder{font-size:10.5px}
#settings .org-logo-actions{gap:7px}
#settings #orgLogoStatus{font-size:12px!important;margin-top:1px}

#settings .service-add-grid{
  grid-template-columns:minmax(260px,1.7fr) 105px 125px auto;
  gap:8px;
  padding:10px;
  margin-bottom:9px;
  border-radius:12px;
}
#settings .service-manage-list{gap:6px}
#settings .service-manage-row{
  grid-template-columns:minmax(260px,1.7fr) 105px 125px 92px auto;
  gap:7px;
  padding:8px 9px;
  border-radius:11px;
}
#settings .service-manage-row .form-field label,
#settings .service-add-grid .form-field label{font-size:11.5px}
#settings .service-manage-row input,
#settings .service-add-grid input{min-height:39px;font-size:13px}
#settings .service-active-toggle{
  height:39px;
  padding:0 9px;
  border-radius:10px;
  font-size:12px;
}
#settings .service-save-btn{min-height:39px}

#settings .booking-toggle{
  display:flex;
  align-items:center;
  gap:7px;
  font-size:12.5px;
  font-weight:600;
  white-space:nowrap;
}
#settings .booking-link-row{gap:7px}
#settings .preset-row{gap:6px;margin:0 0 10px}
#settings .preset-row button{
  min-height:36px;
  padding:7px 11px;
  border-radius:9px;
  font:600 12.5px Inter,system-ui,sans-serif;
}
#settings .confirmation-grid,
#settings .last-minute-config-grid{gap:9px 10px}
#settings .unit-input{min-height:42px;border-color:#dbe5ef;border-radius:11px}
#settings .unit-input input{min-height:40px!important;font-size:13.5px!important}
#settings .unit-input span{padding:0 10px;font-size:12px}
#settings .safety-row{gap:7px;margin:9px 0;font-size:12.5px;line-height:1.4}
#settings .message-preview{
  padding:10px 12px;
  margin-top:9px;
  border-radius:11px;
  font-size:12.5px;
  line-height:1.45;
}
#settings .message-preview strong{font-size:12.5px}
#settings .message-preview p{margin:4px 0 0}
#settings .reminder-offset-editor{gap:7px;margin-top:8px}
#settings .reminder-offset-row{grid-template-columns:110px 145px auto;gap:7px}
#settings .reminder-offset-row input,
#settings .reminder-offset-row select{min-height:40px;padding:0 11px;font-size:13px;border-radius:10px}
#settings .notification-log-wrap{margin-top:10px;padding-top:9px}
#settings .notification-log-wrap summary{font-size:12.5px}
#settings .table th,#settings .table td{font-size:12.5px;padding:9px 8px}
#settings .table th{font-weight:600}
#settings .org-user-invite{gap:9px}
#settings .settings-grid{
  display:grid;
  grid-template-columns:minmax(0,2fr) minmax(260px,.75fr);
  gap:12px;
}
#settings .settings-grid .integration{padding:16px;border-radius:14px}
#settings .settings-grid .integration > strong{font-size:15px}
#settings .google-calendar-integration{grid-column:auto}
#settings .integration p{margin:5px 0 8px}
#settings .calendar-import-panel{margin-top:10px;padding-top:10px}
#settings .calendar-import-controls{gap:8px}
#settings .calendar-review-wrap{margin-top:10px}

@media(max-width:1180px){
  #settings.page.active{grid-template-columns:1fr;gap:10px}
  #settings > .headline,
  #settings > .client-plan-card,
  #settings > .business-settings-card,
  #settings > .service-settings-card,
  #settings > .booking-settings-card,
  #settings > #organizationUsersCard,
  #settings > .system-access-card,
  #settings > .confirmation-settings-card,
  #settings > .last-minute-settings-card,
  #settings > .reminder-settings-card,
  #settings > .security-settings-card,
  #settings > .settings-grid{grid-column:1}
  #settings .settings-grid{grid-template-columns:1fr}
}
@media(max-width:760px){
  #settings .headline h1{font-size:24px}
  #settings .section{padding:14px}
  #settings .section-head{align-items:flex-start}
  #settings .client-billing-month{width:100%;min-width:0}
  #settings .service-add-grid,
  #settings .service-manage-row{grid-template-columns:1fr 1fr}
  #settings .service-add-grid .form-field:first-child,
  #settings .service-manage-row .form-field:first-child{grid-column:1/-1}
}
@media(max-width:540px){
  #settings .service-add-grid,
  #settings .service-manage-row{grid-template-columns:1fr}
  #settings .service-add-grid .form-field:first-child,
  #settings .service-manage-row .form-field:first-child{grid-column:auto}
  #settings .booking-link-row{grid-template-columns:1fr 1fr}
  #settings .booking-link-row input{grid-column:1/-1}
  #settings .reminder-offset-row{grid-template-columns:1fr 1fr auto}
}



/* Service duration + deletion controls */
#settings .duration-free-input{
  width:180px;
  max-width:100%;
}
#settings .duration-free-input input{
  font-family:var(--ui-font);
  font-size:13px;
  font-weight:600;
  color:var(--ui-text);
}
#settings .duration-field-help{
  margin-top:5px;
  font-size:10.5px;
  line-height:1.35;
}
#settings .service-manage-row{
  grid-template-columns:minmax(260px,1.7fr) 105px 125px 92px max-content;
}
#settings .service-row-actions{
  display:flex;
  align-items:center;
  gap:6px;
  min-height:39px;
}
#settings .service-row-actions .btn{
  min-height:39px;
  height:39px;
  padding:0 11px;
  font-size:11.5px;
  white-space:nowrap;
}
#settings .service-delete-btn{
  background:#fff;
  border-color:#efd7d7;
  color:#ba5555;
}
#settings .service-delete-btn:hover{
  background:#fff4f4;
  border-color:#e9bebe;
}
#settings .service-delete-btn.confirming{
  background:#c95757;
  border-color:#c95757;
  color:#fff;
}
#settings input[type="number"]{
  font-family:var(--ui-font);
  font-variant-numeric:tabular-nums;
}
@media(max-width:900px){
  #settings .service-row-actions{justify-content:flex-end}
}
@media(max-width:540px){
  #settings .service-row-actions{width:100%;justify-content:stretch}
  #settings .service-row-actions .btn{flex:1}
  #settings .duration-free-input{width:100%}
}


/* Settings UX refinement — 2026-09-27 */
#settings .org-default-duration{max-width:360px}
#settings .work-hours-grid{
  display:grid;
  grid-template-columns:minmax(220px,360px) minmax(220px,360px);
  gap:12px;
  align-items:end;
  max-width:732px;
}
#settings .work-hours-grid > .form-field{min-width:0}

#settings .confirmation-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
  justify-content:stretch;
  gap:10px;
}
#settings .last-minute-config-grid{
  grid-template-columns:repeat(2,minmax(0,280px));
  justify-content:start;
  gap:10px 14px;
}
#settings .confirmation-grid > .form-field,
#settings .last-minute-config-grid > .form-field{
  padding:9px 10px 10px;
  border:1px solid #e3ebf3;
  border-radius:11px;
  background:#f9fbfd;
}
#settings .confirmation-grid > .form-field > label,
#settings .last-minute-config-grid > .form-field > label{
  min-height:20px;
  display:flex;
  align-items:center;
  gap:7px;
  margin:0;
}
#settings .confirmation-grid > .form-field > label input[type="checkbox"]{
  margin:0;
}
#settings .confirmation-grid .unit-input,
#settings .last-minute-config-grid .unit-input{
  width:100%;
  margin-top:4px;
}
#settings .confirmation-settings-card .section-head .booking-toggle{
  padding:6px 9px;
  border:1px solid #dbe6f1;
  border-radius:9px;
  background:#f8fbff;
}
#settings .safety-row{
  width:fit-content;
  max-width:100%;
  padding:8px 10px;
  border:1px solid #e3ebf3;
  border-radius:10px;
  background:#fbfdff;
}
#settings #saveConfirmationBtn,
#settings #saveLastMinuteSettingsBtn{
  margin-top:13px;
}
#settings .confirmation-settings-card .message-preview,
#settings .last-minute-settings-card .message-preview{
  margin-top:12px;
}

#settings .reminder-offset-editor{
  width:max-content;
  max-width:100%;
}
#settings .reminder-offset-row{
  grid-template-columns:110px 150px max-content;
  width:max-content;
  max-width:100%;
  gap:8px;
}
#settings .reminder-offset-remove{
  width:auto!important;
  min-width:78px;
  min-height:40px;
  padding:8px 12px!important;
  justify-self:start;
  background:#fff5f5;
  border:1px solid #ffd9d9;
  color:#c64f4f;
  box-shadow:none;
}
#settings .reminder-offset-remove:hover{background:#ffecec}
#settings .reminder-settings-card .toolbar{margin-top:9px!important}
#settings .reminder-settings-card .reminder-offset-help{margin-top:8px}
#settings .reminder-settings-card .message-preview{margin-top:12px}
#settings #saveRemindersBtn{margin-top:13px!important}

#settings .settings-grid{grid-template-columns:1fr}
#settings .google-calendar-integration{width:100%}
#settings .security-settings-card .form-grid{grid-template-columns:minmax(220px,320px)}
#settings .security-settings-card #changePasswordBtn{margin-top:12px!important}

@media(max-width:760px){
  #settings .work-hours-grid{grid-template-columns:1fr 1fr;max-width:none}
  #settings .confirmation-grid,
  #settings .last-minute-config-grid{grid-template-columns:1fr!important}
  #settings .confirmation-grid > .form-field,
  #settings .last-minute-config-grid > .form-field{max-width:none}
}
@media(max-width:520px){
  #settings .work-hours-grid{grid-template-columns:1fr}
  #settings .reminder-offset-editor,
  #settings .reminder-offset-row{width:100%}
  #settings .reminder-offset-row{grid-template-columns:1fr 1fr}
  #settings .reminder-offset-remove{grid-column:1/-1}
}


.setup-field-label{display:block;font-size:12px;font-weight:600;color:#425a70;text-align:left;margin-top:2px}
.setup-duration-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;border:1px solid var(--line);border-radius:11px;background:#fff;overflow:hidden}
.setup-duration-row input{border:0!important;border-radius:0!important;min-width:0}
.setup-duration-row span{padding:0 12px;color:#788a9b;font-size:12px}
.setup-duration-help{text-align:left;font-size:10.5px;margin-top:-4px}
.calendar-interval-info{margin-top:12px;padding:10px 12px;border:1px solid #dfe9f2;border-radius:11px;background:#f7fbff;color:#526a80;font-size:11.5px;line-height:1.45}
.calendar-interval-info strong{color:#245f96}


/* Working days selector */
#settings .working-days-field{gap:7px}
#settings .working-days-selector{display:flex;gap:7px;flex-wrap:wrap}
#settings .working-day-chip{position:relative;cursor:pointer}
#settings .working-day-chip input{position:absolute;opacity:0;pointer-events:none}
#settings .working-day-chip span{
  display:inline-flex;align-items:center;justify-content:center;min-width:52px;height:38px;padding:0 12px;
  border:1px solid #dbe5ef;border-radius:10px;background:#fff;color:#5b7187;
  font:600 12.5px Inter,system-ui,sans-serif;transition:all .15s ease
}
#settings .working-day-chip:hover span{border-color:#b7d2ee;background:#f8fbff}
#settings .working-day-chip input:checked + span{border-color:#8fc0f7;background:#eaf4ff;color:#246db2;box-shadow:0 0 0 2px rgba(79,156,249,.06)}
#settings .working-day-chip input:disabled + span{opacity:.55;cursor:not-allowed}
#settings .working-days-help{margin-top:1px}
#calendar .cal-closed-day{background:#f7f9fb!important;color:#9aa8b5}
#calendar .cal-head.cal-closed-day{font-weight:600}


/* Per-day working hours */
#settings .custom-hours-field{margin-top:2px;gap:7px}
#settings .custom-hours-toggle{display:flex;align-items:center;gap:8px;width:max-content;max-width:100%;font-size:13px!important;color:#334f69!important;cursor:pointer}
#settings .custom-hours-toggle input[type="checkbox"]{
  margin:0!important;
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  min-height:18px!important;
  flex:0 0 18px!important;
  border-radius:5px!important;
}
#settings .daily-hours-editor{display:grid;gap:7px;max-width:760px;margin-top:3px}
#settings .daily-hours-row{
  display:grid;grid-template-columns:88px minmax(150px,220px) minmax(150px,220px);gap:9px;align-items:end;
  padding:9px 10px;border:1px solid #e2ebf4;border-radius:11px;background:#f9fbfd
}
#settings .daily-hours-day{align-self:center;font-size:13px;font-weight:700;color:#35516c}
#settings .daily-hours-row .form-field label{font-size:11px}
#calendar .cal-outside-hours{background:#fbfcfd!important;color:#a8b3be}
@media(max-width:620px){
  #settings .daily-hours-row{grid-template-columns:72px 1fr 1fr}
}
@media(max-width:480px){
  #settings .daily-hours-row{grid-template-columns:1fr 1fr}
  #settings .daily-hours-day{grid-column:1/-1}
}


/* ==========================================================================
   CANONICAL UI SYSTEM V1 — 2026-09-27
   Source of truth for visual styling from this point forward.
   Do not append ad-hoc overrides below this section. Change the canonical
   selector here and remove/retire the obsolete legacy rule when touched.
   ========================================================================== */

:root{
  --ui-font:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --ui-bg:#f5f9fd;
  --ui-surface:#ffffff;
  --ui-surface-soft:#f8fbfe;
  --ui-line:#dfe8f1;
  --ui-line-strong:#cbd9e6;
  --ui-text:#1b344d;
  --ui-text-2:#52687d;
  --ui-muted:#7b8c9e;
  --ui-primary:#2f80ed;
  --ui-primary-hover:#2473db;
  --ui-primary-soft:#eaf4ff;
  --ui-success:#25965f;
  --ui-success-soft:#edf8f2;
  --ui-warning:#b98316;
  --ui-warning-soft:#fff7df;
  --ui-danger:#c95656;
  --ui-danger-soft:#fff1f1;
  --ui-radius-sm:9px;
  --ui-radius-md:12px;
  --ui-radius-lg:15px;
  --ui-shadow:0 6px 22px rgba(34,67,102,.055);
  --ui-control-h:42px;
  --ui-fs-xs:10.5px;
  --ui-fs-sm:12px;
  --ui-fs-base:13px;
  --ui-fs-md:14px;
  --ui-fs-lg:16px;
  --ui-fs-xl:26px;
  --ui-space-1:6px;
  --ui-space-2:10px;
  --ui-space-3:14px;
  --ui-space-4:18px;
  --ui-space-5:24px;
}

html{font-family:var(--ui-font)}
body{
  font-family:var(--ui-font);
  font-size:var(--ui-fs-base);
  color:var(--ui-text);
  background:var(--ui-bg);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
button,input,select,textarea{font-family:var(--ui-font)}
body,.app,.main,.page{min-width:0}
.main{padding:22px 24px 34px}
.page{color:var(--ui-text)}
.muted{color:var(--ui-muted);font-size:var(--ui-fs-sm);line-height:1.45}

.headline{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
}
.headline h1{
  margin:0 0 4px;
  font-size:var(--ui-fs-xl);
  line-height:1.16;
  letter-spacing:-.025em;
  font-weight:700;
  color:var(--ui-text);
}
.section-head h2,.detail h2,.integration h2{
  margin:0;
  font-size:var(--ui-fs-lg);
  line-height:1.25;
  letter-spacing:-.012em;
  font-weight:700;
  color:var(--ui-text);
}
.section-head{gap:14px}

.card,.section,.detail,.integration{
  background:var(--ui-surface);
  border:1px solid var(--ui-line);
  border-radius:var(--ui-radius-lg);
  box-shadow:var(--ui-shadow);
}
.section,.detail,.integration{padding:16px}
.cards{gap:12px;margin:14px 0}
.metric{padding:15px}
.metric .value{font-size:24px;line-height:1.1;letter-spacing:-.025em}
.metric .label,.metric small{font-size:var(--ui-fs-xs);color:var(--ui-muted)}

.btn{
  min-height:var(--ui-control-h);
  padding:0 14px;
  border-radius:var(--ui-radius-sm);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  border:1px solid transparent;
  font-size:var(--ui-fs-base);
  font-weight:600;
  line-height:1;
  box-shadow:none;
  transition:background-color .14s,border-color .14s,color .14s,box-shadow .14s,transform .14s;
}
.btn:hover{transform:none}
.btn-primary{
  background:var(--ui-primary);
  border-color:var(--ui-primary);
  color:#fff;
  box-shadow:0 5px 14px rgba(47,128,237,.16);
}
.btn-primary:hover{background:var(--ui-primary-hover);border-color:var(--ui-primary-hover)}
.btn-soft{
  background:var(--ui-primary-soft);
  border-color:#d8eafb;
  color:#286eaf;
}
.btn-danger{background:var(--ui-danger-soft);border-color:#f2cece;color:var(--ui-danger)}
.btn-ghost-danger{color:var(--ui-danger)}

.form-field{gap:5px}
.form-field label{
  color:var(--ui-text-2);
  font-size:11.5px;
  font-weight:600;
  line-height:1.35;
}
.form-field input,
.form-field select,
.form-field textarea,
.toolbar input,
.toolbar select,
.search input{
  min-height:var(--ui-control-h);
  border:1px solid var(--ui-line);
  border-radius:var(--ui-radius-sm);
  background:#fff;
  color:var(--ui-text);
  padding:9px 12px;
  font-size:var(--ui-fs-base);
  font-weight:500;
  outline:none;
  box-shadow:none;
}
.form-field textarea{line-height:1.45}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.toolbar input:focus,
.toolbar select:focus,
.search input:focus{
  border-color:#8dbdf0;
  box-shadow:0 0 0 3px rgba(47,128,237,.09);
}
select{color:var(--ui-text-2)}
input::placeholder,textarea::placeholder{color:#9aa8b5}

.table{font-size:var(--ui-fs-base)}
.table th{
  color:var(--ui-muted);
  font-size:10.5px;
  font-weight:650;
  letter-spacing:0;
  text-transform:none;
  padding:11px 10px;
}
.table td{padding:12px 10px;color:var(--ui-text-2)}
.table td strong{color:var(--ui-text);font-weight:650}

.sidebar{
  border-right:1px solid var(--ui-line);
  box-shadow:none;
}
.brand{font-size:18px;font-weight:700}
.nav{gap:5px}
.nav button{
  min-height:42px;
  padding:0 12px;
  border-radius:10px;
  font-size:13px;
  font-weight:500;
  color:#5f7489;
}
.nav button.active{
  background:var(--ui-primary-soft);
  color:var(--ui-primary);
  font-weight:650;
}
.sidebar-sync{font-size:11px}

.modal-backdrop{background:rgba(23,43,64,.30);backdrop-filter:blur(2px)}
.modal{
  border:1px solid rgba(214,225,236,.9);
  border-radius:17px;
  box-shadow:0 26px 70px rgba(20,48,77,.22);
}
.modal .section-head h2{font-size:18px}
.modal-actions{gap:8px}
.modal-actions .btn{min-height:40px}


/* Shared status / compact controls */
.chip,.status-select,.admin-status,.client-readonly-badge{
  font-family:var(--ui-font);
}
.chip{
  font-size:10.5px;
  font-weight:700;
  padding:5px 8px;
  border-radius:999px;
}
.status-select{
  min-height:38px;
  border:1px solid var(--ui-line);
  border-radius:9px;
  background:#fff;
  color:var(--ui-text-2);
  font-size:12px;
  font-weight:600;
  padding:0 34px 0 10px;
}
.toolbar{gap:9px}
.toolbar input,.toolbar select{height:42px}

/* Keep platform-admin context readable; old calendar rules made this too small. */
body.calendar-mode .admin-tenant-banner{
  padding:10px 12px;
  font-size:12px;
  line-height:1.4;
  border-radius:11px;
}
body.calendar-mode .admin-mode-badge{
  min-height:27px;
  padding:0 8px;
  font-size:10px;
}
body.calendar-mode .admin-mode-title{font-size:12.5px}
body.calendar-mode .admin-mode-note{font-size:11px}
body.calendar-mode .admin-tenant-banner .btn{
  min-height:38px;
  padding:0 12px;
  font-size:12px;
}

/* Dashboard */
#dashboard .headline h1,#clients .headline h1,#appointments .headline h1,#settings .headline h1,#billing .headline h1{
  font-size:26px;
}
#dashboard .overview-controlbar select{height:42px;min-height:42px;font-size:13px}
#dashboard .overview-table-card{padding:16px}
#dashboard .overview-table th{font-size:10.5px}
#dashboard .overview-table td{font-size:13px}

/* Settings */
#settings .settings-grid{gap:12px}
#settings .section{padding:16px}
#settings .message-preview{padding:12px 13px;border-radius:11px;background:var(--ui-surface-soft)}
#settings .message-preview strong{font-size:12px}
#settings .message-preview p{font-size:11.5px;line-height:1.45}
#settings .preset-row button{min-height:36px;padding:0 11px;font-size:11.5px;border-radius:9px}
#settings .preset-row button.active{background:var(--ui-primary-soft);border-color:#a9cff6;color:var(--ui-primary)}
#settings .service-manage-row,#settings .service-add-grid{border-radius:11px}
#settings .calendar-interval-info{font-size:11.5px}

/* Client detail */
.client-detail-modal .modal{width:min(760px,calc(100vw - 28px))}
.client-detail-head h2{font-size:19px}
.client-detail-contact{font-size:11.5px}
.client-detail-stat-label{font-size:10px}
.client-detail-stat-value{font-size:20px}
.client-detail-timeline .timeline-item strong{font-size:12px}
.client-detail-timeline .timeline-item{font-size:11.5px}


/* Client detail UX — tabbed, focused and independently scrollable */
.client-detail-modal .modal{
  width:min(820px,calc(100vw - 32px));
  height:min(760px,calc(100vh - 64px));
  max-height:calc(100vh - 64px);
  padding:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
#clientDetailContent{
  height:100%;
  min-height:0;
  display:flex;
  flex-direction:column;
}
.client-detail-head{
  flex:0 0 auto;
  min-height:74px;
  padding:16px 20px;
  border-bottom:1px solid var(--ui-line);
  background:#fff;
}
.client-detail-identity h2{
  margin:0 0 4px;
  font-size:20px;
  line-height:1.15;
  letter-spacing:-.02em;
}
.client-detail-contact{
  display:flex;
  flex-wrap:wrap;
  gap:7px 12px;
  color:var(--ui-muted);
  font-size:11.5px;
}
.client-detail-close{
  width:38px;
  min-width:38px;
  height:38px;
  min-height:38px;
  padding:0;
  border:0;
  background:#f3f7fa;
  color:#6e8193;
}
.client-detail-close:hover{background:#eaf1f7}

.client-detail-tabs{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:5px;
  padding:8px 20px 0;
  border-bottom:1px solid var(--ui-line);
  background:#fff;
}
.client-detail-tabs button{
  position:relative;
  min-height:42px;
  padding:0 12px 9px;
  border:0;
  background:transparent;
  color:#74879a;
  font:600 12.5px var(--ui-font);
  cursor:pointer;
}
.client-detail-tabs button::after{
  content:"";
  position:absolute;
  left:8px;right:8px;bottom:-1px;
  height:2px;
  border-radius:2px;
  background:transparent;
}
.client-detail-tabs button:hover{color:#3e617f}
.client-detail-tabs button.active{color:var(--ui-primary)}
.client-detail-tabs button.active::after{background:var(--ui-primary)}
.tab-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:20px;
  height:20px;
  margin-left:5px;
  padding:0 6px;
  border-radius:999px;
  background:#eef3f7;
  color:#6f8192;
  font-size:9.5px;
  font-weight:700;
}
.client-detail-tabs button.active .tab-count{background:var(--ui-primary-soft);color:var(--ui-primary)}
.tab-dot{
  display:inline-block;
  width:6px;height:6px;
  margin-left:6px;
  border-radius:50%;
  background:var(--ui-success);
  vertical-align:middle;
}

.client-detail-tab-viewport{
  flex:1 1 auto;
  min-height:0;
  position:relative;
  background:#fff;
}
.client-detail-panel{
  display:none;
  height:100%;
  min-height:0;
  overflow:auto;
  padding:18px 20px 22px;
  scrollbar-width:thin;
  scrollbar-color:#c7d4df transparent;
}
.client-detail-panel.active{display:block}

.client-overview-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.client-overview-stat{
  min-height:74px;
  padding:13px 14px;
  border:1px solid var(--ui-line);
  border-radius:12px;
  background:var(--ui-surface-soft);
}
.client-overview-stat.wide{grid-column:1/-1}
.client-overview-stat small{
  display:block;
  margin-bottom:5px;
  color:var(--ui-muted);
  font-size:10.5px;
  font-weight:600;
}
.client-overview-stat strong{
  display:block;
  color:var(--ui-text);
  font-size:18px;
  line-height:1.2;
  font-weight:700;
}
.client-overview-stat.wide strong{font-size:14px;font-weight:650}
.client-overview-section{
  margin-top:14px;
  padding:14px;
  border:1px solid var(--ui-line);
  border-radius:13px;
  background:#fff;
}
.client-overview-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.client-overview-section-head>div{display:grid;gap:3px}
.client-overview-section-head strong{font-size:13px;color:var(--ui-text)}
.client-overview-section-head span{font-size:11px;color:var(--ui-muted)}
.client-overview-section-head .btn{min-height:34px;height:34px;font-size:11.5px}
.client-overview-lm{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px 14px;
  margin-top:12px;
  color:#64788b;
  font-size:11.5px;
}
.client-overview-lm strong{color:#334f68}
.client-state-pill{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  padding:0 8px;
  border-radius:999px;
  font-size:10px;
  font-weight:700;
}
.client-state-pill.on{background:var(--ui-success-soft);color:var(--ui-success)}
.client-state-pill.off{background:#f1f4f6;color:#7f8e9b}

.client-detail-info-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:14px;
}
.client-detail-info{
  min-height:92px;
  padding:13px 14px;
  border:1px solid var(--ui-line);
  border-radius:12px;
  background:#fff;
}
.client-detail-info strong{font-size:11.5px;color:#405970}
.client-detail-info p{margin:7px 0 0;color:#6a7d8e;font-size:11.5px;line-height:1.55}

/* Last-minute tab */
.client-lm-card.client-lm-card-tab{
  margin:0;
  padding:0;
  border:0;
  background:transparent;
}
.client-lm-card-tab .client-lm-head{
  margin:0 0 12px;
  padding-bottom:12px;
  border-bottom:1px solid #edf2f6;
}
.client-lm-card-tab .client-lm-head>div{display:grid;gap:3px}
.client-lm-card-tab .client-lm-head>div>strong{font-size:14px;color:var(--ui-text)}
.client-lm-card-tab .client-lm-head>div>span{font-size:11px;color:var(--ui-muted)}
.client-switch{
  display:inline-flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
  user-select:none;
}
.client-switch>input{position:absolute;opacity:0;pointer-events:none}
.client-switch-track{
  position:relative;
  width:38px;height:22px;
  border-radius:999px;
  background:#d8e1e8;
  transition:.16s ease;
}
.client-switch-track i{
  position:absolute;
  top:3px;left:3px;
  width:16px;height:16px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 3px rgba(29,54,77,.25);
  transition:.16s ease;
}
.client-switch input:checked + .client-switch-track{background:var(--ui-primary)}
.client-switch input:checked + .client-switch-track i{transform:translateX(16px)}
.client-switch b{font-size:11.5px;color:#65798c;font-weight:600}

.client-lm-card-tab .client-lm-stats{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin:0 0 15px;
}
.client-lm-card-tab .client-lm-stat{
  padding:10px 11px;
  border-radius:10px;
  background:var(--ui-surface-soft);
}
.client-lm-card-tab .client-lm-stat small{font-size:9.5px}
.client-lm-card-tab .client-lm-stat strong{font-size:16px}
.client-lm-card-tab .client-lm-stat strong.date{font-size:11.5px;padding-top:3px}
.client-lm-section{margin-top:13px}
.client-lm-label{
  display:flex;
  align-items:center;
  gap:6px;
  color:#4d647a;
  font-size:11.5px;
  font-weight:650;
}
.client-lm-label span{color:#94a2af;font-size:10px;font-weight:500}
.client-lm-card-tab .client-lm-services{gap:7px;margin-top:7px}
.client-choice-pill,.client-day-pill{
  position:relative;
  min-height:36px;
  padding:0 11px;
  border:1px solid #dfe7ee;
  border-radius:9px;
  background:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#607489;
  font-size:11px;
  font-weight:600;
  cursor:pointer;
  transition:.14s ease;
}
.client-choice-pill input,.client-day-pill input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.client-choice-pill:hover,.client-day-pill:hover{border-color:#b8d2e9;background:#f9fcff}
.client-choice-pill:has(input:checked),
.client-day-pill:has(input:checked){
  border-color:#9fc7ee;
  background:var(--ui-primary-soft);
  color:#256fac;
}
.client-day-pill{min-width:48px}
.client-lm-card-tab .client-lm-grid{
  grid-template-columns:1fr 1fr;
  gap:10px 12px;
  margin-top:14px;
}
.client-lm-card-tab .form-field label{font-size:11.5px}
.client-lm-card-tab .crm-control-trigger{height:42px}
.client-lm-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:16px;
  padding-top:14px;
  border-top:1px solid #edf2f6;
}
.client-lm-footer .btn{min-width:156px}
.client-lm-footer .muted{font-size:10.5px}


/* Client waitlist — simple, one-time auto move */
.client-waitlist-card{max-width:100%}
.client-waitlist-head{
  align-items:flex-start!important;
  margin-bottom:10px!important;
}
.client-waitlist-head>div{max-width:620px}
.client-waitlist-switch{flex:0 0 auto;margin-top:1px}
.client-waitlist-switch input:disabled + .client-switch-track{opacity:.45}
.client-waitlist-switch input:disabled ~ b{opacity:.55}
.client-waitlist-explainer{
  display:grid;
  gap:5px;
  margin:0;
  padding:13px 14px;
  border:1px solid #cfe1f2;
  border-radius:12px;
  background:#f3f8fd;
}
.client-waitlist-explainer strong{
  color:#2f6798;
  font-size:12px;
  font-weight:700;
}
.client-waitlist-explainer span{
  color:#647b90;
  font-size:11.5px;
  line-height:1.55;
}
.client-waitlist-explainer.warning{
  border-color:#eadfbd;
  background:#fffaf0;
}
.client-waitlist-explainer.warning strong{color:#8c6d1c}
.client-waitlist-current{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:2px 12px;
  align-items:center;
  margin-top:10px;
  padding:10px 12px;
  border:1px solid #e0e9f1;
  border-radius:11px;
  background:#fff;
}
.client-waitlist-current span{
  grid-row:1/3;
  align-self:center;
  color:#7d8fa0;
  font-size:10px;
  font-weight:650;
  text-transform:uppercase;
  letter-spacing:.035em;
}
.client-waitlist-current strong{
  color:#35536d;
  font-size:12px;
}
.client-waitlist-current small{
  color:#8292a1;
  font-size:10.5px;
}
.client-waitlist-config{
  display:grid;
  gap:12px;
  margin-top:12px;
}
.client-waitlist-config.hidden{display:none!important}
.client-waitlist-section{
  padding:13px 14px;
  border:1px solid #e0e8f0;
  border-radius:12px;
  background:#fff;
}
.client-waitlist-section-title{
  display:grid;
  gap:3px;
  margin-bottom:10px;
}
.client-waitlist-section-title strong{
  color:#344f68;
  font-size:12.5px;
}
.client-waitlist-section-title span{
  color:#8393a2;
  font-size:10.5px;
  line-height:1.4;
}
.client-waitlist-time-grid{margin-top:11px!important}
.client-waitlist-result-note{
  display:flex;
  align-items:flex-start;
  gap:8px;
  padding:10px 12px;
  border:1px solid #d7e9df;
  border-radius:11px;
  background:#f4fbf7;
}
.client-waitlist-result-note strong{
  flex:0 0 auto;
  color:#287652;
  font-size:10.5px;
}
.client-waitlist-result-note span{
  color:#557364;
  font-size:10.5px;
  line-height:1.45;
}
.client-waitlist-enable-hint{
  margin-top:10px;
  padding:10px 12px;
  border-radius:10px;
  background:#f8fafc;
  color:#80909f;
  font-size:10.5px;
  text-align:center;
}
.client-waitlist-card .client-day-pill{
  min-width:50px;
  min-height:36px;
  border-radius:10px;
}
.client-waitlist-card .client-lm-footer{
  margin-top:0;
}
.client-waitlist-card .crm-select-popover{
  z-index:120;
  max-height:220px;
}
.client-waitlist-card .crm-control-value{
  font-size:12.5px;
  font-weight:550;
}

/* Client-history dropdown uses the same neutral CRM dropdown treatment. */
.client-history-toolbar .client-range-select{position:relative;z-index:30}
.client-history-toolbar .client-range-menu{
  right:0;
  left:auto;
  top:calc(100% + 6px);
  min-width:170px;
  width:100%;
  max-height:230px;
  overflow:auto;
  padding:5px;
  border:1px solid #d8e4ee;
  border-radius:11px;
  background:#fff;
  box-shadow:0 14px 34px rgba(30,61,91,.16);
}
.client-history-toolbar .client-range-option{
  min-height:36px;
  padding:0 10px;
  display:flex;
  align-items:center;
  border-radius:8px;
  color:#526a80;
  font-size:11.5px;
  font-weight:550;
}
.client-history-toolbar .client-range-option:hover{background:#f1f6fb}
.client-history-toolbar .client-range-option.active{
  background:var(--ui-primary-soft);
  color:var(--ui-primary);
  font-weight:700;
}
.client-history-toolbar .client-range-trigger svg{
  width:15px;
  height:15px;
  stroke:#7d90a2;
  stroke-width:1.8;
}

@media(max-width:760px){
  .client-waitlist-head{
    align-items:flex-start!important;
    gap:10px!important;
  }
  .client-waitlist-head>div{min-width:0}
  .client-waitlist-current{grid-template-columns:1fr}
  .client-waitlist-current span{grid-row:auto}
  .client-waitlist-result-note{display:grid;gap:4px}
  .client-history-toolbar .client-range-menu{
    position:absolute!important;
    left:auto!important;
    right:0!important;
    top:calc(100% + 6px)!important;
    bottom:auto!important;
    width:180px!important;
    min-width:180px!important;
  }
}


/* History tab gets the whole body height */
.client-history-panel{
  overflow:hidden;
  padding:0!important;
}
.client-history-toolbar{
  position:sticky;
  top:0;
  z-index:5;
  min-height:68px;
  padding:14px 20px 11px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-bottom:1px solid var(--ui-line);
  background:#fff;
}
.client-history-toolbar>div:first-child{display:grid;gap:2px}
.client-history-toolbar h3{
  margin:0;
  color:var(--ui-text);
  font-size:14px;
  line-height:1.2;
}
.client-history-toolbar>div:first-child span{font-size:10.5px;color:var(--ui-muted)}
.client-history-list{
  height:calc(100% - 68px);
  overflow:auto;
  padding:10px 20px 20px;
  scrollbar-width:thin;
}
.client-history-item{
  width:100%;
  min-height:64px;
  padding:10px 12px;
  border:1px solid var(--ui-line);
  border-radius:11px;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  text-align:left;
  cursor:pointer;
  transition:.14s ease;
}
.client-history-item + .client-history-item{margin-top:7px}
.client-history-item:hover{
  border-color:#bdd6eb;
  background:#f9fcff;
}
.client-history-date{display:grid;gap:3px;min-width:0}
.client-history-date strong{font-size:12px;color:#354f67}
.client-history-date span{font-size:10.5px;color:var(--ui-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.client-history-meta{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:9px;
  color:#738698;
  font-size:10.5px;
}
.client-empty-state{
  min-height:180px;
  display:grid;
  place-content:center;
  text-align:center;
  gap:5px;
  color:var(--ui-muted);
}
.client-empty-state strong{font-size:13px;color:#5c7185}
.client-empty-state span{font-size:11px}

/* Client history range dropdown */
.client-history-toolbar .client-range-select{min-width:150px}
.client-history-toolbar .client-range-trigger{
  min-height:38px;
  height:38px;
  border-radius:9px;
  font-size:11.5px;
}

@media(max-width:760px){
  .client-detail-modal .modal{
    width:calc(100vw - 16px);
    height:calc(100vh - 20px);
    max-height:calc(100vh - 20px);
    border-radius:16px;
  }
  .client-detail-head{padding:14px}
  .client-detail-tabs{padding:7px 10px 0;overflow:auto}
  .client-detail-tabs button{white-space:nowrap}
  .client-detail-panel{padding:14px}
  .client-overview-grid,.client-detail-info-grid{grid-template-columns:1fr}
  .client-overview-stat.wide{grid-column:auto}
  .client-lm-card-tab .client-lm-stats{grid-template-columns:1fr 1fr}
  .client-lm-card-tab .client-lm-grid{grid-template-columns:1fr}
  .client-lm-footer{align-items:stretch;flex-direction:column}
  .client-lm-footer .btn{width:100%}
  .client-history-toolbar{padding:12px 14px}
  .client-history-list{padding:9px 14px 16px}
  .client-history-item{align-items:flex-start;flex-direction:column;gap:7px}
  .client-history-meta{width:100%;justify-content:space-between}
}




/* Canonical checkbox standard — applies to every visible CRM checkbox */
input[type="checkbox"]{
  appearance:none;
  -webkit-appearance:none;
  width:18px;
  height:18px;
  min-width:18px;
  min-height:18px;
  margin:0;
  border:1px solid #bdccda;
  border-radius:5px;
  background:#fff;
  background-position:center;
  background-repeat:no-repeat;
  background-size:12px 12px;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.35);
  cursor:pointer;
  transition:background-color .12s,border-color .12s,box-shadow .12s;
  vertical-align:middle;
}
input[type="checkbox"]:hover:not(:disabled){border-color:#8fb9e3}
input[type="checkbox"]:focus-visible{
  outline:none;
  border-color:var(--ui-primary);
  box-shadow:0 0 0 3px rgba(var(--theme-rgb),.12);
}
input[type="checkbox"]:checked{
  border-color:var(--ui-primary);
  background-color:var(--ui-primary);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.2 8.2 6.5 11.3 12.9 4.9' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
input[type="checkbox"]:disabled{cursor:not-allowed;opacity:.48}
.client-switch>input,
.working-day-chip input,
.client-choice-pill input,
.client-day-pill input,
.appointment-toggle input{
  position:absolute!important;
  opacity:0!important;
  pointer-events:none!important;
}

/* Staff-avatar removal */
#settings .staff-avatar-remove-btn{
  min-height:38px;
  border-color:#eed7d7;
  background:#fff;
  color:#b95555;
  white-space:nowrap;
}
#settings .staff-avatar-remove-btn:hover{background:#fff4f4;border-color:#e6bcbc}
#settings .staff-avatar-remove-btn.confirming{
  background:#c95757;
  border-color:#c95757;
  color:#fff;
}



/* Team settings — full-width staff, access card pairs with business settings */
#settings > #organizationUsersCard{
  grid-column:1/-1!important;
  width:100%;
}
#settings .organization-team-card{
  display:block;
}
#settings .organization-team-card>.section-head{margin-bottom:10px!important}
#settings .organization-team-card>.team-group{
  min-width:0;
  margin-top:0!important;
}
#settings .team-staff-group{width:100%}
#settings .system-access-card{
  min-width:0;
}
#settings .system-access-card .team-access-group{
  min-width:0;
  height:100%;
}
#settings .calendar-staff-card{
  grid-template-columns:58px minmax(260px,1fr) auto!important;
  align-items:center;
}
#settings .calendar-staff-avatar-wrap{
  position:relative;
  width:54px;
  height:54px;
}
#settings .calendar-staff-avatar-wrap .calendar-staff-avatar{
  width:54px;
  height:54px;
}
#settings .calendar-staff-avatar-remove{
  position:absolute;
  top:-5px;
  right:-5px;
  z-index:3;
  width:21px;
  height:21px;
  min-width:21px;
  min-height:21px;
  padding:0;
  border:2px solid #fff;
  border-radius:50%;
  background:#fff;
  color:#c15151;
  box-shadow:0 2px 7px rgba(37,64,89,.18);
  display:grid;
  place-items:center;
  font:700 14px/1 var(--ui-font);
  cursor:pointer;
  transition:background .12s,color .12s,transform .12s;
}
#settings .calendar-staff-avatar-remove:hover{
  background:#fff1f1;
  color:#a83e3e;
  transform:scale(1.06);
}
#settings .calendar-staff-avatar-remove.confirming{
  background:#c95757;
  color:#fff;
}
#settings .calendar-staff-avatar-remove:disabled{opacity:.65;cursor:wait}
#settings .calendar-staff-main input{width:100%!important}
#settings .calendar-staff-actions{
  justify-content:flex-end;
  max-width:100%;
}
#settings .calendar-staff-add{
  grid-template-columns:minmax(300px,1fr) minmax(130px,180px)!important;
}
#settings .system-access-card .org-user-invite{
  grid-template-columns:1fr 1fr!important;
  gap:9px;
}
#settings .system-access-card .invite-user-action{
  grid-column:1/-1;
  min-width:0!important;
}
#settings .system-access-card .invite-user-action .btn{width:100%}

@media(max-width:1220px){
  #settings .system-access-card .org-user-invite{grid-template-columns:1fr 1fr!important}
}
@media(max-width:820px){
  #settings .calendar-staff-card{
    grid-template-columns:54px minmax(0,1fr)!important;
  }
  #settings .calendar-staff-actions{
    grid-column:1/-1;
    justify-content:flex-start;
  }
  #settings .calendar-staff-actions .btn{min-width:0!important}
  #settings .calendar-staff-add{grid-template-columns:1fr!important}
  #settings .system-access-card .org-user-invite{grid-template-columns:1fr!important}
  #settings .system-access-card .invite-user-action{grid-column:auto}
}

#settings .system-access-card,
#settings .business-settings-card{
  height:100%;
}
#settings .system-access-card{
  display:block;
}
#settings .system-access-card .team-members-heading{margin-bottom:10px}

/* Trial access */
.trial-status-banner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 12px;
  padding:10px 13px;
  border:1px solid #cfe2f5;
  border-radius:12px;
  background:#f2f8ff;
  color:#46627d;
}
.trial-status-banner>div{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.trial-status-banner strong{
  color:#246db2;
  font-size:11.5px;
  font-weight:750;
}
.trial-status-banner span{
  font-size:11px;
  line-height:1.35;
}
.admin-status.trial{background:#fff4d8;color:#927019}
.admin-status.trial-expired{background:#fff0f0;color:#b24e4e}
.admin-trial-btn{border-color:#d7e7f6}
.admin-activate-btn{border-color:#cfe5d9;color:#2b8058;background:#f4fbf7}

.trial-create-toggle{
  display:flex!important;
  align-items:flex-start!important;
  gap:9px!important;
  min-height:58px;
  padding:10px 11px;
  border:1px solid #dce7f0;
  border-radius:11px;
  background:#f8fbff;
  cursor:pointer;
}
.trial-create-toggle>input{margin-top:2px!important}
.trial-create-toggle>span{display:grid;gap:2px}
.trial-create-toggle strong{font-size:12px;color:#35536e}
.trial-create-toggle small{font-size:10.5px;line-height:1.4;color:#7b8e9f;font-weight:500}

.trial-expired-gate{
  position:fixed;
  inset:0;
  z-index:10000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:linear-gradient(180deg,#f1f6fb,#eaf2f9);
}
.trial-expired-card{
  width:min(470px,calc(100vw - 28px));
  padding:28px;
  border:1px solid #dce6ef;
  border-radius:20px;
  background:#fff;
  box-shadow:0 24px 70px rgba(32,61,88,.16);
  text-align:center;
}
.trial-expired-card .brand{justify-content:center;margin-bottom:18px}
.trial-expired-icon{
  width:52px;height:52px;
  margin:0 auto 14px;
  display:grid;place-items:center;
  border-radius:15px;
  background:var(--ui-primary-soft);
  color:var(--ui-primary);
  font:800 20px var(--ui-font);
}
.trial-expired-card h1{
  margin:0 0 9px;
  color:var(--ui-text);
  font-size:24px;
  letter-spacing:-.025em;
}
.trial-expired-card p{
  margin:0 auto 18px;
  max-width:380px;
  color:var(--ui-muted);
  font-size:13px;
  line-height:1.55;
}
.trial-expired-card .btn{min-width:140px}

@media(max-width:620px){
  .trial-status-banner{margin:0 8px 9px;padding:9px 10px}
  .trial-status-banner>div{display:grid;gap:2px}
  .trial-expired-card{padding:22px 18px}
}


/* Staff availability — recurring weekly schedule with optional split shifts */
.staff-availability-btn{white-space:nowrap}
.availability-dialog{
  width:min(860px,calc(100vw - 30px));
  max-height:min(820px,calc(100vh - 40px));
  padding:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.availability-head{
  flex:0 0 auto;
  margin:0!important;
  padding:16px 18px 13px;
  border-bottom:1px solid var(--ui-line);
  background:#fff;
}
.availability-head h2{font-size:19px!important;margin:0 0 4px!important}
.availability-body{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  padding:15px 18px 18px;
  background:#fff;
}
.availability-mode-card{
  min-height:72px;
  padding:12px 13px;
  border:1px solid var(--ui-line);
  border-radius:12px;
  background:var(--ui-surface-soft);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.availability-mode-card>div{display:grid;gap:3px;min-width:0}
.availability-mode-card>div strong{font-size:13px;color:var(--ui-text)}
.availability-mode-card>div span{font-size:11px;line-height:1.4;color:var(--ui-muted)}
.availability-editor-wrap{margin-top:12px;transition:opacity .15s}
.availability-editor-wrap.disabled{opacity:.52}
.availability-help{
  display:flex;
  align-items:flex-start;
  gap:7px;
  margin-bottom:10px;
  padding:9px 10px;
  border:1px solid #dce9f5;
  border-radius:10px;
  background:#f7fbff;
  font-size:11px;
  line-height:1.4;
  color:#667d92;
}
.availability-help strong{color:#315c84;white-space:nowrap}
.availability-week{display:grid;gap:7px}
.availability-day-row{
  display:grid;
  grid-template-columns:150px minmax(0,1fr);
  align-items:start;
  gap:12px;
  padding:10px 11px;
  border:1px solid #e1e9f0;
  border-radius:11px;
  background:#fff;
}
.availability-day-row.enabled{border-color:#c9dff3;background:#fbfdff}
.availability-day-row.closed{background:#f7f8fa;color:#99a5af}
.availability-day-toggle{
  min-height:38px;
  display:flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
}
.availability-day-toggle input{
  width:17px;
  height:17px;
  margin:0;
  accent-color:var(--ui-primary);
}
.availability-day-toggle strong{font-size:12px;color:#405a72}
.availability-day-row.closed .availability-day-toggle strong{color:#98a5b0}
.availability-periods{
  min-width:0;
  display:grid;
  gap:6px;
}
.availability-period{
  display:grid;
  grid-template-columns:24px 92px 16px 92px 34px;
  align-items:center;
  gap:6px;
  width:max-content;
  max-width:100%;
}
.availability-period:first-child{grid-template-columns:24px 92px 16px 92px 34px}
.availability-period-label{
  font-size:10px;
  font-weight:700;
  color:#8a9aa9;
  text-align:center;
}
.availability-time-control{position:relative;width:92px}
.availability-time-input{display:none!important}
.availability-time-trigger{
  width:92px;
  min-height:38px;
  height:38px;
  border:1px solid var(--ui-line);
  border-radius:10px;
  background:#fff;
  padding:0 9px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:7px;
  font-family:var(--ui-font);
  font-size:12px;
  font-weight:650;
  font-variant-numeric:tabular-nums;
  color:var(--ui-text);
  outline:none;
  cursor:pointer;
  transition:border-color .12s,box-shadow .12s,background .12s;
}
.availability-time-trigger svg{
  width:15px;height:15px;flex:0 0 15px;
  fill:none;stroke:#8092a3;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;
}
.availability-time-trigger:hover:not(:disabled){border-color:#b8d0e6;background:#fbfdff}
.availability-time-trigger:focus-visible{
  border-color:var(--ui-primary);
  box-shadow:0 0 0 3px rgba(var(--theme-rgb),.09);
}
.availability-time-trigger:disabled{background:#f4f6f8;color:#9aa6b1;cursor:not-allowed}
.availability-time-trigger:disabled svg{opacity:.5}
.availability-time-separator{text-align:center;color:#93a2af;font-size:11px}
.availability-period-remove{
  width:30px;
  height:30px;
  border:0;
  border-radius:8px;
  background:#fff1f1;
  color:#b95757;
  cursor:pointer;
  font:600 11px var(--ui-font);
}
.availability-add-period{
  width:max-content;
  min-height:32px!important;
  height:32px!important;
  padding:0 9px!important;
  font-size:10.5px!important;
  margin-left:24px;
}
.availability-closed-note{
  grid-column:2;
  margin-top:-3px;
  color:#9aa6b0;
  font-size:10px;
}
.availability-actions{
  flex:0 0 auto;
  margin:0!important;
  padding:10px 18px 14px!important;
  border-top:1px solid var(--ui-line);
  background:#fff;
  justify-content:flex-end!important;
}
.availability-actions .btn{min-width:120px}


.availability-time-picker{
  position:fixed;
  z-index:3500;
  display:none;
  padding:10px;
  border:1px solid #d6e2ec;
  border-radius:14px;
  background:#fff;
  box-shadow:0 20px 48px rgba(27,57,87,.22);
  font-family:var(--ui-font);
}
.availability-time-picker.open{display:block}
.availability-time-picker-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:1px 2px 9px;
  border-bottom:1px solid #edf2f6;
}
.availability-time-picker-head strong{
  color:#304b64;
  font-size:12.5px;
  font-weight:700;
}
.availability-time-picker-head button{
  width:30px;height:30px;
  border:0;border-radius:8px;
  background:#f3f7fa;color:#75899b;
  cursor:pointer;
  font:600 12px var(--ui-font);
}
.availability-time-picker-body{
  display:grid;
  grid-template-columns:1.35fr .75fr;
  gap:10px;
  padding-top:9px;
}
.availability-time-picker-body>div>span{
  display:block;
  margin:0 0 6px 2px;
  color:#8392a1;
  font-size:9.5px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.availability-time-options{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:4px;
  max-height:218px;
  overflow:auto;
  padding-right:2px;
  scrollbar-width:thin;
}
.availability-time-options.minute{grid-template-columns:repeat(2,1fr)}
.availability-time-option{
  min-height:32px;
  border:1px solid transparent;
  border-radius:8px;
  background:#f7f9fb;
  color:#4d6378;
  font:600 11.5px var(--ui-font);
  font-variant-numeric:tabular-nums;
  cursor:pointer;
}
.availability-time-option:hover{background:#edf5fd;color:#256da9}
.availability-time-option.selected{
  border-color:#a9cff3;
  background:var(--ui-primary-soft);
  color:var(--ui-primary);
}


@media(max-width:760px){
  .availability-modal{
    padding:0!important;
    align-items:stretch!important;
    justify-content:stretch!important;
  }
  .availability-dialog{
    width:100%!important;
    max-width:none!important;
    height:100dvh!important;
    max-height:100dvh!important;
    margin:0!important;
    border-radius:0!important;
  }
  .availability-head{padding:13px 14px 11px}
  .availability-head h2{font-size:18px!important}
  .availability-body{padding:12px 10px 16px}
  .availability-mode-card{align-items:flex-start;flex-direction:column;gap:10px}
  .availability-day-row{grid-template-columns:1fr;gap:6px;padding:10px}
  .availability-day-toggle{min-height:32px}
  .availability-closed-note{grid-column:auto}
  .availability-period{
    width:100%;
    grid-template-columns:22px minmax(0,1fr) 14px minmax(0,1fr) 30px;
  }
  .availability-period:first-child{grid-template-columns:22px minmax(0,1fr) 14px minmax(0,1fr) 30px}
  .availability-time-control,.availability-time-trigger{width:100%}
  .availability-time-picker{max-width:calc(100vw - 20px)}
  .availability-add-period{margin-left:22px}
  .availability-actions{
    padding:9px 10px calc(9px + env(safe-area-inset-bottom))!important;
  }
  .availability-actions .btn{flex:1;min-width:0}
}


/* Appointment popup */
.appointment-detail-modal .modal{width:min(640px,calc(100vw - 28px))}
.appointment-detail-head h2{font-size:19px}
.appointment-detail-modal .form-grid{gap:11px 12px}
.appointment-detail-modal .form-field input,
.appointment-detail-modal .form-field select,
.appointment-detail-modal .form-field textarea{font-size:13px}
.appointment-actionbar .btn{font-size:12.5px}

/* Platform admin */
.admin-toolbar .admin-search-input,
.admin-toolbar .admin-filter-select{height:42px;font-size:13px;border-radius:10px}
.admin-toolbar .btn{min-height:42px;font-size:13px}
.admin-client-name{font-size:13px}
.admin-status{font-size:10.5px}
.business-preset-head strong{font-size:13px}
.business-preset-meta{font-size:11px}

/* ==========================================================================
   CALENDAR — primary work screen
   ========================================================================== */
#calendar{
  --cal-title:28px;
  --cal-control:13px;
  --cal-meta:12px;
  --cal-grid:12.5px;
  --cal-event:12.5px;
  --calendar-row-height:68px;
}
#calendar .headline{margin-bottom:12px;align-items:center}
#calendar .headline h1{
  font-size:var(--cal-title);
  margin:0 0 3px;
  line-height:1.12;
}
#calendar .headline .muted{font-size:var(--cal-meta)}
#calendar .calendar-toolbar{
  gap:9px;
  margin-bottom:10px!important;
}
#calendar .calendar-toolbar input,
#calendar .calendar-toolbar select,
#calendar .calendar-new-btn{
  min-height:42px;
  height:42px;
  font-size:var(--cal-control);
  border-radius:10px;
}
#calendar .calendar-client-search{min-width:240px}
#calendar .calendar-toolbar .therapist-select{min-width:190px}
#calendar .calendar-new-btn{padding:0 15px}
#calendar .calendar-weekbar{
  margin:0 0 10px;
  min-height:40px;
}
#calendar .calendar-week-controls{gap:7px}
#calendar .calendar-week-picker,
#calendar .week-arrow,
#calendar .current-week-btn{
  height:40px;
  min-height:40px;
  border-radius:10px;
}
#calendar .calendar-week-picker{font-size:12.5px;padding:0 11px}
#calendar .current-week-btn{font-size:12.5px;padding:0 12px}
#calendar .calendar-week-label{font-size:11.5px;font-weight:600}
#calendar .calendar-card{
  padding:11px;
  border-radius:14px;
  border-color:var(--ui-line);
  box-shadow:none;
}
#calendar .calendar-scroll{
  border:1px solid var(--ui-line);
  border-radius:12px;
  background:#fff;
}
#calendar .calendar-grid,
#calendar .calendar-grid.half-hour{
  border:0;
  border-radius:0;
  background:#fff;
  font-family:var(--ui-font);
}
#calendar .calendar-grid.half-hour .cal-cell{
  min-height:var(--calendar-row-height);
  padding:9px 10px;
  font-size:var(--cal-grid);
  line-height:1.3;
  color:#3d556c;
  border-color:#e5edf4;
}
#calendar .calendar-grid.half-hour .cal-head{
  min-height:44px;
  padding:12px 10px;
  background:#f7fafe;
  color:#536b81;
  font-size:12px;
  font-weight:650;
}
#calendar .cal-cell>strong{
  font-size:12px;
  font-weight:650;
  color:#4b6176;
}
#calendar .event{
  margin-top:4px;
  padding:9px 10px;
  border-radius:9px;
  font-size:var(--cal-event);
  line-height:1.28;
  box-shadow:none;
}
#calendar .event:hover{transform:none;box-shadow:0 4px 12px rgba(41,77,112,.10)}
#calendar .event-time{
  font-size:12px;
  font-weight:700;
  line-height:1.2;
}
#calendar .event-client{
  margin-top:3px;
  font-size:13.5px;
  font-weight:700;
  line-height:1.22;
  color:#28445e;
}
#calendar .event-service{
  margin-top:3px;
  font-size:11.5px;
  line-height:1.25;
  color:#687c8f;
}
#calendar .event-status-tag{
  margin-top:6px;
  padding:4px 7px;
  font-size:9.5px;
  font-weight:700;
  line-height:1;
}
#calendar .event-mini-tag{font-size:8.5px;padding:3px 6px}
#calendar .event.event-confirmed{background:#edf8f2;border-left-color:#45a879}
#calendar .event.event-pending{background:#fff7df;border-left-color:#d3a33b}
#calendar .event.event-unconfirmed{background:#fff1f1;border-left-color:#cf6666}
#calendar .released-slot-event{background:#eef6ff!important;border-left-color:#4f91db!important}

@media(min-width:1280px){
  .main{padding:24px 28px 36px}
  #calendar{--cal-title:29px}
  #calendar .calendar-grid{grid-template-columns:74px repeat(7,minmax(150px,1fr))}
  #calendar .calendar-grid.half-hour .cal-cell{padding:10px 11px}
}
@media(min-width:1600px){
  .main{padding-left:32px;padding-right:32px}
  #calendar{--cal-title:30px;--cal-grid:13px;--cal-event:13px}
  #calendar .calendar-grid{grid-template-columns:78px repeat(7,minmax(165px,1fr))}
  #calendar .event-client{font-size:14px}
  #calendar .event-service{font-size:12px}
}

/* Calendar density follows the shortest active service. */
@media(min-width:981px){
  #calendar.calendar-density-compact{--calendar-row-height:58px}
  #calendar.calendar-density-medium{--calendar-row-height:70px}
  #calendar.calendar-density-comfortable{--calendar-row-height:82px}
  #calendar.calendar-density-comfortable .event{padding-top:10px;padding-bottom:10px}
  #calendar.calendar-density-comfortable .event-client{font-size:14px}
}

/* Calendar viewport: only the grid scrolls on desktop */
@media(min-width:981px){
  body.calendar-mode{overflow:hidden}
  body.calendar-mode .main{
    height:100vh;
    overflow:hidden;
    display:flex;
    flex-direction:column;
    padding-bottom:18px;
  }
  body.calendar-mode .admin-tenant-banner{flex:0 0 auto;margin-bottom:12px}
  body.calendar-mode #calendar.page.active{
    display:flex;
    flex:1 1 auto;
    min-height:0;
    flex-direction:column;
  }
  body.calendar-mode #calendar .headline,
  body.calendar-mode #calendar .calendar-toolbar,
  body.calendar-mode #calendar .calendar-weekbar{flex:0 0 auto}
  body.calendar-mode #calendar .calendar-card{
    flex:1 1 auto;
    min-height:0;
    margin-bottom:0;
    overflow:hidden;
  }
  body.calendar-mode #calendar .calendar-scroll{
    height:100%;
    min-height:0;
    overflow:auto;
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
  }
  body.calendar-mode #calendar .cal-head{
    position:sticky;
    top:0;
    z-index:8;
    background:#f7fafe;
    box-shadow:0 1px 0 var(--ui-line);
  }
}

/* Responsive system */
@media(max-width:980px){
  :root{--ui-control-h:44px;--ui-fs-base:13px}
  .main{padding:16px 14px 92px}
  .headline h1{font-size:23px}
  .section,.detail,.integration{padding:14px}
  #calendar{--cal-title:23px;--cal-grid:11px;--cal-event:11px;--calendar-row-height:54px}
  #calendar .calendar-grid,
  #calendar .calendar-grid.half-hour{
    width:max-content;
    min-width:1112px;
    grid-template-columns:62px repeat(7,150px);
  }
  #calendar .calendar-toolbar input,
  #calendar .calendar-toolbar select,
  #calendar .calendar-new-btn{height:44px;min-height:44px;font-size:13px}
  #calendar .calendar-week-picker,
  #calendar .week-arrow,
  #calendar .current-week-btn{height:42px;min-height:42px}
}
@media(max-width:620px){
  .main{padding:8px 8px 76px}
  .mobile-topbar{
    margin:0 0 8px;
    padding:0 2px 7px;
  }
  .mobile-brand{gap:7px;font-size:14px}
  .mobile-brand .brand-mark{
    width:28px;
    height:28px;
    border-radius:9px;
  }
  .mobile-menu-trigger{
    width:36px;
    height:36px;
    border-radius:10px;
  }
  .mobile-menu-trigger svg{width:19px;height:19px}
  .mobile-menu-popover{width:184px}
  .headline{gap:8px;margin-bottom:8px}
  .headline h1{font-size:20px}
  .cards{grid-template-columns:1fr 1fr}
  .section,.detail,.integration{padding:10px}
  .modal{border-radius:18px 18px 0 0}

  #calendar{--calendar-row-height:48px}
  #calendar .calendar-toolbar{
    gap:6px;
    margin-bottom:7px!important;
  }
  #calendar .calendar-toolbar input,
  #calendar .calendar-toolbar select,
  #calendar .calendar-new-btn{
    height:38px;
    min-height:38px;
    font-size:12px;
    border-radius:9px;
  }
  #calendar .calendar-card{
    padding:6px;
    border-radius:12px;
  }
  #calendar .calendar-scroll{border-radius:10px}
  #calendar .calendar-grid,
  #calendar .calendar-grid.half-hour{
    min-width:1010px;
    grid-template-columns:52px repeat(7,137px);
  }
  #calendar .calendar-grid.half-hour .cal-head{
    min-height:36px;
    padding:8px 7px;
    font-size:10.5px;
  }
  #calendar .calendar-grid.half-hour .cal-cell{
    min-height:48px;
    padding:6px 7px;
  }
  #calendar .cal-cell>strong{font-size:10.5px}
  #calendar .event{
    margin-top:3px;
    padding:6px 7px;
    border-radius:8px;
  }
  #calendar .event-time{font-size:10.5px}
  #calendar .event-client{margin-top:2px;font-size:11.5px}
  #calendar .event-service{margin-top:2px;font-size:9.5px}
  #calendar .event-status-tag{margin-top:4px;padding:2px 5px;font-size:8px}

  .mobile-nav{
    left:8px;
    right:8px;
    bottom:calc(6px + env(safe-area-inset-bottom));
    height:62px;
    padding:4px 5px;
    border-radius:16px;
  }
  .mobile-nav button{
    min-height:52px;
    gap:2px;
    padding:4px;
    font-size:10px;
  }
  .mobile-nav-icon{width:23px;height:23px}
  .mobile-nav-icon svg{width:21px;height:21px}
}



/* Mobile settings UX correction — 2026-09-27 */
.sr-only{
  position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;
  overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important
}

/* Confirmation: compact number field + checkbox aligned on the right */
#settings .confirmation-option-field > label{min-height:auto!important}
#settings .confirmation-option-control{
  display:grid;
  grid-template-columns:minmax(0,1fr) 34px;
  align-items:center;
  gap:9px;
  margin-top:4px;
}
#settings .confirmation-option-control .unit-input{margin-top:0!important;min-width:0}
#settings .confirmation-inline-toggle{
  width:34px;height:42px;display:grid!important;place-items:center;
  margin:0!important;padding:0!important;border:1px solid #dbe5ef;border-radius:10px;background:#fff;cursor:pointer
}
#settings .confirmation-inline-toggle input{margin:0!important}
#settings .confirmation-grid > .form-field:first-child .unit-input{max-width:none}

/* Last-minute keeps two compact fields per row on mobile. */
#settings .last-minute-config-grid > .form-field:nth-child(5){grid-column:1/-1;max-width:280px}

/* Billing header must never squeeze copy or overflow the card. */
#settings .client-plan-card .section-head > div:first-child{min-width:0}
#settings .client-plan-head-actions{min-width:0}
#settings .client-plan-card .section-head .muted{max-width:680px}

/* Reminder row always stays value + unit + remove on one line. */
#settings .reminder-offset-row{
  align-items:center;
}
#settings .reminder-offset-remove{
  white-space:nowrap;
}

@media(max-width:760px){
  #settings .confirmation-grid{
    grid-template-columns:1fr!important;
  }
  #settings .confirmation-grid > .form-field{
    padding:9px 10px!important;
  }
  #settings .confirmation-option-control{
    grid-template-columns:minmax(0,190px) 34px;
    justify-content:start;
  }
  #settings .confirmation-grid > .form-field:first-child .unit-input{max-width:190px}

  #settings .last-minute-config-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }
  #settings .last-minute-config-grid > .form-field{
    padding:9px!important;
    min-width:0;
  }
  #settings .last-minute-config-grid > .form-field > label{
    min-height:32px!important;
    align-items:flex-end!important;
    font-size:11.5px!important;
  }
  #settings .last-minute-config-grid .unit-input span{
    padding:0 7px;
    font-size:10.5px;
  }
  #settings .last-minute-config-grid > .form-field:nth-child(5){
    grid-column:1/-1;
    max-width:none;
  }

  #settings .client-plan-card .section-head{
    display:grid!important;
    grid-template-columns:1fr;
    gap:10px!important;
  }
  #settings .client-plan-card .section-head > div:first-child{
    width:100%;
  }
  #settings .client-plan-card .section-head h2{
    margin-bottom:4px!important;
    white-space:normal;
  }
  #settings .client-plan-card .section-head .muted{
    width:100%;
    max-width:none;
    font-size:12px!important;
    line-height:1.45!important;
  }
  #settings .client-plan-head-actions{
    width:100%;
    display:grid;
    grid-template-columns:max-content minmax(0,1fr);
    align-items:center;
    gap:8px;
  }
  #settings .client-billing-month{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }
  #settings .client-readonly-badge{
    min-height:34px;
    padding:0 10px;
  }

  #settings .reminder-offset-editor,
  #settings .reminder-offset-row{
    width:100%!important;
    max-width:100%!important;
  }
  #settings .reminder-offset-row{
    grid-template-columns:64px minmax(120px,1fr) 72px!important;
    gap:7px!important;
  }
  #settings .reminder-offset-row input,
  #settings .reminder-offset-row select{
    width:100%!important;
    min-width:0!important;
  }
  #settings .reminder-offset-remove{
    grid-column:auto!important;
    width:72px!important;
    min-width:72px!important;
    padding:7px 6px!important;
    font-size:11.5px!important;
  }
}

@media(max-width:390px){
  #settings .last-minute-config-grid{gap:7px!important}
  #settings .last-minute-config-grid > .form-field{padding:8px!important}
  #settings .last-minute-config-grid .unit-input input{padding-left:8px!important}
  #settings .confirmation-option-control{
    grid-template-columns:minmax(0,1fr) 34px;
  }
  #settings .confirmation-grid > .form-field:first-child .unit-input{max-width:none}
  #settings .reminder-offset-row{
    grid-template-columns:58px minmax(112px,1fr) 66px!important;
    gap:6px!important;
  }
  #settings .reminder-offset-remove{
    width:66px!important;min-width:66px!important;font-size:11px!important
  }
}


/* Appointment reschedule calendar + compact confirmation — 2026-09-27 */
.appointment-slot-field{gap:6px}
.appointment-slot-source{
  position:absolute!important;
  width:1px!important;height:1px!important;
  opacity:0!important;pointer-events:none!important;
  overflow:hidden!important;clip:rect(0 0 0 0)!important
}
.appointment-slot-trigger{
  width:100%;min-height:50px;display:flex;align-items:center;gap:10px;padding:9px 11px;
  border:1px solid #dbe6f1;border-radius:11px;background:#fff;color:#29445e;text-align:left;
  font-family:Inter,system-ui,sans-serif;cursor:pointer;transition:border-color .15s,box-shadow .15s,background .15s
}
.appointment-slot-trigger:hover{
  border-color:#9cc6f4;background:#fbfdff;box-shadow:0 0 0 3px rgba(79,156,249,.07)
}
.appointment-slot-icon{
  width:30px;height:30px;display:grid;place-items:center;border-radius:8px;
  background:#eaf4ff;color:#2f80ed;font-size:16px;flex:0 0 auto
}
.appointment-slot-copy{display:flex;align-items:baseline;gap:8px;min-width:0;flex:1}
.appointment-slot-copy strong{font-size:13.5px;color:#24425e}
.appointment-slot-copy span{font-size:13px;color:#667d93}
.appointment-slot-action{font-size:12px;font-weight:700;color:#2f80ed;white-space:nowrap}

.edit-slot-picker-modal{
  z-index:1400!important;
  padding:22px;
  background:rgba(23,43,64,.42);
  backdrop-filter:blur(3px);
}
.edit-slot-picker-dialog{
  width:min(1180px,96vw);
  max-height:min(780px,92vh);
  margin:auto;
  display:flex;
  flex-direction:column;
  border-radius:18px;
  background:#fff;
  box-shadow:0 30px 90px rgba(25,55,88,.28);
  overflow:hidden
}
.edit-slot-picker-head{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:16px 18px 11px;border-bottom:1px solid #edf2f7
}
.edit-slot-picker-head h2{margin:0 0 3px;font-size:19px;color:#1f3b56;letter-spacing:-.015em}
.edit-slot-picker-head .muted{font-size:12px}
.edit-slot-picker-toolbar{
  display:flex;align-items:center;justify-content:center;gap:8px;padding:11px 14px 5px
}
.edit-slot-picker-toolbar strong{min-width:220px;text-align:center;font-size:13px;color:#35516b}
.edit-slot-picker-toolbar .btn{min-height:36px;padding:7px 11px}
.edit-slot-picker-legend{
  display:flex;justify-content:center;gap:16px;padding:4px 14px 10px;color:#71859a;font-size:11px
}
.edit-slot-picker-legend span{display:flex;align-items:center;gap:5px}
.slot-legend-dot{width:8px;height:8px;border-radius:999px;display:inline-block}
.slot-legend-dot.free{background:#dcefff;border:1px solid #8bbcf4}
.slot-legend-dot.busy{background:#eef1f4;border:1px solid #cbd5df}
.slot-legend-dot.selected{background:#2f80ed}
.edit-slot-week-arrow{
  width:38px;
  min-width:38px;
  height:36px;
  min-height:36px;
  padding:0!important;
}
.edit-slot-week-arrow svg{
  width:16px;
  height:16px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.edit-slot-calendar-scroll{
  margin:0 15px 16px;
  border:1px solid #dfe8f1;
  border-radius:13px;
  background:#fff;
  overflow:auto;
  min-height:420px;
  max-height:560px;
  scrollbar-gutter:stable;
}
.edit-calendar-grid{
  display:grid;
  grid-template-columns:66px repeat(7,minmax(138px,1fr));
  min-width:1032px;
  background:#fff;
  border:0!important;
  border-radius:0!important;
  overflow:visible!important;
  font-family:var(--ui-font);
}
.edit-cal-cell{
  position:relative;
  min-height:58px;
  padding:7px 8px;
  border-right:1px solid #e5edf4;
  border-bottom:1px solid #e5edf4;
  background:#fff;
  color:#3e566d;
  font-size:11.5px;
}
.edit-cal-head{
  position:sticky;
  top:0;
  z-index:20;
  min-height:48px;
  padding:8px 9px;
  background:#f7fafe;
  color:#5e7387;
  box-shadow:0 1px 0 #dfe8f1;
}
.edit-cal-head span{
  display:block;
  font-size:9.5px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.035em;
}
.edit-cal-head strong{
  display:block;
  margin-top:2px;
  font-size:12.5px;
  font-weight:700;
  color:#29445e;
}
.edit-cal-head small{
  display:block;
  margin-top:2px;
  font-size:8.5px;
  color:#a0aebb;
}
.edit-cal-time-head,
.edit-cal-time{
  position:sticky;
  left:0;
  z-index:21;
  background:#f9fbfd;
}
.edit-cal-time{
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding-top:9px;
}
.edit-cal-time strong{
  font-size:11px;
  font-weight:650;
  color:#50677c;
}
.edit-calendar-slot{
  cursor:pointer;
  transition:background .12s,box-shadow .12s;
  overflow:visible;
}
.edit-calendar-slot.free:hover{
  background:#f1f8ff;
  box-shadow:inset 0 0 0 2px rgba(47,128,237,.18);
}
.edit-calendar-slot.busy{
  cursor:not-allowed;
  background:#fbfcfd;
}
.edit-cal-closed,
.edit-cal-outside{
  cursor:not-allowed;
  background:#f6f8fa!important;
}
.edit-calendar-slot.selected{
  background:#eef6ff;
  box-shadow:inset 0 0 0 2px #61a4ef;
}
.edit-free-slot-label{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:0 7px;
  border-radius:7px;
  background:#f5faff;
  color:#7d91a5;
  font-size:9.5px;
  font-weight:600;
  opacity:0;
  transition:opacity .12s;
}
.edit-calendar-slot.free:hover .edit-free-slot-label{opacity:1}
.edit-calendar-event{
  position:relative;
  z-index:5;
  height:var(--edit-event-height,46px);
  min-height:42px;
  padding:7px 8px;
  border-radius:9px;
  border-left:3px solid #8c9bab;
  background:#f0f3f6;
  color:#617487;
  box-shadow:0 3px 8px rgba(28,62,94,.06);
  overflow:hidden;
  pointer-events:none;
}
.edit-calendar-event + .edit-calendar-event{margin-top:4px}
.edit-calendar-event.event-confirmed{
  border-left-color:#45a879;
  background:#edf8f2;
}
.edit-calendar-event.event-pending{
  border-left-color:#d3a33b;
  background:#fff7df;
}
.edit-calendar-event.event-unconfirmed{
  border-left-color:#cf6666;
  background:#fff1f1;
}
.edit-calendar-event.current{
  border-left-color:#2f80ed;
  background:#eaf4ff;
  box-shadow:inset 0 0 0 1px #73aceb,0 3px 8px rgba(28,62,94,.06);
}
.edit-calendar-event-time{
  font-size:10.5px;
  font-weight:700;
  line-height:1.1;
  color:#425d76;
}
.edit-calendar-event-client{
  margin-top:2px;
  font-size:11.5px;
  font-weight:700;
  line-height:1.15;
  color:#2f4b65;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.edit-calendar-event-service{
  margin-top:2px;
  font-size:9.5px;
  line-height:1.15;
  color:#718497;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.edit-calendar-event-status{
  display:inline-flex;
  margin-top:5px;
  padding:3px 6px;
  border-radius:6px;
  background:rgba(255,255,255,.72);
  color:#60788f;
  font-size:8.5px;
  font-weight:700;
}
.edit-calendar-event.current .edit-calendar-event-status{
  color:#236fb7;
  background:#fff;
}

/* Compact confirmation box inside appointment details */
.appointment-confirmation-panel.compact{
  padding:9px 10px!important;gap:7px!important;border-radius:11px!important
}
.appointment-confirmation-panel.compact .appointment-panel-head{
  min-height:22px;margin:0!important;display:flex;align-items:center;justify-content:space-between
}
.appointment-confirmation-panel.compact .appointment-panel-head strong{font-size:12.5px}
.appointment-confirmation-compact-row{
  display:grid;grid-template-columns:minmax(220px,1fr) minmax(180px,.8fr);gap:8px;align-items:end
}
.appointment-confirmation-panel.compact .confirmation-deadline-field{gap:3px}
.appointment-confirmation-panel.compact .confirmation-deadline-field label{font-size:10.5px}
.confirmation-delivery-compact{
  min-height:38px;display:flex;align-items:center;gap:7px;padding:0 9px;
  border:1px solid #e1e9f1;border-radius:9px;background:#fff;color:#73889c;font-size:10.5px
}
.confirmation-delivery-compact span{
  display:inline-flex;align-items:center;min-height:22px;padding:0 6px;border-radius:6px;
  background:#f4f7fa;color:#70859a;font-size:9px;font-weight:700
}
.confirmation-delivery-compact strong{font-size:11px;color:#4a647d;font-weight:600}
.appointment-confirmation-panel.compact .delivery-alert{
  margin-top:1px;padding:7px 8px;font-size:10.5px;line-height:1.35
}
.waitlist-preview.compact{margin-top:1px;padding-top:6px;border-top:1px solid #e7edf3}
.waitlist-preview.compact .waiter{min-height:28px;padding:4px 0;font-size:10.5px}
.waitlist-preview.compact .btn{min-height:32px;padding:6px 9px;font-size:11px;margin-top:5px!important}

@media(max-width:900px){
  .edit-slot-calendar-scroll{margin-left:10px;margin-right:10px}
  .edit-calendar-grid{grid-template-columns:60px repeat(7,140px);min-width:1040px}
}
@media(max-width:620px){
  .appointment-slot-copy{align-items:flex-start;flex-direction:column;gap:1px}
  .appointment-slot-action{font-size:11px}
  .appointment-confirmation-compact-row{grid-template-columns:1fr}
}


/* Plain-language last-minute + service separation — 2026-09-27 */
.settings-subhead{
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin:0 0 8px
}
.settings-subhead > strong,.settings-subhead > div > strong{display:block;font-size:12.5px;color:#304b65}
.settings-subhead > span,.settings-subhead > div > span{display:block;margin-top:2px;font-size:11px;line-height:1.4;color:#7a8b9c}

.last-minute-mode-cards{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:2px 0 10px
}
.last-minute-mode-cards button{
  min-height:72px;padding:10px 11px;border:1px solid #dce6f0;border-radius:11px;background:#fff;
  text-align:left;font-family:Inter,system-ui,sans-serif;cursor:pointer;transition:border-color .15s,background .15s,box-shadow .15s
}
.last-minute-mode-cards button strong{display:block;font-size:12.5px;color:#405b74}
.last-minute-mode-cards button span{display:block;margin-top:4px;font-size:10.5px;line-height:1.35;color:#7a8b9c}
.last-minute-mode-cards button:hover{border-color:#b6d4f5;background:#fbfdff}
.last-minute-mode-cards button.active{border-color:#83baf6;background:#edf6ff;box-shadow:inset 0 0 0 1px rgba(47,128,237,.08)}
.last-minute-mode-cards button.active strong{color:#176dbb}
.last-minute-mode-help{
  margin-bottom:11px;padding:9px 10px;border:1px solid #dfe9f3;border-radius:10px;background:#f8fbff;
  color:#597087;font-size:11.5px;line-height:1.45
}
.last-minute-mode-help strong{color:#2d587f}
.last-minute-rules-group{
  padding:10px;border:1px solid #e2eaf2;border-radius:11px;background:#fbfcfe;margin-bottom:9px
}
.last-minute-rules-group .last-minute-config-grid{margin:0}
.last-minute-config-grid.automatic-rules{grid-template-columns:repeat(3,minmax(0,1fr))}
.last-minute-config-grid.common-rules{grid-template-columns:repeat(2,minmax(0,1fr))}
.last-minute-selection-help{margin-top:9px!important}

/* Strong visual boundary between adding and editing services. */
.service-new-block{
  padding:11px;border:1px solid #bcd8f5;border-radius:13px;background:#f2f8ff;margin-bottom:14px
}
.service-new-head{margin-bottom:9px}
.service-new-head strong{color:#2168a9}
.service-new-block .service-add-grid{
  margin:0!important;padding:0!important;border:0!important;background:transparent!important
}
.service-existing-block{
  padding-top:12px;border-top:1px solid #dfe8f1
}
.service-existing-head{align-items:center;margin-bottom:9px}
.service-count-badge{
  flex:0 0 auto;display:inline-flex!important;align-items:center;justify-content:center;min-height:26px;
  padding:0 9px;border-radius:999px;background:#eef4fa;color:#60778e!important;font-size:10.5px!important;font-weight:700
}
.service-existing-card-head{display:none}
.service-manage-row{
  position:relative
}

@media(max-width:760px){
  .last-minute-mode-cards{grid-template-columns:1fr}
  .last-minute-mode-cards button{min-height:0;padding:10px 11px}
  .last-minute-mode-cards button span{font-size:11px}
  #settings .last-minute-config-grid.automatic-rules,
  #settings .last-minute-config-grid.common-rules{grid-template-columns:1fr 1fr!important}
  #settings .last-minute-config-grid.automatic-rules > .form-field:nth-child(3){grid-column:1/-1}
  .last-minute-rules-group{padding:9px}
}

@media(max-width:620px){
  .service-new-block{
    padding:11px 10px 10px;border-width:1.5px;background:#eef7ff
  }
  .service-new-head{
    padding-bottom:8px;border-bottom:1px solid #cfe2f6
  }
  .service-new-head strong{font-size:13px}
  .service-add-grid{gap:8px!important}
  .service-add-grid .service-save-btn{
    width:100%;min-height:42px;background:#2f80ed;color:#fff
  }
  .service-existing-block{
    margin-top:2px;padding-top:14px;border-top:2px solid #d9e4ee
  }
  .service-existing-head{
    display:flex;align-items:flex-start;gap:8px
  }
  .service-existing-head > div{min-width:0;flex:1}
  .service-existing-head > div > strong{font-size:13px}
  .service-manage-list{gap:10px!important}
  .service-manage-row{
    display:grid!important;grid-template-columns:1fr!important;gap:8px!important;
    padding:11px 10px 10px!important;border:1px solid #dce6ef!important;border-radius:13px!important;
    background:#fff!important;box-shadow:0 3px 10px rgba(40,75,110,.035)
  }
  .service-existing-card-head{
    display:flex;align-items:center;justify-content:space-between;gap:8px;
    margin:-2px 0 2px;padding-bottom:8px;border-bottom:1px solid #e7edf3
  }
  .service-existing-card-head span{
    font-size:9px;font-weight:800;letter-spacing:.055em;color:#71869a
  }
  .service-existing-card-head strong{
    min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
    color:#314e68;font-size:11.5px;font-weight:700
  }
  .service-manage-row .form-field label{
    font-size:11px!important
  }
  .service-manage-row .service-active-toggle{
    width:100%;justify-content:flex-start
  }
  .service-row-actions{
    display:grid!important;grid-template-columns:1fr auto!important;gap:7px!important
  }
  .service-row-actions .service-save-btn{
    width:100%!important;min-width:0!important
  }
  .service-row-actions .service-delete-btn{
    width:auto!important;min-width:72px!important
  }
}


/* Mobile dropdowns stay attached to the field — 2026-09-27 */
.crm-control.opens-up>.crm-control-popover{
  top:auto;
  bottom:calc(100% + 6px);
}
.client-detail-panel .form-field:has(.crm-control.open){
  position:relative;
  z-index:60;
}
@media(max-width:620px){
  .crm-control-popover{
    position:absolute!important;
    left:0!important;
    right:auto!important;
    top:calc(100% + 6px)!important;
    bottom:auto!important;
    width:100%!important;
    max-height:min(250px,42dvh)!important;
  }
  .crm-control.opens-up>.crm-control-popover{
    top:auto!important;
    bottom:calc(100% + 6px)!important;
  }
  .crm-select-popover{
    max-height:min(250px,42dvh)!important;
  }
  .client-detail-panel{
    overflow:auto;
    overflow-x:visible;
  }
}


/* Settings clarity pass — services, team, confirmation, security — 2026-09-27 */

/* Logo is intentionally more visible. */
#settings .org-logo-settings{min-height:76px}
#settings .org-logo-preview,
#settings .org-logo-placeholder{width:72px!important;height:72px!important;border-radius:14px!important}
#settings .org-logo-placeholder{font-size:11px!important}

/* Existing services are closed summaries until the owner chooses to edit. */
#settings .service-manage-list{display:grid;gap:8px}
#settings details.service-manage-row{
  display:block!important;
  padding:0!important;
  border:1px solid #dce6ef!important;
  border-radius:12px!important;
  background:#fff!important;
  overflow:hidden;
}
#settings details.service-manage-row.inactive{opacity:.72}
#settings .service-summary{
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:58px;
  padding:9px 11px;
  cursor:pointer;
  user-select:none;
}
#settings .service-summary::-webkit-details-marker{display:none}
#settings .service-summary-main{display:grid;gap:3px;min-width:0}
#settings .service-summary-main strong{font-size:13px;color:#2f4a64;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#settings .service-summary-main small{font-size:10.5px;color:#7a8d9f}
#settings .service-summary-side{display:flex;align-items:center;gap:8px;flex:0 0 auto}
#settings .service-status-pill{
  display:inline-flex;align-items:center;min-height:25px;padding:0 8px;border-radius:999px;font-size:9.5px;font-weight:700
}
#settings .service-status-pill.on{background:#eaf8f1;color:#26865a}
#settings .service-status-pill.off{background:#f2f4f6;color:#7c8995}
#settings .service-chevron{font-size:18px;line-height:1;color:#7d8fa0;transition:transform .15s}
#settings details[open] .service-chevron{transform:rotate(180deg)}
#settings .service-edit-body{padding:10px 11px 11px;border-top:1px solid #e8eef4;background:#fbfdff}
#settings .service-edit-grid{
  display:grid;grid-template-columns:minmax(220px,1.7fr) 110px 130px 95px;gap:8px;align-items:end
}
#settings .service-edit-body .service-row-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:9px}

/* Team members must be visually obvious before the invite form. */
#settings .organization-team-card .section-head{margin-bottom:9px}
#settings .team-members-heading{
  display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px
}
#settings .team-members-heading strong{font-size:12.5px;color:#36516a}
#settings .team-members-heading span{
  display:inline-flex;align-items:center;min-height:25px;padding:0 8px;border-radius:999px;
  background:#edf5fd;color:#3b77ad;font-size:10px;font-weight:700
}
#settings .team-members-list{display:grid;gap:7px;margin-bottom:12px}
#settings .team-member-card{
  display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:9px;
  min-height:54px;padding:8px 10px;border:1px solid #dfe8f1;border-radius:11px;background:#fafdff
}
#settings .team-member-avatar{
  width:38px;height:38px;display:grid;place-items:center;border-radius:10px;background:#dceeff;color:#2671b7;font-size:11px;font-weight:800
}
#settings .team-member-copy{display:grid;gap:2px;min-width:0}
#settings .team-member-copy strong{font-size:12.5px;color:#2f4a64;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#settings .team-member-copy>span{font-size:10.5px;color:#788b9d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#settings .team-you{display:inline-flex!important;margin-left:5px;padding:2px 5px;border-radius:999px;background:#eaf8f1;color:#26865a!important;font-size:8.5px!important;vertical-align:middle}
#settings .team-role-badge{font-size:10px;font-weight:700;color:#536c82;background:#eef3f7;border-radius:8px;padding:5px 7px;white-space:nowrap}
#settings .team-member-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap}
#settings .team-avatar-remove-btn{
  min-height:28px;padding:0 8px;border:1px solid #efd7d7;border-radius:8px;
  background:#fff;color:#b95555;font:600 9.5px var(--ui-font);cursor:pointer
}
#settings .team-avatar-remove-btn:hover{background:#fff4f4;border-color:#e5bbbb}
#settings .team-avatar-remove-btn.confirming{background:#c95757;border-color:#c95757;color:#fff}
#settings .calendar-staff-actions{flex-wrap:wrap}

#settings .team-empty{padding:10px;border:1px dashed #d6e2ec;border-radius:10px;color:#7b8d9d;font-size:11px}
#settings .team-invite-divider{
  display:flex;align-items:center;gap:8px;margin:12px 0 10px;color:#6c8195;font-size:10.5px;font-weight:700
}
#settings .team-invite-divider:before,#settings .team-invite-divider:after{content:"";height:1px;background:#e3eaf1;flex:1}

/* Explanation belongs directly to the confirmation rule it describes. */
#settings .confirmation-rule-help{
  margin-top:6px;padding:7px 8px;border-radius:8px;background:#f3f7fa;color:#687f94;font-size:10.5px;line-height:1.4
}
#settings .confirmation-rule-help.important{background:#fff8e8;color:#7d672b}

/* Password eye + confirmation. */
#settings .security-password-grid{grid-template-columns:1fr!important}
#settings .password-field{position:relative}
#settings .password-field input{padding-right:44px!important}
#settings .password-eye{
  position:absolute;right:5px;top:50%;transform:translateY(-50%);
  width:34px;height:34px;display:grid;place-items:center;border:0;border-radius:8px;background:transparent;
  color:#73879a;cursor:pointer;font-size:15px
}
#settings .password-eye:hover,#settings .password-eye.active{background:#eef5fb;color:#2f80ed}

@media(max-width:760px){
  #settings .service-edit-grid{grid-template-columns:1fr 1fr}
  #settings .service-edit-grid>.form-field:first-child{grid-column:1/-1}
  #settings .service-edit-grid>.service-active-toggle{align-self:end}
}
@media(max-width:620px){
  #settings .org-logo-preview,#settings .org-logo-placeholder{width:76px!important;height:76px!important}
  #settings .service-summary{min-height:60px;padding:10px}
  #settings .service-summary-main strong{font-size:13px}
  #settings .service-edit-grid{grid-template-columns:1fr!important}
  #settings .service-edit-grid>.form-field:first-child{grid-column:auto}
  #settings .service-edit-body .service-row-actions{display:grid;grid-template-columns:1fr 80px}
  #settings .team-member-card{grid-template-columns:38px minmax(0,1fr)}
  #settings .team-member-actions{grid-column:1/-1;justify-content:flex-end}
  #settings .team-role-badge{grid-column:2;justify-self:start;margin-top:-2px}
}


/* UX cleanup: dropdowns, team, earlier-slot wording, mobile picker — 2026-09-27 */
.app select:not([hidden]){
  appearance:none;
  -webkit-appearance:none;
  padding-right:44px!important;
  background-color:#fff;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Crect x='1' y='1' width='26' height='26' rx='8' fill='%23f4f8fc' stroke='%23dfe8f1'/%3E%3Cpath d='m10 12 4 4 4-4' fill='none' stroke='%236b8094' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important;
  background-repeat:no-repeat!important;
  background-position:right 6px center!important;
  background-size:28px 28px!important;
}
.app select:not([hidden]):focus{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Crect x='1' y='1' width='26' height='26' rx='8' fill='%23edf6ff' stroke='%2386b9f3'/%3E%3Cpath d='m10 12 4 4 4-4' fill='none' stroke='%232f80ed' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important;
}
.app select[disabled]{background-color:#f6f8fa!important}

#settings .team-members-heading>div{display:grid;gap:2px;min-width:0}
#settings .team-members-heading small{font-size:10.5px;font-weight:500;color:#8797a7}
#settings .team-member-card{
  grid-template-columns:54px minmax(0,1fr) auto!important;
  min-height:70px!important;
  padding:9px 11px!important;
  border-color:#dce7f0!important;
  background:linear-gradient(180deg,#fff,#f9fcff)!important;
}
#settings .team-member-avatar{
  width:54px!important;height:54px!important;border-radius:14px!important;
  overflow:hidden;position:relative;display:grid;place-items:center!important;
  background:#e4f1ff!important;color:#2c73b5!important;font-size:13px!important;font-weight:800!important
}
#settings .team-member-avatar img{width:100%;height:100%;object-fit:cover;display:block}
#settings .team-avatar-edit{cursor:pointer}
#settings .team-avatar-edit input{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
#settings .team-avatar-edit i{
  position:absolute;right:3px;bottom:3px;width:18px;height:18px;display:grid;place-items:center;
  border-radius:6px;background:rgba(255,255,255,.94);box-shadow:0 2px 5px rgba(24,61,94,.16);
  color:#47708f;font-style:normal;font-size:10px;opacity:0;transition:.15s
}
#settings .team-avatar-edit:hover i{opacity:1}
#settings .team-member-copy{gap:4px!important}
#settings .team-member-name-line{display:flex;align-items:center;gap:6px;min-width:0}
#settings .team-member-name-line strong{font-size:13.5px!important;color:#263f58!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#settings .team-member-copy>span{font-size:11.5px!important}
#settings .team-role-badge{font-size:10.5px!important;padding:6px 9px!important;border-radius:999px!important}
#settings .team-you{margin-left:0!important}

.client-lm-consent-note{
  display:grid;gap:3px;margin:0 0 13px;padding:10px 11px;border:1px solid #cfe3f8;border-radius:11px;
  background:#f2f8ff;color:#58718a
}
.client-lm-consent-note strong{font-size:11.5px;color:#276ba7}
.client-lm-consent-note span{font-size:10.5px;line-height:1.45}

@media(max-width:760px){
  .edit-slot-picker-modal{overflow:hidden!important}
  .edit-slot-picker-dialog{min-width:0!important;max-width:100vw!important}
  .edit-slot-picker-head,.edit-slot-picker-toolbar,.edit-slot-picker-legend{width:100%!important;min-width:0!important}
  .edit-slot-calendar-scroll{
    width:calc(100% - 16px)!important;
    max-width:calc(100% - 16px)!important;
    box-sizing:border-box!important;
  }
  .edit-calendar-grid{
    grid-template-columns:56px repeat(7,145px)!important;
    min-width:1071px!important;
  }
}
@media(max-width:620px){
  #settings .team-member-card{grid-template-columns:54px minmax(0,1fr) auto!important}
  #settings .team-role-badge{grid-column:auto!important;align-self:center!important}
  #settings .team-avatar-edit i{opacity:1}
}


/* New appointment modal compact UX — 2026-09-27 */
.appointment-create-dialog{
  width:min(540px,100%);
  padding:18px;
}
.appointment-create-head{
  align-items:flex-start!important;
  margin-bottom:12px!important;
}
.appointment-create-head h2{margin:0 0 3px;font-size:19px;line-height:1.2}
.appointment-create-head .muted{font-size:11px;line-height:1.4}
.appointment-create-grid{
  grid-template-columns:1fr 1fr;
  gap:10px 10px;
}
.appointment-create-grid .form-field{gap:5px}
.appointment-create-grid .form-field>label{
  font-size:11.5px;
  font-weight:600;
  color:#4f657b;
}
.appointment-create-grid .form-field>label span{
  color:#94a1ae;
  font-size:10px;
  font-weight:500;
}
.appointment-create-grid input:not([type="checkbox"]),
.appointment-create-grid select,
.appointment-create-grid textarea{
  min-height:42px;
  border-radius:11px;
  font-size:13px;
}
.appointment-create-grid textarea{
  min-height:64px;
  padding:9px 11px;
}
.appointment-date-control{
  position:relative;
  min-height:42px;
}
.appointment-date-display{
  width:100%;
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:0 10px 0 12px;
  border:1px solid var(--line);
  border-radius:11px;
  background:#fff;
  color:#28445e;
  font:600 13px Inter,system-ui,sans-serif;
  text-align:left;
}
.appointment-date-display svg{
  width:16px;
  height:16px;
  fill:none;
  stroke:#687d90;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
  flex:0 0 16px;
}
.appointment-date-native{
  position:absolute!important;
  inset:0;
  width:100%!important;
  height:100%!important;
  min-height:42px!important;
  opacity:0!important;
  cursor:pointer;
  z-index:2;
}
.appointment-note-field{margin-top:1px}
.appointment-reminder-card{
  padding:10px 11px!important;
  border-radius:12px!important;
  background:#f8fbfe!important;
  border:1px solid #dfe9f2!important;
  gap:0!important;
}
.appointment-reminder-master{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  min-height:34px;
  cursor:pointer;
}
.appointment-reminder-copy{
  display:grid;
  gap:2px;
  min-width:0;
}
.appointment-reminder-copy strong{
  font-size:12.5px;
  color:#304a63;
}
.appointment-reminder-copy small{
  font-size:10.5px;
  color:#8091a1;
  line-height:1.3;
  font-weight:500;
}
.appointment-toggle{
  position:relative;
  width:40px;
  height:23px;
  flex:0 0 40px;
}
.appointment-toggle input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.appointment-toggle i{
  position:absolute;
  inset:0;
  border-radius:999px;
  background:#d7e1ea;
  transition:.16s;
}
.appointment-toggle i:after{
  content:"";
  position:absolute;
  width:17px;
  height:17px;
  left:3px;
  top:3px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 4px rgba(37,65,92,.24);
  transition:.16s;
}
.appointment-toggle input:checked+i{background:#2f80ed}
.appointment-toggle input:checked+i:after{transform:translateX(17px)}
.appointment-create-dialog .appointment-reminder-options{
  display:block;
  margin-top:6px;
}
.appointment-create-dialog .reminder-schedule-summary{
  border:0;
  background:transparent;
  padding:0;
  color:#60758a;
  font-size:10.5px;
  line-height:1.35;
}
.appointment-create-dialog .reminder-hint{
  margin-top:3px;
  min-height:0;
  font-size:10.5px;
  line-height:1.35;
  color:#6f8294;
}
.appointment-create-dialog .appointment-reminder-options.is-disabled{
  opacity:.45;
}
.appointment-create-actions{
  display:grid!important;
  grid-template-columns:1fr 1fr;
  gap:8px!important;
  margin-top:12px!important;
}
.appointment-create-actions .btn{
  width:100%;
  min-height:42px;
  border-radius:11px;
  font-size:12.5px;
  font-weight:700;
}
.appointment-create-actions .appointment-cancel-btn{
  background:#f4f6f8;
  border-color:#eef1f4;
  color:#53687c;
}

/* The new-term modal should use the same custom chevron treatment everywhere. */
.appointment-create-dialog select:not([hidden]){
  appearance:none!important;
  -webkit-appearance:none!important;
  padding-right:42px!important;
  background-color:#fff!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26'%3E%3Crect x='1' y='1' width='24' height='24' rx='7' fill='%23f5f9fd' stroke='%23e0e8f0'/%3E%3Cpath d='m9.5 11 3.5 3.5 3.5-3.5' fill='none' stroke='%236a8095' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important;
  background-repeat:no-repeat!important;
  background-position:right 6px center!important;
  background-size:26px 26px!important;
}

@media(max-width:620px){
  .appointment-create-modal{
    padding:10px!important;
    align-items:center!important;
  }
  .appointment-create-dialog{
    width:calc(100vw - 20px)!important;
    max-height:calc(100dvh - 20px)!important;
    padding:14px!important;
    border-radius:18px!important;
    overflow:auto!important;
  }
  .appointment-create-dialog .section-head{
    position:static!important;
    padding:0!important;
    margin:0 0 10px!important;
  }
  .appointment-create-head .muted{display:none}
  .appointment-create-grid{
    grid-template-columns:1fr 1fr!important;
    gap:9px 8px!important;
  }
  .appointment-create-grid .form-field.full{grid-column:1/-1!important}
  .appointment-create-grid .form-field>label{font-size:11px}
  .appointment-create-grid input:not([type="checkbox"]),
  .appointment-create-grid select,
  .appointment-create-grid textarea,
  .appointment-date-display{
    min-height:40px!important;
    font-size:12.5px!important;
  }
  .appointment-create-grid textarea{min-height:58px!important}
  .appointment-create-grid .crm-select-trigger{
    min-height:40px!important;
    font-size:12.5px!important;
  }
  .appointment-reminder-card{
    padding:9px 10px!important;
  }
  .appointment-reminder-copy small{display:none}
  .appointment-create-actions{
    position:sticky;
    bottom:-14px;
    z-index:5;
    margin:10px -14px -14px!important;
    padding:10px 14px calc(10px + env(safe-area-inset-bottom));
    background:linear-gradient(180deg,rgba(255,255,255,.92),#fff 30%);
    border-top:1px solid #edf1f5;
  }
}

@media(max-width:390px){
  .appointment-create-dialog{padding:12px!important}
  .appointment-create-grid{gap:8px 7px!important}
  .appointment-create-actions{
    bottom:-12px;
    margin:9px -12px -12px!important;
    padding-left:12px;
    padding-right:12px;
  }
}


/* Mobile calendar, lists and controls cleanup — 2026-09-27 */
.calendar-range-picker{
  position:relative;
  min-width:210px;
  height:40px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:9px;
  padding:0 10px 0 12px;
  border:1px solid var(--ui-line,var(--line));
  border-radius:10px;
  background:#fff;
  color:#52677d;
  font-family:Inter,system-ui,sans-serif;
  font-size:12px;
  font-weight:600;
  cursor:pointer;
  overflow:hidden;
}
.calendar-range-picker svg{
  width:16px;height:16px;flex:0 0 16px;
  fill:none;stroke:#6c8195;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round
}
.calendar-range-picker input{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  opacity:0;
  cursor:pointer;
}
#calendar .calendar-week-picker{position:absolute!important;opacity:0!important;pointer-events:auto!important}
#calendar .calendar-week-label{display:none}

/* Strong custom chevrons in settings, including native mobile selects. */
#settings select{
  appearance:none!important;
  -webkit-appearance:none!important;
  padding-right:44px!important;
  background-color:#fff!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Crect x='1' y='1' width='26' height='26' rx='8' fill='%23f4f8fc' stroke='%23dfe8f1'/%3E%3Cpath d='m10 12 4 4 4-4' fill='none' stroke='%236b8094' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important;
  background-repeat:no-repeat!important;
  background-position:right 6px center!important;
  background-size:28px 28px!important;
}
#settings select:focus{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Crect x='1' y='1' width='26' height='26' rx='8' fill='%23edf6ff' stroke='%2386b9f3'/%3E%3Cpath d='m10 12 4 4 4-4' fill='none' stroke='%232f80ed' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important;
}
#settings .service-chevron{
  width:28px;height:28px;display:grid;place-items:center;border-radius:8px;background:#f4f8fc;border:1px solid #dfe8f1;
}
#settings .service-chevron svg{
  width:15px;height:15px;fill:none;stroke:#6b8094;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;
  transition:transform .15s;
}
#settings details[open] .service-chevron{transform:none!important}
#settings details[open] .service-chevron svg{transform:rotate(180deg)}

/* Touch move feedback */
#calendar .event.touch-dragging{
  opacity:.72;
  box-shadow:0 8px 20px rgba(31,68,104,.18)!important;
  transform:scale(.98)!important;
}
body.calendar-touch-moving{user-select:none;-webkit-user-select:none}
body.calendar-touch-moving #calendarGrid{touch-action:none}
#calendar .cal-cell.drop-target{outline:2px solid #4f9cf9;outline-offset:-2px;background:#edf6ff!important}

/* Reschedule popup stays centered; only its calendar scrolls. */
.edit-slot-picker-modal{
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
.edit-slot-picker-dialog{
  margin:auto!important;
  max-width:calc(100vw - 20px)!important;
  box-sizing:border-box!important;
}
.edit-slot-calendar-scroll{
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
.edit-free-slot-label{display:none!important}

/* Mobile list views: no horizontal tables. */
@media(max-width:620px){
  #calendar .calendar-week-controls{
    grid-template-columns:40px minmax(0,1fr) 40px!important;
    gap:7px!important;
  }
  #calendar .calendar-range-picker{
    width:100%;
    min-width:0;
    height:42px;
    font-size:11.5px;
  }
  #calendar .current-week-btn{grid-column:1/-1}
  #calendar .calendar-week-label{display:none!important}

  #dashboard .overview-table-card,
  #clients .client-table-card{padding:12px!important}
  #dashboard .overview-table-card .table-wrap,
  #clients .client-table-card .table-wrap{
    overflow:visible!important;
    width:100%;
  }

  #dashboard .overview-table,
  #dashboard .overview-table tbody,
  #clients .client-table,
  #clients .client-table tbody{
    display:block!important;
    width:100%!important;
    min-width:0!important;
  }
  #dashboard .overview-table thead,
  #clients .client-table thead{display:none!important}

  #dashboard .overview-table tr{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto;
    gap:3px 10px;
    width:100%;
    padding:10px 4px;
    border-bottom:1px solid #e6edf4;
    cursor:pointer;
  }
  #dashboard .overview-table td{
    display:block!important;
    width:auto!important;
    min-width:0!important;
    padding:0!important;
    border:0!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }
  #dashboard .mobile-term-time{grid-column:1;font-size:11px!important;color:#718499}
  #dashboard .mobile-term-client{grid-column:1;font-size:13px!important;color:#28445e}
  #dashboard .mobile-term-person{grid-column:2;grid-row:1;font-size:10.5px!important;color:#6e8194;text-align:right}
  #dashboard .mobile-term-status{grid-column:2;grid-row:2;text-align:right}
  #dashboard .mobile-term-open{display:none!important}

  #clients .client-table tr{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    align-items:center;
    gap:5px 10px;
    width:100%;
    padding:11px 4px;
    border-bottom:1px solid #e6edf4;
  }
  #clients .client-table td{
    display:block!important;
    width:auto!important;
    min-width:0!important;
    padding:0!important;
    border:0!important;
    white-space:normal!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  #clients .client-list-name{font-size:13px!important;color:#28445e}
  #clients .client-list-phone{font-size:11.5px!important;color:#60778d;text-align:right}
  #clients .client-list-last,
  #clients .client-list-count{display:none!important}

  .edit-slot-picker-modal{padding:8px!important}
  .edit-slot-picker-dialog{
    width:calc(100vw - 16px)!important;
    max-width:calc(100vw - 16px)!important;
    height:calc(100dvh - 16px)!important;
    max-height:calc(100dvh - 16px)!important;
    border-radius:16px!important;
    overflow:hidden!important;
  }
  .edit-slot-picker-head{
    flex:0 0 auto;
    padding:12px 12px 9px!important;
  }
  .edit-slot-picker-head h2{font-size:17px!important}
  .edit-slot-picker-toolbar{
    flex:0 0 auto;
    width:100%!important;
    padding:8px 10px 5px!important;
  }
  .edit-slot-picker-legend{
    flex:0 0 auto;
    width:100%!important;
    padding:4px 10px 8px!important;
  }
  .edit-slot-calendar-scroll{
    flex:1 1 auto!important;
    width:calc(100% - 16px)!important;
    max-width:calc(100% - 16px)!important;
    min-height:0!important;
    margin:0 8px 8px!important;
    overflow:auto!important;
  }
}


/* Organization brand themes + calendar staff manager — 2026-09-27 */
html[data-theme="blue"]{
  --blue:#4f9cf9;--blue-strong:#2f80ed;--blue-soft:#eaf4ff;--bg:#f6fbff;
  --ui-primary:#2f80ed;--ui-primary-hover:#2473db;--ui-primary-soft:#eaf4ff;--ui-bg:#f5f9fd;
  --theme-rgb:47,128,237;
}
html[data-theme="green"]{
  --blue:#45b979;--blue-strong:#2f9d62;--blue-soft:#eaf8f0;--bg:#f5fbf7;
  --ui-primary:#2f9d62;--ui-primary-hover:#238a54;--ui-primary-soft:#eaf8f0;--ui-bg:#f5fbf7;
  --theme-rgb:47,157,98;
}
html[data-theme="pink"]{
  --blue:#e56aa5;--blue-strong:#d94f91;--blue-soft:#fdebf4;--bg:#fff7fb;
  --ui-primary:#d94f91;--ui-primary-hover:#c53d7e;--ui-primary-soft:#fdebf4;--ui-bg:#fff7fb;
  --theme-rgb:217,79,145;
}
html[data-theme="yellow"]{
  --blue:#e2ae2d;--blue-strong:#c88b00;--blue-soft:#fff4cf;--bg:#fffbef;
  --ui-primary:#c88b00;--ui-primary-hover:#ad7800;--ui-primary-soft:#fff4cf;--ui-bg:#fffbef;
  --theme-rgb:200,139,0;
}
html[data-theme="purple"]{
  --blue:#9178ef;--blue-strong:#7657df;--blue-soft:#f0ecff;--bg:#faf8ff;
  --ui-primary:#7657df;--ui-primary-hover:#6447c9;--ui-primary-soft:#f0ecff;--ui-bg:#faf8ff;
  --theme-rgb:118,87,223;
}
.btn-primary{box-shadow:0 5px 14px rgba(var(--theme-rgb),.16)}
.btn-soft{background:var(--ui-primary-soft);border-color:var(--ui-primary-soft);color:var(--ui-primary)}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.toolbar input:focus,
.toolbar select:focus,
.search input:focus{
  border-color:var(--ui-primary)!important;
  box-shadow:0 0 0 3px rgba(var(--theme-rgb),.09)!important;
}
.crm-control.open>.crm-control-trigger,
.crm-control-trigger:focus-visible{
  border-color:var(--ui-primary)!important;
  box-shadow:0 0 0 3px rgba(var(--theme-rgb),.09)!important;
}
.crm-select-option.selected{background:var(--ui-primary-soft);color:var(--ui-primary)}
.crm-calendar-day:hover{background:var(--ui-primary-soft);color:var(--ui-primary)}
.crm-time-option.selected{background:var(--ui-primary-soft);color:var(--ui-primary);border-color:var(--ui-primary-soft)}
.avatar{background:var(--ui-primary-soft);color:var(--ui-primary)}
.working-day-chip input:checked+span{border-color:var(--ui-primary);background:var(--ui-primary-soft);color:var(--ui-primary)}
body{background:var(--ui-bg)}
.brand-mark{background:linear-gradient(135deg,var(--ui-primary-soft),var(--ui-primary))}
.appointment-slot-icon{background:var(--ui-primary-soft);color:var(--ui-primary)}
.appointment-slot-action{color:var(--ui-primary)}
.slot-legend-dot.selected{background:var(--ui-primary)}
.edit-calendar-event.current{
  border-left-color:var(--ui-primary);
  background:var(--ui-primary-soft);
  box-shadow:inset 0 0 0 1px rgba(var(--theme-rgb),.42),0 3px 8px rgba(28,62,94,.06)
}
#settings .service-add-grid .service-save-btn{background:var(--ui-primary);color:#fff}
#settings .password-eye:hover,#settings .password-eye.active{background:var(--ui-primary-soft);color:var(--ui-primary)}
.appointment-toggle input:checked+i{background:var(--ui-primary)}

#settings .theme-color-field{gap:7px}
#settings .theme-color-picker{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
}
#settings .theme-color-picker button{
  min-width:90px;
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  padding:0 11px;
  border:1px solid #dce6ef;
  border-radius:11px;
  background:#fff;
  color:#52687d;
  font-family:var(--ui-font);
  font-size:12px;
  font-weight:650;
  cursor:pointer;
}
#settings .theme-color-picker button i{
  width:17px;height:17px;border-radius:50%;box-shadow:inset 0 0 0 1px rgba(0,0,0,.06);
}
#settings .theme-color-picker button[data-theme-color="blue"] i{background:#2f80ed}
#settings .theme-color-picker button[data-theme-color="green"] i{background:#2f9d62}
#settings .theme-color-picker button[data-theme-color="pink"] i{background:#d94f91}
#settings .theme-color-picker button[data-theme-color="yellow"] i{background:#d7a20b}
#settings .theme-color-picker button[data-theme-color="purple"] i{background:#7657df}
#settings .theme-color-picker button.active{
  border-color:var(--ui-primary);
  background:var(--ui-primary-soft);
  color:var(--ui-primary);
  box-shadow:0 0 0 2px rgba(var(--theme-rgb),.08);
}
#settings .theme-color-picker button:disabled{opacity:.6;cursor:not-allowed}

#settings .organization-team-card .section-head{margin-bottom:12px}
#settings .team-group{
  padding:12px;
  border:1px solid #e2eaf2;
  border-radius:13px;
  background:#fbfdff;
}
#settings .team-group+.team-group{margin-top:12px}
#settings .team-staff-group{background:linear-gradient(180deg,#fff,#fbfdff)}
#settings .calendar-staff-list{display:grid;gap:7px}
#settings .calendar-staff-card{
  display:grid;
  grid-template-columns:54px minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  padding:9px 10px;
  border:1px solid #dce7f0;
  border-radius:12px;
  background:#fff;
}
#settings .calendar-staff-avatar{
  width:54px;height:54px;border-radius:14px;
  display:grid;place-items:center;
  position:relative;overflow:hidden;
  background:var(--ui-primary-soft);
  color:var(--ui-primary);
  font-size:13px;font-weight:800;
  cursor:pointer;
}
#settings .calendar-staff-avatar img{width:100%;height:100%;object-fit:cover;display:block}
#settings .calendar-staff-avatar input{
  position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;
}
#settings .calendar-staff-avatar i{
  position:absolute;right:3px;bottom:3px;width:18px;height:18px;
  display:grid;place-items:center;border-radius:6px;
  background:rgba(255,255,255,.95);
  box-shadow:0 2px 5px rgba(24,61,94,.16);
  color:#52687d;font-style:normal;font-size:10px;
}
#settings .calendar-staff-main{min-width:0;display:grid;gap:4px}
#settings .calendar-staff-main>label{font-size:10.5px;color:#7b8c9e;font-weight:650}
#settings .calendar-staff-main input{min-height:38px!important;font-size:13px!important}
#settings .calendar-staff-meta{font-size:10.5px;color:#8a99a8}
#settings .calendar-staff-actions{display:flex;align-items:center;gap:8px}
#settings .calendar-staff-active{
  display:flex;align-items:center;gap:6px;
  min-height:38px;padding:0 9px;
  border:1px solid #e1e9f0;border-radius:10px;background:#f8fbfe;
  font-size:11px;font-weight:650;color:#5f7489;
}
#settings .calendar-staff-active input{margin:0}
#settings .calendar-staff-actions .btn{min-height:38px}
#settings .calendar-staff-add{
  display:grid;
  grid-template-columns:minmax(0,340px) auto;
  gap:8px;
  align-items:end;
}
#settings .calendar-staff-add .btn{min-height:42px}

@media(max-width:620px){
  #settings .theme-color-picker{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  #settings .theme-color-picker button{width:100%;min-width:0}
  #settings .team-group{padding:10px}
  #settings .calendar-staff-card{
    grid-template-columns:50px minmax(0,1fr);
    gap:8px;
  }
  #settings .calendar-staff-avatar{width:50px;height:50px;border-radius:13px}
  #settings .calendar-staff-actions{
    grid-column:1/-1;
    justify-content:space-between;
    padding-top:2px;
  }
  #settings .calendar-staff-actions .btn{min-width:110px}
  #settings .calendar-staff-add{grid-template-columns:1fr}
  #settings .calendar-staff-add .btn{width:100%}
}


/* Mobile clients + compact edit popups — 2026-09-27 */
.client-mobile-label{display:none}

@media(max-width:620px){
  /* Client list reads as labeled cards instead of unexplained table numbers. */
  #clients .client-table tr.client-row{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:6px 12px!important;
    align-items:start!important;
    padding:12px 4px!important;
  }
  #clients .client-table td{min-width:0!important}
  #clients .client-list-name{
    grid-column:1!important;
    grid-row:1!important;
    font-size:13.5px!important;
  }
  #clients .client-list-phone{
    grid-column:2!important;
    grid-row:1!important;
    text-align:right!important;
    font-size:11px!important;
    color:#6d8296!important;
    max-width:140px!important;
  }
  #clients .client-list-last,
  #clients .client-list-count{
    display:flex!important;
    align-items:center!important;
    gap:5px!important;
    font-size:10.5px!important;
    color:#526a81!important;
    white-space:nowrap!important;
  }
  #clients .client-list-last{grid-column:1!important;grid-row:2!important}
  #clients .client-list-count{grid-column:2!important;grid-row:2!important;justify-content:flex-end!important}
  #clients .client-mobile-label{
    display:inline!important;
    color:#93a1af!important;
    font-size:9px!important;
    font-weight:600!important;
  }

  /* Client detail is a real centered popup, not a nearly full-screen sheet. */
  .client-detail-modal{
    padding:12px!important;
    align-items:center!important;
    justify-content:center!important;
  }
  .client-detail-modal .modal{
    width:calc(100vw - 24px)!important;
    max-width:520px!important;
    height:min(660px,calc(100dvh - 24px))!important;
    max-height:calc(100dvh - 24px)!important;
    margin:auto!important;
    border-radius:18px!important;
    overflow:hidden!important;
  }
  .client-detail-shell{
    height:100%!important;
    max-height:none!important;
  }
  .client-detail-head{
    flex:0 0 auto!important;
    padding:13px 14px 11px!important;
  }
  .client-detail-identity h2{font-size:18px!important;margin-bottom:3px!important}
  .client-detail-contact{font-size:10.5px!important}
  .client-detail-tabs{
    flex:0 0 auto!important;
    padding:5px 8px 0!important;
    overflow-x:auto!important;
    overflow-y:visible!important;
  }
  .client-detail-tab-viewport{
    min-height:0!important;
    overflow:visible!important;
  }
  .client-history-panel.active{
    display:flex!important;
    flex-direction:column!important;
    overflow:visible!important;
  }
  .client-history-toolbar{
    position:relative!important;
    top:auto!important;
    flex:0 0 auto!important;
    min-height:62px!important;
    padding:10px 12px!important;
    overflow:visible!important;
    z-index:30!important;
  }
  .client-history-toolbar h3{font-size:13px!important}
  .client-history-toolbar .client-range-select{
    min-width:145px!important;
    position:relative!important;
    z-index:50!important;
  }
  .client-range-menu{
    top:calc(100% + 5px)!important;
    right:0!important;
    z-index:100!important;
    max-height:240px!important;
    overflow:auto!important;
    box-shadow:0 16px 34px rgba(25,56,88,.20)!important;
  }
  .client-history-list{
    flex:1 1 auto!important;
    height:auto!important;
    min-height:0!important;
    overflow:auto!important;
    padding:8px 12px 14px!important;
  }

  /* Appointment details remain compact and visibly modal. */
  .appointment-detail-modal{
    padding:12px!important;
    align-items:center!important;
    justify-content:center!important;
  }
  .appointment-detail-modal .modal{
    width:calc(100vw - 24px)!important;
    max-width:540px!important;
    height:auto!important;
    max-height:calc(100dvh - 24px)!important;
    margin:auto!important;
    border-radius:18px!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
  }
  .appointment-detail-modal .appointment-detail-head{
    min-height:58px!important;
    padding:11px 12px 9px!important;
    border-bottom:1px solid var(--ui-line)!important;
  }
  .appointment-detail-modal .appointment-detail-head h2{font-size:17px!important}
  .appointment-detail-modal .form-grid{
    flex:1 1 auto!important;
    min-height:0!important;
    overflow-y:auto!important;
    grid-template-columns:1fr 1fr!important;
    gap:9px 8px!important;
    padding:10px 12px 12px!important;
  }
  .appointment-detail-modal .form-field.full{grid-column:1/-1!important}
  .appointment-detail-modal .form-field input,
  .appointment-detail-modal .form-field select,
  .appointment-detail-modal .form-field textarea,
  .appointment-detail-modal .crm-control-trigger{
    min-height:40px!important;
    font-size:13px!important;
  }
  .appointment-detail-modal textarea{min-height:62px!important}
  .appointment-detail-modal .appointment-confirmation-panel{
    padding:9px 10px!important;
  }
  .appointment-detail-modal .reminder-box{
    padding:9px 10px!important;
  }
  .appointment-detail-modal .appointment-actionbar{
    position:relative!important;
    flex:0 0 auto!important;
    margin:0!important;
    padding:9px 10px calc(9px + env(safe-area-inset-bottom))!important;
    border-top:1px solid var(--ui-line)!important;
    background:#fff!important;
  }

  /* Confirmation deadline calendar is centered and fully visible. */
  .appointment-detail-modal .crm-deadline-control.open{
    z-index:2800!important;
  }
  .appointment-detail-modal .crm-deadline-control .crm-control-popover{
    position:fixed!important;
    left:12px!important;
    right:12px!important;
    top:50%!important;
    bottom:auto!important;
    width:auto!important;
    max-width:440px!important;
    max-height:calc(100dvh - 32px)!important;
    margin:0 auto!important;
    transform:translateY(-50%)!important;
    overflow:auto!important;
    z-index:2800!important;
    border-radius:14px!important;
    box-shadow:0 24px 70px rgba(20,48,77,.30)!important;
  }
  .appointment-detail-modal .crm-deadline-popover{
    max-height:none!important;
    overflow:auto!important;
    padding:12px!important;
  }
  .appointment-detail-modal .crm-deadline-layout{
    grid-template-columns:1fr!important;
    gap:8px!important;
  }
  .appointment-detail-modal .crm-deadline-calendar{
    padding:0 0 8px!important;
    border:0!important;
    border-bottom:1px solid #e6edf4!important;
  }
  .appointment-detail-modal .crm-time-grid{
    max-height:105px!important;
    grid-template-columns:repeat(4,1fr)!important;
  }
  .appointment-detail-modal .crm-deadline-actions{
    position:sticky!important;
    bottom:-12px!important;
    margin:8px -12px -12px!important;
    padding:10px 12px!important;
    background:#fff!important;
  }
}


/* Settings dropdowns + centered mobile modals — 2026-09-27 */
#settings .settings-native-select-source{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  opacity:0!important;
  pointer-events:none!important;
}
#settings .settings-select-control{
  position:relative;
  width:100%;
  min-width:0;
  font-family:var(--ui-font);
}
#settings .settings-select-trigger{
  width:100%;
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:0 6px 0 12px;
  border:1px solid var(--ui-line);
  border-radius:10px;
  background:#fff;
  color:var(--ui-text);
  font:500 13px var(--ui-font);
  text-align:left;
  cursor:pointer;
  outline:none;
}
#settings .settings-select-trigger:hover{border-color:var(--ui-line-strong)}
#settings .settings-select-control.open .settings-select-trigger{
  border-color:var(--ui-primary);
  box-shadow:0 0 0 3px rgba(var(--theme-rgb),.09);
}
#settings .settings-select-value{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#settings .settings-select-chevron{
  width:28px;height:28px;flex:0 0 28px;
  display:grid;place-items:center;
  border:1px solid #dfe8f1;
  border-radius:8px;
  background:#f4f8fc;
  color:#6b8094;
}
#settings .settings-select-chevron svg{
  width:15px;height:15px;
  fill:none;stroke:currentColor;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round;
  transition:transform .15s ease;
}
#settings .settings-select-control.open .settings-select-chevron{
  color:var(--ui-primary);
  border-color:rgba(var(--theme-rgb),.28);
  background:var(--ui-primary-soft);
}
#settings .settings-select-control.open .settings-select-chevron svg{transform:rotate(180deg)}
#settings .settings-select-menu{
  display:none;
  position:absolute;
  left:0;right:0;
  top:calc(100% + 6px);
  z-index:120;
  max-height:260px;
  overflow:auto;
  padding:5px;
  border:1px solid var(--ui-line);
  border-radius:11px;
  background:#fff;
  box-shadow:0 14px 32px rgba(24,55,87,.16);
  scrollbar-width:thin;
}
#settings .settings-select-control.opens-up .settings-select-menu{
  top:auto;
  bottom:calc(100% + 6px);
}
#settings .settings-select-control.open .settings-select-menu{display:block}
#settings .settings-select-option{
  width:100%;
  min-height:38px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:8px 10px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#40566d;
  font:500 12.5px var(--ui-font);
  text-align:left;
  cursor:pointer;
}
#settings .settings-select-option:hover{background:#f5f9fd}
#settings .settings-select-option.selected{
  background:var(--ui-primary-soft);
  color:var(--ui-primary);
  font-weight:650;
}
#settings .settings-select-check{font-size:12px;font-weight:800}
#settings .settings-select-control.is-disabled{opacity:.6;pointer-events:none}
#settings .reminder-offset-row,
#settings .calendar-import-controls,
#settings .form-field{overflow:visible}
#settings .google-disconnect-btn{
  color:#b64f4f!important;
  border-color:#efd1d1!important;
  background:#fff7f7!important;
}
#settings .google-disconnect-btn:hover{background:#fff0f0!important}

/* Client list: explain dates and counts on mobile instead of naked numbers. */
.client-mobile-label{display:none}
@media(max-width:620px){
  #clients .client-table tr{
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:5px 10px!important;
    padding:11px 5px!important;
  }
  #clients .client-list-name{grid-column:1;grid-row:1}
  #clients .client-list-phone{grid-column:2;grid-row:1}
  #clients .client-list-last{
    display:flex!important;
    grid-column:1;
    grid-row:2;
    align-items:center;
    gap:5px;
    font-size:10.5px!important;
    color:#60778d;
  }
  #clients .client-list-count{
    display:flex!important;
    grid-column:2;
    grid-row:2;
    align-items:center;
    justify-content:flex-end;
    gap:5px;
    font-size:10.5px!important;
    color:#60778d;
  }
  #clients .client-list-last strong,
  #clients .client-list-count strong{font-size:10.5px;font-weight:650;color:#536b81}
  #clients .client-mobile-label{display:inline;color:#98a5b1;font-size:9px}
}

/* Client popup is a centered dialog, not a full-height sheet. */
@media(max-width:760px){
  .client-detail-modal{
    align-items:center!important;
    justify-content:center!important;
    padding:12px!important;
  }
  .client-detail-modal .modal{
    width:calc(100vw - 24px)!important;
    max-width:520px!important;
    height:min(690px,calc(100dvh - 24px))!important;
    max-height:calc(100dvh - 24px)!important;
    margin:auto!important;
    border-radius:18px!important;
    overflow:visible!important;
    box-shadow:0 24px 60px rgba(22,50,78,.24)!important;
  }
  .client-detail-shell{
    height:100%;
    max-height:none!important;
    overflow:visible;
  }
  .client-detail-tab-viewport{min-height:0;overflow:visible!important}
  .client-detail-panel{min-height:0}
  .client-history-panel.active{
    display:flex!important;
    flex-direction:column;
    overflow:visible!important;
  }
  .client-history-toolbar{
    position:relative!important;
    z-index:30!important;
    flex:0 0 auto;
  }
  .client-history-list{
    flex:1 1 auto;
    height:auto!important;
    min-height:0;
    overflow:auto!important;
  }
  .client-range-select{position:relative;z-index:80;width:min(170px,100%)!important}
  .client-range-menu{
    z-index:200!important;
    max-height:230px;
    overflow:auto;
  }
}

/* Appointment details: centered compact modal with standard date + time fields. */
@media(max-width:760px){
  .appointment-detail-modal{
    align-items:center!important;
    justify-content:center!important;
    padding:12px!important;
  }
  .appointment-detail-modal .modal{
    width:calc(100vw - 24px)!important;
    max-width:520px!important;
    height:auto!important;
    max-height:calc(100dvh - 24px)!important;
    margin:auto!important;
    padding:0!important;
    border-radius:18px!important;
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
    box-shadow:0 24px 60px rgba(22,50,78,.26)!important;
  }
  .appointment-detail-modal .appointment-detail-head{
    position:relative!important;
    top:auto!important;
    min-height:60px!important;
    padding:12px 14px 10px!important;
  }
  .appointment-detail-modal .form-grid{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto!important;
    padding:12px 14px 14px!important;
    gap:9px!important;
  }
  .appointment-detail-modal .appointment-actionbar{
    position:relative!important;
    bottom:auto!important;
    flex:0 0 auto;
    margin:0!important;
    padding:9px 12px calc(9px + env(safe-area-inset-bottom))!important;
  }
  .appointment-detail-modal .appointment-danger-group{order:2}
  .appointment-detail-modal .appointment-primary-group{order:1}
  .appointment-detail-modal textarea{min-height:64px!important}
}

/* Confirmation deadline calendar must fit entirely inside the viewport. */
@media(max-width:620px){
  .appointment-detail-modal .crm-deadline-control.open .crm-deadline-popover{
    position:fixed!important;
    left:16px!important;
    right:16px!important;
    top:50%!important;
    bottom:auto!important;
    transform:translateY(-50%)!important;
    width:auto!important;
    max-width:420px!important;
    max-height:calc(100dvh - 32px)!important;
    margin:0 auto!important;
    padding:12px!important;
    overflow:auto!important;
    z-index:4000!important;
    border-radius:15px!important;
    box-shadow:0 22px 60px rgba(20,47,76,.28)!important;
  }
  .appointment-detail-modal .crm-deadline-layout{
    grid-template-columns:1fr!important;
    gap:8px!important;
  }
  .appointment-detail-modal .crm-deadline-calendar{
    padding:0 0 8px!important;
    border:0!important;
    border-bottom:1px solid #e6edf4!important;
  }
  .appointment-detail-modal .crm-calendar-day{
    min-height:30px;
    aspect-ratio:auto;
  }
  .appointment-detail-modal .crm-deadline-time-title{height:26px}
  .appointment-detail-modal .crm-time-grid{
    max-height:96px!important;
    grid-template-columns:repeat(4,1fr)!important;
  }
  .appointment-detail-modal .crm-deadline-actions{
    position:sticky!important;
    bottom:-12px!important;
    margin:8px -12px -12px!important;
    padding:9px 12px 12px!important;
    background:#fff!important;
  }
}


/* Unified SMS confirmation flow + rounded client modal — 2026-09-27 */
#settings .confirmation-purpose-note{
  display:grid;
  gap:3px;
  margin:0 0 10px;
  padding:10px 11px;
  border:1px solid color-mix(in srgb,var(--ui-primary) 22%,#dce6ef);
  border-radius:11px;
  background:var(--ui-primary-soft);
}
#settings .confirmation-purpose-note strong{
  font-size:12px;
  color:var(--ui-primary);
}
#settings .confirmation-purpose-note span{
  font-size:11px;
  line-height:1.42;
  color:#60758a;
}
#settings .confirmation-log-wrap{
  margin-top:11px;
  padding-top:10px;
  border-top:1px solid #e6edf4;
}
#settings .confirmation-log-wrap summary{
  cursor:pointer;
  font-size:12px;
  font-weight:650;
  color:#60758a;
}
#settings > .booking-settings-card,
#settings > .confirmation-settings-card,
#settings > .last-minute-settings-card{grid-column:1/-1!important}
#settings > .security-settings-card{grid-column:span 6}

/* Keep client details visibly rounded like the rest of the product. */
.client-detail-modal{
  align-items:center!important;
  justify-content:center!important;
}
.client-detail-modal .modal{
  border-radius:20px!important;
  overflow:hidden!important;
  background:#fff!important;
  box-shadow:0 24px 64px rgba(22,50,78,.26)!important;
}
.client-detail-shell{
  border-radius:inherit!important;
  overflow:hidden!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
}
.client-detail-head,
.client-detail-tabs{
  flex:0 0 auto!important;
}
.client-detail-tab-viewport{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:auto!important;
  overscroll-behavior:contain;
}
.client-detail-panel{
  min-height:0!important;
}
.client-history-panel.active{
  overflow:visible!important;
}
.client-range-menu{
  border-radius:12px!important;
  box-shadow:0 14px 30px rgba(25,56,88,.18)!important;
}

@media(max-width:760px){
  .client-detail-modal{padding:14px!important}
  .client-detail-modal .modal{
    width:calc(100vw - 28px)!important;
    max-width:500px!important;
    height:min(650px,calc(100dvh - 28px))!important;
    max-height:calc(100dvh - 28px)!important;
    border-radius:20px!important;
    overflow:hidden!important;
  }
  .client-detail-shell{overflow:hidden!important}
  .client-detail-tab-viewport{overflow:auto!important}
  .client-history-list{overflow:visible!important}
  #settings .confirmation-purpose-note{padding:9px 10px}
}



/* Settings + sidebar final layout contract — 2026-09-28 */

/* Checkboxes: one reliable square control everywhere, never stretched by parent layouts. */
#settings input[type="checkbox"],
.app input[type="checkbox"]{
  appearance:none!important;
  -webkit-appearance:none!important;
  box-sizing:border-box!important;
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  min-height:18px!important;
  max-width:18px!important;
  max-height:18px!important;
  padding:0!important;
  margin:0!important;
  border:1px solid #b9c9d8!important;
  border-radius:5px!important;
  background-color:#fff!important;
  background-image:none!important;
  background-position:center!important;
  background-repeat:no-repeat!important;
  background-size:12px 12px!important;
  box-shadow:none!important;
  flex:0 0 18px!important;
  cursor:pointer;
  vertical-align:middle;
}
#settings input[type="checkbox"]:checked,
.app input[type="checkbox"]:checked{
  border-color:var(--ui-primary)!important;
  background-color:var(--ui-primary)!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.1 8.1 6.4 11.2 12.9 4.8' fill='none' stroke='white' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important;
}
#settings input[type="checkbox"]:focus-visible,
.app input[type="checkbox"]:focus-visible{
  outline:none!important;
  box-shadow:0 0 0 3px rgba(var(--theme-rgb),.12)!important;
}
#settings input[type="checkbox"]:disabled,
.app input[type="checkbox"]:disabled{opacity:.48;cursor:not-allowed}

/* These are semantic inputs hidden behind custom pills/switches. */
.client-switch>input,
.working-day-chip input,
.client-choice-pill input,
.client-day-pill input,
.appointment-toggle input{
  position:absolute!important;
  width:1px!important;height:1px!important;min-width:1px!important;min-height:1px!important;
  max-width:1px!important;max-height:1px!important;
  opacity:0!important;
  pointer-events:none!important;
  margin:0!important;
}

/* Different-hours checkbox must remain the same canonical 18px square. */
#settings .custom-hours-toggle{
  min-height:32px;
  align-items:center!important;
}
#settings .custom-hours-toggle input[type="checkbox"]{
  width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;
  max-width:18px!important;max-height:18px!important;
  padding:0!important;
}

/* Confirmation settings: three compact equal controls in one row on desktop. */
#settings .confirmation-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  align-items:start!important;
  gap:10px!important;
}
#settings .confirmation-grid>.form-field{
  display:flex!important;
  flex-direction:column!important;
  gap:8px!important;
  min-width:0!important;
  min-height:0!important;
  padding:11px!important;
  align-self:start!important;
}
#settings .confirmation-grid>.form-field>label{
  min-height:28px!important;
  display:flex!important;
  align-items:flex-end!important;
  margin:0!important;
}
#settings .confirmation-grid .unit-input{
  width:100%!important;
  min-width:0!important;
  height:42px!important;
  min-height:42px!important;
  margin:0!important;
  flex:0 0 42px!important;
}
#settings .confirmation-grid .unit-input input{
  height:40px!important;
  min-height:40px!important;
  padding:0 10px!important;
}
#settings .confirmation-grid .unit-input span{
  min-width:max-content;
  padding:0 9px!important;
  font-size:11.5px!important;
}
#settings .confirmation-option-control{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 20px!important;
  align-items:center!important;
  gap:8px!important;
  margin:0!important;
}
#settings .confirmation-inline-toggle{
  width:20px!important;
  height:40px!important;
  min-width:20px!important;
  min-height:40px!important;
  display:grid!important;
  place-items:center!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
#settings .confirmation-inline-toggle input{
  width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;
  max-width:18px!important;max-height:18px!important;
}
#settings .confirmation-rule-help{
  margin-top:0!important;
  min-height:0!important;
}
#settings .safety-row input{align-self:flex-start;margin-top:1px!important}

/* Cards requested as full-width work areas. */
#settings > .booking-settings-card,
#settings > .confirmation-settings-card,
#settings > .last-minute-settings-card{
  grid-column:1/-1!important;
  width:100%!important;
}
#settings.page.active{
  width:100%!important;
  max-width:none!important;
}
#settings>*{min-width:0}

/* Password visibility control: clean SVG eye / eye-off, no emoji glyph. */
#settings .password-eye{
  width:34px!important;height:34px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:#6f8497!important;
}
#settings .password-eye:hover,
#settings .password-eye.active{background:#eef5fb!important;color:var(--ui-primary)!important}
#settings .password-eye-icon,
#settings .password-eye-icon svg{width:18px;height:18px;display:block}
#settings .password-eye-icon svg{
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
#settings .password-eye .eye-closed{display:none}
#settings .password-eye.active .eye-open{display:none}
#settings .password-eye.active .eye-closed{display:block}

/* Sidebar collapse: toggle lives on the edge, never on top of the logo. */
.app{width:100%;max-width:100vw;min-width:0}
.main{width:100%;max-width:100%;min-width:0;overflow-x:hidden}
.sidebar{overflow:visible}
.sidebar-toggle{
  right:-15px!important;
  top:15px!important;
  z-index:30!important;
}
body.sidebar-collapsed .sidebar-toggle{right:-15px!important}
body.sidebar-collapsed .sidebar .brand{
  justify-content:center!important;
  margin:4px 0 28px!important;
  padding:0!important;
}
body.sidebar-collapsed .sidebar .brand-mark{
  width:36px!important;height:36px!important;flex:0 0 36px!important;
}
body.sidebar-collapsed .main{min-width:0!important;width:100%!important}
body.sidebar-collapsed #settings.page.active{width:100%!important;max-width:none!important}

/* Longer sync label is allowed in expanded sidebar; icon-only when collapsed. */
.sidebar .sync-btn{gap:7px;white-space:normal;text-align:center;line-height:1.2}
.sidebar .sync-btn .sync-label{display:inline}
body.sidebar-collapsed .sidebar .sync-btn .sync-label{display:none!important}

/* Responsive settings: requested pair stays 50/50 only while there is real space. */
@media(max-width:1180px){
  #settings .confirmation-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:900px){
  #settings .confirmation-grid{grid-template-columns:1fr!important}
  #settings .confirmation-grid>.form-field>label{min-height:0!important;align-items:center!important}
  #settings .confirmation-option-control{grid-template-columns:minmax(0,1fr) 20px!important}
}
@media(max-width:620px){
  .main{padding-left:12px!important;padding-right:12px!important}
  #settings .booking-link-row{display:grid!important;grid-template-columns:1fr 1fr!important}
  #settings .booking-link-row input{grid-column:1/-1!important}
}

/* Global network action loader — 2026-09-28 */
.global-loader{
  position:fixed;
  inset:0;
  z-index:20000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(235,243,250,.42);
  backdrop-filter:blur(2px);
  -webkit-backdrop-filter:blur(2px);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .16s ease,visibility .16s ease;
}
.global-loader.open{
  opacity:1;
  visibility:visible;
  pointer-events:all;
}
.global-loader-card{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:148px;
  min-height:48px;
  padding:10px 14px;
  border:1px solid rgba(205,220,234,.92);
  border-radius:14px;
  background:rgba(255,255,255,.97);
  box-shadow:0 15px 42px rgba(34,69,103,.16);
}
.global-loader-spinner{
  width:21px;
  height:21px;
  flex:0 0 21px;
  border:2.5px solid rgba(var(--theme-rgb),.17);
  border-top-color:var(--ui-primary);
  border-radius:50%;
  animation:globalLoaderSpin .72s linear infinite;
}
.global-loader-copy{
  color:#38536c;
  font-family:Inter,system-ui,sans-serif;
  font-size:12.5px;
  font-weight:650;
  line-height:1.2;
  white-space:nowrap;
}
@keyframes globalLoaderSpin{to{transform:rotate(360deg)}}
@media(max-width:620px){
  .global-loader{padding:14px}
  .global-loader-card{
    min-width:136px;
    min-height:46px;
    padding:9px 13px;
    border-radius:13px;
  }
  .global-loader-copy{font-size:12px}
}
@media(prefers-reduced-motion:reduce){
  .global-loader{transition:none}
  .global-loader-spinner{animation-duration:1.2s}
}


/* FINAL SETTINGS STABILIZATION — 2026-09-28 */
#settings > #organizationUsersCard{
  grid-column:1/-1!important;
  width:100%!important;
}
#settings .organization-team-card{
  display:block!important;
  width:100%!important;
}
#settings .organization-team-card>.team-staff-group{
  width:100%!important;
  max-width:none!important;
}
#settings > .system-access-card,
#settings > .business-settings-card{
  grid-column:span 6!important;
  width:100%!important;
  height:auto!important;
  align-self:start!important;
}
@media(max-width:1180px){
  #settings > .system-access-card,
  #settings > .business-settings-card{
    grid-column:1/-1!important;
  }
}

/* Canonical checkbox: square, rounded, never stretched by unit/input layouts. */
#settings input[type="checkbox"]:not([hidden]),
.app input[type="checkbox"]:not([hidden]){
  appearance:none!important;
  -webkit-appearance:none!important;
  display:inline-block!important;
  box-sizing:border-box!important;
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  min-height:18px!important;
  max-width:18px!important;
  max-height:18px!important;
  padding:0!important;
  margin:0!important;
  border:1px solid #b8c9d8!important;
  border-radius:5px!important;
  background:#fff!important;
  background-image:none!important;
  box-shadow:none!important;
  flex:0 0 18px!important;
  vertical-align:middle!important;
}
#settings input[type="checkbox"]:not([hidden]):checked,
.app input[type="checkbox"]:not([hidden]):checked{
  border-color:var(--ui-primary)!important;
  background-color:var(--ui-primary)!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.1 8.1 6.4 11.2 12.9 4.8' fill='none' stroke='white' stroke-width='2.35' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important;
  background-repeat:no-repeat!important;
  background-position:center!important;
  background-size:12px 12px!important;
}
#settings .custom-hours-toggle{
  display:inline-flex!important;
  align-items:center!important;
  gap:8px!important;
  width:auto!important;
  min-height:32px!important;
  padding:0!important;
}
#settings .custom-hours-toggle input[type="checkbox"]{
  position:static!important;
  opacity:1!important;
  pointer-events:auto!important;
}
#settings .confirmation-inline-toggle{
  display:grid!important;
  place-items:center!important;
  width:24px!important;
  height:24px!important;
  min-width:24px!important;
  min-height:24px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}
#settings .confirmation-inline-toggle input[type="checkbox"]{
  position:static!important;
  opacity:1!important;
  pointer-events:auto!important;
}

/* Full-width workflow cards. */
#settings > .booking-settings-card,
#settings > .confirmation-settings-card,
#settings > .last-minute-settings-card{
  grid-column:1/-1!important;
  width:100%!important;
}

/* SMS confirmation controls: compact, aligned, no dead vertical space. */
#settings .confirmation-grid{
  display:grid!important;
  grid-template-columns:repeat(3,280px)!important;
  justify-content:start!important;
  gap:10px!important;
  align-items:stretch!important;
}
#settings .confirmation-grid>.form-field{
  width:280px!important;
  min-width:0!important;
  min-height:156px!important;
  height:156px!important;
  align-self:stretch!important;
  padding:12px!important;
  display:grid!important;
  align-content:start!important;
  gap:8px!important;
}
#settings .confirmation-grid>.form-field>label{
  min-height:22px!important;
  margin:0!important;
  align-items:center!important;
}
#settings .confirmation-grid .unit-input{
  width:176px!important;
  max-width:100%!important;
  min-width:0!important;
  height:40px!important;
  min-height:40px!important;
  margin:0!important;
}
#settings .confirmation-grid .auto-cancel-value-input{
  width:222px!important;
}
#settings .confirmation-grid .unit-input input{
  min-width:0!important;
  height:38px!important;
  min-height:38px!important;
  padding:0 9px!important;
  font-variant-numeric:tabular-nums;
}
#settings .confirmation-option-control{
  display:grid!important;
  grid-template-columns:max-content 20px!important;
  justify-content:start!important;
  align-items:center!important;
  gap:8px!important;
}
#settings .confirmation-rule-help{
  width:min(100%,360px)!important;
  margin:0!important;
}
@media(max-width:900px){
  #settings .confirmation-grid{grid-template-columns:1fr!important}
  #settings .confirmation-grid>.form-field{width:100%!important}
  #settings .confirmation-grid .unit-input{width:176px!important}
  #settings .confirmation-grid .auto-cancel-value-input{width:222px!important}
  #settings .confirmation-option-control{grid-template-columns:max-content 20px!important}
}

/* Password eye is always the same clean SVG button. */
#settings .password-field{
  position:relative!important;
}
#settings .password-field input{
  padding-right:46px!important;
}
#settings .password-eye{
  position:absolute!important;
  right:5px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  min-height:34px!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
  border:0!important;
  border-radius:9px!important;
  background:transparent!important;
  color:#6f8497!important;
  box-shadow:none!important;
}
#settings .password-eye-icon,
#settings .password-eye-icon svg{
  width:18px!important;
  height:18px!important;
  display:block!important;
}
#settings .password-eye-icon svg{
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.8!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
#settings .password-eye .eye-closed{display:none!important}
#settings .password-eye.active .eye-open{display:none!important}
#settings .password-eye.active .eye-closed{display:block!important}

/* Collapsed sidebar never lets the logo collide with the edge toggle. */
body.sidebar-collapsed .sidebar{
  width:76px!important;
  padding-left:10px!important;
  padding-right:10px!important;
}
body.sidebar-collapsed .sidebar .brand{
  width:100%!important;
  min-width:0!important;
  height:42px!important;
  margin:4px 0 22px!important;
  padding:0!important;
  justify-content:center!important;
  overflow:visible!important;
}
body.sidebar-collapsed .sidebar .brand-mark{
  width:32px!important;
  height:32px!important;
  flex:0 0 32px!important;
  border-radius:10px!important;
}
body.sidebar-collapsed .sidebar-toggle{
  width:28px!important;
  height:28px!important;
  right:-14px!important;
  top:54px!important;
  z-index:40!important;
}
body.sidebar-collapsed .sidebar-toggle svg{
  width:15px!important;
  height:15px!important;
}
body.sidebar-collapsed .app{
  grid-template-columns:76px minmax(0,1fr)!important;
}
body.sidebar-collapsed .main{
  grid-column:2!important;
  min-width:0!important;
  width:auto!important;
  max-width:none!important;
}

/* Staff rows stay balanced after moving image delete onto avatar. */
#settings .calendar-staff-card{
  grid-template-columns:58px minmax(0,1fr) auto!important;
  width:100%!important;
}
#settings .calendar-staff-main{min-width:0!important}
#settings .calendar-staff-main input{width:100%!important}
#settings .calendar-staff-actions{flex-wrap:nowrap!important}
@media(max-width:900px){
  #settings .calendar-staff-card{
    grid-template-columns:54px minmax(0,1fr)!important;
  }
  #settings .calendar-staff-actions{
    grid-column:1/-1!important;
    flex-wrap:wrap!important;
    justify-content:flex-start!important;
  }
}
@media(max-width:620px){
  #settings.page.active{width:100%!important;max-width:100%!important}
  #settings .section{width:100%!important;max-width:100%!important}
}


/* SETTINGS MOBILE + TEAM CONTROLS — owner-requested stabilization 2026-09-28 */

/* Count/status tags use one consistent pill treatment. */
#settings #therapistSettingsCount,
#settings #organizationUsersCount,
#settings .service-count-badge,
#settings .client-readonly-badge,
#settings .team-role-badge,
#settings .team-you{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:auto!important;
  max-width:100%!important;
  min-height:27px!important;
  padding:0 9px!important;
  border:1px solid #dce7f2!important;
  border-radius:999px!important;
  background:#f3f8fd!important;
  color:#52718e!important;
  font-family:Inter,system-ui,sans-serif!important;
  font-size:10.5px!important;
  font-weight:700!important;
  line-height:1!important;
  white-space:nowrap!important;
}
#settings .team-you{
  min-height:21px!important;
  padding:0 7px!important;
  border-color:#d9eee3!important;
  background:#eef9f3!important;
  color:#2b8058!important;
}
#settings .team-role-badge{
  min-height:25px!important;
  background:#f1f5f9!important;
  color:#566e84!important;
}

/* Team headings: title/copy stays readable, count tag never collides. */
#settings .team-members-heading{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:10px!important;
  flex-wrap:wrap!important;
}
#settings .team-members-heading>div{
  flex:1 1 220px!important;
  min-width:0!important;
}
#settings .team-members-heading>span{
  flex:0 0 auto!important;
  margin-left:auto!important;
}

/* Staff action layout: checkbox above, two equal buttons below. */
#settings .calendar-staff-actions{
  display:grid!important;
  grid-template-columns:1fr!important;
  align-items:start!important;
  justify-items:stretch!important;
  gap:8px!important;
  min-width:220px!important;
  max-width:260px!important;
  flex-wrap:nowrap!important;
}
#settings .calendar-staff-active{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:8px!important;
  width:max-content!important;
  max-width:100%!important;
  min-height:28px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:#536b82!important;
  font-size:11.5px!important;
  font-weight:650!important;
}
#settings .calendar-staff-active input[type="checkbox"]{
  position:static!important;
  opacity:1!important;
  pointer-events:auto!important;
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  min-height:18px!important;
  max-width:18px!important;
  max-height:18px!important;
  flex:0 0 18px!important;
}
#settings .calendar-staff-button-row{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;
  width:100%!important;
}
#settings .calendar-staff-button-row .btn{
  width:100%!important;
  min-width:0!important;
  min-height:38px!important;
  margin:0!important;
}

/* Appointment SMS checkbox stays a real square checkbox, never a stretched switch. */
.appointment-detail-modal .reminder-master{
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  min-width:0!important;
}
.appointment-detail-modal .reminder-master input[type="checkbox"]{
  position:static!important;
  opacity:1!important;
  pointer-events:auto!important;
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  min-height:18px!important;
  max-width:18px!important;
  max-height:18px!important;
  flex:0 0 18px!important;
  margin:0!important;
}

/* Mobile Settings is a true single-column layout. */
@media(max-width:900px){
  #settings.page.active{
    grid-template-columns:minmax(0,1fr)!important;
    gap:10px!important;
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
  }
  #settings.page.active>*{
    grid-column:1!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  #settings .calendar-staff-card{
    grid-template-columns:54px minmax(0,1fr)!important;
    align-items:start!important;
  }
  #settings .calendar-staff-actions{
    grid-column:1/-1!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    padding-top:3px!important;
  }
}

@media(max-width:620px){
  #settings.page.active{
    padding:0!important;
    gap:9px!important;
  }
  #settings .section{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    padding:13px!important;
    overflow:visible!important;
  }
  #settings .section-head{
    align-items:flex-start!important;
    flex-wrap:wrap!important;
    gap:8px!important;
  }
  #settings .section-head>.booking-toggle{
    margin-left:0!important;
  }
  #settings .form-grid,
  #settings .org-branding-grid,
  #settings .org-user-invite{
    grid-template-columns:minmax(0,1fr)!important;
  }
  #settings .client-plan-head-actions{
    width:100%!important;
    justify-content:space-between!important;
    flex-wrap:wrap!important;
  }
  #settings .client-billing-month{
    min-width:0!important;
    width:min(170px,100%)!important;
  }
  #settings .calendar-staff-card{
    grid-template-columns:48px minmax(0,1fr)!important;
    gap:9px!important;
    padding:10px!important;
  }
  #settings .calendar-staff-avatar-wrap,
  #settings .calendar-staff-avatar-wrap .calendar-staff-avatar,
  #settings .calendar-staff-avatar{
    width:48px!important;
    height:48px!important;
  }
  #settings .calendar-staff-main input{
    min-height:42px!important;
    font-size:14px!important;
  }
  #settings .calendar-staff-meta{
    font-size:10.5px!important;
    line-height:1.35!important;
  }
  #settings .calendar-staff-button-row{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
  }
  #settings .calendar-staff-button-row .btn{
    min-height:40px!important;
    font-size:12px!important;
  }
  #settings .team-member-card{
    grid-template-columns:44px minmax(0,1fr)!important;
    gap:9px!important;
    padding:10px!important;
  }
  #settings .team-member-avatar{
    width:44px!important;
    height:44px!important;
  }
  #settings .team-member-actions{
    grid-column:1/-1!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:8px!important;
    width:100%!important;
  }
  #settings .team-invite-divider{
    margin:14px 0 10px!important;
  }
  #settings #therapistSettingsCount,
  #settings #organizationUsersCount,
  #settings .service-count-badge{
    min-height:25px!important;
    padding:0 8px!important;
    font-size:10px!important;
  }
}


/* Staff avatar sizing polish — 2026-09-28 */
#settings .calendar-staff-avatar-wrap,
#settings .calendar-staff-avatar-wrap .calendar-staff-avatar,
#settings .calendar-staff-avatar{
  width:60px!important;
  height:60px!important;
}
#settings .calendar-staff-avatar-wrap{flex:0 0 60px!important}
#settings .calendar-staff-avatar i{
  right:3px!important;
  bottom:3px!important;
  width:23px!important;
  height:23px!important;
  border-radius:7px!important;
  font-size:13px!important;
}
#settings .calendar-staff-avatar-remove{
  top:-6px!important;
  right:-6px!important;
  width:25px!important;
  height:25px!important;
  min-width:25px!important;
  min-height:25px!important;
  font-size:16px!important;
  border-width:2px!important;
}
@media(max-width:900px){
  #settings .calendar-staff-card{
    grid-template-columns:60px minmax(0,1fr)!important;
  }
}
@media(max-width:620px){
  #settings .calendar-staff-card{
    grid-template-columns:58px minmax(0,1fr)!important;
  }
  #settings .calendar-staff-avatar-wrap,
  #settings .calendar-staff-avatar-wrap .calendar-staff-avatar,
  #settings .calendar-staff-avatar{
    width:58px!important;
    height:58px!important;
  }
  #settings .calendar-staff-avatar-wrap{flex-basis:58px!important}
  #settings .calendar-staff-avatar i{
    width:22px!important;
    height:22px!important;
    font-size:12px!important;
  }
  #settings .calendar-staff-avatar-remove{
    width:24px!important;
    height:24px!important;
    min-width:24px!important;
    min-height:24px!important;
    font-size:15px!important;
  }
}


/* Resource / accommodation booking controls — 2026-09-28 */
#settings .resource-price-label{
  margin-top:3px!important;
  font-size:10px!important;
  color:#7b8c9e!important;
  font-weight:650!important;
}
#settings .resource-price-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:7px!important;
}
#settings .resource-price-row input{
  min-width:0!important;
}
#settings .resource-price-row span{
  min-height:38px;
  display:flex;
  align-items:center;
  padding:0 9px;
  border:1px solid #dce7f0;
  border-radius:10px;
  background:#f8fbfe;
  color:#657b90;
  font-size:10.5px;
  font-weight:650;
}
#settings .business-preset-meta{
  text-align:right;
  line-height:1.35;
}
@media(max-width:620px){
  #settings .business-preset-head{
    align-items:flex-start!important;
    flex-direction:column!important;
  }
  #settings .business-preset-meta{text-align:left!important}
}


/* ==========================================================================
   SETTINGS WORKFLOW LAYOUT — 2026-09-28
   ========================================================================== */

/* Number fields use permanent up/down arrows so editable values are obvious. */
#settings .unit-input.has-number-stepper{
  grid-template-columns:minmax(0,1fr) auto 30px!important;
}
#settings .number-stepper{
  align-self:stretch;
  display:grid;
  grid-template-rows:1fr 1fr;
  width:30px;
  min-height:40px;
  border-left:1px solid #dbe5ef;
  background:#f7fafe;
}
#settings .number-stepper button{
  width:30px!important;
  min-width:30px!important;
  min-height:0!important;
  height:auto!important;
  padding:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  line-height:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:#617b92!important;
  box-shadow:none!important;
}
#settings .number-stepper button+button{border-top:1px solid #e2eaf2!important}
#settings .number-stepper button:hover{background:#eaf4fe!important;color:#246fb7!important}
#settings .number-stepper button:active{background:#deedfc!important}
#settings .number-stepper svg{display:block;width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.1;stroke-linecap:round;stroke-linejoin:round}
#settings .unit-input input[type="number"]{-moz-appearance:textfield}
#settings .unit-input input[type="number"]::-webkit-inner-spin-button,
#settings .unit-input input[type="number"]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}

/* Automatic release can be entered in minutes or hours. */
#settings .auto-cancel-value-input{grid-template-columns:minmax(0,1fr) auto 30px!important}
#settings .auto-cancel-unit-toggle{
  align-self:stretch;
  display:grid;
  grid-template-columns:repeat(2,auto);
  align-items:center;
  gap:3px;
  padding:4px;
  border-left:1px solid #dbe5ef;
  background:#f8fbfe;
}
#settings .auto-cancel-unit-toggle button{
  min-width:38px!important;
  min-height:32px!important;
  height:32px!important;
  padding:0 8px!important;
  border:0!important;
  border-radius:7px!important;
  background:transparent!important;
  color:#71869a!important;
  font-size:10.5px!important;
  font-weight:700!important;
  box-shadow:none!important;
}
#settings .auto-cancel-unit-toggle button.active{
  background:#e8f3ff!important;
  color:#246fb7!important;
}

/* Automatic sending and its limits are one related settings surface. */
#settings .last-minute-rules-shell{
  padding:11px;
  border:1px solid #e0e9f2;
  border-radius:13px;
  background:#fbfdff;
  margin-bottom:9px;
}
#settings .last-minute-rules-section{min-width:0}
#settings .last-minute-rules-section+.last-minute-rules-section{
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid #e5edf4;
}
#settings .last-minute-rules-shell .settings-subhead{margin-bottom:8px}
#settings .last-minute-config-grid.automatic-rules{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:10px!important;
}
#settings .last-minute-config-grid.common-rules{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
}
#settings .last-minute-rules-shell .last-minute-config-grid>.form-field{
  max-width:none!important;
  min-width:0!important;
  padding:9px 10px 10px!important;
}

/* Security and Google Calendar share one desktop row. */
#settings > .security-settings-card{
  grid-column:span 5!important;
  width:100%!important;
}
#settings > .settings-grid{
  grid-column:span 7!important;
  width:100%!important;
  display:block!important;
}
#settings > .settings-grid .google-calendar-integration{
  width:100%!important;
  min-height:100%!important;
  padding:16px!important;
}
#settings .security-settings-card .security-password-grid{
  grid-template-columns:1fr!important;
}
#settings .security-settings-card .form-field{min-width:0}
#settings .integration-actions{display:flex;gap:8px;flex-wrap:wrap}

/* Mobile Settings stays compact and truly single-column. */
@media(max-width:900px){
  #settings > .security-settings-card,
  #settings > .settings-grid{
    grid-column:1/-1!important;
  }
  #settings .last-minute-config-grid.automatic-rules{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  #settings .last-minute-config-grid.automatic-rules>.form-field:nth-child(3){
    grid-column:1/-1!important;
  }
  #settings .last-minute-config-grid.common-rules{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:620px){
  #settings .settings-subhead{
    flex-direction:column!important;
    align-items:flex-start!important;
    gap:3px!important;
  }
  #settings .last-minute-config-grid.automatic-rules,
  #settings .last-minute-config-grid.common-rules{
    grid-template-columns:1fr!important;
  }
  #settings .last-minute-config-grid.automatic-rules>.form-field:nth-child(3){
    grid-column:auto!important;
  }
  #settings .last-minute-rules-shell{padding:9px!important}
  #settings .last-minute-mode-cards{grid-template-columns:1fr!important}
  #settings .integration-actions{display:grid!important;grid-template-columns:1fr!important}
  #settings .integration-actions .btn{width:100%!important}
  #settings .calendar-import-controls{grid-template-columns:1fr!important;width:100%!important;max-width:none!important}
  #settings .calendar-import-controls .btn{width:100%!important}
  #settings .auto-cancel-value-input{grid-template-columns:minmax(0,1fr) auto 32px!important}
  #settings .auto-cancel-unit-toggle button{min-width:34px!important;padding:0 6px!important}
}

/* ==========================================================================
   STUDIO 7 ADMIN — mobile cards + SMS demo tools — 2026-09-28
   ========================================================================== */
.sms-test-note{margin:-2px 0 14px;padding:11px 12px;border:1px solid #dce9f6;border-radius:12px;background:#f6faff;color:#5b7188;font-size:12px;line-height:1.45}
.sms-test-preview{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px;padding:12px;border:1px solid var(--ui-line,#dce6ef);border-radius:12px;background:#fbfdff}
.sms-test-preview>div{display:grid;gap:3px;min-width:0}.sms-test-preview strong{font-size:12.5px;color:#314e68}.sms-test-preview span{font-size:10.5px;color:var(--muted)}
.sms-test-preview .btn{flex:0 0 auto;text-decoration:none}.sms-test-preview .btn.disabled{pointer-events:none;opacity:.45}
.sms-test-status{gap:3px;margin-top:12px;padding:11px 12px;border-radius:12px;border:1px solid transparent;font-size:11.5px;line-height:1.4}
.sms-test-status strong{font-size:12.5px}.sms-test-status span{color:inherit;opacity:.82}
.sms-test-status.sending,.sms-test-status.sent{background:#eef6ff;border-color:#d5e8fb;color:#356f9f}.sms-test-status.delivered{background:#eef9f3;border-color:#d3ecdf;color:#287554}.sms-test-status.failed{background:#fff1f1;border-color:#f1d7d7;color:#a14545}
.admin-test-sms-btn{border-color:#d5e8fb!important}
@media(max-width:760px){
  #admin{overflow:visible}
  #admin .headline{display:grid;grid-template-columns:1fr;gap:10px}
  #admin .headline>.btn{width:100%}
  #admin #adminMetrics{grid-template-columns:1fr 1fr!important;gap:8px;margin:12px 0}
  #admin #adminMetrics .metric{padding:12px}
  #admin #adminMetrics .metric .value{font-size:21px;margin-top:5px}
  #admin .admin-toolbar{display:grid!important;grid-template-columns:1fr;gap:8px}
  #admin .admin-search-wrap,#admin .admin-toolbar .admin-filter-select,#admin .admin-toolbar .btn{width:100%;min-width:0;max-width:none}
  #admin .table-wrap{overflow:visible!important}
  #admin .admin-client-table,#admin .admin-client-table tbody{display:block;width:100%}
  #admin .admin-client-table thead{display:none}
  #admin .admin-client-table .admin-client-row{display:block;width:100%;margin:0 0 10px;padding:12px;border:1px solid var(--ui-line,#dce6ef);border-radius:14px;background:#fff;box-shadow:0 4px 14px rgba(40,75,110,.045)}
  #admin .admin-client-table .admin-client-row td{display:grid;grid-template-columns:minmax(88px,.75fr) minmax(0,1.25fr);align-items:start;gap:10px;width:100%;padding:8px 0!important;border:0!important;border-top:1px solid #edf2f6!important;font-size:12.5px;line-height:1.35;min-width:0}
  #admin .admin-client-table .admin-client-row td::before{content:attr(data-label);font-size:10.5px;font-weight:700;color:#7a8d9f;line-height:1.35}
  #admin .admin-client-table .admin-client-row td:first-child{display:block;padding:0 0 11px!important;border-top:0!important}
  #admin .admin-client-table .admin-client-row td:first-child::before,#admin .admin-client-table .admin-client-row td:last-child::before{display:none}
  #admin .admin-client-table .admin-client-row td:last-child{display:block;padding:11px 0 0!important}
  #admin .admin-client-name{align-items:center}
  #admin .admin-client-logo,#admin .admin-client-fallback{width:46px;height:46px;border-radius:12px;flex:0 0 auto}
  #admin .admin-client-name strong{font-size:14px}
  #admin .admin-plan-cell{min-width:0}
  #admin .admin-actions{min-width:0!important;width:100%;display:grid;grid-template-columns:1fr 1fr;gap:7px}
  #admin .admin-actions .btn{width:100%;min-width:0;min-height:42px;padding:9px 8px;font-size:11.5px}
  #platformNewClientSetup{padding:14px!important}
  #platformNewClientSetup .platform-client-grid{grid-template-columns:1fr!important}
  #platformNewClientSetup .form-field,#platformNewClientSetup .form-field.full{grid-column:auto!important}
  .admin-sms-test-modal{padding:14px!important}
  .admin-sms-test-modal .modal{width:100%;max-width:520px;padding:16px;border-radius:18px}
  .admin-sms-test-modal .sms-test-preview{align-items:stretch;flex-direction:column}
  .admin-sms-test-modal .sms-test-preview .btn{width:100%;text-align:center}
  .admin-sms-test-modal .modal-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .admin-sms-test-modal .modal-actions .btn{width:100%;min-width:0}
}
@media(max-width:390px){#admin #adminMetrics{grid-template-columns:1fr!important}#admin .admin-actions{grid-template-columns:1fr}.admin-sms-test-modal .modal-actions{grid-template-columns:1fr}}


/* Platform new-client alignment + accommodation occupancy board — 2026-09-28 */
.platform-client-grid #newClientBusinessType,
.platform-client-grid .unit-input,
.platform-client-grid .unit-input input{
  min-height:55px;
  height:55px;
}
.platform-client-grid .unit-input{
  display:flex;
  align-items:center;
}
.platform-client-grid .unit-input input{
  border:0!important;
  box-shadow:none!important;
}
#newClientBusinessTypeField.full{
  grid-column:1/-1;
}

/* Hotel-style occupancy: rows are units, columns are calendar days. */
.occupancy-board{
  --occupancy-days:14;
  display:grid;
  grid-template-columns:180px repeat(var(--occupancy-days),92px);
  grid-auto-rows:72px;
  width:max-content;
  min-width:100%;
  position:relative;
  border:1px solid #dce7f0;
  border-radius:14px;
  overflow:visible;
  background:#fff;
}
.occupancy-head{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  padding:8px;
  background:#f7fbff;
  border-right:1px solid #e3ebf3;
  border-bottom:1px solid #dce7f0;
  color:#6c8093;
  font-size:10px;
  text-transform:capitalize;
  position:sticky;
  top:0;
  z-index:5;
}
.occupancy-head strong{
  color:#173651;
  font-size:12px;
}
.occupancy-unit-head{
  left:0;
  z-index:7;
  align-items:flex-start;
  padding-left:14px;
  color:#173651;
  font-size:12px;
  font-weight:750;
}
.occupancy-day-head.today{
  background:#eef7ff;
}
.occupancy-day-head.today strong{
  color:#2f7df6;
}
.occupancy-unit{
  position:sticky;
  left:0;
  z-index:4;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:4px;
  padding:10px 12px;
  background:#fff;
  border-right:1px solid #dce7f0;
  border-bottom:1px solid #edf2f6;
  box-shadow:6px 0 12px rgba(31,67,99,.03);
}
.occupancy-unit strong{
  color:#173651;
  font-size:12px;
  line-height:1.2;
}
.occupancy-unit span{
  color:#8291a1;
  font-size:9.5px;
  line-height:1.25;
}
.occupancy-cell{
  border:0;
  border-right:1px solid #edf2f6;
  border-bottom:1px solid #edf2f6;
  background:#fff;
  padding:0;
  margin:0;
  cursor:pointer;
  min-width:0;
}
.occupancy-cell:hover{
  background:#f4f9ff;
}
.occupancy-cell.today{
  background:#fbfdff;
  box-shadow:inset 1px 0 0 #cfe4fb,inset -1px 0 0 #cfe4fb;
}
.occupancy-reservation{
  align-self:center;
  justify-self:stretch;
  z-index:3;
  height:50px;
  margin:0 4px;
  padding:7px 9px;
  border:1px solid #cfe3f8;
  border-radius:10px;
  background:#edf6ff;
  color:#286aa9;
  box-shadow:0 5px 14px rgba(40,93,140,.10);
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:2px;
  min-width:0;
  overflow:hidden;
  cursor:pointer;
  text-align:left;
  font-family:Inter,system-ui,sans-serif;
}
.occupancy-reservation strong,
.occupancy-reservation span{
  display:block;
  max-width:100%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.occupancy-reservation strong{
  font-size:11px;
  line-height:1.15;
}
.occupancy-reservation span{
  font-size:9px;
  line-height:1.15;
  opacity:.82;
}
.occupancy-reservation.pending{
  background:#fff8e7;
  border-color:#f1d98d;
  color:#916b08;
}
.occupancy-reservation.confirmed{
  background:#edf8f2;
  border-color:#c8e8d6;
  color:#24734d;
}
.occupancy-reservation.done{
  background:#f2f5f7;
  border-color:#dbe2e7;
  color:#657681;
}
.occupancy-reservation.clipped-left{
  border-top-left-radius:3px;
  border-bottom-left-radius:3px;
}
.occupancy-reservation.clipped-right{
  border-top-right-radius:3px;
  border-bottom-right-radius:3px;
}
.occupancy-empty{
  grid-column:1/-1;
  min-height:170px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  color:#7e8e9d;
  font-size:13px;
  text-align:center;
}
#calendar .calendar-card:has(.occupancy-board){
  padding:8px;
}
#calendar .calendar-scroll:has(.occupancy-board){
  overflow-x:auto;
  overflow-y:visible;
  border-radius:14px;
}
@media(max-width:760px){
  .platform-client-grid #newClientBusinessType,
  .platform-client-grid .unit-input,
  .platform-client-grid .unit-input input{
    min-height:50px;
    height:50px;
  }
  .occupancy-board{
    grid-template-columns:145px repeat(var(--occupancy-days),82px);
    grid-auto-rows:68px;
  }
  .occupancy-unit{
    padding:8px 9px;
  }
  .occupancy-unit strong{font-size:11px}
  .occupancy-unit span{font-size:9px}
  .occupancy-reservation{
    height:46px;
    padding:6px 7px;
  }
  .occupancy-reservation strong{font-size:10px}
  .occupancy-reservation span{font-size:8.5px}
}


/* Studio 7 admin mobile polish + collapsed platform integrations — 2026-09-28 */
.platform-system-card{
  padding:0!important;
  overflow:hidden;
}
.platform-system-summary{
  list-style:none;
  min-height:68px;
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  cursor:pointer;
  user-select:none;
}
.platform-system-summary::-webkit-details-marker{display:none}
.platform-system-summary-copy{display:grid;gap:4px;min-width:0}
.platform-system-summary-copy>strong{
  color:var(--ui-text,#263f57);
  font-size:15px;
  font-weight:700;
  line-height:1.2;
}
.platform-system-status{
  color:var(--ui-muted,#7d8fa1);
  font-size:11px;
  line-height:1.35;
  white-space:normal;
}
.platform-system-chevron{
  width:32px;height:32px;min-width:32px;
  display:grid;place-items:center;
  border:1px solid #dfe8f0;
  border-radius:9px;
  background:#f7fafe;
  color:#6f8294;
  transition:transform .16s,background .16s,color .16s;
}
.platform-system-chevron svg{
  width:17px;height:17px;
  fill:none;stroke:currentColor;stroke-width:2;
  stroke-linecap:round;stroke-linejoin:round;
}
.platform-system-card[open] .platform-system-summary{
  border-bottom:1px solid var(--ui-line,#e1e9f0);
}
.platform-system-card[open] .platform-system-chevron{
  transform:rotate(180deg);
  background:#eef6ff;
  color:var(--ui-primary,#2f80ed);
}
.platform-system-body{
  padding:15px 16px 16px;
}
.platform-system-help{margin-bottom:12px}
.platform-system-body>.btn{margin-top:12px}

@media(max-width:760px){
  #admin{
    padding-bottom:10px;
  }
  #admin .headline{
    gap:7px!important;
    margin-bottom:8px;
  }
  #admin .headline h1{
    font-size:22px!important;
    line-height:1.15;
    letter-spacing:-.02em;
    margin-bottom:2px;
  }
  #admin .headline .muted{font-size:11px}
  #admin .headline>.btn{
    min-height:40px;
    border-radius:10px;
    font-size:12px;
  }

  #admin #adminMetrics{
    gap:7px!important;
    margin:9px 0 10px!important;
  }
  #admin #adminMetrics .metric{
    min-height:70px;
    padding:10px 11px!important;
    border-radius:11px;
  }
  #admin #adminMetrics .metric .muted{font-size:10.5px}
  #admin #adminMetrics .metric .value{
    margin-top:3px!important;
    font-size:19px!important;
  }

  #admin .admin-toolbar{
    grid-template-columns:minmax(0,1fr) 94px!important;
    gap:7px!important;
    margin-bottom:10px;
  }
  #admin .admin-search-wrap{
    grid-column:1/-1;
  }
  #admin .admin-toolbar .admin-search-input,
  #admin .admin-toolbar .admin-filter-select,
  #admin .admin-toolbar .btn{
    min-height:40px!important;
    height:40px!important;
    border-radius:10px!important;
    font-size:11.5px!important;
  }
  #admin .admin-toolbar .admin-search-input{padding-left:38px}
  #admin .admin-search-icon{left:12px}
  #admin .admin-toolbar .admin-filter-select{
    grid-column:1;
    padding-left:11px!important;
  }
  #admin #adminRefreshBtn{
    grid-column:2;
    padding:0 10px!important;
  }

  #admin .admin-clients-section{
    padding:0!important;
    margin-bottom:10px!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }
  #admin .admin-clients-section>.section-head{
    margin:0 1px 7px!important;
    padding:0!important;
  }
  #admin .admin-clients-section>.section-head h2{
    font-size:15px;
    margin:0 0 2px;
  }
  #admin #adminClientCount{
    font-size:9.5px;
    line-height:1.35;
  }

  #admin .admin-client-table .admin-client-row{
    margin-bottom:8px!important;
    padding:10px!important;
    border-radius:12px!important;
    box-shadow:0 2px 10px rgba(40,75,110,.035)!important;
  }
  #admin .admin-client-table .admin-client-row td{
    grid-template-columns:82px minmax(0,1fr)!important;
    gap:8px!important;
    padding:6px 0!important;
    font-size:11.5px!important;
  }
  #admin .admin-client-table .admin-client-row td::before{
    font-size:9.5px!important;
  }
  #admin .admin-client-table .admin-client-row td:first-child{
    padding-bottom:9px!important;
  }
  #admin .admin-client-logo,
  #admin .admin-client-fallback{
    width:40px!important;
    height:40px!important;
    border-radius:10px!important;
  }
  #admin .admin-client-name{gap:9px}
  #admin .admin-client-name strong{font-size:12.5px!important}
  #admin .admin-client-name .muted,
  #admin .admin-client-row td .muted{
    font-size:9.5px;
    overflow-wrap:anywhere;
  }
  #admin .admin-plan-cell{gap:2px}
  #admin .admin-plan-cell strong{font-size:11.5px}
  #admin .admin-status{
    padding:4px 7px;
    font-size:9.5px;
  }

  #admin .admin-actions{
    grid-template-columns:1fr 1fr!important;
    gap:6px!important;
  }
  #admin .admin-actions [data-admin-open]{
    grid-column:1/-1;
  }
  #admin .admin-actions .btn{
    min-height:36px!important;
    padding:7px 7px!important;
    border-radius:9px!important;
    font-size:10.5px!important;
    line-height:1.15!important;
    white-space:normal!important;
    color:#4f6d88;
  }
  #admin .admin-actions .btn-primary{color:#fff}
  #admin .admin-actions .btn:empty{display:none!important}

  #platformGoogleSetup,
  #platformInfobipSetup,
  #platformBillingLink{
    margin-bottom:8px!important;
  }
  .platform-system-summary{
    min-height:58px;
    padding:11px 12px;
  }
  .platform-system-summary-copy{gap:3px}
  .platform-system-summary-copy>strong{font-size:13px}
  .platform-system-status{font-size:9.5px}
  .platform-system-chevron{
    width:30px;height:30px;min-width:30px;border-radius:8px;
  }
  .platform-system-body{
    padding:12px;
  }
  .platform-system-body .form-grid{
    grid-template-columns:1fr!important;
    gap:9px;
  }
  .platform-system-body .form-field,
  .platform-system-body .form-field.full{
    grid-column:auto!important;
  }
  .platform-system-body .form-field label{font-size:10px}
  .platform-system-body .form-field input,
  .platform-system-body .form-field select{
    min-height:40px;
    height:40px;
    font-size:11px;
    border-radius:9px;
  }
  .platform-system-help{
    margin-bottom:10px;
    font-size:10px!important;
    line-height:1.4;
  }
  .platform-system-body>.btn{
    width:100%;
    min-height:40px;
    margin-top:10px;
    font-size:11.5px;
  }

  #platformBillingLink{
    padding:11px 12px!important;
  }
  #platformBillingLink .section-head{
    gap:10px;
    margin:0!important;
    align-items:center;
  }
  #platformBillingLink .section-head h2{
    margin:0 0 2px;
    font-size:13px;
  }
  #platformBillingLink .section-head .muted{
    font-size:9.5px;
    line-height:1.35;
  }
  #platformBillingLink .btn{
    min-height:36px;
    padding:0 10px;
    font-size:10.5px;
    white-space:nowrap;
  }
}
@media(max-width:390px){
  #admin #adminMetrics{grid-template-columns:1fr 1fr!important}
  #admin .admin-actions{grid-template-columns:1fr 1fr!important}
}


/* Tablet layout + viewport-bound modal system — 2026-09-28 */

/* Every popup is anchored to the visible viewport, never to page height. */
body.modal-open{overflow:hidden!important;overscroll-behavior:none}
.modal-backdrop{
  position:fixed!important;
  inset:0!important;
  width:100vw!important;
  width:100dvw!important;
  height:100vh!important;
  height:100dvh!important;
  max-width:none!important;
  max-height:none!important;
  display:none;
  align-items:center!important;
  justify-content:center!important;
  padding:
    max(12px,env(safe-area-inset-top))
    max(12px,env(safe-area-inset-right))
    max(12px,env(safe-area-inset-bottom))
    max(12px,env(safe-area-inset-left))!important;
  overflow:hidden!important;
  overscroll-behavior:contain;
  z-index:1000!important;
}
.modal-backdrop.open{display:flex!important}
.modal-backdrop>.modal{
  --viewport-modal-width:620px;
  position:relative!important;
  inset:auto!important;
  width:min(var(--viewport-modal-width),calc(100dvw - 24px))!important;
  max-width:calc(100dvw - 24px)!important;
  max-height:calc(100dvh - 24px)!important;
  margin:0!important;
  overflow:auto!important;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  border-radius:18px!important;
}
.admin-new-client-modal>.modal{--viewport-modal-width:840px}
.availability-modal>.modal{--viewport-modal-width:880px}
.client-detail-modal>.modal{--viewport-modal-width:840px}
.appointment-detail-modal>.modal{--viewport-modal-width:700px}
.appointment-create-modal>.modal{--viewport-modal-width:660px}
.admin-price-modal>.modal{--viewport-modal-width:540px}
.admin-sms-test-modal>.modal{--viewport-modal-width:560px}
.last-minute-offer-modal>.modal{--viewport-modal-width:680px}

/* Long structured dialogs keep their own inner scroll, still bounded to viewport. */
.availability-modal>.availability-dialog,
.client-detail-modal>.modal{
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
}
.client-detail-modal>.modal{
  height:min(760px,calc(100dvh - 24px))!important;
}
.availability-modal>.availability-dialog{
  height:min(820px,calc(100dvh - 24px))!important;
}
.modal-backdrop>.modal>.section-head:first-child{
  position:sticky;
  top:0;
  z-index:12;
  background:#fff;
}
.modal-backdrop>.modal>.modal-actions:last-child{
  position:sticky;
  bottom:0;
  z-index:11;
  background:#fff;
}
.admin-new-client-dialog>.admin-new-client-head{
  top:0!important;
}
.admin-new-client-dialog>.admin-new-client-actions{
  bottom:0!important;
}

/* Tablet: use the full screen instead of squeezing content beside desktop sidebar. */
@media(min-width:761px) and (max-width:1180px){
  body{background:#f6fbff}
  .app,
  body.sidebar-collapsed .app{
    display:block!important;
    width:100%!important;
    min-width:0!important;
  }
  .sidebar{display:none!important}
  .main{
    grid-column:1!important;
    width:100%!important;
    max-width:100%!important;
    padding:18px 20px 94px!important;
    overflow-x:hidden!important;
  }
  .page{width:100%!important;max-width:100%!important;min-width:0!important}
  .mobile-topbar{
    display:flex!important;
    align-items:center;
    justify-content:space-between;
    margin:0 0 16px;
    padding:0 0 12px;
    border-bottom:1px solid var(--ui-line,var(--line));
  }
  .mobile-brand{font-size:16px}
  .mobile-brand .brand-mark{width:32px;height:32px;border-radius:10px}
  .mobile-logout-btn{width:40px;height:40px}

  .mobile-nav{
    display:flex!important;
    position:fixed!important;
    left:50%!important;
    right:auto!important;
    bottom:max(10px,env(safe-area-inset-bottom))!important;
    transform:translateX(-50%)!important;
    width:min(620px,calc(100vw - 40px))!important;
    height:64px!important;
    padding:5px 7px!important;
    border:1px solid var(--ui-line,var(--line))!important;
    border-radius:18px!important;
    background:rgba(255,255,255,.97)!important;
    backdrop-filter:blur(16px);
    -webkit-backdrop-filter:blur(16px);
    box-shadow:0 14px 38px rgba(31,65,98,.15)!important;
    z-index:80!important;
  }
  .mobile-nav button{
    flex:1;
    min-width:0;
    min-height:52px!important;
    border-radius:12px;
    font-size:11px!important;
  }
  .mobile-nav-icon{width:26px!important;height:26px!important}
  .mobile-nav-icon svg{width:24px!important;height:24px!important}
  body.platform-root .mobile-nav{display:none!important}
  body.platform-root .main{padding-bottom:26px!important}

  /* Tenant dashboard */
  #dashboard .headline{
    align-items:center!important;
    margin-bottom:12px!important;
  }
  #dashboard .headline h1{font-size:25px!important}
  #dashboard .headline>.btn{
    min-width:150px;
    min-height:42px;
  }
  #dashboard .overview-controlbar{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:10px!important;
    margin-bottom:12px!important;
  }
  #dashboard .overview-controlbar select{
    width:100%!important;
    min-width:0!important;
  }
  #dashboard #metrics{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:10px!important;
    margin:12px 0!important;
  }
  #dashboard #metrics .metric{
    min-width:0;
    padding:14px!important;
  }
  #dashboard #metrics .metric .value{font-size:23px!important}
  #dashboard .last-minute-metrics{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
  #dashboard .overview-table-card{
    padding:14px!important;
    overflow:hidden;
  }
  #dashboard .overview-table-card .table-wrap{
    width:100%;
    overflow-x:auto;
  }
  #dashboard .overview-table{
    min-width:680px!important;
    width:100%!important;
  }
  #dashboard .overview-table th,
  #dashboard .overview-table td{
    padding:10px 8px!important;
    font-size:12px!important;
  }

  /* Platform admin: cards instead of a desktop table squeezed into tablet width. */
  #admin .headline{
    align-items:center!important;
    gap:12px!important;
  }
  #admin .headline>.btn{min-width:150px}
  #admin #adminMetrics{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:10px!important;
  }
  #admin .admin-toolbar{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 220px 100px!important;
    gap:8px!important;
  }
  #admin .admin-search-wrap,
  #admin .admin-filter-select,
  #admin #adminRefreshBtn{
    min-width:0!important;
    width:100%!important;
  }
  #admin .admin-clients-section{
    padding:14px!important;
  }
  #admin .admin-clients-section .table-wrap{overflow:visible!important}
  #admin .admin-client-table,
  #admin .admin-client-table tbody{
    display:block!important;
    width:100%!important;
    min-width:0!important;
  }
  #admin .admin-client-table thead{display:none!important}
  #admin .admin-client-table tbody{
    display:grid!important;
    grid-template-columns:repeat(auto-fit,minmax(340px,1fr))!important;
    gap:10px!important;
  }
  #admin .admin-client-table .admin-client-row{
    display:block!important;
    min-width:0!important;
    padding:12px!important;
    border:1px solid var(--ui-line,var(--line))!important;
    border-radius:13px!important;
    background:#fff!important;
  }
  #admin .admin-client-table .admin-client-row td{
    display:grid!important;
    grid-template-columns:92px minmax(0,1fr)!important;
    gap:9px!important;
    width:100%!important;
    min-width:0!important;
    padding:7px 0!important;
    border:0!important;
    border-top:1px solid #edf2f6!important;
    font-size:11.5px!important;
  }
  #admin .admin-client-table .admin-client-row td::before{
    content:attr(data-label);
    color:#7a8d9f;
    font-size:9.5px;
    font-weight:700;
  }
  #admin .admin-client-table .admin-client-row td:first-child{
    display:block!important;
    padding:0 0 10px!important;
    border-top:0!important;
  }
  #admin .admin-client-table .admin-client-row td:first-child::before,
  #admin .admin-client-table .admin-client-row td:last-child::before{display:none}
  #admin .admin-client-table .admin-client-row td:last-child{
    display:block!important;
    padding-top:10px!important;
  }
  #admin .admin-actions{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
  }
  #admin .admin-actions [data-admin-open]{grid-column:1/-1}
  #admin .admin-actions .btn{
    width:100%!important;
    min-width:0!important;
    min-height:36px!important;
    padding:7px 8px!important;
    font-size:10.5px!important;
    white-space:normal!important;
  }

  .platform-system-card,
  #platformBillingLink{max-width:none!important}
  .platform-system-body .form-grid{grid-template-columns:1fr 1fr!important}

  /* Generic two-column forms stay two-column on tablet; phone rules take over below 620px. */
  .modal-backdrop .form-grid{grid-template-columns:1fr 1fr!important}
  .modal-backdrop .form-field.full{grid-column:1/-1!important}
}

/* Smaller tablets: dashboard metrics and admin cards breathe instead of shrinking. */
@media(min-width:621px) and (max-width:820px){
  .main{padding-left:14px!important;padding-right:14px!important}
  #dashboard #metrics,
  #dashboard .last-minute-metrics,
  #admin #adminMetrics{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  #admin .admin-toolbar{
    grid-template-columns:minmax(0,1fr) 180px 92px!important;
  }
  #admin .admin-client-table tbody{
    grid-template-columns:1fr!important;
  }
}

/* Phone: still viewport-bound, but no bottom-sheet overflow outside the screen. */
@media(max-width:620px){
  .modal-backdrop{
    align-items:center!important;
    padding:
      max(8px,env(safe-area-inset-top))
      max(8px,env(safe-area-inset-right))
      max(8px,env(safe-area-inset-bottom))
      max(8px,env(safe-area-inset-left))!important;
  }
  .modal-backdrop>.modal{
    width:calc(100dvw - 16px)!important;
    max-width:calc(100dvw - 16px)!important;
    max-height:calc(100dvh - 16px)!important;
    border-radius:16px!important;
    padding:14px!important;
  }
  .client-detail-modal>.modal,
  .availability-modal>.availability-dialog{
    height:calc(100dvh - 16px)!important;
  }
  .modal-backdrop .form-grid{grid-template-columns:1fr!important}
  .modal-backdrop .form-field.full{grid-column:auto!important}
  .modal-backdrop>.modal>.section-head:first-child{
    top:0!important;
  }
  .modal-backdrop>.modal>.modal-actions:last-child{
    bottom:0!important;
  }
}


/* Touch-tablet override for desktop-mode browsers — 2026-09-28 */
/*
  Some Android tablets report a desktop-like CSS width in landscape.
  JS adds body.tablet-ui from touch capability + visual viewport width.
  These rules intentionally override desktop sidebar/table layouts.
*/
body.tablet-ui{
  background:#f6fbff;
}
body.tablet-ui .app,
body.tablet-ui.sidebar-collapsed .app{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  grid-template-columns:1fr!important;
}
body.tablet-ui .sidebar{
  display:none!important;
}
body.tablet-ui .main{
  grid-column:1!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  padding:18px 20px 92px!important;
  overflow-x:hidden!important;
}
body.tablet-ui.platform-root .main{
  padding-bottom:24px!important;
}
body.tablet-ui .page{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
}
body.tablet-ui .mobile-topbar{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  margin:0 0 14px!important;
  padding:0 0 11px!important;
  border-bottom:1px solid var(--ui-line,var(--line))!important;
}
body.tablet-ui .mobile-brand{
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  font-size:15px!important;
}
body.tablet-ui .mobile-brand .brand-mark{
  width:32px!important;
  height:32px!important;
  border-radius:10px!important;
}
body.tablet-ui .mobile-logout-btn{
  width:40px!important;
  height:40px!important;
}
body.tablet-ui .mobile-nav{
  display:flex!important;
  position:fixed!important;
  left:50%!important;
  right:auto!important;
  bottom:max(10px,env(safe-area-inset-bottom))!important;
  transform:translateX(-50%)!important;
  width:min(620px,calc(100vw - 36px))!important;
  height:64px!important;
  padding:5px 7px!important;
  border:1px solid var(--ui-line,var(--line))!important;
  border-radius:18px!important;
  background:rgba(255,255,255,.97)!important;
  backdrop-filter:blur(16px)!important;
  -webkit-backdrop-filter:blur(16px)!important;
  box-shadow:0 14px 38px rgba(31,65,98,.15)!important;
  z-index:80!important;
}
body.tablet-ui .mobile-nav button{
  flex:1!important;
  min-width:0!important;
  min-height:52px!important;
  border-radius:12px!important;
  font-size:11px!important;
}
body.tablet-ui.platform-root .mobile-nav{
  display:none!important;
}

/* Tenant dashboard on tablet */
body.tablet-ui #dashboard .headline{
  display:flex!important;
  align-items:center!important;
  gap:14px!important;
  margin-bottom:12px!important;
}
body.tablet-ui #dashboard .headline h1{
  font-size:25px!important;
}
body.tablet-ui #dashboard .headline>.btn{
  width:auto!important;
  min-width:150px!important;
  min-height:42px!important;
}
body.tablet-ui #dashboard .overview-controlbar{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:9px!important;
  margin-bottom:12px!important;
}
body.tablet-ui #dashboard .overview-controlbar select{
  width:100%!important;
  min-width:0!important;
}
body.tablet-ui #dashboard #metrics{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:9px!important;
  margin:12px 0!important;
}
body.tablet-ui #dashboard #metrics .metric{
  min-width:0!important;
  padding:13px!important;
}
body.tablet-ui #dashboard #metrics .metric .value{
  font-size:22px!important;
}
body.tablet-ui #dashboard .last-minute-metrics{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
}
body.tablet-ui #dashboard .overview-table-card{
  padding:13px!important;
  overflow:hidden!important;
}
body.tablet-ui #dashboard .overview-table-card .table-wrap{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  -webkit-overflow-scrolling:touch;
}
body.tablet-ui #dashboard .overview-table{
  width:100%!important;
  min-width:660px!important;
}
body.tablet-ui #dashboard .overview-table th,
body.tablet-ui #dashboard .overview-table td{
  padding:9px 8px!important;
  font-size:11.5px!important;
}

/* Studio 7 platform admin on tablet */
body.tablet-ui #admin{
  width:100%!important;
  max-width:100%!important;
  overflow:visible!important;
}
body.tablet-ui #admin .headline{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  margin-bottom:11px!important;
}
body.tablet-ui #admin .headline h1{
  font-size:24px!important;
}
body.tablet-ui #admin .headline>.btn{
  width:auto!important;
  min-width:150px!important;
  min-height:42px!important;
}
body.tablet-ui #admin #adminMetrics{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:9px!important;
  margin:10px 0 12px!important;
}
body.tablet-ui #admin #adminMetrics .metric{
  min-width:0!important;
  min-height:72px!important;
  padding:11px 12px!important;
}
body.tablet-ui #admin #adminMetrics .metric .value{
  font-size:20px!important;
}
body.tablet-ui #admin .admin-toolbar{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 220px 96px!important;
  gap:8px!important;
  align-items:center!important;
  margin-bottom:11px!important;
}
body.tablet-ui #admin .admin-search-wrap,
body.tablet-ui #admin .admin-filter-select,
body.tablet-ui #admin #adminRefreshBtn{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
}
body.tablet-ui #admin .admin-search-wrap{
  grid-column:auto!important;
}
body.tablet-ui #admin .admin-toolbar .admin-search-input,
body.tablet-ui #admin .admin-toolbar .admin-filter-select,
body.tablet-ui #admin .admin-toolbar .btn{
  min-height:42px!important;
  height:42px!important;
}
body.tablet-ui #admin .admin-clients-section{
  padding:12px!important;
  margin-bottom:10px!important;
  overflow:visible!important;
}
body.tablet-ui #admin .admin-clients-section>.section-head{
  margin-bottom:8px!important;
}
body.tablet-ui #admin .admin-clients-section .table-wrap{
  width:100%!important;
  max-width:100%!important;
  overflow:visible!important;
}
body.tablet-ui #admin .admin-client-table,
body.tablet-ui #admin .admin-client-table tbody{
  display:block!important;
  width:100%!important;
  min-width:0!important;
}
body.tablet-ui #admin .admin-client-table thead{
  display:none!important;
}
body.tablet-ui #admin .admin-client-table tbody{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
}
body.tablet-ui #admin .admin-client-table .admin-client-row{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  height:auto!important;
  min-height:0!important;
  margin:0!important;
  padding:12px!important;
  border:1px solid var(--ui-line,var(--line))!important;
  border-radius:13px!important;
  background:#fff!important;
  box-shadow:0 3px 12px rgba(39,73,106,.045)!important;
}
body.tablet-ui #admin .admin-client-table .admin-client-row td{
  display:grid!important;
  grid-template-columns:88px minmax(0,1fr)!important;
  align-items:start!important;
  gap:8px!important;
  width:100%!important;
  min-width:0!important;
  height:auto!important;
  padding:6px 0!important;
  border:0!important;
  border-top:1px solid #edf2f6!important;
  font-size:11px!important;
  line-height:1.35!important;
  white-space:normal!important;
  vertical-align:top!important;
}
body.tablet-ui #admin .admin-client-table .admin-client-row td::before{
  content:attr(data-label)!important;
  display:block!important;
  color:#7b8d9e!important;
  font-size:9.5px!important;
  font-weight:700!important;
}
body.tablet-ui #admin .admin-client-table .admin-client-row td:first-child{
  display:block!important;
  padding:0 0 9px!important;
  border-top:0!important;
}
body.tablet-ui #admin .admin-client-table .admin-client-row td:first-child::before,
body.tablet-ui #admin .admin-client-table .admin-client-row td:last-child::before{
  display:none!important;
}
body.tablet-ui #admin .admin-client-table .admin-client-row td:last-child{
  display:block!important;
  padding:9px 0 0!important;
}
body.tablet-ui #admin .admin-client-name{
  gap:9px!important;
  align-items:center!important;
}
body.tablet-ui #admin .admin-client-logo,
body.tablet-ui #admin .admin-client-fallback{
  width:42px!important;
  height:42px!important;
  flex:0 0 42px!important;
  border-radius:10px!important;
}
body.tablet-ui #admin .admin-client-name strong{
  font-size:12.5px!important;
}
body.tablet-ui #admin .admin-client-row .muted{
  overflow-wrap:anywhere!important;
}
body.tablet-ui #admin .admin-actions{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:6px!important;
  width:100%!important;
  min-width:0!important;
}
body.tablet-ui #admin .admin-actions [data-admin-open]{
  grid-column:1/-1!important;
}
body.tablet-ui #admin .admin-actions .btn{
  width:100%!important;
  min-width:0!important;
  min-height:35px!important;
  padding:7px 8px!important;
  border-radius:9px!important;
  font-size:10px!important;
  line-height:1.15!important;
  white-space:normal!important;
}
body.tablet-ui .platform-system-card,
body.tablet-ui #platformBillingLink{
  width:100%!important;
  max-width:none!important;
}

/* Narrow portrait tablet */
@media(max-width:900px){
  body.tablet-ui .main{
    padding-left:14px!important;
    padding-right:14px!important;
  }
  body.tablet-ui #dashboard #metrics,
  body.tablet-ui #dashboard .last-minute-metrics,
  body.tablet-ui #admin #adminMetrics{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  body.tablet-ui #admin .admin-toolbar{
    grid-template-columns:minmax(0,1fr) 170px 90px!important;
  }
  body.tablet-ui #admin .admin-client-table tbody{
    grid-template-columns:1fr!important;
  }
}


/* Tablet left sidebar restore — 2026-09-28 */
body.tablet-ui .app,
body.tablet-ui.sidebar-collapsed .app{
  display:grid!important;
  grid-template-columns:190px minmax(0,1fr)!important;
  width:100%!important;
  min-width:0!important;
}
body.tablet-ui .sidebar{
  display:block!important;
  position:fixed!important;
  left:0!important;
  top:0!important;
  width:190px!important;
  height:100dvh!important;
  padding:18px 12px!important;
  overflow-y:auto!important;
  overflow-x:visible!important;
  z-index:90!important;
}
body.tablet-ui .sidebar .brand{
  margin:3px 8px 22px!important;
  font-size:16px!important;
  gap:8px!important;
  padding-right:24px!important;
}
body.tablet-ui .sidebar .brand-mark{
  width:32px!important;
  height:32px!important;
  flex:0 0 32px!important;
  border-radius:10px!important;
}
body.tablet-ui .sidebar .nav{
  gap:5px!important;
}
body.tablet-ui .sidebar .nav button{
  min-height:40px!important;
  padding:0 10px!important;
  font-size:12px!important;
  border-radius:9px!important;
}
body.tablet-ui .sidebar .nav-icon{
  width:18px!important;
  height:18px!important;
  flex:0 0 18px!important;
}
body.tablet-ui .sidebar .nav-icon svg{
  width:18px!important;
  height:18px!important;
}
body.tablet-ui .sidebar-toggle{
  display:grid!important;
  right:-14px!important;
  top:14px!important;
}
body.tablet-ui .main{
  grid-column:2!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  padding:16px 16px 28px!important;
}
body.tablet-ui .mobile-topbar,
body.tablet-ui .mobile-nav{
  display:none!important;
}

/* Collapsed tablet sidebar stays useful instead of disappearing. */
body.tablet-ui.sidebar-collapsed .app{
  grid-template-columns:68px minmax(0,1fr)!important;
}
body.tablet-ui.sidebar-collapsed .sidebar{
  width:68px!important;
  padding-left:8px!important;
  padding-right:8px!important;
}
body.tablet-ui.sidebar-collapsed .sidebar .brand{
  justify-content:center!important;
  margin:3px 0 22px!important;
  padding:0!important;
}
body.tablet-ui.sidebar-collapsed .sidebar #sidebarBrandName,
body.tablet-ui.sidebar-collapsed .sidebar .nav-label,
body.tablet-ui.sidebar-collapsed .sidebar .sidebar-label,
body.tablet-ui.sidebar-collapsed .sidebar .sidebar-user-copy,
body.tablet-ui.sidebar-collapsed .sidebar .sync-label,
body.tablet-ui.sidebar-collapsed .sidebar .sync-meta{
  display:none!important;
}
body.tablet-ui.sidebar-collapsed .sidebar .nav button{
  justify-content:center!important;
  padding:0!important;
}
body.tablet-ui.sidebar-collapsed .sidebar .brand-mark{
  width:34px!important;
  height:34px!important;
  flex:0 0 34px!important;
}
body.tablet-ui.sidebar-collapsed .sidebar-toggle{
  right:-14px!important;
}

/* Narrow portrait tablet: slightly slimmer menu, but keep it visible. */
@media(max-width:900px){
  body.tablet-ui .app{
    grid-template-columns:164px minmax(0,1fr)!important;
  }
  body.tablet-ui .sidebar{
    width:164px!important;
    padding-left:10px!important;
    padding-right:10px!important;
  }
  body.tablet-ui .sidebar .brand{
    font-size:14px!important;
    margin-left:6px!important;
    margin-right:6px!important;
  }
  body.tablet-ui .sidebar .nav button{
    font-size:11px!important;
    padding-left:9px!important;
    padding-right:9px!important;
  }
  body.tablet-ui.sidebar-collapsed .app{
    grid-template-columns:64px minmax(0,1fr)!important;
  }
  body.tablet-ui.sidebar-collapsed .sidebar{
    width:64px!important;
  }
  body.tablet-ui .main{
    padding:14px 12px 24px!important;
  }
}


/* Tablet final navigation/admin list pass — 2026-09-28 */
/* Tablet uses the left sidebar only; never show the phone bottom navigation. */
html.tablet-ui .mobile-nav,
body.tablet-ui .mobile-nav{
  display:none!important;
}
body.tablet-ui .mobile-topbar{
  display:none!important;
}
body.tablet-ui .sidebar{
  display:block!important;
}

/* Studio 7 admin clients are always one beneath another on tablet. */
body.tablet-ui #admin .admin-client-table tbody{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:9px!important;
}
body.tablet-ui #admin .admin-client-table .admin-client-row{
  width:100%!important;
  max-width:none!important;
}

/* Client preview is intentionally clean: no Studio 7 context banner. */
.admin-tenant-banner{
  display:none!important;
}

/* Keep Calendar sync readable on tablet sidebar. */
body.tablet-ui .sidebar-sync{
  padding-left:0!important;
  padding-right:0!important;
}
body.tablet-ui .sidebar .sync-btn{
  width:100%!important;
  min-width:0!important;
  min-height:38px!important;
  padding:0 6px!important;
  gap:4px!important;
  white-space:nowrap!important;
  font-size:9.5px!important;
  line-height:1!important;
}
body.tablet-ui .sidebar .sync-btn .sync-label{
  display:inline!important;
  white-space:nowrap!important;
  line-height:1!important;
}
body.tablet-ui .sidebar .sync-icon{
  flex:0 0 auto!important;
}
body.tablet-ui .sidebar .sync-meta{
  font-size:9px!important;
  line-height:1.25!important;
  margin-top:5px!important;
}

/* In collapsed tablet sidebar, retain icon-only sync. */
body.tablet-ui.sidebar-collapsed .sidebar .sync-btn{
  padding:0!important;
  justify-content:center!important;
}
body.tablet-ui.sidebar-collapsed .sidebar .sync-btn .sync-label{
  display:none!important;
}


/* Tablet settings + compact Studio 7 admin — 2026-09-28 */

/* --------------------------------------------------------------------------
   CLIENT SETTINGS — tablet must look like tablet/desktop, never phone.
   These overrides intentionally come after all max-width mobile rules.
   -------------------------------------------------------------------------- */
body.tablet-ui #settings{
  width:100%!important;
  max-width:none!important;
}
body.tablet-ui #settings>.headline{
  margin-bottom:12px!important;
}
body.tablet-ui #settings>.headline h1{
  font-size:24px!important;
}
body.tablet-ui #settings>.card.section{
  padding:16px!important;
  margin-bottom:10px!important;
  border-radius:13px!important;
}
body.tablet-ui #settings .section-head{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  margin-bottom:12px!important;
}
body.tablet-ui #settings .section-head h2{
  font-size:16px!important;
  margin:0!important;
}
body.tablet-ui #settings .section-head .muted{
  font-size:10.5px!important;
  line-height:1.4!important;
}

/* Core forms are two-column on tablet. */
body.tablet-ui #settings .form-grid,
body.tablet-ui #settings .org-branding-grid,
body.tablet-ui #settings .security-password-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:11px!important;
}
body.tablet-ui #settings .form-field{
  min-width:0!important;
}
body.tablet-ui #settings .form-field.full{
  grid-column:1/-1!important;
}
body.tablet-ui #settings .form-field label{
  font-size:10.5px!important;
  margin-bottom:5px!important;
}
body.tablet-ui #settings .form-field input,
body.tablet-ui #settings .form-field select,
body.tablet-ui #settings .form-field textarea{
  min-height:40px!important;
  height:40px!important;
  font-size:11.5px!important;
  border-radius:9px!important;
}
body.tablet-ui #settings .form-field textarea{
  height:auto!important;
  min-height:88px!important;
}

/* Plan metrics stay horizontal/compact. */
body.tablet-ui #settings .client-billing-metrics{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:8px!important;
}
body.tablet-ui #settings .client-billing-metrics .metric,
body.tablet-ui #settings .client-billing-metrics>div{
  min-width:0!important;
}

/* Team sections use space instead of mobile stacking. */
body.tablet-ui #settings .calendar-staff-add{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:9px!important;
  align-items:end!important;
}
body.tablet-ui #settings .calendar-staff-add .btn{
  width:auto!important;
  min-width:100px!important;
  min-height:40px!important;
}
body.tablet-ui #settings .org-user-invite{
  grid-template-columns:1.25fr 1.35fr .8fr auto!important;
  align-items:end!important;
}
body.tablet-ui #settings .org-user-invite .invite-user-action{
  grid-column:auto!important;
}
body.tablet-ui #settings .org-user-invite .btn{
  width:auto!important;
  min-width:110px!important;
}
body.tablet-ui #settings .team-member-card,
body.tablet-ui #settings .calendar-staff-card{
  padding:10px 12px!important;
  min-height:0!important;
}

/* Business settings. */
body.tablet-ui #settings .org-logo-settings{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  gap:12px!important;
}
body.tablet-ui #settings .org-logo-actions{
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:wrap!important;
  gap:7px!important;
}
body.tablet-ui #settings .theme-color-picker{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:7px!important;
}
body.tablet-ui #settings .working-days-selector{
  display:grid!important;
  grid-template-columns:repeat(7,minmax(0,1fr))!important;
  gap:6px!important;
}
body.tablet-ui #settings .work-hours-grid{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:10px!important;
}

/* Services are a proper tablet row, not phone cards. */
body.tablet-ui #settings .service-add-grid{
  display:grid!important;
  grid-template-columns:minmax(0,1.6fr) 120px 130px auto!important;
  gap:9px!important;
  align-items:end!important;
}
body.tablet-ui #settings .service-add-grid .service-save-btn{
  width:auto!important;
  min-width:145px!important;
  min-height:40px!important;
  white-space:nowrap!important;
}
body.tablet-ui #settings .service-manage-row{
  display:grid!important;
  grid-template-columns:minmax(0,1.5fr) 105px 120px auto!important;
  gap:8px!important;
  align-items:center!important;
}
body.tablet-ui #settings .service-manage-row .btn{
  width:auto!important;
}

/* Booking link stays on one row. */
body.tablet-ui #settings .booking-link-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto auto!important;
  gap:8px!important;
  align-items:center!important;
}
body.tablet-ui #settings .booking-link-row .btn{
  width:auto!important;
  min-width:82px!important;
  white-space:nowrap!important;
}

/* SMS / automation settings stay multi-column. */
body.tablet-ui #settings .confirmation-grid{
  grid-template-columns:repeat(3,minmax(220px,280px))!important;
  justify-content:start!important;
}
body.tablet-ui #settings .confirmation-grid .form-field{
  grid-column:auto!important;
}
body.tablet-ui #settings .last-minute-mode-cards{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
}
body.tablet-ui #settings .last-minute-config-grid.automatic-rules{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
body.tablet-ui #settings .last-minute-config-grid.automatic-rules>.form-field:nth-child(3){
  grid-column:auto!important;
}
body.tablet-ui #settings .last-minute-config-grid.common-rules{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
body.tablet-ui #settings .integration-actions{
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:wrap!important;
  gap:8px!important;
}
body.tablet-ui #settings .integration-actions .btn{
  width:auto!important;
  min-width:110px!important;
  white-space:nowrap!important;
}
body.tablet-ui #settings .calendar-import-controls{
  display:grid!important;
  grid-template-columns:minmax(180px,260px) auto!important;
  gap:8px!important;
  align-items:end!important;
  width:auto!important;
  max-width:none!important;
}
body.tablet-ui #settings .calendar-import-controls .btn{
  width:auto!important;
  white-space:nowrap!important;
}
body.tablet-ui #settings>.settings-grid{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:10px!important;
}
body.tablet-ui #settings>.settings-grid .google-calendar-integration{
  padding:16px!important;
}

/* --------------------------------------------------------------------------
   STUDIO 7 ADMIN — compact tablet UX.
   One client per row, but row content is horizontal and dense.
   -------------------------------------------------------------------------- */
body.tablet-ui #admin .headline{
  margin-bottom:8px!important;
}
body.tablet-ui #admin .headline h1{
  font-size:22px!important;
}
body.tablet-ui #admin .headline .muted{
  font-size:10px!important;
}
body.tablet-ui #admin .headline>.btn{
  min-width:0!important;
  min-height:36px!important;
  height:36px!important;
  padding:0 14px!important;
  font-size:10.5px!important;
  border-radius:9px!important;
}
body.tablet-ui #admin #adminMetrics{
  gap:7px!important;
  margin:7px 0 9px!important;
}
body.tablet-ui #admin #adminMetrics .metric{
  min-height:58px!important;
  padding:8px 10px!important;
  border-radius:10px!important;
}
body.tablet-ui #admin #adminMetrics .metric .muted{
  font-size:9.5px!important;
}
body.tablet-ui #admin #adminMetrics .metric .value{
  font-size:18px!important;
  margin-top:2px!important;
}
body.tablet-ui #admin .admin-toolbar{
  grid-template-columns:minmax(0,1fr) 185px 82px!important;
  gap:6px!important;
  margin-bottom:8px!important;
}
body.tablet-ui #admin .admin-toolbar .admin-search-input,
body.tablet-ui #admin .admin-toolbar .admin-filter-select,
body.tablet-ui #admin .admin-toolbar .btn{
  min-height:36px!important;
  height:36px!important;
  font-size:10.5px!important;
  border-radius:9px!important;
}
body.tablet-ui #admin .admin-clients-section{
  padding:10px!important;
}
body.tablet-ui #admin .admin-clients-section>.section-head{
  margin-bottom:6px!important;
}
body.tablet-ui #admin .admin-clients-section>.section-head h2{
  font-size:14px!important;
}
body.tablet-ui #admin #adminClientCount{
  font-size:9px!important;
}

/* One horizontal compact card per client. */
body.tablet-ui #admin .admin-client-table tbody{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:7px!important;
}
body.tablet-ui #admin .admin-client-table .admin-client-row{
  display:grid!important;
  grid-template-columns:
    minmax(145px,1.35fr)
    minmax(150px,1.45fr)
    minmax(100px,.9fr)
    minmax(130px,1.1fr)
    82px
    55px
    70px
    minmax(210px,1.65fr)!important;
  align-items:center!important;
  gap:8px!important;
  width:100%!important;
  padding:8px 9px!important;
  border-radius:10px!important;
  min-height:0!important;
}
body.tablet-ui #admin .admin-client-table .admin-client-row td{
  display:block!important;
  width:auto!important;
  min-width:0!important;
  padding:0!important;
  border:0!important;
  font-size:10.5px!important;
  line-height:1.25!important;
  overflow:hidden!important;
}
body.tablet-ui #admin .admin-client-table .admin-client-row td::before{
  display:none!important;
  content:none!important;
}
body.tablet-ui #admin .admin-client-table .admin-client-row td:first-child,
body.tablet-ui #admin .admin-client-table .admin-client-row td:last-child{
  display:block!important;
  padding:0!important;
  border:0!important;
}
body.tablet-ui #admin .admin-client-name{
  gap:7px!important;
  min-width:0!important;
}
body.tablet-ui #admin .admin-client-logo,
body.tablet-ui #admin .admin-client-fallback{
  width:34px!important;
  height:34px!important;
  flex:0 0 34px!important;
  border-radius:8px!important;
}
body.tablet-ui #admin .admin-client-name>div{
  min-width:0!important;
}
body.tablet-ui #admin .admin-client-name strong{
  display:block!important;
  font-size:11.5px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
body.tablet-ui #admin .admin-client-row td:nth-child(2){
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
body.tablet-ui #admin .admin-client-row td:nth-child(2)>.muted{
  display:block!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  max-width:100%!important;
  font-size:9px!important;
  overflow-wrap:normal!important;
}
body.tablet-ui #admin .admin-client-row td:nth-child(3),
body.tablet-ui #admin .admin-client-row td:nth-child(5),
body.tablet-ui #admin .admin-client-row td:nth-child(6),
body.tablet-ui #admin .admin-client-row td:nth-child(7){
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
body.tablet-ui #admin .admin-plan-cell{
  display:grid!important;
  gap:1px!important;
  min-width:0!important;
}
body.tablet-ui #admin .admin-plan-cell strong{
  font-size:10px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
body.tablet-ui #admin .admin-plan-cell .muted{
  font-size:8.5px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
body.tablet-ui #admin .admin-status{
  display:inline-flex!important;
  padding:3px 6px!important;
  font-size:8.5px!important;
  line-height:1!important;
  white-space:nowrap!important;
}
body.tablet-ui #admin .admin-actions{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:4px!important;
  width:100%!important;
}
body.tablet-ui #admin .admin-actions [data-admin-open]{
  grid-column:auto!important;
}
body.tablet-ui #admin .admin-actions .btn{
  width:auto!important;
  min-width:0!important;
  min-height:28px!important;
  height:28px!important;
  padding:0 7px!important;
  border-radius:7px!important;
  font-size:8.5px!important;
  line-height:1!important;
  white-space:nowrap!important;
  flex:0 0 auto!important;
}

/* If the content area gets too narrow, keep compact cards but use two rows,
   never the phone label/value layout. */
@media(max-width:1050px){
  body.tablet-ui #admin .admin-client-table .admin-client-row{
    grid-template-columns:
      minmax(145px,1.3fr)
      minmax(150px,1.4fr)
      minmax(100px,.9fr)
      minmax(130px,1.1fr)
      80px
      52px
      65px!important;
  }
  body.tablet-ui #admin .admin-client-table .admin-client-row td:last-child{
    grid-column:1/-1!important;
    padding-top:5px!important;
    border-top:1px solid #edf2f6!important;
  }
  body.tablet-ui #admin .admin-actions{
    justify-content:flex-start!important;
  }
}


/* HTML tablet fallback for settings — 2026-09-28 */
html.tablet-ui body #settings .form-grid,
html.tablet-ui body #settings .org-branding-grid,
html.tablet-ui body #settings .security-password-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:11px!important;
}
html.tablet-ui body #settings .form-field.full{
  grid-column:1/-1!important;
}
html.tablet-ui body #settings .confirmation-grid{
  grid-template-columns:repeat(3,minmax(220px,280px))!important;
  justify-content:start!important;
}
html.tablet-ui body #settings .confirmation-grid .form-field{
  grid-column:auto!important;
}
html.tablet-ui body #settings .last-minute-mode-cards{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
html.tablet-ui body #settings .last-minute-config-grid.automatic-rules{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
html.tablet-ui body #settings .last-minute-config-grid.automatic-rules>.form-field:nth-child(3){
  grid-column:auto!important;
}
html.tablet-ui body #settings .last-minute-config-grid.common-rules{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
html.tablet-ui body #settings .service-add-grid{
  display:grid!important;
  grid-template-columns:minmax(0,1.6fr) 120px 130px auto!important;
  gap:9px!important;
  align-items:end!important;
}
html.tablet-ui body #settings .service-manage-row{
  display:grid!important;
  grid-template-columns:minmax(0,1.5fr) 105px 120px auto!important;
  gap:8px!important;
  align-items:center!important;
}
html.tablet-ui body #settings .booking-link-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto auto!important;
  gap:8px!important;
  align-items:center!important;
}
html.tablet-ui body #settings .calendar-staff-add{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:9px!important;
  align-items:end!important;
}
html.tablet-ui body #settings .org-user-invite{
  grid-template-columns:1.25fr 1.35fr .8fr auto!important;
  align-items:end!important;
}
html.tablet-ui body #settings .work-hours-grid{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:10px!important;
}
html.tablet-ui body #settings .working-days-selector{
  display:grid!important;
  grid-template-columns:repeat(7,minmax(0,1fr))!important;
  gap:6px!important;
}
html.tablet-ui body #settings .theme-color-picker{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:7px!important;
}
html.tablet-ui body #settings .integration-actions{
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:wrap!important;
  gap:8px!important;
}
html.tablet-ui body #settings .integration-actions .btn{
  width:auto!important;
  white-space:nowrap!important;
}


/* Client preview settings hard tablet override — 2026-09-28 */
/*
  Studio 7 client preview must never inherit phone Settings layout on a tablet.
  client-preview is explicit app state, so this does not depend on browser touch detection.
*/
@media(min-width:621px){
  body.client-preview #settings{
    width:100%!important;
    max-width:none!important;
  }
  body.client-preview #settings>.headline{
    margin-bottom:12px!important;
  }
  body.client-preview #settings>.card.section{
    padding:16px!important;
    margin-bottom:10px!important;
    border-radius:13px!important;
  }
  body.client-preview #settings .section-head{
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:12px!important;
  }
  body.client-preview #settings .form-grid,
  body.client-preview #settings .org-branding-grid,
  body.client-preview #settings .security-password-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:11px!important;
  }
  body.client-preview #settings .form-field.full{
    grid-column:1/-1!important;
  }
  body.client-preview #settings .client-billing-metrics{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:8px!important;
  }
  body.client-preview #settings .calendar-staff-add{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:9px!important;
    align-items:end!important;
  }
  body.client-preview #settings .org-user-invite{
    display:grid!important;
    grid-template-columns:1.25fr 1.35fr .8fr auto!important;
    gap:9px!important;
    align-items:end!important;
  }
  body.client-preview #settings .org-user-invite .invite-user-action{
    grid-column:auto!important;
  }
  body.client-preview #settings .work-hours-grid{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:10px!important;
  }
  body.client-preview #settings .working-days-selector{
    display:grid!important;
    grid-template-columns:repeat(7,minmax(0,1fr))!important;
    gap:6px!important;
  }
  body.client-preview #settings .theme-color-picker{
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:7px!important;
  }
  body.client-preview #settings .service-add-grid{
    display:grid!important;
    grid-template-columns:minmax(0,1.6fr) 120px 130px auto!important;
    gap:9px!important;
    align-items:end!important;
  }
  body.client-preview #settings .service-manage-row{
    display:grid!important;
    grid-template-columns:minmax(0,1.5fr) 105px 120px auto!important;
    gap:8px!important;
    align-items:center!important;
  }
  body.client-preview #settings .booking-link-row{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto auto!important;
    gap:8px!important;
    align-items:center!important;
  }
  body.client-preview #settings .confirmation-grid{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(220px,280px))!important;
    justify-content:start!important;
  }
  body.client-preview #settings .confirmation-grid .form-field{
    grid-column:auto!important;
  }
  body.client-preview #settings .last-minute-mode-cards{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:8px!important;
  }
  body.client-preview #settings .last-minute-config-grid.automatic-rules{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  body.client-preview #settings .last-minute-config-grid.automatic-rules>.form-field:nth-child(3){
    grid-column:auto!important;
  }
  body.client-preview #settings .last-minute-config-grid.common-rules{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  body.client-preview #settings .integration-actions{
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:wrap!important;
    gap:8px!important;
  }
  body.client-preview #settings .integration-actions .btn,
  body.client-preview #settings .calendar-import-controls .btn,
  body.client-preview #settings .booking-link-row .btn{
    width:auto!important;
    white-space:nowrap!important;
  }
  body.client-preview #settings .calendar-import-controls{
    display:grid!important;
    grid-template-columns:minmax(180px,260px) auto!important;
    gap:8px!important;
    align-items:end!important;
    width:auto!important;
    max-width:none!important;
  }
}

/* Smaller portrait tablet: still tablet, just two-column where needed. */
@media(min-width:621px) and (max-width:850px){
  body.client-preview #settings .client-billing-metrics{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  body.client-preview #settings .service-add-grid{
    grid-template-columns:minmax(0,1fr) 110px 120px!important;
  }
  body.client-preview #settings .service-add-grid .service-save-btn{
    grid-column:1/-1!important;
    justify-self:start!important;
    width:auto!important;
  }
  body.client-preview #settings .org-user-invite{
    grid-template-columns:1fr 1fr!important;
  }
  body.client-preview #settings .org-user-invite .invite-user-action{
    grid-column:auto!important;
  }
}


/* Stop active trial control — 2026-09-28 */
.admin-stop-trial-btn{
  border-color:#efd1d1!important;
  background:#fff7f7!important;
  color:#a44747!important;
}
.admin-stop-trial-btn:hover{
  background:#fff0f0!important;
  border-color:#e8bcbc!important;
}


/* SETTINGS + WAITLIST + TABLET SIDEBAR FIX — 2026-09-28 */

/* System access first, full business/settings card directly below it. */
#settings > .system-access-card{
  grid-column:1/-1!important;
  width:100%!important;
  height:auto!important;
  order:30;
}
#settings > .business-settings-card{
  grid-column:1/-1!important;
  width:100%!important;
  height:auto!important;
  order:31;
}
#settings .business-settings-card .org-branding-grid{
  width:100%!important;
  min-width:0!important;
}
@media(max-width:820px){
  #settings .system-access-card .org-user-invite,
  #settings .business-settings-card .org-branding-grid{
    grid-template-columns:1fr!important;
  }
  #settings .system-access-card .invite-user-action,
  #settings .business-settings-card .form-field.full{
    grid-column:auto!important;
  }
}

/* Checkbox reset with enough specificity to beat tablet input-height rules. */
body #settings input[type="checkbox"]:not([hidden]),
html.tablet-ui body #settings input[type="checkbox"]:not([hidden]),
body.tablet-ui #settings input[type="checkbox"]:not([hidden]),
body.client-preview #settings input[type="checkbox"]:not([hidden]){
  appearance:none!important;
  -webkit-appearance:none!important;
  position:static!important;
  display:inline-block!important;
  opacity:1!important;
  pointer-events:auto!important;
  box-sizing:border-box!important;
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  min-height:18px!important;
  max-width:18px!important;
  max-height:18px!important;
  padding:0!important;
  margin:0!important;
  border:1px solid #b7c8d8!important;
  border-radius:5px!important;
  background:#fff!important;
  background-image:none!important;
  box-shadow:none!important;
  flex:0 0 18px!important;
  vertical-align:middle!important;
  cursor:pointer!important;
}
body #settings input[type="checkbox"]:not([hidden]):checked,
html.tablet-ui body #settings input[type="checkbox"]:not([hidden]):checked,
body.tablet-ui #settings input[type="checkbox"]:not([hidden]):checked,
body.client-preview #settings input[type="checkbox"]:not([hidden]):checked{
  border-color:var(--ui-primary)!important;
  background-color:var(--ui-primary)!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.1 8.1 6.4 11.2 12.9 4.8' fill='none' stroke='white' stroke-width='2.35' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important;
  background-repeat:no-repeat!important;
  background-position:center!important;
  background-size:12px 12px!important;
}
/* Keep chip/switch source checkboxes visually hidden; their styled wrappers remain the control. */
body #settings .working-day-chip input[type="checkbox"],
html.tablet-ui body #settings .working-day-chip input[type="checkbox"],
body.tablet-ui #settings .working-day-chip input[type="checkbox"],
body.client-preview #settings .working-day-chip input[type="checkbox"],
body #settings .client-switch>input[type="checkbox"],
body #settings .client-choice-pill input[type="checkbox"],
body #settings .client-day-pill input[type="checkbox"],
body #settings .appointment-toggle input[type="checkbox"]{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  min-width:1px!important;
  min-height:1px!important;
  max-width:1px!important;
  max-height:1px!important;
  opacity:0!important;
  pointer-events:none!important;
  overflow:hidden!important;
  clip:rect(0 0 0 0)!important;
  margin:-1px!important;
}

#settings .custom-hours-toggle,
#settings .booking-toggle,
#settings .safety-row{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
}
#settings .custom-hours-toggle{width:max-content!important;max-width:100%!important}
#settings .confirmation-inline-toggle{
  width:20px!important;
  height:40px!important;
  min-width:20px!important;
  min-height:40px!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
#settings .confirmation-inline-toggle input[type="checkbox"]{
  width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;
  max-width:18px!important;max-height:18px!important;
}
#settings .confirmation-option-control{
  grid-template-columns:max-content 20px!important;
}
#settings .safety-row{
  width:fit-content!important;
  max-width:100%!important;
  line-height:1.4!important;
}

/* Waitlist nav + viewport modal. */
#waitlistNavBtn{position:relative}
.nav-count-badge{
  margin-left:auto;
  min-width:21px;height:21px;padding:0 6px;
  align-items:center;justify-content:center;
  border-radius:999px;background:#fff1db;color:#a76f0b;
  font-size:9.5px;font-weight:800;line-height:1;
}
.waitlist-modal>.waitlist-dialog{--viewport-modal-width:900px}
.waitlist-dialog{
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  padding:0!important;
}
.waitlist-modal-head{
  position:sticky!important;
  top:0!important;
  z-index:3!important;
  margin:0!important;
  padding:17px 18px 14px!important;
  border-bottom:1px solid var(--ui-line)!important;
  background:#fff!important;
}
.waitlist-list{
  display:grid;
  gap:8px;
  padding:12px 14px 16px;
  overflow:auto;
  min-height:0;
}
.waitlist-row{
  display:grid;
  grid-template-columns:minmax(150px,1.25fr) minmax(150px,1.25fr) minmax(120px,1fr) minmax(120px,1fr) auto;
  gap:10px;
  align-items:center;
  padding:11px 12px;
  border:1px solid #e0e9f1;
  border-radius:11px;
  background:#fbfdff;
}
.waitlist-person,.waitlist-detail{display:grid;gap:2px;min-width:0}
.waitlist-person strong,.waitlist-detail strong{
  color:#304b64;font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
.waitlist-person span,.waitlist-detail span{color:#8191a1;font-size:9.5px}
.waitlist-status{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:27px;padding:0 8px;border-radius:999px;
  font-size:9.5px;font-weight:750;white-space:nowrap
}
.waitlist-status.waiting{background:#fff6df;color:#a87713}
.waitlist-status.offered{background:#eaf4ff;color:#2f75b9}
.waitlist-empty{
  display:grid;place-items:center;text-align:center;gap:4px;
  min-height:180px;padding:24px;border:1px dashed #d7e2ec;border-radius:12px;color:#72879a
}
.waitlist-empty strong{color:#3d5871;font-size:13px}
.waitlist-empty span{font-size:11px}
@media(max-width:760px){
  .waitlist-row{
    grid-template-columns:1fr 1fr;
    gap:8px;
  }
  .waitlist-person{grid-column:1/-1}
  .waitlist-status{justify-self:start}
}

/* Tablet sidebar: arrow remains outside visually but fixed above clipping layers. */
body.tablet-ui{--tablet-sidebar-w:190px}
body.tablet-ui.sidebar-collapsed{--tablet-sidebar-w:68px}
body.tablet-ui .sidebar-toggle{
  position:fixed!important;
  left:calc(var(--tablet-sidebar-w) - 15px)!important;
  right:auto!important;
  top:14px!important;
  z-index:160!important;
  pointer-events:auto!important;
  width:30px!important;
  height:30px!important;
}
body.tablet-ui .sidebar .brand{
  min-width:0!important;
  gap:7px!important;
  margin:2px 4px 20px!important;
  padding:0 24px 0 0!important;
  overflow:hidden!important;
  align-items:center!important;
}
body.tablet-ui .sidebar .brand-mark{
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  flex:0 0 34px!important;
  border-radius:9px!important;
  background-size:contain!important;
  background-position:center!important;
  background-repeat:no-repeat!important;
}
body.tablet-ui #sidebarBrandName{
  display:block!important;
  min-width:0!important;
  max-width:118px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:12px!important;
  line-height:1.15!important;
  font-weight:700!important;
}
body.tablet-ui.sidebar-collapsed #sidebarBrandName{display:none!important}
@media(max-width:900px){
  body.tablet-ui{--tablet-sidebar-w:164px}
  body.tablet-ui.sidebar-collapsed{--tablet-sidebar-w:64px}
  body.tablet-ui #sidebarBrandName{max-width:92px!important;font-size:11px!important}
  body.tablet-ui .sidebar .brand-mark{width:32px!important;height:32px!important;min-width:32px!important;flex-basis:32px!important}
}


/* Compact working days + single-row calendar controls — 2026-09-28 */

/* Working days are chips, not seven stretched columns. */
#settings .working-days-selector,
html.tablet-ui body #settings .working-days-selector,
body.tablet-ui #settings .working-days-selector,
body.client-preview #settings .working-days-selector{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
  grid-template-columns:none!important;
  width:fit-content!important;
  max-width:100%!important;
  gap:7px!important;
}
#settings .working-day-chip,
html.tablet-ui body #settings .working-day-chip,
body.tablet-ui #settings .working-day-chip,
body.client-preview #settings .working-day-chip{
  flex:0 0 auto!important;
  width:auto!important;
  min-width:0!important;
}
#settings .working-day-chip span{
  width:auto!important;
  min-width:50px!important;
  height:36px!important;
  padding:0 11px!important;
}

/* Calendar controls share a single compact row on desktop and tablet. */
#calendar .calendar-toolbar-single{
  display:grid!important;
  grid-template-columns:minmax(220px,1fr) minmax(160px,190px) auto max-content!important;
  align-items:center!important;
  gap:8px!important;
  width:100%!important;
  flex-wrap:nowrap!important;
}
#calendar .calendar-toolbar-single .calendar-client-search{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
}
#calendar .calendar-toolbar-single .therapist-select{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  flex:none!important;
}
#calendar .calendar-inline-week{
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  min-width:0!important;
  width:max-content!important;
  margin:0!important;
}
#calendar .calendar-inline-week .week-arrow{
  width:36px!important;
  min-width:36px!important;
  height:39px!important;
  min-height:39px!important;
  padding:0!important;
}
#calendar .calendar-inline-week .calendar-range-picker{
  width:164px!important;
  min-width:164px!important;
  height:39px!important;
  min-height:39px!important;
}
#calendar .calendar-inline-week .current-week-btn{
  height:39px!important;
  min-height:39px!important;
  padding:0 11px!important;
  white-space:nowrap!important;
}
#calendar .calendar-inline-week .calendar-week-label{
  display:none!important;
}
#calendar .calendar-toolbar-single .calendar-new-btn{
  justify-self:end!important;
  margin-left:auto!important;
  width:auto!important;
  min-width:112px!important;
  white-space:nowrap!important;
}

/* Tablet keeps the same one-row logic but trims each control slightly. */
body.tablet-ui #calendar .calendar-toolbar-single{
  grid-template-columns:minmax(150px,1fr) minmax(135px,155px) auto max-content!important;
  gap:6px!important;
}
body.tablet-ui #calendar .calendar-inline-week{gap:5px!important}
body.tablet-ui #calendar .calendar-inline-week .calendar-range-picker{
  width:148px!important;
  min-width:148px!important;
  padding-left:9px!important;
  padding-right:9px!important;
}
body.tablet-ui #calendar .calendar-inline-week .week-arrow{
  width:34px!important;
  min-width:34px!important;
}
body.tablet-ui #calendar .calendar-inline-week .current-week-btn{
  padding:0 9px!important;
  font-size:11px!important;
}
body.tablet-ui #calendar .calendar-toolbar-single .calendar-new-btn{
  min-width:105px!important;
  padding-left:11px!important;
  padding-right:11px!important;
}

/* Phone can wrap; tablet and desktop stay one line. */
@media(max-width:620px){
  #calendar .calendar-toolbar-single{
    grid-template-columns:minmax(0,1fr) minmax(125px,.72fr)!important;
    gap:7px!important;
  }
  #calendar .calendar-toolbar-single .calendar-client-search{
    grid-column:1/-1!important;
  }
  #calendar .calendar-inline-week{
    grid-column:1/-1!important;
    width:100%!important;
    overflow-x:auto!important;
    padding-bottom:1px!important;
  }
  #calendar .calendar-toolbar-single .calendar-new-btn{
    grid-column:2!important;
    grid-row:2!important;
    width:100%!important;
    min-width:0!important;
  }
  #calendar .calendar-toolbar-single .therapist-select{
    grid-column:1!important;
    grid-row:2!important;
  }
}


/* Solo / Business plan treatment — 2026-09-28 */
.solo-plan-note{
  margin:10px 0 2px;
  padding:10px 12px;
  border:1px solid #d9e6f2;
  border-radius:12px;
  background:#f7fbff;
  color:#597086;
  display:grid;
  gap:3px;
  font-size:10.5px;
  line-height:1.4;
}
.solo-plan-note strong{
  color:#264a68;
  font-size:11px;
}
.plan-explainer{
  line-height:1.45;
}


/* Calendar toolbar + sidebar brand polish — 2026-09-28 */
.sidebar .brand{
  gap:9px!important;
  margin:2px 4px 24px!important;
  padding-right:4px!important;
  min-width:0!important;
  min-height:40px!important;
  overflow:visible!important;
  align-items:center!important;
}
.sidebar .brand-mark{
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  flex:0 0 38px!important;
  border-radius:10px!important;
  background-size:contain!important;
  background-position:center!important;
  background-repeat:no-repeat!important;
}
.sidebar .brand-mark.has-logo{
  width:54px!important;
  min-width:54px!important;
  flex-basis:54px!important;
  overflow:hidden!important;
  background-color:#fff!important;
}
.sidebar .brand-mark.has-logo img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
}
#sidebarBrandName{
  display:block!important;
  min-width:0!important;
  max-width:none!important;
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  font-size:15px!important;
  line-height:1.18!important;
  font-weight:700!important;
}
body.sidebar-collapsed .sidebar .brand{
  justify-content:center!important;
  padding-right:0!important;
  overflow:hidden!important;
}
body.sidebar-collapsed .sidebar .brand-mark.has-logo{
  width:38px!important;
  min-width:38px!important;
  flex-basis:38px!important;
}
body.sidebar-collapsed #sidebarBrandName{display:none!important}

#calendar .calendar-toolbar-single{
  display:grid!important;
  grid-template-columns:minmax(260px,380px) minmax(160px,190px) max-content minmax(112px,1fr)!important;
  align-items:center!important;
  gap:10px!important;
  width:100%!important;
}
#calendar .calendar-toolbar-single .calendar-client-search{
  width:100%!important;
  max-width:380px!important;
  min-width:0!important;
}
#calendar .calendar-toolbar-single .therapist-select{
  width:100%!important;
  min-width:0!important;
  max-width:190px!important;
}
#calendar .calendar-inline-week{
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
  width:max-content!important;
  min-width:0!important;
  margin:0!important;
}
#calendar .calendar-inline-week .calendar-range-picker{
  width:232px!important;
  min-width:232px!important;
  height:39px!important;
  min-height:39px!important;
  padding-left:12px!important;
  padding-right:12px!important;
}
#calendar .calendar-inline-week .calendar-range-picker > span{
  flex:1 1 auto!important;
  min-width:0!important;
  white-space:nowrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
  font-size:12px!important;
  font-weight:600!important;
}
#calendar .calendar-inline-week .week-arrow{
  width:36px!important;
  min-width:36px!important;
  height:39px!important;
  min-height:39px!important;
}
#calendar .calendar-inline-week .current-week-btn{
  height:39px!important;
  min-height:39px!important;
  padding-left:12px!important;
  padding-right:12px!important;
}
#calendar .calendar-toolbar-single .calendar-new-btn{
  justify-self:end!important;
  margin-left:0!important;
  width:auto!important;
  min-width:112px!important;
  white-space:nowrap!important;
}

/* Real tablets still show the wordmark and readable tenant name. */
body.tablet-ui .sidebar .brand{
  gap:7px!important;
  margin:2px 2px 20px!important;
  padding-right:20px!important;
  overflow:visible!important;
}
body.tablet-ui .sidebar .brand-mark.has-logo{
  width:46px!important;
  min-width:46px!important;
  flex-basis:46px!important;
  height:34px!important;
}
body.tablet-ui #sidebarBrandName{
  max-width:none!important;
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  font-size:12px!important;
  line-height:1.15!important;
}
body.tablet-ui #calendar .calendar-toolbar-single{
  grid-template-columns:minmax(190px,280px) minmax(135px,160px) max-content minmax(105px,1fr)!important;
  gap:7px!important;
}
body.tablet-ui #calendar .calendar-inline-week .calendar-range-picker{
  width:205px!important;
  min-width:205px!important;
}
body.tablet-ui #calendar .calendar-toolbar-single .calendar-client-search{
  max-width:280px!important;
}

/* Medium widths use two tidy rows instead of crushing the week period. */
@media(min-width:621px) and (max-width:1180px){
  #calendar .calendar-toolbar-single,
  body.tablet-ui #calendar .calendar-toolbar-single{
    grid-template-columns:minmax(0,1fr) minmax(145px,180px) max-content!important;
    gap:8px!important;
  }
  #calendar .calendar-toolbar-single .calendar-client-search,
  body.tablet-ui #calendar .calendar-toolbar-single .calendar-client-search{
    grid-column:1!important;
    grid-row:1!important;
    max-width:none!important;
  }
  #calendar .calendar-toolbar-single .therapist-select,
  body.tablet-ui #calendar .calendar-toolbar-single .therapist-select{
    grid-column:2!important;
    grid-row:1!important;
    max-width:none!important;
  }
  #calendar .calendar-toolbar-single .calendar-new-btn,
  body.tablet-ui #calendar .calendar-toolbar-single .calendar-new-btn{
    grid-column:3!important;
    grid-row:1!important;
  }
  #calendar .calendar-inline-week,
  body.tablet-ui #calendar .calendar-inline-week{
    grid-column:1/-1!important;
    grid-row:2!important;
    width:max-content!important;
  }
  #calendar .calendar-inline-week .calendar-range-picker,
  body.tablet-ui #calendar .calendar-inline-week .calendar-range-picker{
    width:232px!important;
    min-width:232px!important;
  }
}

/* Phone calendar: compact three-row control stack. */
@media(max-width:620px){
  #calendar .calendar-toolbar-single{
    display:grid!important;
    grid-template-columns:150px minmax(0,1fr)!important;
    gap:6px!important;
  }
  #calendar .calendar-toolbar-single .therapist-select{
    grid-column:1!important;
    grid-row:1!important;
    width:150px!important;
    max-width:150px!important;
    min-width:0!important;
    padding-left:10px!important;
    padding-right:28px!important;
  }
  #calendar .calendar-toolbar-single .calendar-new-btn{
    grid-column:2!important;
    grid-row:1!important;
    width:100%!important;
    min-width:0!important;
    height:38px!important;
    min-height:38px!important;
    padding:0 8px!important;
    font-size:11px!important;
  }
  #calendar .calendar-inline-week{
    grid-column:1/-1!important;
    grid-row:2!important;
    display:grid!important;
    grid-template-columns:32px minmax(0,1fr) 32px 78px!important;
    gap:5px!important;
    width:100%!important;
    overflow:visible!important;
    padding:0!important;
  }
  #calendar .calendar-inline-week .week-arrow{
    width:32px!important;
    min-width:32px!important;
    height:36px!important;
    min-height:36px!important;
    border-radius:9px!important;
    font-size:18px!important;
  }
  #calendar .calendar-inline-week #prevWeekBtn{grid-column:1!important;grid-row:1!important}
  #calendar .calendar-inline-week .calendar-range-picker{grid-column:2!important;grid-row:1!important}
  #calendar .calendar-inline-week #nextWeekBtn{grid-column:3!important;grid-row:1!important}
  #calendar .calendar-inline-week .calendar-range-picker{
    width:100%!important;
    min-width:0!important;
    height:36px!important;
    min-height:36px!important;
    padding:0 9px!important;
    border-radius:9px!important;
  }
  #calendar .calendar-inline-week .calendar-range-picker>span{
    font-size:10.5px!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  #calendar .calendar-inline-week .current-week-btn{
    grid-column:4!important;
    grid-row:1!important;
    width:78px!important;
    min-width:78px!important;
    height:36px!important;
    min-height:36px!important;
    padding:0 5px!important;
    border-radius:9px!important;
    font-size:9.5px!important;
    white-space:nowrap!important;
  }
  #calendar .calendar-toolbar-single .calendar-client-search{
    grid-column:1/-1!important;
    grid-row:3!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    height:38px!important;
    min-height:38px!important;
    padding-left:10px!important;
    font-size:11.5px!important;
  }

  /* Wider days + shorter rows so more appointments fit vertically. */
  #calendar{--calendar-row-height:40px!important}
  #calendar .calendar-grid,
  #calendar .calendar-grid.half-hour{
    min-width:1256px!important;
    grid-template-columns:52px repeat(7,172px)!important;
  }
  #calendar .calendar-grid.half-hour .cal-cell{
    min-height:40px!important;
    padding:4px 5px!important;
  }
  #calendar .calendar-grid.half-hour .cal-head{
    min-height:34px!important;
    padding:7px 6px!important;
  }
  #calendar .event{
    min-height:0!important;
    margin-top:2px!important;
    padding:4px 6px!important;
    border-radius:7px!important;
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr) auto!important;
    grid-template-rows:auto auto!important;
    column-gap:5px!important;
    row-gap:1px!important;
    align-items:center!important;
    overflow:hidden!important;
  }
  #calendar .event.duration-45{min-height:36px!important}
  #calendar .event.duration-60{min-height:40px!important}
  #calendar .event.duration-90{min-height:48px!important}
  #calendar .event-time{
    grid-column:1!important;
    grid-row:1!important;
    margin:0!important;
    font-size:9.5px!important;
    white-space:nowrap!important;
  }
  #calendar .event-client{
    grid-column:2!important;
    grid-row:1!important;
    margin:0!important;
    min-width:0!important;
    font-size:10.5px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  #calendar .event-status-tag{
    grid-column:3!important;
    grid-row:1!important;
    margin:0!important;
    padding:2px 5px!important;
    font-size:7.5px!important;
  }
  #calendar .event-service{
    grid-column:1/-1!important;
    grid-row:2!important;
    margin:0!important;
    min-width:0!important;
    font-size:8.5px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  #calendar .event-extra-tags{
    grid-column:1/-1!important;
    margin-top:2px!important;
  }

  /* Business logo in the phone header must stay visible even for white/transparent artwork. */
  .mobile-brand .brand-mark.has-logo{
    width:44px!important;
    min-width:44px!important;
    height:32px!important;
    flex:0 0 44px!important;
    padding:2px!important;
    overflow:hidden!important;
    border:1px solid #d4e5f5!important;
    background:#e7f2ff!important;
  }
  .mobile-brand .brand-mark.has-logo img{
    display:block!important;
    width:100%!important;
    height:100%!important;
    object-fit:contain!important;
    object-position:center!important;
  }
}

@media(max-width:900px){
  body.tablet-ui #sidebarBrandName{
    font-size:10.5px!important;
    line-height:1.15!important;
  }
  body.tablet-ui .sidebar .brand-mark.has-logo{
    width:40px!important;
    min-width:40px!important;
    flex-basis:40px!important;
    height:32px!important;
  }
}


/* AUTH MUST NEVER BE BLOCKED BY GLOBAL LOADER — 2026-09-28 */
body.auth-locked:not(.auth-checking) .global-loader,
body.auth-locked:not(.auth-checking) .global-loader.open{
  display:none!important;
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
}


/* SERVICE DETAILS LAYOUT FIX — 2026-09-28 */
/*
  service-manage-row is a <details> element. Tablet/client-preview overrides were
  turning the <details> itself into a multi-column grid, which placed <summary>
  and the edit body next to each other and crushed the edit fields.
  Keep the accordion shell block-level; only the inner edit grid owns columns.
*/
#settings details.service-manage-row,
html.tablet-ui body #settings details.service-manage-row,
body.tablet-ui #settings details.service-manage-row,
body.client-preview #settings details.service-manage-row{
  display:block!important;
  grid-template-columns:none!important;
  gap:0!important;
  align-items:stretch!important;
  width:100%!important;
  min-width:0!important;
}
#settings details.service-manage-row > .service-summary,
#settings details.service-manage-row > .service-edit-body{
  width:100%!important;
  min-width:0!important;
}
#settings details.service-manage-row > .service-edit-body{
  box-sizing:border-box!important;
}
#settings details.service-manage-row .service-edit-grid{
  width:100%!important;
  min-width:0!important;
}
@media(min-width:761px){
  html.tablet-ui body #settings details.service-manage-row .service-edit-grid,
  body.tablet-ui #settings details.service-manage-row .service-edit-grid,
  body.client-preview #settings details.service-manage-row .service-edit-grid{
    display:grid!important;
    grid-template-columns:minmax(220px,1.7fr) 110px 130px 95px!important;
    gap:8px!important;
    align-items:end!important;
  }
}
@media(min-width:621px) and (max-width:760px){
  html.tablet-ui body #settings details.service-manage-row .service-edit-grid,
  body.tablet-ui #settings details.service-manage-row .service-edit-grid,
  body.client-preview #settings details.service-manage-row .service-edit-grid{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
  }
  #settings details.service-manage-row .service-edit-grid > .form-field:first-child{
    grid-column:1/-1!important;
  }
}


/* Google Calendar review workspace — 2026-09-29 */
.calendar-import-stats{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:9px;
  margin-top:14px;
}
.calendar-import-stat{
  min-width:0;
  padding:12px 13px;
  border:1px solid #dfe9f3;
  border-radius:12px;
  background:#f8fbfe;
}
.calendar-import-stat span{
  display:block;
  margin-bottom:4px;
  color:#7a8da1;
  font-size:10.5px;
  font-weight:600;
}
.calendar-import-stat strong{
  color:#15324f;
  font-size:20px;
  line-height:1.1;
  letter-spacing:-.02em;
}
.calendar-import-stats-meta{
  margin-top:7px;
  color:#8293a5;
  font-size:10.5px;
}
.calendar-review-wrap{
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid var(--line);
}
.calendar-review-launch{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:12px 14px;
  border:1px solid #dce8f3;
  border-radius:12px;
  background:#f7fbff;
  color:#24425f;
  text-align:left;
  cursor:pointer;
  transition:border-color .15s,background .15s,box-shadow .15s;
}
.calendar-review-launch:hover{
  border-color:#b8d3ec;
  background:#f0f7fe;
  box-shadow:0 4px 14px rgba(44,103,158,.06);
}
.calendar-review-launch>span:first-child{display:grid;gap:3px;min-width:0}
.calendar-review-launch strong{font-size:12px}
.calendar-review-launch small{color:#7c8fa2;font-size:10.5px;font-weight:500}
.calendar-review-launch-right{display:flex;align-items:center;gap:10px;font-size:20px;color:#6c8baa}
.review-count{
  display:inline-grid;
  place-items:center;
  min-width:26px;
  height:24px;
  margin:0;
  padding:0 7px;
  border-radius:999px;
  background:var(--amber-bg);
  color:var(--amber);
  font-size:10px;
  font-weight:700;
}

.google-review-modal{
  z-index:60;
  padding:18px;
  background:rgba(22,43,64,.34);
  backdrop-filter:blur(3px);
}
.google-review-dialog{
  width:min(1460px,calc(100vw - 36px));
  max-width:none;
  height:min(92dvh,940px);
  max-height:none;
  padding:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  border-radius:20px;
  box-shadow:0 30px 90px rgba(20,46,73,.28);
}
.google-review-head{
  flex:0 0 auto;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding:20px 22px 16px;
  border-bottom:1px solid #e8eef4;
  background:#fff;
}
.google-review-head h2{
  margin:0 0 4px;
  color:#18324e;
  font-size:21px;
  letter-spacing:-.02em;
}
.google-review-toolbar{
  flex:0 0 auto;
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:16px;
  padding:13px 22px;
  border-bottom:1px solid #edf2f6;
  background:#f8fbfe;
}
.google-review-search{display:grid;gap:5px;min-width:240px}
.google-review-search>label,
.google-review-sort label{font-size:10.5px;font-weight:700;color:#587087}
.google-review-search-wrap{position:relative}
.google-review-search-wrap svg{
  position:absolute;
  left:11px;
  top:50%;
  width:16px;
  height:16px;
  transform:translateY(-50%);
  fill:none;
  stroke:#7d90a3;
  stroke-width:1.8;
  stroke-linecap:round;
  pointer-events:none;
}
.google-review-search-wrap input{
  width:100%;
  min-height:40px;
  height:40px;
  padding:0 11px 0 35px;
  border:1px solid #d6e3ee;
  border-radius:10px;
  background:#fff;
  color:#29445f;
  font:600 12px Inter,system-ui,sans-serif;
  outline:none;
}
.google-review-search-wrap input:focus{
  border-color:#8fbce8;
  box-shadow:0 0 0 3px rgba(73,143,210,.09);
}
.google-review-sort{display:grid;gap:5px;min-width:190px}
.google-review-sort select{
  min-height:40px;
  border:1px solid #d6e3ee;
  border-radius:10px;
  background:#fff;
  padding:0 34px 0 11px;
  color:#29445f;
  font:600 12px Inter,system-ui,sans-serif;
}
.google-review-toolbar-note{font-size:10.5px;text-align:right}
.google-review-list-scroll{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  padding:16px 22px 20px;
  background:#f5f8fb;
}
.google-review-modal .calendar-review-list{display:grid;gap:10px}
.google-review-modal .calendar-review-item{
  padding:13px 14px;
  border:1px solid #dfe8f1;
  border-radius:13px;
  background:#fff;
  box-shadow:0 2px 8px rgba(31,67,99,.035);
}
.google-review-modal .review-event-meta{margin-bottom:9px}
.google-review-modal .review-event-title{font-size:12px}
.google-review-modal .review-fields{
  grid-template-columns:minmax(190px,1.25fr) minmax(150px,.85fr) minmax(210px,1.15fr) minmax(150px,auto);
  gap:9px;
}
.google-review-modal .review-fields .form-field{gap:4px}
.google-review-modal .review-fields label{font-size:10px;color:#60768b}
.google-review-modal .review-fields input{
  min-height:40px;
  height:40px;
  border-radius:10px;
}
.google-review-modal .review-fields .btn{
  min-height:40px;
  height:40px;
  padding:0 12px;
}
.google-review-modal .review-row-actions{
  display:flex;
  align-items:end;
  gap:6px;
  align-self:end;
}
.google-review-modal .review-row-actions .btn{white-space:nowrap}
.google-review-modal .google-review-delete{
  border:1px solid #efd1d1;
  background:#fff7f7;
  color:#b24e4e;
}
.google-review-modal .google-review-delete:hover{
  border-color:#e7bcbc;
  background:#fff0f0;
}
.google-review-footer{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 22px 15px;
  border-top:1px solid #e8eef4;
  background:#fff;
}
.google-review-footer .btn{min-width:120px}

@media(max-width:820px){
  .calendar-import-stats{grid-template-columns:1fr}
  .google-review-modal{padding:0}
  .google-review-dialog{
    width:100vw;
    height:100dvh;
    border-radius:0;
  }
  .google-review-head{padding:15px 14px 12px}
  .google-review-toolbar{align-items:stretch;flex-direction:column;padding:11px 14px}
  .google-review-toolbar-note{text-align:left}
  .google-review-sort{min-width:0;width:100%}
  .google-review-list-scroll{padding:12px 10px 16px}
  .google-review-modal .review-event-meta{display:flex}
  .google-review-modal .review-fields{grid-template-columns:1fr}
  .google-review-footer{padding:10px 14px calc(12px + env(safe-area-inset-bottom))}
}


/* Google review modal full viewport fix — 2026-09-29 */
.google-review-modal>.google-review-dialog{
  --viewport-modal-width:1600px!important;
  width:min(1600px,calc(100dvw - 40px))!important;
  max-width:calc(100dvw - 40px)!important;
  height:calc(100dvh - 40px)!important;
  max-height:calc(100dvh - 40px)!important;
  padding:0!important;
  overflow:hidden!important;
  border-radius:20px!important;
}
.google-review-modal .google-review-list-scroll{
  overflow-y:auto!important;
  overflow-x:hidden!important;
}
.google-review-modal .calendar-review-item,
.google-review-modal .review-fields,
.google-review-modal .review-fields>*{
  min-width:0!important;
}
@media(max-width:820px){
  .google-review-modal>.google-review-dialog{
    width:100dvw!important;
    max-width:100dvw!important;
    height:100dvh!important;
    max-height:100dvh!important;
    border-radius:0!important;
  }
}


/* Collapsible Google review items — 2026-09-29 */
.google-review-modal details.calendar-review-item{
  padding:0!important;
  overflow:hidden;
}
.google-review-modal details.calendar-review-item>summary{
  list-style:none;
  cursor:pointer;
  user-select:none;
  margin:0!important;
  padding:13px 14px;
  align-items:center;
  min-height:46px;
}
.google-review-modal details.calendar-review-item>summary::-webkit-details-marker{display:none}
.google-review-modal .review-event-side{
  display:flex;
  align-items:center;
  gap:10px;
  flex:0 0 auto;
}
.google-review-modal .review-event-chevron{
  display:grid;
  place-items:center;
  width:26px;
  height:26px;
  border-radius:8px;
  background:#f2f6fa;
  color:#6e8499;
  font-size:15px;
  line-height:1;
  transition:transform .15s ease,background .15s ease;
}
.google-review-modal details[open] .review-event-chevron{
  transform:rotate(180deg);
  background:#eaf3fc;
}
.google-review-modal details.calendar-review-item>.review-fields{
  padding:0 14px 14px;
  border-top:1px solid #edf2f6;
  padding-top:12px;
}
.google-review-modal details.calendar-review-item:not([open])>.review-fields{display:none}
.google-review-modal details.calendar-review-item>summary:hover{background:#f8fbfe}
@media(max-width:820px){
  .google-review-modal details.calendar-review-item>summary{
    padding:12px;
    align-items:flex-start;
  }
  .google-review-modal .review-event-side{gap:7px}
  .google-review-modal .review-event-date{white-space:normal;text-align:right}
  .google-review-modal details.calendar-review-item>.review-fields{padding:11px 12px 13px}
}


/* Collapsible settings panels — 2026-09-29 */
#settings>.settings-collapsible,
#settings>.settings-grid>.settings-collapsible{
  margin:0 0 12px;
  border:1px solid #dfe8f1;
  border-radius:15px;
  background:#fff;
  overflow:hidden;
  box-shadow:0 2px 10px rgba(31,67,99,.025);
}
#settings>.settings-grid>.settings-collapsible{
  grid-column:1/-1;
  width:100%;
}
.settings-collapsible-summary{
  list-style:none;
  min-height:62px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:14px 16px;
  cursor:pointer;
  user-select:none;
  background:#fff;
  transition:background .15s ease;
}
.settings-collapsible-summary::-webkit-details-marker{display:none}
.settings-collapsible-summary:hover{background:#f8fbfe}
.settings-collapsible-copy{
  display:grid;
  gap:3px;
  min-width:0;
}
.settings-collapsible-copy strong{
  color:#18324e;
  font-size:15px;
  line-height:1.2;
}
.settings-collapsible-copy small{
  color:#8192a4;
  font-size:10.5px;
  font-weight:500;
  line-height:1.35;
}
.settings-collapsible-chevron{
  flex:0 0 32px;
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  border-radius:9px;
  background:#f1f6fa;
  color:#6f8498;
  font-size:17px;
  line-height:1;
  transition:transform .16s ease,background .16s ease;
}
.settings-collapsible[open]>.settings-collapsible-summary{
  border-bottom:1px solid #e8eef4;
  background:#fbfdff;
}
.settings-collapsible[open]>.settings-collapsible-summary .settings-collapsible-chevron{
  transform:rotate(180deg);
  background:#eaf3fc;
}
.settings-collapsible-card{
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  margin:0!important;
}
.settings-collapsible>.settings-collapsible-card{
  padding-top:16px;
}
@media(max-width:620px){
  .settings-collapsible-summary{min-height:58px;padding:12px 13px}
  .settings-collapsible-copy strong{font-size:14px}
  .settings-collapsible-copy small{font-size:10px}
  .settings-collapsible-chevron{width:30px;height:30px;flex-basis:30px}
}

/* The Google review popup itself stays expanded; only Settings cards are collapsible. */
.google-review-modal div.calendar-review-item{
  display:block;
}


/* Settings cards: original layout, collapsible content — 2026-09-29 */
/* Neutralize the temporary wrapper-based accordion styles. */
#settings>.settings-collapsible,
#settings>.settings-grid>.settings-collapsible{display:contents!important}

#settings .settings-collapsible-card{
  position:relative;
  overflow:hidden;
}
#settings .settings-collapsible-card>.settings-panel-toggle{
  width:100%;
  min-height:62px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:14px 16px;
  margin:0;
  border:0;
  background:#fff;
  color:inherit;
  text-align:left;
  cursor:pointer;
  font:inherit;
}
#settings .settings-collapsible-card>.settings-panel-toggle:hover{
  background:#f8fbfe;
}
#settings .settings-panel-toggle-copy{
  display:grid;
  gap:3px;
  min-width:0;
}
#settings .settings-panel-toggle-copy strong{
  color:#18324e;
  font-size:15px;
  line-height:1.2;
}
#settings .settings-panel-toggle-copy small{
  color:#8192a4;
  font-size:10.5px;
  font-weight:500;
  line-height:1.35;
}
#settings .settings-panel-toggle-chevron{
  flex:0 0 32px;
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  border-radius:9px;
  background:#f1f6fa;
  color:#6f8498;
  font-size:17px;
  line-height:1;
  transition:transform .16s ease,background .16s ease;
}
#settings .settings-collapsible-card:not(.is-collapsed)>.settings-panel-toggle{
  border-bottom:1px solid #e8eef4;
  background:#fbfdff;
}
#settings .settings-collapsible-card:not(.is-collapsed)>.settings-panel-toggle .settings-panel-toggle-chevron{
  transform:rotate(180deg);
  background:#eaf3fc;
}
#settings .settings-collapsible-card>.settings-panel-body{
  display:block;
}
#settings .settings-collapsible-card.is-collapsed>.settings-panel-body{
  display:none!important;
}
/* When expanded, keep the exact old card padding/content treatment. */
#settings .settings-collapsible-card>.settings-panel-body{
  padding:16px;
}
#settings .settings-collapsible-card{
  padding:0!important;
}
/* Full-width cards remain full width exactly as before. */
#settings>.settings-collapsible-card{
  width:100%;
}
#settings>.settings-grid{
  width:100%;
}
#settings>.settings-grid>.settings-collapsible-card{
  width:auto;
}
/* Google Calendar kept in its original grid slot/size. */
#settings .google-calendar-integration.settings-collapsible-card{
  grid-column:1/-1;
}
/* Existing cards that had their own inner card spacing should not gain nested borders. */
#settings .settings-panel-body>.section-head:first-child{margin-top:0}

@media(max-width:620px){
  #settings .settings-collapsible-card>.settings-panel-toggle{
    min-height:58px;
    padding:12px 13px;
  }
  #settings .settings-panel-toggle-copy strong{font-size:14px}
  #settings .settings-panel-toggle-copy small{font-size:10px}
}


/* Settings bottom placement + proper chevrons — 2026-09-29 */
#settings .settings-panel-toggle-chevron{
  font-size:0!important;
}
#settings .settings-panel-toggle-chevron svg{
  width:17px;
  height:17px;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/*
  Desktop bottom block:
  left column  = Bezbednost, then Google Calendar
  right column = Biznis i radno vreme (in the old Google Calendar position)
*/
@media(min-width:901px){
  #settings > .security-settings-card{
    order:40!important;
    grid-column:1 / span 5!important;
    width:100%!important;
    align-self:start!important;
  }
  #settings > .business-settings-card{
    order:41!important;
    grid-column:6 / -1!important;
    width:100%!important;
    align-self:start!important;
  }
  #settings > .settings-grid{
    order:42!important;
    grid-column:1 / span 5!important;
    width:100%!important;
    display:block!important;
    align-self:start!important;
  }
  #settings > .settings-grid .google-calendar-integration{
    width:100%!important;
    min-height:0!important;
  }
}

/* On narrower screens keep the same logical sequence: Security -> Google -> Business. */
@media(max-width:900px){
  #settings > .security-settings-card{order:40!important}
  #settings > .settings-grid{order:41!important}
  #settings > .business-settings-card{order:42!important}
}


/* Settings width, spacing and sidebar icon polish — 2026-09-29 */
/* Settings cards: tighter rhythm and a clearer thin outline. */
#settings.page.active{
  gap:8px!important;
}
#settings > .card,
#settings > .settings-grid{
  margin-bottom:0!important;
}
#settings .settings-collapsible-card{
  border:1px solid #d5e0eb!important;
  border-radius:14px!important;
  box-shadow:0 3px 12px rgba(35,67,98,.035)!important;
}
#settings .settings-collapsible-card>.settings-panel-toggle{
  min-height:58px!important;
  padding:12px 14px!important;
}
#settings .settings-collapsible-card:not(.is-collapsed)>.settings-panel-toggle{
  border-bottom-color:#dde7f0!important;
}

/* Security + Business stay paired; Google Calendar becomes a true full-width row below. */
@media(min-width:901px){
  #settings > .security-settings-card{
    order:40!important;
    grid-column:1 / span 5!important;
  }
  #settings > .business-settings-card{
    order:41!important;
    grid-column:6 / -1!important;
  }
  #settings > .settings-grid{
    order:42!important;
    grid-column:1 / -1!important;
    width:100%!important;
    max-width:none!important;
    display:block!important;
  }
}
#settings > .settings-grid,
#settings > .settings-grid .google-calendar-integration,
#settings > .settings-grid .google-calendar-integration>.settings-panel-body{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
}
#settings > .settings-grid .google-calendar-integration{
  min-height:0!important;
}
#settings .google-calendar-integration .integration-actions{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  width:100%!important;
  gap:8px!important;
}
#settings .google-calendar-integration .integration-actions .btn{
  width:100%!important;
}
#settings .google-calendar-integration .calendar-import-panel,
#settings .google-calendar-integration .calendar-import-stats,
#settings .google-calendar-integration .calendar-review-wrap{
  width:100%!important;
  max-width:none!important;
}
#settings .google-calendar-integration .calendar-import-controls{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(190px,280px)!important;
  align-items:end!important;
  gap:8px!important;
  width:100%!important;
  max-width:none!important;
}
#settings .google-calendar-integration .calendar-import-controls .btn{
  width:100%!important;
}
@media(max-width:700px){
  #settings .google-calendar-integration .integration-actions,
  #settings .google-calendar-integration .calendar-import-controls{
    grid-template-columns:1fr!important;
  }
  #settings .calendar-import-stats{
    grid-template-columns:1fr!important;
  }
}

/* Sidebar: sync action is exactly the same usable width as menu items. */
.sidebar-sync{
  margin:8px 0 0!important;
  padding:10px 0 0!important;
  border-top:1px solid #e0e8f1!important;
}
.sidebar-sync .sync-btn{
  width:100%!important;
  min-height:44px!important;
  justify-content:flex-start!important;
  padding:0 14px!important;
  border-radius:12px!important;
}
.sidebar-sync .sync-meta{
  padding:0 4px;
  margin-top:6px!important;
}
.sync-icon,.nav-icon{
  display:grid;
  place-items:center;
  flex:0 0 20px;
  width:20px;
  height:20px;
}
.sync-icon svg,.nav-icon svg{
  width:19px;
  height:19px;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.nav button{
  min-height:44px;
}
.nav button[data-page="dashboard"] .nav-icon svg,
.mobile-nav button[data-page="dashboard"] .mobile-nav-icon svg{
  fill:none!important;
  stroke:currentColor!important;
}
.mobile-nav-icon svg{
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.8!important;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* Collapsed sidebar keeps the sync icon centered without a text glyph fallback. */
body.sidebar-collapsed .sidebar .sync-btn{
  justify-content:center!important;
  padding-left:0!important;
  padding-right:0!important;
}


/* Admin new-client modal scrolling + dual create actions — 2026-09-29 */
.admin-new-client-dialog{
  width:min(820px,calc(100vw - 28px))!important;
  height:min(88dvh,860px)!important;
  max-height:min(88dvh,860px)!important;
  padding:0!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
}
.admin-new-client-head{
  position:relative!important;
  top:auto!important;
  flex:0 0 auto;
  margin:0!important;
  padding:20px 22px 16px!important;
}
.admin-new-client-content{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:18px 22px 20px;
  scrollbar-gutter:stable;
}
.admin-new-client-actions{
  position:relative!important;
  bottom:auto!important;
  flex:0 0 auto;
  margin:0!important;
  padding:14px 22px 16px!important;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.admin-new-client-action-group{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  min-width:0;
}
.admin-new-client-action-group .btn{
  white-space:nowrap;
}
@media(max-width:720px){
  .admin-new-client-modal{padding:0!important}
  .admin-new-client-dialog{
    width:100vw!important;
    height:100dvh!important;
    max-height:100dvh!important;
    border-radius:0!important;
  }
  .admin-new-client-head{padding:16px 16px 13px!important}
  .admin-new-client-content{padding:15px 16px 18px}
  .admin-new-client-actions{
    padding:12px 16px calc(14px + env(safe-area-inset-bottom))!important;
    align-items:stretch;
    flex-direction:column-reverse;
  }
  .admin-new-client-action-group{
    display:grid;
    grid-template-columns:1fr;
    width:100%;
  }
  .admin-new-client-actions>.btn,
  .admin-new-client-action-group .btn{width:100%}
}


/* CRM polish: toast alerts, inline client edit, current time, denser calendar — 2026-09-29 */
.app-toast-host{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:250;
  display:grid;
  gap:8px;
  width:min(360px,calc(100vw - 28px));
  pointer-events:none;
}
.app-toast{
  pointer-events:auto;
  display:grid;
  grid-template-columns:28px 1fr;
  align-items:start;
  gap:9px;
  padding:11px 13px;
  border:1px solid #dce7f0;
  border-radius:12px;
  background:rgba(255,255,255,.98);
  color:#29435b;
  box-shadow:0 12px 34px rgba(25,55,84,.16);
  font-size:12.5px;
  line-height:1.4;
  opacity:0;
  transform:translateY(8px);
  transition:opacity .18s ease,transform .18s ease;
  cursor:pointer;
}
.app-toast.show{opacity:1;transform:translateY(0)}
.app-toast.error{border-color:#f0cfd0;color:#984747;background:#fffafa}
.app-toast-icon{
  width:26px;height:26px;
  display:grid;place-items:center;
  border-radius:8px;
  background:#eef6fd;
  color:#3b7db7;
  font-weight:800;
}
.app-toast.error .app-toast-icon{background:#fff0f0;color:#c34c4c}
.app-toast-text{padding-top:4px}
.field-optional{font-size:9.5px;font-weight:600;color:#8a9aab;margin-left:4px}
.field-help{font-size:10.5px;margin-top:2px}

.appointment-client-label-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.appointment-client-edit-link{
  border:0;
  background:transparent;
  color:var(--ui-primary,var(--blue));
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:2px 0;
  font:600 10.5px var(--ui-font,inherit);
  cursor:pointer;
}
.appointment-client-edit-link:hover{text-decoration:underline}
.appointment-client-edit-link svg{
  width:13px;height:13px;
  fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;
}

#calendar .calendar-now-line{
  position:absolute;
  left:-1px;
  right:-1px;
  top:var(--now-offset,0%);
  height:0;
  border-top:2px solid #ef4444;
  z-index:12;
  pointer-events:none;
}
#calendar .calendar-now-line::before{
  content:"";
  position:absolute;
  left:-5px;
  top:-5px;
  width:9px;
  height:9px;
  border-radius:50%;
  background:#ef4444;
  box-shadow:0 0 0 2px #fff;
}
#calendar .cal-cell[data-slot-date]{position:relative}

/* Google-style calendar density: full-width days, denser vertically. */
@media(min-width:981px){
  #calendar .calendar-grid,
  #calendar .calendar-grid.half-hour{
    width:100%!important;
    min-width:100%!important;
    grid-template-columns:64px repeat(7,minmax(0,1fr))!important;
  }

  /* The user wanted less vertical height, not narrower day columns. */
  #calendar.calendar-density-compact{--calendar-row-height:38px!important}
  #calendar.calendar-density-medium{--calendar-row-height:42px!important}
  #calendar.calendar-density-comfortable{--calendar-row-height:46px!important}

  #calendar .calendar-grid.half-hour .cal-cell{
    padding:4px 8px!important;
  }
  #calendar .calendar-grid.half-hour .cal-head{
    min-height:36px!important;
    padding:8px 8px!important;
  }
  #calendar .event{
    margin-top:2px!important;
    padding:4px 7px!important;
    overflow:hidden;
  }
  #calendar .event-time{
    font-size:10.5px!important;
    line-height:1.1!important;
  }
  #calendar .event-client{
    margin-top:1px!important;
    font-size:11.5px!important;
    line-height:1.12!important;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  #calendar .event-service{
    margin-top:1px!important;
    font-size:9.5px!important;
    line-height:1.1!important;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  #calendar .event-status-tag{
    margin-top:3px!important;
    padding:2px 5px!important;
    font-size:8px!important;
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
  }
}
@media(max-width:980px){
  #calendar .calendar-grid,
  #calendar .calendar-grid.half-hour{
    width:max-content!important;
    min-width:1112px!important;
    grid-template-columns:62px repeat(7,150px)!important;
  }
}
@media(max-width:620px){
  .app-toast-host{right:10px;bottom:86px;width:calc(100vw - 20px)}
  #calendar .calendar-grid,
  #calendar .calendar-grid.half-hour{
    min-width:1064px!important;
    grid-template-columns:56px repeat(7,144px)!important;
  }
}


/* Appointment detail final polish — 2026-09-29 */
.appointment-detail-modal{
  align-items:center!important;
  justify-content:center!important;
}
.appointment-detail-modal>.modal{
  --viewport-modal-width:720px;
  width:min(720px,calc(100dvw - 32px))!important;
  max-width:calc(100dvw - 32px)!important;
  max-height:min(90dvh,900px)!important;
  padding:0!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
  border-radius:20px!important;
  background:#fff!important;
  box-shadow:0 26px 72px rgba(21,51,82,.24)!important;
}
.appointment-detail-modal .appointment-detail-head{
  position:relative!important;
  top:auto!important;
  flex:0 0 auto!important;
  padding:17px 18px 14px!important;
  margin:0!important;
  background:#fff!important;
  border-bottom:1px solid #e8eef4!important;
}
.appointment-detail-modal .form-grid{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  padding:15px 18px 16px!important;
  gap:10px 12px!important;
}
.appointment-detail-modal .appointment-actionbar{
  position:relative!important;
  bottom:auto!important;
  flex:0 0 auto!important;
  margin:0!important;
  padding:11px 18px 13px!important;
  border-top:1px solid #e8eef4!important;
  background:#fff!important;
}

/* Visit-service cards */
.appointment-detail-modal .appointment-visit-services{
  padding:12px!important;
  border:1px solid #dfe8ef!important;
  border-radius:14px!important;
  background:#f8fbfd!important;
}
.appointment-detail-modal .appointment-visit-services-list{
  gap:8px!important;
}
.appointment-detail-modal .visit-service-option{
  min-height:52px!important;
  padding:9px 10px!important;
  border:1px solid #dce6ee!important;
  border-radius:11px!important;
  background:#fff!important;
  transition:border-color .15s ease,background .15s ease,box-shadow .15s ease!important;
}
.appointment-detail-modal .visit-service-option:hover{
  border-color:color-mix(in srgb,var(--ui-primary) 45%,#dce6ee)!important;
  background:color-mix(in srgb,var(--ui-primary-soft) 45%,#fff)!important;
}
.appointment-detail-modal .visit-service-option:has(input:checked){
  border-color:color-mix(in srgb,var(--ui-primary) 58%,#dce6ee)!important;
  background:color-mix(in srgb,var(--ui-primary-soft) 72%,#fff)!important;
  box-shadow:0 0 0 2px rgba(var(--theme-rgb),.055)!important;
}
.appointment-detail-modal .visit-service-option.primary{
  border-color:color-mix(in srgb,var(--ui-primary) 38%,#dce6ee)!important;
}

/* Force appointment checkboxes to stay square; generic form input rules used to stretch them. */
.appointment-detail-modal input[type="checkbox"],
.appointment-detail-modal .visit-service-option input[type="checkbox"],
.appointment-detail-modal .reminder-master input[type="checkbox"]{
  appearance:none!important;
  -webkit-appearance:none!important;
  box-sizing:border-box!important;
  width:20px!important;
  height:20px!important;
  min-width:20px!important;
  min-height:20px!important;
  max-width:20px!important;
  max-height:20px!important;
  flex:0 0 20px!important;
  padding:0!important;
  margin:0!important;
  border:1.5px solid #b8c9d8!important;
  border-radius:6px!important;
  background:#fff!important;
  background-image:none!important;
  box-shadow:none!important;
  cursor:pointer!important;
}
.appointment-detail-modal input[type="checkbox"]:checked{
  border-color:var(--ui-primary)!important;
  background-color:var(--ui-primary)!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.1 8.2 6.4 11.3 12.9 4.8' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important;
  background-position:center!important;
  background-repeat:no-repeat!important;
  background-size:13px 13px!important;
}
.appointment-detail-modal input[type="checkbox"]:disabled{
  cursor:default!important;
  opacity:1!important;
}
.appointment-detail-modal input[type="checkbox"]:disabled:checked{
  border-color:var(--ui-primary)!important;
  background-color:var(--ui-primary)!important;
}
.appointment-detail-modal .reminder-master{
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
}
@media(max-width:760px){
  .appointment-detail-modal>.modal{
    width:calc(100dvw - 20px)!important;
    max-width:540px!important;
    max-height:calc(100dvh - 20px)!important;
    border-radius:18px!important;
  }
  .appointment-detail-modal .appointment-detail-head{padding:13px 14px 11px!important}
  .appointment-detail-modal .form-grid{padding:12px 14px 14px!important}
  .appointment-detail-modal .appointment-actionbar{padding:10px 14px calc(10px + env(safe-area-inset-bottom))!important}
}


/* Settings final layout: messaging + business + security/google split — 2026-09-29 */
/* Kanali poruka must always behave like a normal full-width settings section. */
#settings > .messaging-settings-card{
  grid-column:1 / -1!important;
  width:100%!important;
  min-width:0!important;
  margin-bottom:0!important;
}
#settings .messaging-settings-card>.settings-panel-body{
  width:100%!important;
  min-width:0!important;
  padding:16px!important;
}
#settings .messaging-settings-card .section-head{
  margin-bottom:12px!important;
}
#settings .messaging-channel-status{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
  width:100%!important;
  margin:0 0 12px!important;
}
#settings .messaging-channel-state{
  min-width:0!important;
  padding:12px 13px!important;
  border:1px solid #dbe6ee!important;
  border-radius:12px!important;
  background:#f8fbfd!important;
}
#settings .messaging-channel-state.active{
  border-color:color-mix(in srgb,var(--ui-primary) 32%,#dbe6ee)!important;
  background:color-mix(in srgb,var(--ui-primary-soft) 55%,#fff)!important;
}
#settings .messaging-channel-state strong{
  font-size:13px!important;
  color:#304d65!important;
}
#settings .messaging-channel-state span{
  margin-top:4px!important;
  font-size:11px!important;
}
#settings .messaging-channel-state small{
  margin-top:5px!important;
  font-size:10.5px!important;
  line-height:1.4!important;
}
#settings .messaging-channel-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:10px!important;
  width:100%!important;
}
#settings .messaging-channel-grid>.form-field{
  min-width:0!important;
}
#settings .messaging-channel-grid select,
#settings .messaging-channel-grid .settings-select-control{
  width:100%!important;
  min-width:0!important;
}
#settings .messaging-provider-note{
  width:100%!important;
  margin:12px 0!important;
  padding:12px 13px!important;
  border:1px solid #e0e8ef!important;
  border-radius:12px!important;
  background:#f9fbfd!important;
}
#settings .messaging-provider-note strong{
  font-size:12px!important;
}
#settings .messaging-provider-note p{
  margin:4px 0 0!important;
  font-size:10.5px!important;
  line-height:1.45!important;
  color:#6b7e90!important;
}
#settings #saveMessagingSettingsBtn{
  min-width:170px!important;
}

/* Bottom settings layout:
   Business full width, then Security + Google 50/50. */
@media(min-width:901px){
  #settings > .business-settings-card{
    order:40!important;
    grid-column:1 / -1!important;
    width:100%!important;
    max-width:none!important;
    align-self:start!important;
  }
  #settings > .security-settings-card{
    order:41!important;
    grid-column:1 / span 6!important;
    width:100%!important;
    min-width:0!important;
    align-self:start!important;
  }
  #settings > .settings-grid{
    order:42!important;
    grid-column:7 / -1!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    display:block!important;
    align-self:start!important;
  }

  /* Google is half-page now, so make its internals compact instead of forcing full-page controls. */
  #settings > .settings-grid .google-calendar-integration,
  #settings > .settings-grid .google-calendar-integration>.settings-panel-body{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }
  #settings .google-calendar-integration .integration-actions{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  #settings .google-calendar-integration .calendar-import-controls{
    grid-template-columns:minmax(0,1fr) minmax(150px,.75fr)!important;
    gap:8px!important;
  }
  #settings .google-calendar-integration .calendar-import-stats{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:7px!important;
  }
  #settings .google-calendar-integration .calendar-import-stat{
    min-width:0!important;
    padding:10px!important;
  }
  #settings .google-calendar-integration .calendar-import-stat span{
    font-size:9.5px!important;
  }
  #settings .google-calendar-integration .calendar-import-stat strong{
    font-size:17px!important;
  }

  /* Security should fill its half cleanly when opened. */
  #settings > .security-settings-card>.settings-panel-body{
    width:100%!important;
    min-width:0!important;
    padding:16px!important;
  }
  #settings .security-password-grid{
    grid-template-columns:1fr!important;
  }
  #settings #changePasswordBtn{
    width:100%!important;
    margin-top:10px!important;
  }
}

/* Tablet/mobile: all of these return to one full-width stack. */
@media(max-width:900px){
  #settings > .business-settings-card,
  #settings > .security-settings-card,
  #settings > .settings-grid,
  #settings > .messaging-settings-card{
    grid-column:1 / -1!important;
    width:100%!important;
    max-width:none!important;
  }
  #settings > .business-settings-card{order:40!important}
  #settings > .security-settings-card{order:41!important}
  #settings > .settings-grid{order:42!important}
}
@media(max-width:760px){
  #settings .messaging-channel-status,
  #settings .messaging-channel-grid{
    grid-template-columns:1fr!important;
  }
  #settings #saveMessagingSettingsBtn{
    width:100%!important;
  }
  #settings .google-calendar-integration .integration-actions,
  #settings .google-calendar-integration .calendar-import-controls,
  #settings .google-calendar-integration .calendar-import-stats{
    grid-template-columns:1fr!important;
  }
}


/* Auth refresh + site date controls + appointment overflow fix — 2026-09-29 */
body.auth-checking #authGate{display:none!important}
body.auth-checking .app{visibility:hidden!important}
body.auth-checking #globalLoader{
  display:flex!important;
  opacity:1!important;
  visibility:visible!important;
  pointer-events:none!important;
}

/* New appointment modal must never create a horizontal scrollbar. */
.appointment-create-dialog{
  box-sizing:border-box!important;
  overflow-x:hidden!important;
}
.appointment-create-grid,
.appointment-create-grid .form-field,
.appointment-create-grid .crm-control{
  min-width:0!important;
  max-width:100%!important;
}
.appointment-create-grid input:not([type="checkbox"]),
.appointment-create-grid select,
.appointment-create-grid textarea,
.appointment-create-grid .crm-control-trigger{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
.appointment-create-grid .crm-control-popover{
  max-width:100%!important;
  box-sizing:border-box!important;
}
.appointment-create-dialog .crm-select-option>span:first-child{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}

/* All visible date fields use the same CRM date control instead of browser-native calendars. */
.site-date-control{
  width:100%!important;
  min-width:0!important;
}
.site-date-control .crm-control-trigger{
  width:100%!important;
  min-height:42px!important;
  border-radius:11px!important;
  box-sizing:border-box!important;
}
.crm-date-control .crm-control-popover{
  width:min(286px,calc(100vw - 24px))!important;
  max-width:min(286px,calc(100vw - 24px))!important;
  box-sizing:border-box!important;
}
.crm-control.align-right>.crm-control-popover{
  left:auto!important;
  right:0!important;
}
.crm-calendar-day.disabled,
.crm-calendar-day:disabled{
  color:#c4cdd5!important;
  background:transparent!important;
  cursor:not-allowed!important;
  box-shadow:none!important;
}
.crm-calendar-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:8px;
  padding-top:8px;
  border-top:1px solid #edf2f6;
}
.crm-calendar-actions button{
  min-height:30px;
  padding:0 9px;
  border:0;
  border-radius:8px;
  background:var(--ui-primary-soft);
  color:var(--ui-primary);
  font:650 10.5px var(--ui-font);
  cursor:pointer;
}

/* Existing week-range control now opens the same in-app calendar. */
.calendar-range-picker.calendar-range-custom{
  overflow:visible!important;
  position:relative!important;
}
.calendar-range-picker.calendar-range-custom>input{
  display:none!important;
}
.calendar-range-picker.calendar-range-custom .calendar-range-popover{
  display:none;
  position:absolute!important;
  left:0!important;
  right:auto!important;
  top:calc(100% + 6px)!important;
  bottom:auto!important;
  width:min(286px,calc(100vw - 24px))!important;
  max-width:min(286px,calc(100vw - 24px))!important;
  z-index:180!important;
}
.calendar-range-picker.calendar-range-custom.open .calendar-range-popover{
  display:block!important;
}

/* Old transparent native date overlay is disabled once the custom control is mounted. */
.appointment-date-control:has(.site-date-control) .appointment-date-display{
  display:none!important;
}
.appointment-date-control:has(.site-date-control){
  min-width:0!important;
}
.appointment-date-control:has(.site-date-control) .site-date-control{
  display:block!important;
}

@media(max-width:620px){
  .crm-date-control .crm-control-popover{
    left:0!important;
    right:auto!important;
    width:min(286px,calc(100vw - 40px))!important;
    max-width:min(286px,calc(100vw - 40px))!important;
  }
  .crm-control.align-right>.crm-control-popover{left:auto!important;right:0!important}
  .calendar-range-picker.calendar-range-custom .calendar-range-popover{
    position:fixed!important;
    left:12px!important;
    right:12px!important;
    top:50%!important;
    bottom:auto!important;
    transform:translateY(-50%)!important;
    width:auto!important;
    max-width:360px!important;
    margin:0 auto!important;
  }
}


/* Flat Google review rows + clearer confirmation purpose — 2026-09-29 */
.google-review-toolbar-controls{
  display:flex;
  align-items:end;
  gap:12px;
  flex-wrap:wrap;
  min-width:0;
}
.google-review-date-filter{
  display:grid;
  gap:5px;
}
.google-review-filter-label{
  font-size:10.5px;
  font-weight:700;
  color:#587087;
}
.google-review-date-range{
  display:flex;
  align-items:end;
  gap:7px;
}
.google-review-date-bound{
  display:grid;
  gap:4px;
  width:154px;
}
.google-review-date-bound>label{
  font-size:9.5px;
  font-weight:700;
  color:#708499;
}
.google-review-date-bound .crm-control-trigger,
.google-review-sort .crm-control-trigger{
  min-height:40px;
  height:40px;
  border-color:#d6e3ee;
  border-radius:10px;
  font-size:12px;
  font-weight:600;
}
.google-review-date-bound .crm-control-value{
  color:#29445f;
}
.google-review-date-range>.btn{
  min-height:40px;
  height:40px;
  white-space:nowrap;
}
.google-review-sort>.crm-control{width:100%}
.google-review-modal .google-review-list-scroll{
  background:#fff;
}
.google-review-modal .calendar-review-list{
  gap:0!important;
}
.google-review-modal .calendar-review-item{
  padding:14px 0!important;
  border:0!important;
  border-bottom:1px solid #e7edf3!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.google-review-modal .calendar-review-item:first-child{
  padding-top:2px!important;
}
.google-review-modal .calendar-review-item:last-child{
  border-bottom:0!important;
}
.google-review-modal .calendar-review-item:hover{
  background:#fbfdff!important;
}
.appointment-confirmation-title{
  display:grid;
  gap:2px;
  min-width:0;
}
.appointment-confirmation-title strong{
  font-size:12.5px!important;
  color:#304b65;
}
.appointment-confirmation-title small{
  color:#7b8ea1;
  font-size:10px;
  line-height:1.35;
}
.appointment-confirmation-purpose{
  padding:8px 9px;
  border:1px solid #e1e9f1;
  border-radius:9px;
  background:#fff;
  color:#587087;
  font-size:10.5px;
  line-height:1.45;
}
@media(max-width:820px){
  .google-review-toolbar-controls{
    width:100%;
    align-items:stretch;
    flex-direction:column;
  }
  .google-review-search,
  .google-review-sort{width:100%;min-width:0}
  .google-review-date-filter{
    width:100%;
  }
  .google-review-date-range{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    align-items:end;
  }
  .google-review-date-bound{
    width:auto;
    min-width:0;
  }
  .google-review-date-range>.btn{
    grid-column:1/-1;
    width:100%;
  }
}


/* Client card actions, sorting + SMS composer clarity — 2026-09-29 */
.clients-toolbar{
  display:flex;
  align-items:center;
  gap:9px;
  flex-wrap:wrap;
}
.clients-toolbar #clientSearch{
  flex:1 1 320px;
}
.client-sort-select{
  flex:0 0 230px;
  min-height:42px;
  height:42px;
  border:1px solid #d9e4ee;
  border-radius:11px;
  background:#fff;
  color:#405a72;
  padding:0 36px 0 12px;
  font:600 12px Inter,system-ui,sans-serif;
}
.client-detail-head{
  align-items:center!important;
}
.client-detail-identity{
  flex:1 1 auto;
}
.client-detail-head-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:7px;
  flex:0 0 auto;
}
.client-detail-head-actions .btn{
  min-height:38px;
  height:38px;
  white-space:nowrap;
  font-size:11.5px;
}
.client-detail-head-actions .client-detail-book{
  padding:0 13px;
}
.client-detail-head-actions .client-detail-edit{
  padding:0 12px;
}
.client-followup-note-help{
  display:block;
  margin-top:4px;
  color:#7e8fa1;
  font-size:10px;
  line-height:1.35;
}
.sms-composer-note{
  display:grid;
  gap:3px;
  margin-top:6px;
  padding:8px 9px;
  border:1px solid #dce7f0;
  border-radius:9px;
  background:#f8fbfd;
  color:#61778b;
  font-size:10px;
  line-height:1.4;
}
.sms-composer-note strong{
  color:#405b73;
  font-size:10.5px;
}
.sms-composer-note.warning{
  border-color:#ecd7b4;
  background:#fffaf2;
  color:#886534;
}
.sms-composer-note.warning strong{
  color:#9a5d17;
}
.sidebar-sync .sync-btn{
  font-size:10.5px!important;
}
.sidebar-sync .sync-btn.syncing .sync-icon{
  animation:calendar-refresh-spin .8s linear infinite;
}
@keyframes calendar-refresh-spin{
  to{transform:rotate(360deg)}
}
@media(max-width:760px){
  .client-sort-select{
    flex:1 1 180px;
    width:auto;
    min-width:0;
  }
  .client-detail-head{
    align-items:flex-start!important;
    gap:10px!important;
  }
  .client-detail-head-actions{
    gap:5px;
  }
  .client-detail-head-actions .client-detail-book,
  .client-detail-head-actions .client-detail-edit{
    width:38px;
    min-width:38px;
    padding:0;
    overflow:hidden;
    text-indent:-9999px;
    position:relative;
  }
  .client-detail-head-actions .client-detail-book::after{
    content:"+";
    position:absolute;
    inset:0;
    display:grid;
    place-items:center;
    text-indent:0;
    font-size:20px;
    font-weight:700;
  }
  .client-detail-head-actions .client-detail-edit::after{
    content:"✎";
    position:absolute;
    inset:0;
    display:grid;
    place-items:center;
    text-indent:0;
    font-size:16px;
  }
}


/* Analytics dashboard + simplified appointment SMS — 2026-09-29 */
.dashboard-activity-card{
  margin-bottom:14px;
  overflow:hidden;
}
.dashboard-chart-head{
  align-items:flex-start!important;
  margin-bottom:8px!important;
}
.dashboard-chart-legend{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
  margin:2px 0 12px;
  color:#73869a;
  font-size:10.5px;
}
.dashboard-chart-legend span{
  display:inline-flex;
  align-items:center;
  gap:5px;
}
.dashboard-chart-legend i{
  width:8px;
  height:8px;
  border-radius:999px;
  display:inline-block;
}
.dashboard-chart-legend i.confirmed,
.dashboard-chart-stack .confirmed{background:#49b982}
.dashboard-chart-legend i.done,
.dashboard-chart-stack .done{background:#8fa6bc}
.dashboard-chart-legend i.pending,
.dashboard-chart-stack .pending{background:#e5b45c}
.dashboard-chart-legend i.cancelled,
.dashboard-chart-stack .cancelled{background:#dc8585}
.dashboard-activity-chart{
  --dashboard-chart-columns:7;
  display:grid;
  grid-template-columns:repeat(var(--dashboard-chart-columns),minmax(34px,1fr));
  align-items:end;
  gap:10px;
  min-height:220px;
  padding:12px 8px 2px;
  border-top:1px solid #edf2f6;
  overflow-x:auto;
}
.dashboard-chart-column{
  min-width:34px;
  height:188px;
  display:grid;
  grid-template-rows:20px 1fr 22px;
  align-items:end;
  gap:4px;
}
.dashboard-chart-value{
  align-self:center;
  text-align:center;
  color:#60758a;
  font-size:10px;
  font-weight:800;
}
.dashboard-chart-track{
  height:138px;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  border-bottom:1px solid #dfe8ef;
  background-image:linear-gradient(to top,rgba(222,231,239,.55) 1px,transparent 1px);
  background-size:100% 34px;
}
.dashboard-chart-stack{
  width:min(42px,72%);
  min-height:6px;
  display:flex;
  flex-direction:column-reverse;
  overflow:hidden;
  border-radius:8px 8px 3px 3px;
  box-shadow:0 4px 12px rgba(43,69,94,.08);
}
.dashboard-chart-stack span{
  display:block;
  min-height:2px;
}
.dashboard-chart-label{
  align-self:start;
  text-align:center;
  color:#73869a;
  font-size:9.5px;
  font-weight:700;
  line-height:1.15;
  white-space:nowrap;
}
.dashboard-chart-summary{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-top:9px;
  padding:9px 11px;
  border-radius:10px;
  background:#f7fafc;
  color:#6d8194;
  font-size:10.5px;
}
.dashboard-chart-summary strong{
  color:#36546d;
}
.dashboard-chart-summary span+span:before,
.dashboard-chart-summary strong+span:before{
  content:"·";
  margin-right:8px;
  color:#a5b3bf;
}
.dashboard-chart-empty{
  grid-column:1/-1;
  align-self:center;
  justify-self:center;
  color:#8595a5;
  font-size:12px;
}
.appointment-sms-confirmation-box{
  padding:12px!important;
  border-radius:12px!important;
}
.appointment-sms-confirmation-box .reminder-schedule-summary{
  margin-top:5px;
  font-size:10.5px;
}
.appointment-sms-confirmation-box .delivery-alert{
  margin-top:8px;
}
@media(max-width:760px){
  .dashboard-activity-chart{
    gap:7px;
    min-height:205px;
    padding-left:2px;
    padding-right:2px;
  }
  .dashboard-chart-column{height:176px}
  .dashboard-chart-track{height:126px}
  .dashboard-chart-stack{width:min(36px,78%)}
  .dashboard-chart-summary{align-items:flex-start;flex-direction:column;gap:3px}
  .dashboard-chart-summary span+span:before,
  .dashboard-chart-summary strong+span:before{content:none;margin:0}
}


/* Client toolbar single-row layout — 2026-09-29 */
#clients .clients-toolbar{
  display:flex;
  align-items:center;
  gap:9px;
  flex-wrap:nowrap;
  max-width:980px;
}
#clients .clients-toolbar #clientSearch{
  flex:1 1 430px;
  min-width:280px;
  max-width:520px;
  height:42px;
}
#clients .clients-toolbar .client-sort-select{
  display:none!important;
}
#clients .clients-toolbar [data-crm-select-for="clientSort"]{
  flex:0 0 220px;
  width:220px;
  min-width:220px;
}
#clients .clients-toolbar [data-crm-select-for="clientSort"] .crm-control-trigger{
  min-height:42px;
  height:42px;
}
#clients .clients-toolbar .followup-due-btn{
  flex:0 0 auto;
  min-height:42px;
  height:42px;
  padding:0 14px;
}
@media(max-width:760px){
  #clients .clients-toolbar{
    max-width:none;
    flex-wrap:wrap;
  }
  #clients .clients-toolbar #clientSearch{
    flex:1 1 100%;
    width:100%;
    min-width:0;
    max-width:none;
  }
  #clients .clients-toolbar [data-crm-select-for="clientSort"]{
    flex:1 1 190px;
    width:auto;
    min-width:0;
  }
  #clients .clients-toolbar .followup-due-btn{
    flex:0 0 auto;
  }
}


/* Slide-out draggable clients drawer for calendar — 2026-09-29 */
.calendar-client-drawer{
  position:fixed;
  top:132px;
  right:0;
  bottom:24px;
  width:338px;
  max-width:calc(100vw - 54px);
  z-index:26;
  transform:translateX(100%);
  transition:transform .2s ease;
  pointer-events:none;
}
.calendar-client-drawer.open{
  transform:translateX(0);
}
.calendar-client-drawer-tab{
  position:absolute;
  left:-44px;
  top:18px;
  width:44px;
  min-height:118px;
  padding:10px 6px;
  border:1px solid var(--ui-line,#dfe8f0);
  border-right:0;
  border-radius:13px 0 0 13px;
  background:#fff;
  color:var(--ui-primary,#2f80ed);
  box-shadow:-8px 8px 22px rgba(34,58,82,.11);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  cursor:pointer;
  pointer-events:auto;
  font:700 10px Inter,system-ui,sans-serif;
}
.calendar-client-drawer-tab:hover{
  background:var(--ui-primary-soft,#eef6ff);
}
.calendar-client-drawer-tab>span:nth-child(2){
  writing-mode:vertical-rl;
  transform:rotate(180deg);
  letter-spacing:.03em;
}
.calendar-client-drawer-tab-icon{
  width:20px;
  height:20px;
  display:grid;
  place-items:center;
}
.calendar-client-drawer-tab-icon svg{
  width:19px;
  height:19px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.calendar-client-drawer-tab-arrow{
  font-size:18px;
  line-height:1;
  font-weight:500;
}
.calendar-client-drawer-panel{
  height:100%;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid var(--ui-line,#dfe8f0);
  border-right:0;
  border-radius:16px 0 0 16px;
  background:#fff;
  box-shadow:-18px 12px 42px rgba(32,57,81,.16);
  pointer-events:auto;
}
.calendar-client-drawer-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:16px 16px 12px;
  border-bottom:1px solid #edf2f6;
}
.calendar-client-drawer-head>div{
  display:grid;
  gap:3px;
  min-width:0;
}
.calendar-client-drawer-head strong{
  color:var(--ui-text,#263f57);
  font-size:15px;
  line-height:1.2;
}
.calendar-client-drawer-head span{
  color:var(--ui-muted,#7b8da0);
  font-size:10.5px;
  line-height:1.35;
}
.calendar-client-drawer-close{
  width:32px;
  height:32px;
  flex:0 0 32px;
  border:0;
  border-radius:9px;
  background:#f4f7fa;
  color:#6e8092;
  cursor:pointer;
  font-size:20px;
  line-height:1;
}
.calendar-client-drawer-close:hover{
  background:#eaf0f5;
  color:#40566c;
}
.calendar-client-drawer-search{
  position:relative;
  margin:12px 12px 7px;
}
.calendar-client-drawer-search svg{
  position:absolute;
  left:11px;
  top:50%;
  width:17px;
  height:17px;
  transform:translateY(-50%);
  fill:none;
  stroke:#8797a7;
  stroke-width:1.9;
  stroke-linecap:round;
  pointer-events:none;
}
.calendar-client-drawer-search input{
  width:100%;
  min-height:42px;
  height:42px;
  padding:0 12px 0 36px;
  border:1px solid #dce6ee;
  border-radius:11px;
  background:#f9fbfd;
  color:var(--ui-text,#263f57);
  outline:none;
  font:500 12px Inter,system-ui,sans-serif;
}
.calendar-client-drawer-search input:focus{
  border-color:var(--ui-primary,#2f80ed);
  background:#fff;
  box-shadow:0 0 0 3px rgba(var(--theme-rgb),.08);
}
.calendar-client-drawer-count{
  padding:0 14px 8px;
  color:#8796a5;
  font-size:9.5px;
  font-weight:600;
}
.calendar-client-drawer-list{
  min-height:0;
  flex:1 1 auto;
  overflow:auto;
  padding:0 8px 10px;
  overscroll-behavior:contain;
}
.calendar-drag-client{
  display:grid;
  grid-template-columns:34px minmax(0,1fr) 22px;
  align-items:center;
  gap:9px;
  min-height:55px;
  margin:2px 0;
  padding:8px 7px;
  border:1px solid transparent;
  border-radius:10px;
  background:#fff;
  cursor:grab;
  user-select:none;
  transition:background .12s,border-color .12s,transform .12s,opacity .12s;
}
.calendar-drag-client:hover{
  border-color:#dfe9f1;
  background:#f8fbfd;
}
.calendar-drag-client:active{
  cursor:grabbing;
}
.calendar-drag-client.dragging{
  opacity:.45;
  transform:scale(.98);
}
.calendar-drag-client-avatar{
  width:34px;
  height:34px;
  border-radius:10px;
  display:grid;
  place-items:center;
  background:var(--ui-primary-soft,#eef6ff);
  color:var(--ui-primary,#2f80ed);
  font-size:10px;
  font-weight:800;
}
.calendar-drag-client-copy{
  min-width:0;
  display:grid;
  gap:3px;
}
.calendar-drag-client-copy strong,
.calendar-drag-client-copy small{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.calendar-drag-client-copy strong{
  color:#29445d;
  font-size:11.5px;
  line-height:1.2;
}
.calendar-drag-client-copy small{
  color:#8594a3;
  font-size:9.5px;
  line-height:1.2;
}
.calendar-drag-client-grip{
  justify-self:center;
  color:#b1bdc8;
  font-size:13px;
  letter-spacing:-3px;
}
.calendar-client-drawer-empty{
  padding:24px 12px;
  color:#8696a6;
  text-align:center;
  font-size:11px;
}
.cal-cell.client-drop-target{
  position:relative;
  background:rgba(var(--theme-rgb),.075)!important;
  outline:2px dashed var(--ui-primary,#2f80ed);
  outline-offset:-3px;
}
.cal-cell.client-drop-target::after{
  content:"Pusti klijenta ovde";
  position:absolute;
  left:6px;
  right:6px;
  bottom:5px;
  z-index:3;
  padding:3px 5px;
  border-radius:6px;
  background:var(--ui-primary,#2f80ed);
  color:#fff;
  text-align:center;
  font-size:8px;
  font-weight:800;
  line-height:1.2;
  pointer-events:none;
}
@media(max-width:980px){
  .calendar-client-drawer{
    top:78px;
    bottom:86px;
    width:min(330px,calc(100vw - 52px));
  }
  .calendar-client-drawer-tab{
    left:-42px;
    width:42px;
    min-height:108px;
  }
}
@media(max-width:620px){
  .calendar-client-drawer{
    display:none!important;
  }
}


/* Client delete action — 2026-09-29 */
.client-detail-delete{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:0 11px!important;
}
.client-detail-delete svg{
  width:15px;
  height:15px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.client-detail-delete:disabled{
  opacity:.58;
  cursor:wait;
}
@media(max-width:760px){
  .client-detail-head-actions .client-detail-delete{
    width:38px;
    min-width:38px;
    padding:0!important;
  }
  .client-detail-head-actions .client-detail-delete span{
    display:none;
  }
  .client-detail-head-actions .client-detail-delete svg{
    width:17px;
    height:17px;
  }
}


/* Platform admin cleanup + compact actions — 2026-09-29 */
#admin .admin-toolbar{
  display:grid;
  grid-template-columns:minmax(320px,1fr) 250px auto;
  gap:10px;
  align-items:center;
  margin-bottom:14px;
}
#admin .admin-search-wrap{
  min-width:0;
  width:100%;
}
#admin .admin-filter-select{
  width:100%;
  min-width:0;
}
#admin #adminRefreshBtn{
  min-width:96px;
  height:44px;
}
#admin .admin-clients-section{
  padding:14px 14px 10px;
}
#admin .admin-clients-section>.section-head{
  margin-bottom:8px;
}
#admin .admin-client-table{
  table-layout:fixed;
}
#admin .admin-client-table th:nth-child(1){width:13%}
#admin .admin-client-table th:nth-child(2){width:11%}
#admin .admin-client-table th:nth-child(3){width:9%}
#admin .admin-client-table th:nth-child(4){width:14%}
#admin .admin-client-table th:nth-child(5){width:7%}
#admin .admin-client-table th:nth-child(6){width:5%}
#admin .admin-client-table th:nth-child(7){width:6%}
#admin .admin-client-table th:nth-child(8){width:35%}
#admin .admin-client-row td{
  vertical-align:middle;
  padding-top:11px;
  padding-bottom:11px;
}
#admin .admin-client-name strong{
  font-size:13px;
  line-height:1.25;
}
#admin .admin-client-row td,
#admin .admin-client-row td .muted{
  line-height:1.35;
}
#admin .admin-actions{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:6px;
  flex-wrap:nowrap;
  min-width:0;
}
#admin .admin-actions>.btn,
#admin .admin-more-trigger{
  min-height:34px;
  height:34px;
  padding:0 11px;
  border-radius:9px;
  font-size:10.5px;
  line-height:1;
  white-space:nowrap;
}
#admin .admin-actions [data-admin-open]{
  min-width:88px;
}
#admin .admin-more-menu{
  position:relative;
  flex:0 0 auto;
}
#admin .admin-more-menu>summary{
  list-style:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  cursor:pointer;
  user-select:none;
}
#admin .admin-more-menu>summary::-webkit-details-marker{display:none}
#admin .admin-more-menu[open]>.admin-more-trigger{
  background:#eaf3fd;
  border-color:#cfe2f5;
  color:#246db2;
}
#admin .admin-more-popover{
  position:absolute;
  top:calc(100% + 7px);
  right:0;
  z-index:80;
  width:190px;
  padding:6px;
  border:1px solid #dce6ef;
  border-radius:11px;
  background:#fff;
  box-shadow:0 14px 34px rgba(30,55,80,.16);
}
#admin .admin-more-action{
  width:100%;
  min-height:34px;
  display:flex;
  align-items:center;
  padding:0 9px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#405c75;
  cursor:pointer;
  text-align:left;
  font:600 10.5px Inter,system-ui,sans-serif;
}
#admin .admin-more-action:hover{
  background:#f2f7fb;
  color:#245f95;
}
#admin .admin-more-action.success{
  color:#287650;
}
#admin .admin-more-action.success:hover{
  background:#eef9f2;
}
#admin .admin-more-action.danger,
#admin .admin-more-action.danger-soft{
  color:#b94a4a;
}
#admin .admin-more-action.danger:hover,
#admin .admin-more-action.danger-soft:hover{
  background:#fff2f2;
}
#admin .admin-more-action:disabled{
  opacity:.55;
  cursor:wait;
}
#admin .admin-more-divider{
  height:1px;
  margin:5px 4px;
  background:#edf1f5;
}
@media(min-width:1061px){
  #admin .admin-clients-section .table-wrap{
    overflow:visible;
  }
}
@media(max-width:1060px){
  #admin .admin-toolbar{
    grid-template-columns:minmax(260px,1fr) 210px auto;
  }
  #admin .admin-client-table{
    table-layout:auto;
  }
  #admin .admin-actions{
    flex-wrap:wrap;
  }
}
@media(max-width:760px){
  #admin .admin-toolbar{
    grid-template-columns:1fr 1fr;
  }
  #admin .admin-search-wrap{
    grid-column:1/-1;
  }
  #admin #adminRefreshBtn{
    min-width:0;
  }
  #admin .admin-more-menu{
    width:100%;
  }
  #admin .admin-more-trigger{
    width:100%;
  }
  #admin .admin-more-popover{
    position:static;
    width:100%;
    margin-top:6px;
    box-shadow:none;
  }
}


/* Client last-visit date range filters — 2026-09-29 */
#clients .clients-toolbar{
  max-width:1280px;
}
#clients .clients-toolbar #clientSearch{
  flex:1 1 360px;
  min-width:260px;
  max-width:430px;
}
#clients .client-date-filter{
  flex:0 0 160px;
  height:42px;
  display:flex;
  align-items:center;
  gap:7px;
  padding:0 8px 0 10px;
  border:1px solid #d9e4ee;
  border-radius:10px;
  background:#fff;
  color:#718398;
  font-size:10px;
  font-weight:750;
  white-space:nowrap;
}
#clients .client-date-filter span{
  flex:0 0 auto;
}
#clients .client-date-filter input{
  min-width:0!important;
  width:100%!important;
  max-width:none!important;
  height:38px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:#405a72;
  box-shadow:none!important;
  outline:none;
  font:600 11px Inter,system-ui,sans-serif;
}
#clients .client-date-filter:focus-within{
  border-color:#8bbcf4;
  box-shadow:0 0 0 3px rgba(79,156,249,.09);
}
#clients .client-date-clear{
  flex:0 0 auto;
  min-height:42px;
  height:42px;
  padding:0 11px;
  color:#60788f;
}
@media(max-width:1180px){
  #clients .clients-toolbar{
    flex-wrap:wrap;
    max-width:none;
  }
  #clients .clients-toolbar #clientSearch{
    flex:1 1 320px;
    max-width:none;
  }
}
@media(max-width:760px){
  #clients .client-date-filter{
    flex:1 1 calc(50% - 5px);
    min-width:145px;
  }
  #clients .client-date-clear{
    flex:0 0 auto;
  }
}
@media(max-width:480px){
  #clients .client-date-filter{
    flex:1 1 100%;
  }
  #clients .client-date-clear{
    width:100%;
  }
}


/* Fizio simplified scheduling workflow — 2026-09-29 */
.client-edit-dialog{width:min(720px,calc(100vw - 30px))}
.client-birth-parts{
  display:grid;
  grid-template-columns:1.15fr 1fr .8fr;
  gap:7px;
}
.client-birth-parts select{
  width:100%;
  min-width:0;
}
.appointment-client-lookup-field{position:relative}
.appointment-client-search-wrap{
  position:relative;
}
.appointment-client-search-wrap svg{
  position:absolute;
  left:12px;
  top:50%;
  width:17px;
  height:17px;
  transform:translateY(-50%);
  fill:none;
  stroke:#8193a5;
  stroke-width:1.9;
  stroke-linecap:round;
  pointer-events:none;
}
.appointment-client-search-wrap input{
  width:100%;
  padding-left:38px!important;
}
#appointmentModal [data-crm-select-for="apptClient"]{display:none!important}
.appointment-client-search-results{
  display:none;
  margin-top:6px;
  max-height:230px;
  overflow:auto;
  padding:5px;
  border:1px solid #dbe6ef;
  border-radius:11px;
  background:#fff;
  box-shadow:0 12px 28px rgba(35,62,86,.10);
}
.appointment-client-result,
.appointment-client-create{
  width:100%;
  min-height:48px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px 9px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#29445d;
  text-align:left;
  cursor:pointer;
  font:inherit;
}
.appointment-client-result:hover,
.appointment-client-create:hover{background:#f4f9fd}
.appointment-client-create{
  border-top:1px solid #edf2f6;
  border-radius:0 0 8px 8px;
  align-items:flex-start;
  flex-direction:column;
  justify-content:center;
}
.appointment-client-create strong{font-size:11.5px;color:var(--ui-primary,#2f80ed)}
.appointment-client-create span{font-size:9.5px;color:#8393a3}
.appointment-client-card-main{
  min-width:0;
  display:grid;
  gap:3px;
}
.appointment-client-card-main strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:11.5px;
  color:#29445d;
}
.appointment-client-card-main span{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:9.5px;
  color:#8090a0;
}
.appointment-client-noshow-badge{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:0 7px;
  border-radius:999px;
  background:#fff0f0;
  color:#b94a4a;
  font-size:9px;
  font-weight:800;
}
.appointment-client-selected{
  margin:0 0 7px;
  min-height:52px;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:9px 10px;
  border:1px solid #cde5d7;
  border-radius:11px;
  background:#f5fbf7;
}
.appointment-client-selected>button{
  flex:0 0 auto;
  border:0;
  background:transparent;
  color:#39805c;
  cursor:pointer;
  font:700 10px Inter,system-ui,sans-serif;
}
.appointment-client-warning{
  margin-top:7px;
  padding:9px 10px;
  border:1px solid #f0c5c5;
  border-radius:10px;
  background:#fff4f4;
  color:#a83f3f;
}
.appointment-client-warning strong,
.appointment-client-warning span{display:block}
.appointment-client-warning strong{font-size:10.5px}
.appointment-client-warning span{margin-top:2px;font-size:9.5px}
.appointment-client-empty{
  display:grid;
  gap:7px;
  padding:8px;
}
.appointment-client-empty-copy{
  padding:8px 9px;
  border-radius:9px;
  background:#f7fafc;
  color:#60788e;
}
.appointment-client-empty-copy strong,
.appointment-client-empty-copy span{display:block}
.appointment-client-empty-copy strong{font-size:11px;color:#405b73}
.appointment-client-empty-copy span{margin-top:2px;font-size:9.5px;color:#8192a2}
.appointment-client-empty .appointment-client-create{
  border:1px solid #cfe1f1;
  border-radius:9px;
  background:#f4f9fd;
}
.appointment-client-empty .appointment-client-create:hover{background:#ebf5fc}
.appointment-series-quick{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 11px!important;
  border:1px solid #dce7f0;
  border-radius:11px;
  background:#f8fbfe;
}
.appointment-series-quick>div:first-child{display:grid;gap:2px}
.appointment-series-quick strong{font-size:11px;color:#38556e}
.appointment-series-quick span{font-size:9.5px;line-height:1.35;color:#8090a0}
.appointment-series-quick-buttons{display:flex;gap:6px;flex:0 0 auto}
.appointment-series-quick-buttons button{
  width:36px;
  height:34px;
  padding:0;
  border:1px solid #d7e3ed;
  border-radius:9px;
  background:#fff;
  color:#54708a;
  font:700 11px Inter,system-ui,sans-serif;
  cursor:pointer;
}
.appointment-series-quick-buttons button:hover{border-color:#a9cbea;background:#f3f9ff;color:#2f76b7}
.appointment-series-quick-buttons button.active{
  border-color:#8fbce8;
  background:#eaf4ff;
  color:#246fb7;
}

.appointment-overlap-field{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:58px;
  padding:10px 11px!important;
  border:1px solid #eadbbd;
  border-radius:11px;
  background:#fffaf2;
}
.appointment-overlap-field>span:last-child{display:grid;gap:2px}
.appointment-overlap-field strong{font-size:11px;color:#7b5728}
.appointment-overlap-field small{font-size:9.5px;line-height:1.35;color:#9a794e}
.appointment-overlap-toggle{
  position:relative;
  width:36px;
  height:20px;
  flex:0 0 36px;
}
.appointment-overlap-toggle input{position:absolute;opacity:0}
.appointment-overlap-toggle i{
  position:absolute;
  inset:0;
  border-radius:999px;
  background:#d6dde4;
  transition:.15s;
}
.appointment-overlap-toggle i:after{
  content:"";
  position:absolute;
  width:16px;
  height:16px;
  left:2px;
  top:2px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.18);
  transition:.15s;
}
.appointment-overlap-toggle input:checked+i{background:#d18a37}
.appointment-overlap-toggle input:checked+i:after{transform:translateX(16px)}
.appointment-attendance-panel{
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px!important;
  border:1px solid #d6e3ed;
  border-radius:12px;
  background:#f7fafc;
}
.appointment-attendance-panel>div:first-child{display:grid;gap:2px}
.appointment-attendance-panel strong{font-size:11.5px;color:#324f69}
.appointment-attendance-panel span{font-size:9.5px;color:#7d8fa0}
.appointment-attendance-actions{display:flex;gap:8px}
.appointment-attendance-actions .btn{
  min-height:38px;
  height:38px;
  padding:0 12px;
  border-width:1px;
  border-style:solid;
  border-radius:10px;
  font-size:10.5px;
  font-weight:750;
  box-shadow:none;
}
.appointment-attendance-actions .attendance-yes{
  border-color:#b9dfca;
  background:#eef9f3;
  color:#2f7952;
}
.appointment-attendance-actions .attendance-no{
  border-color:#efc2c2;
  background:#fff4f4;
  color:#ae4b4b;
}
.appointment-attendance-actions .attendance-yes:hover,
.appointment-attendance-actions .attendance-yes.active{
  border-color:#49ae79;
  background:#dff4e8;
  color:#1f6d45;
  box-shadow:0 0 0 2px rgba(73,174,121,.08);
}
.appointment-attendance-actions .attendance-no:hover,
.appointment-attendance-actions .attendance-no.active{
  border-color:#dc7777;
  background:#ffe7e7;
  color:#9e3434;
  box-shadow:0 0 0 2px rgba(220,119,119,.08);
}
.appointment-availability-field{
  padding:10px 11px!important;
  border:1px solid #dce7f0;
  border-radius:11px;
  background:#f8fbfe;
}
.appointment-availability-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}
.appointment-availability-head label{margin:0!important}
.appointment-availability-head span{
  color:#8091a2;
  font-size:9.5px;
  font-weight:650;
  text-align:right;
}
#apptTimeAvailabilityHelp{
  display:block;
  margin-top:7px;
  font-size:9.5px;
  line-height:1.35;
  color:#8494a4;
}
@media(max-width:620px){
  .client-birth-parts{grid-template-columns:1fr 1fr 1fr}
  .appointment-series-quick{align-items:flex-start;flex-direction:column}
  .appointment-series-quick-buttons{width:100%}
  .appointment-series-quick-buttons button{flex:1;width:auto}
  .appointment-attendance-panel{align-items:stretch;flex-direction:column}
  .appointment-attendance-actions .btn{flex:1}
  .appointment-availability-field{padding:9px!important}
  .appointment-availability-slots,
  .series-row-slots{gap:5px}
  .appointment-availability-slot,
  .series-slot-btn{min-width:54px;height:32px;padding:0 8px;font-size:10.5px}
  .series-date-row{padding:9px}
  .series-row-slot-head{align-items:flex-start;flex-direction:column;gap:2px}
  .series-row-slot-head>small{text-align:left}
}


/* Missed-visit warnings — 2026-09-29 */
.client-list-name{
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
}
.client-noshow-alert{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:26px;
  height:22px;
  padding:0 7px;
  border-radius:999px;
  background:#fff0f0;
  color:#b74242;
  font-size:9.5px;
  font-weight:800;
}
.client-row.client-has-noshow:hover{
  background:#fffafa!important;
}


/* Secondary phone presentation — 2026-09-29 */
.client-list-phone span,
.client-list-phone small{display:block}
.client-list-phone small{
  margin-top:3px;
  color:#8a99a8;
  font-size:9.5px;
}


/* Configurable fixed booking slots — 2026-09-30 */
.booking-slot-mode{
  margin:0 0 16px;
  padding:13px;
  border:1px solid #e0e8ef;
  border-radius:12px;
  background:#fbfdfe;
}
.booking-slot-mode>.form-field{
  max-width:560px;
}
.fixed-slot-editor-wrap{
  margin-top:12px;
  padding:12px;
  border:1px solid #d9e6ee;
  border-radius:11px;
  background:#fff;
}
.fixed-slot-editor-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.fixed-slot-editor-head>div{
  display:grid;
  gap:3px;
}
.fixed-slot-editor-head strong{
  color:#314d65;
  font-size:12px;
}
.fixed-slot-editor-head span{
  color:#7b8d9e;
  font-size:10px;
  line-height:1.4;
}
.fixed-slot-editor{
  display:grid;
  gap:7px;
}
.fixed-slot-row{
  display:grid;
  grid-template-columns:minmax(140px,190px) minmax(140px,190px) 34px;
  gap:8px;
  align-items:end;
  padding:8px;
  border:1px solid #e4ebf1;
  border-radius:9px;
  background:#fafcfd;
}
.fixed-slot-row .form-field{
  margin:0;
}
.fixed-slot-row .form-field label{
  font-size:9px;
}
.fixed-slot-row input[type="time"],
.fixed-slot-row input[type="number"]{
  min-height:38px;
  height:38px;
}
.fixed-slot-remove{
  width:34px;
  height:38px;
  border:0;
  border-radius:8px;
  background:#fff0f0;
  color:#b94c4c;
  cursor:pointer;
  font-size:17px;
  line-height:1;
}
.fixed-slot-remove:hover{
  background:#ffe5e5;
}
.fixed-slot-empty{
  padding:15px;
  border:1px dashed #d8e2ea;
  border-radius:9px;
  color:#8192a2;
  text-align:center;
  font-size:10.5px;
}
.fixed-slot-example{
  margin-top:9px;
  color:#8192a2;
  font-size:9.5px;
  line-height:1.4;
}
.calendar-staff-main [data-therapist-phone]{
  margin-bottom:5px;
}
@media(max-width:650px){
  .fixed-slot-editor-head{
    align-items:stretch;
    flex-direction:column;
  }
  .fixed-slot-editor-head .btn{
    width:100%;
  }
  .fixed-slot-row{
    grid-template-columns:1fr 1fr 34px;
  }
}


/* Booking flow modes + therapist services — 2026-09-30 */
.booking-flow-settings{
  display:grid;
  gap:12px;
  margin:4px 0 18px;
  padding:14px;
  border:1px solid #e2eaf1;
  border-radius:14px;
  background:#fbfdff;
}
.booking-flow-cards{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:9px;
}
.booking-flow-cards button{
  min-height:96px;
  display:grid;
  align-content:start;
  gap:5px;
  padding:12px;
  border:1px solid #dce6ef;
  border-radius:12px;
  background:#fff;
  color:#405b73;
  text-align:left;
  cursor:pointer;
  transition:.14s ease;
}
.booking-flow-cards button:hover{
  border-color:#bcd4ea;
  background:#f8fbfe;
}
.booking-flow-cards button.active{
  border-color:var(--ui-primary,#2f80ed);
  background:var(--ui-primary-soft,#eef6ff);
  box-shadow:0 0 0 2px rgba(var(--theme-rgb),.07);
}
.booking-flow-cards button strong{
  color:#294963;
  font-size:12px;
  line-height:1.2;
}
.booking-flow-cards button span{
  color:#74879a;
  font-size:10px;
  line-height:1.4;
}
.booking-phone-flow-settings{
  padding-top:2px;
}
.booking-phone-flow-settings small{
  display:block;
  margin-top:5px;
  color:#8192a3;
  font-size:9.5px;
  line-height:1.4;
}
.therapist-service-picker{
  grid-column:1/-1;
  display:grid;
  gap:7px;
  margin-top:9px;
  padding-top:9px;
  border-top:1px solid #e7edf3;
}
.therapist-service-picker-head{
  display:grid;
  gap:2px;
}
.therapist-service-picker-head strong,
.therapist-service-picker.empty strong{
  color:#405b73;
  font-size:10.5px;
}
.therapist-service-picker-head span,
.therapist-service-picker.empty span{
  color:#8595a5;
  font-size:9px;
  line-height:1.35;
}
.therapist-service-options{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.therapist-service-option{
  position:relative;
  display:inline-flex;
  align-items:center;
  cursor:pointer;
}
.therapist-service-option input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.therapist-service-option span{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:0 9px;
  border:1px solid #dce6ef;
  border-radius:999px;
  background:#fff;
  color:#63788c;
  font-size:9.5px;
  font-weight:650;
  transition:.12s ease;
}
.therapist-service-option input:checked+span{
  border-color:#9fc7ef;
  background:#eef6ff;
  color:#2869a5;
}
.therapist-service-option input:disabled+span{
  opacity:.65;
  cursor:not-allowed;
}
@media(max-width:820px){
  .booking-flow-cards{grid-template-columns:1fr}
  .booking-flow-cards button{min-height:72px}
}


/* MOBILE TOPBAR MENU HARD FIX — 2026-09-30 */
.mobile-menu-wrap{display:none;position:relative}
.mobile-menu-trigger{
  appearance:none;
  -webkit-appearance:none;
  width:38px;
  height:38px;
  padding:0;
  border:1px solid var(--ui-line,var(--line));
  border-radius:11px;
  background:#fff;
  color:#506a82;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.mobile-menu-trigger svg{
  width:20px;
  height:20px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
}
.mobile-menu-popover{
  display:none;
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  z-index:120;
  width:190px;
  padding:6px;
  border:1px solid var(--ui-line,var(--line));
  border-radius:13px;
  background:#fff;
  box-shadow:0 14px 34px rgba(30,55,80,.17);
}
.mobile-menu-wrap.open .mobile-menu-popover{display:grid;gap:3px}
.mobile-menu-popover[aria-hidden="true"]{display:none!important}
.mobile-menu-popover button{
  appearance:none;
  -webkit-appearance:none;
  width:100%;
  min-height:40px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:0 10px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:#405b74;
  text-align:left;
  font:650 11px Inter,system-ui,sans-serif;
  cursor:pointer;
}
.mobile-menu-popover button:hover{background:#f3f8fb}
.mobile-menu-popover button.danger{color:#b74b4b}
.mobile-menu-popover button.danger:hover{background:#fff2f2}
.mobile-menu-icon{
  width:20px;
  height:20px;
  display:grid;
  place-items:center;
  flex:0 0 20px;
}
.mobile-menu-icon svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
@media(max-width:980px){
  .mobile-topbar{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    min-height:44px;
  }
  .mobile-menu-wrap{display:block}
  .mobile-menu-trigger{display:flex}
  .mobile-brand{
    min-width:0;
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
  }
  .mobile-brand strong{
    min-width:0;
    max-width:220px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
}
@media(max-width:620px){
  .mobile-topbar{
    margin:0 0 8px!important;
    padding:2px 2px 8px!important;
    border-bottom:1px solid var(--ui-line,var(--line))!important;
  }
  .mobile-menu-trigger{
    width:36px;
    height:36px;
    border-radius:10px;
  }
  .mobile-menu-popover{
    width:178px;
    top:calc(100% + 6px);
  }
  .mobile-brand strong{max-width:185px}
}

/* BRAND LOGO SQUARE — 2026-09-30 */
.sidebar .brand-mark.has-logo{
  width:52px!important;
  height:52px!important;
  min-width:52px!important;
  min-height:52px!important;
  flex:0 0 52px!important;
  aspect-ratio:1/1!important;
  padding:4px!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
  border:1px solid var(--line)!important;
  border-radius:12px!important;
  background:#fff!important;
}
.sidebar .brand-mark.has-logo img,
.mobile-brand .brand-mark.has-logo img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
}
body.sidebar-collapsed .sidebar .brand-mark.has-logo{
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  min-height:38px!important;
  flex:0 0 38px!important;
  padding:3px!important;
}
.mobile-brand .brand-mark.has-logo{
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  min-height:44px!important;
  flex:0 0 44px!important;
  aspect-ratio:1/1!important;
  padding:3px!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
  border:1px solid #d4e5f5!important;
  border-radius:11px!important;
  background:#fff!important;
}
body.tablet-ui .sidebar .brand-mark.has-logo{
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  min-height:44px!important;
  flex:0 0 44px!important;
}
@media(max-width:900px){
  body.tablet-ui .sidebar .brand-mark.has-logo{
    width:42px!important;
    height:42px!important;
    min-width:42px!important;
    min-height:42px!important;
    flex:0 0 42px!important;
  }
}

/* BOOKING CONTACTS + STAFF CARD CLEANUP — 2026-09-30 */
#settings .booking-contact-editor{
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid #e4ebf2;
}
#settings .booking-contact-editor-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:9px;
}
#settings .booking-contact-editor-head>div{min-width:0}
#settings .booking-contact-editor-head label{
  display:block;
  margin:0;
  color:#405b73;
  font-size:12px;
  font-weight:700;
}
#settings .booking-contact-editor-head small{
  display:block;
  margin-top:3px;
  color:#8192a3;
  font-size:10px;
  line-height:1.4;
}
#settings .booking-contact-list{display:grid;gap:8px}
#settings .booking-contact-row{
  display:grid;
  grid-template-columns:minmax(150px,.75fr) minmax(220px,1.25fr) 34px;
  gap:8px;
  align-items:end;
  padding:9px;
  border:1px solid #e1e9f1;
  border-radius:11px;
  background:#fff;
}
#settings .booking-contact-row .form-field{min-width:0}
#settings .booking-contact-row input{width:100%;min-height:40px}
#settings .booking-contact-remove{
  width:34px;
  height:40px;
  min-width:34px;
  padding:0;
  border:1px solid #edd6d6;
  border-radius:10px;
  background:#fff;
  color:#b55555;
  font:700 18px/1 Inter,system-ui,sans-serif;
  cursor:pointer;
}
#settings .booking-contact-remove:hover{background:#fff4f4;border-color:#e4bebe}

/* Staff cards: larger photo, compact name field, clean service list. */
#settings .calendar-staff-card{
  display:grid!important;
  grid-template-columns:92px minmax(240px,420px) minmax(220px,1fr)!important;
  gap:11px 16px!important;
  align-items:start!important;
  width:100%!important;
  padding:14px!important;
}
#settings .calendar-staff-avatar-wrap{
  grid-column:1!important;
  grid-row:1 / span 2!important;
  width:82px!important;
  height:82px!important;
  justify-self:center!important;
  align-self:start!important;
  margin-top:1px!important;
}
#settings .calendar-staff-avatar-wrap .calendar-staff-avatar,
#settings .calendar-staff-avatar{
  width:82px!important;
  height:82px!important;
  border-radius:16px!important;
}
#settings .calendar-staff-avatar img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center!important;
}
#settings .calendar-staff-avatar-remove{
  top:-6px!important;
  right:-6px!important;
}
#settings .calendar-staff-main{
  grid-column:2!important;
  grid-row:1!important;
  width:100%!important;
  max-width:420px!important;
  min-width:0!important;
}
#settings .calendar-staff-main>input[data-therapist-name]{
  width:100%!important;
  max-width:420px!important;
}
#settings .calendar-staff-meta{
  margin-top:7px!important;
}
#settings .calendar-staff-actions{
  grid-column:3!important;
  grid-row:1!important;
  justify-self:end!important;
  width:min(240px,100%)!important;
  min-width:210px!important;
  max-width:240px!important;
  padding-top:12px!important;
}
#settings .calendar-staff-services{
  grid-column:2 / 4!important;
  grid-row:2!important;
  min-width:0!important;
  width:100%!important;
}
#settings .calendar-staff-services .therapist-service-picker{
  margin-top:0!important;
  padding-top:10px!important;
}
#settings .therapist-service-options{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:7px 12px!important;
}
#settings .therapist-service-option{
  display:inline-flex!important;
  align-items:center!important;
  gap:5px!important;
  min-height:24px!important;
}
#settings .therapist-service-option input[type="checkbox"]{
  position:static!important;
  opacity:1!important;
  pointer-events:auto!important;
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  min-height:18px!important;
  max-width:18px!important;
  max-height:18px!important;
  flex:0 0 18px!important;
  margin:0!important;
}
#settings .therapist-service-option span,
#settings .therapist-service-option input:checked+span{
  min-height:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#456078!important;
  font-size:10.5px!important;
  font-weight:650!important;
}

@media(max-width:900px){
  #settings .calendar-staff-card{
    grid-template-columns:72px minmax(0,1fr)!important;
    gap:10px 12px!important;
  }
  #settings .calendar-staff-avatar-wrap,
  #settings .calendar-staff-avatar-wrap .calendar-staff-avatar,
  #settings .calendar-staff-avatar{
    width:68px!important;
    height:68px!important;
  }
  #settings .calendar-staff-main{
    grid-column:2!important;
    max-width:none!important;
  }
  #settings .calendar-staff-actions{
    grid-column:2!important;
    grid-row:2!important;
    justify-self:start!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    padding-top:0!important;
  }
  #settings .calendar-staff-services{
    grid-column:1 / -1!important;
    grid-row:3!important;
  }
}
@media(max-width:620px){
  #settings .booking-contact-editor-head{align-items:stretch;flex-direction:column}
  #settings .booking-contact-editor-head .btn{width:100%}
  #settings .booking-contact-row{
    grid-template-columns:1fr 42px;
  }
  #settings .booking-contact-row .form-field{grid-column:1}
  #settings .booking-contact-remove{
    grid-column:2;
    grid-row:1 / span 2;
    width:42px;
    height:100%;
    min-height:40px;
  }
  #settings .calendar-staff-card{
    grid-template-columns:58px minmax(0,1fr)!important;
    padding:11px!important;
  }
  #settings .calendar-staff-avatar-wrap,
  #settings .calendar-staff-avatar-wrap .calendar-staff-avatar,
  #settings .calendar-staff-avatar{
    width:56px!important;
    height:56px!important;
    border-radius:13px!important;
  }
}

/* ZAUZMI auth branding */
.auth-card .auth-brand{
  margin:2px auto 22px;
  padding:0;
  width:100%;
  display:flex;
  justify-content:center;
  overflow:visible;
}
.auth-brand-logo{
  display:block;
  width:min(330px,88%);
  height:auto;
}
@media(max-width:560px){
  .auth-card .auth-brand{margin-bottom:18px}
  .auth-brand-logo{width:min(285px,92%)}
}

/* MOBILE CALENDAR FINAL VIEWPORT — 2026-09-30 */
@media(max-width:620px){
  #calendar .calendar-card{
    height:calc(100dvh - 250px)!important;
    min-height:430px!important;
    max-height:680px!important;
    overflow:hidden!important;
    padding:6px!important;
  }
  #calendar .calendar-scroll{
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    overflow:auto!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch;
    position:relative;
  }

  #calendar .calendar-grid,
  #calendar .calendar-grid.half-hour{
    width:max-content!important;
    min-width:1722px!important;
    grid-template-columns:42px repeat(7,240px)!important;
  }

  #calendar .calendar-grid.half-hour .cal-head{
    position:sticky!important;
    top:0!important;
    z-index:20!important;
    background:#f7fafe!important;
  }

  #calendar .calendar-grid.half-hour > .cal-cell:nth-child(8n+1){
    position:sticky!important;
    left:0!important;
    z-index:18!important;
    width:42px!important;
    min-width:42px!important;
    max-width:42px!important;
    padding-left:3px!important;
    padding-right:3px!important;
    background:#fff!important;
    box-shadow:1px 0 0 #e5edf4;
  }
  #calendar .calendar-grid.half-hour > .cal-head:nth-child(8n+1){
    z-index:30!important;
    background:#f7fafe!important;
  }
  #calendar .calendar-grid.half-hour > .cal-cell:nth-child(8n+1) strong{
    font-size:9px!important;
    white-space:nowrap!important;
  }

  #calendar .event{
    grid-template-columns:auto minmax(0,1fr) auto!important;
    min-height:44px!important;
  }
  #calendar .event-time{
    grid-column:1!important;
    grid-row:1!important;
  }
  #calendar .event-client{
    grid-column:2 / 4!important;
    grid-row:1!important;
    min-width:0!important;
    font-size:11px!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    line-height:1.15!important;
  }
  #calendar .event-service{
    grid-column:1 / 3!important;
    grid-row:2!important;
    min-width:0!important;
  }
  #calendar .event-status-tag{
    grid-column:3!important;
    grid-row:2!important;
    justify-self:end!important;
  }
}

/* READ-ONLY BOOKED THERAPIES — 2026-09-30 */
.appointment-detail-modal .appointment-visit-services-list{
  grid-template-columns:1fr!important;
}
.appointment-detail-modal .visit-service-readonly{
  min-height:48px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 11px;
  border:1px solid #dce6ee;
  border-radius:11px;
  background:#fff;
}
.appointment-detail-modal .visit-service-readonly.primary{
  border-color:#cfe1f1;
  background:#f8fbfd;
}
.appointment-detail-modal .visit-service-readonly-dot{
  width:8px;
  height:8px;
  min-width:8px;
  border-radius:50%;
  background:var(--ui-primary);
}
.appointment-detail-modal .visit-service-readonly>span:last-child,
.appointment-detail-modal .visit-service-readonly strong,
.appointment-detail-modal .visit-service-readonly small{
  display:block;
}
.appointment-detail-modal .visit-service-readonly strong{
  color:#405a72;
  font-size:11.5px;
}
.appointment-detail-modal .visit-service-readonly small{
  margin-top:2px;
  color:var(--muted);
  font-size:9.5px;
}


/* ORIGINAL ZAUZMI LOGIN LOGO — source image is untouched; only empty canvas is clipped */
.auth-card .auth-brand{
  position:relative!important;
  width:100%!important;
  height:82px!important;
  margin:0 auto 18px!important;
  padding:0!important;
  overflow:hidden!important;
  display:block!important;
}
.auth-card .auth-brand-logo{
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  transform:translate(-50%,-50%)!important;
  width:min(370px,100%)!important;
  max-width:none!important;
  height:auto!important;
  display:block!important;
}
@media(max-width:560px){
  .auth-card .auth-brand{height:72px!important;margin-bottom:16px!important}
  .auth-card .auth-brand-logo{width:min(330px,108%)!important}
}


/* Compact add-service action — 2026-09-30 */
#settings .service-add-grid #addServiceBtn{
  width:auto!important;
  min-width:170px!important;
  max-width:220px!important;
  min-height:39px!important;
  padding:0 16px!important;
  justify-self:start!important;
  align-self:end!important;
}
@media(max-width:620px){
  #settings .service-add-grid #addServiceBtn{
    width:100%!important;
    max-width:none!important;
    justify-self:stretch!important;
  }
}
