:root{--bg:#f6f8fc;--card:#fff;--ink:#19202d;--muted:#6d7687;--line:#e5e9f2;--brand:#6d5dfc;--sidebar:#151923;--sideink:#aab1c2;--good:#0c9b70;--warn:#e48b18;--bad:#dc4c5a;--shadow:0 12px 35px rgba(27,35,53,.08)}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px Inter,ui-sans-serif,system-ui,-apple-system,sans-serif}a{color:inherit;text-decoration:none}.shell{display:grid;grid-template-columns:240px 1fr;min-height:100vh}.sidebar{background:var(--sidebar);color:#fff;padding:24px 14px;position:sticky;top:0;height:100vh}.brand{font-weight:800;font-size:17px;padding:0 12px 28px;letter-spacing:-.02em}.brand em{font-style:normal;color:#a89fff}.nav-label{font-size:10px;font-weight:700;letter-spacing:.11em;color:#737c91;padding:14px 12px 7px}.nav a{display:block;padding:10px 12px;border-radius:9px;color:var(--sideink);margin:2px 0}.nav a:hover,.nav a.active{background:#292e3b;color:white}.main{min-width:0;padding:25px 34px}.topbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:26px}.crumb{color:var(--muted);font-size:12px}.userbox{display:flex;align-items:center;gap:10px;background:var(--card);padding:7px 11px 7px 8px;border:1px solid var(--line);border-radius:10px}.avatar{width:30px;height:30px;background:#dedbff;color:#4d3cf0;display:grid;place-items:center;border-radius:8px;font-weight:800}.userbox small{display:block;color:var(--muted)}.title-row{display:flex;align-items:end;justify-content:space-between;gap:15px;margin-bottom:22px}h1{font-size:25px;letter-spacing:-.04em;margin:0 0 5px}h2{font-size:15px;margin:0 0 15px}p{color:var(--muted);line-height:1.55}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:20px}.stat,.panel{background:var(--card);border:1px solid var(--line);border-radius:13px;box-shadow:var(--shadow)}.stat{padding:17px}.stat span{color:var(--muted);font-size:12px}.stat strong{font-size:24px;display:block;margin-top:9px;letter-spacing:-.04em}.stat .up{color:var(--good);font-size:11px;margin-top:8px}.grid{display:grid;grid-template-columns:1.2fr .8fr;gap:18px}.panel{padding:19px}.panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.panel-head a{color:var(--brand);font-weight:600;font-size:12px}table{width:100%;border-collapse:collapse}th{text-align:left;color:var(--muted);font-size:11px;font-weight:600;padding:0 8px 10px}td{padding:12px 8px;border-top:1px solid var(--line)}.muted{color:var(--muted)}.badge{display:inline-block;padding:4px 8px;border-radius:30px;font-size:11px;font-weight:700;text-transform:capitalize}.badge.paid,.badge.active,.badge.resolved{color:var(--good);background:#e7f7f0}.badge.due,.badge.high{color:#a96505;background:#fff3df}.badge.open,.badge.unpaid{color:#5b48e9;background:#efedff}.badge.closed,.badge.terminated{color:#667085;background:#eff1f5}.button,button{background:var(--brand);border:0;color:#fff;border-radius:8px;padding:10px 14px;font:inherit;font-weight:700;cursor:pointer}.button.secondary{background:#f0eeff;color:#5140e6}.list-item{display:flex;gap:10px;padding:12px 0;border-top:1px solid var(--line)}.list-item:first-child{border-top:0}.dot{width:9px;height:9px;border-radius:99px;background:var(--brand);margin-top:5px}.auth{min-height:100vh;display:grid;place-items:center;background:#171b26}.install{width:min(560px,calc(100% - 32px));color:#fff}.install h1{font-size:32px;margin:9px 0}.install p{color:#b8c0d1}.eyebrow{font-weight:800;letter-spacing:.12em;font-size:11px;color:#aca2ff}.stack{display:grid;gap:11px}.install .panel{margin-top:22px;color:var(--ink)}label{display:grid;gap:6px;font-weight:650;color:#4c5565;font-size:12px}input,select,textarea{width:100%;border:1px solid #dbe1ec;border-radius:8px;background:#fff;padding:10px 11px;font:inherit;color:var(--ink)}textarea{min-height:105px;resize:vertical}.alert{padding:10px 12px;border-radius:8px}.warn{background:#fff3df;color:#86510c}.tabs{display:flex;gap:3px;border-bottom:1px solid var(--line);margin-bottom:18px;overflow:auto}.tabs a{white-space:nowrap;padding:10px 12px;color:var(--muted);font-weight:600}.tabs a.active{color:var(--brand);border-bottom:2px solid var(--brand)}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:13px}.form-grid .wide{grid-column:1/-1}.table-wrap{overflow:auto}.empty{padding:30px;text-align:center;color:var(--muted)}.footer{margin-top:28px;color:var(--muted);font-size:12px}.danger{background:var(--bad)}@media(max-width:850px){.shell{grid-template-columns:1fr}.sidebar{height:auto;position:static;padding:16px}.brand{padding-bottom:10px}.nav{display:flex;overflow:auto}.nav-label{display:none}.nav a{white-space:nowrap}.main{padding:20px}.stats{grid-template-columns:repeat(2,1fr)}.grid{grid-template-columns:1fr}.sidebar .nav a:nth-child(n+7){display:none}}@media(max-width:520px){.main{padding:15px}.stats{gap:9px}.stat{padding:13px}.stat strong{font-size:20px}.topbar{align-items:flex-start}.userbox small{display:none}.form-grid{grid-template-columns:1fr}table th:nth-child(n+4),table td:nth-child(n+4){display:none}.title-row{align-items:flex-start;flex-direction:column}}
.auth form > a.muted{display:none}
.settings-card{background:var(--card);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);overflow:hidden}.settings-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding:24px 26px;border-bottom:1px solid var(--line);background:linear-gradient(135deg,#fff,#fafaff)}.settings-card-head h2{font-size:20px;margin:4px 0 5px}.settings-card-head p{margin:0;max-width:650px}.settings-kicker{font-size:10px;font-weight:800;letter-spacing:.13em;color:var(--brand)}.settings-fields{padding:0 26px}.setting-row{display:grid;grid-template-columns:minmax(220px,.85fr) minmax(260px,1.15fr);gap:42px;align-items:center;padding:21px 0;border-bottom:1px solid var(--line)}.setting-row:last-child{border-bottom:0}.setting-row[hidden]{display:none}.setting-copy label{font-size:14px;color:var(--ink);font-weight:750}.setting-copy p{font-size:12px;margin:5px 0 0;line-height:1.45}.setting-control input,.setting-control select,.setting-control textarea{background:#fbfcff;border-color:#d7ddea}.setting-control textarea{min-height:92px}.settings-card>.alert{margin:18px 26px 0}.settings-success{background:#e7f7f0;color:#087653}.settings-card button:disabled{opacity:.65;cursor:wait}@media(max-width:700px){.settings-card-head{padding:20px;align-items:stretch;flex-direction:column}.settings-card-head button{width:100%}.settings-fields{padding:0 20px}.setting-row{grid-template-columns:1fr;gap:10px;padding:18px 0}}
.impersonation-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:-4px 0 22px;padding:11px 14px;border:1px solid #f0c36a;border-radius:10px;background:#fff6dc;color:#76500a;font-weight:700}.impersonation-bar form{margin:0}.impersonation-bar input{display:none}.impersonation-bar button{padding:7px 11px;background:#76500a}@media(max-width:560px){.impersonation-bar{align-items:flex-start;flex-direction:column}.impersonation-bar button{width:100%}}
.row-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px}.row-actions form{margin:0}.row-actions input{display:none}.row-actions .button,.row-actions button{padding:7px 10px;white-space:nowrap;font-size:12px}button:disabled{opacity:.45;cursor:not-allowed}
.empty-state{text-align:center;padding:56px 24px}.empty-state .empty-icon{display:grid;place-items:center;width:54px;height:54px;margin:0 auto 16px;border-radius:15px;background:#efedff;color:var(--brand);font-size:24px;font-weight:800}.empty-state h2{font-size:20px;margin-bottom:7px}.empty-state p{max-width:470px;margin:0 auto 20px}.account-card{padding:0;overflow:hidden}.account-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.account-grid>div{padding:20px 22px;border-right:1px solid var(--line);border-bottom:1px solid var(--line)}.account-grid>div:nth-child(2n){border-right:0}.account-grid span{display:block;color:var(--muted);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;margin-bottom:7px}.account-grid strong{display:block;font-size:14px;overflow-wrap:anywhere}.account-grid .account-wide{grid-column:1/-1;border-right:0}.status-dot{display:inline-block;width:8px;height:8px;margin-right:7px;border-radius:50%;background:var(--good)}.account-note{margin:0;padding:16px 22px;background:#fafbfe;font-size:12px}@media(max-width:620px){.account-grid{grid-template-columns:1fr}.account-grid>div{border-right:0}.account-grid .account-wide{grid-column:auto}}
.settings-page{max-width:1040px;margin:0 auto}.settings-hero{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;margin:4px 0 22px}.settings-hero span,.settings-form-head>div>span{display:block;font-size:10px;font-weight:800;letter-spacing:.14em;color:var(--brand)}.settings-hero h1{margin:6px 0}.settings-hero p{margin:0;max-width:660px}.settings-progress{border:1px solid #dedbff;background:#f2f0ff;color:#5947e4;border-radius:999px;padding:8px 12px;font-size:12px;font-weight:750;white-space:nowrap}.settings-nav{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 18px}.settings-nav a{padding:9px 12px;border:1px solid var(--line);border-radius:9px;background:#fff;color:#667085;font-size:12px;font-weight:750}.settings-nav a:hover{border-color:#bcb4ff;color:#5140e6}.settings-nav a.active{border-color:var(--brand);background:var(--brand);color:#fff}.settings-form{background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);overflow:hidden}.settings-form-head,.settings-form-footer{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:21px 24px;background:#fcfcff}.settings-form-head{border-bottom:1px solid var(--line)}.settings-form-head h2{margin:4px 0 0;font-size:19px}.settings-form-head>div>span{color:#887cff}.settings-form-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 26px;padding:4px 24px}.settings-field{display:grid;gap:10px;padding:21px 0;border-bottom:1px solid var(--line)}.settings-field.wide{grid-column:1/-1}.settings-field label{font-size:13px;color:var(--ink);font-weight:800}.settings-field p{font-size:12px;line-height:1.45;margin:5px 0 0}.settings-field input,.settings-field select,.settings-field textarea{background:#fbfcff;border-color:#d8deea}.settings-field textarea{min-height:115px}.settings-logo-preview{display:block;max-width:230px;max-height:68px;object-fit:contain;object-position:left center;margin-top:12px;padding:8px;border:1px solid var(--line);border-radius:9px;background:#fff}.settings-form>.alert{margin:18px 24px 0}.settings-form-footer{border-top:1px solid var(--line)}.settings-form-footer p{margin:0;font-size:12px}.settings-form button:disabled{opacity:.65;cursor:wait}@media(max-width:720px){.settings-hero{align-items:flex-start;flex-direction:column}.settings-form-body{grid-template-columns:1fr;padding:4px 20px}.settings-field.wide{grid-column:auto}.settings-form-head,.settings-form-footer{padding:18px 20px;align-items:stretch;flex-direction:column}.settings-form-head button,.settings-form-footer button{width:100%}}
.ticket-link{color:#5140e6;font-weight:750}.ticket-link:hover{text-decoration:underline}.ticket-thread{padding-bottom:6px}.ticket-message{margin:12px 0;padding:14px 16px;border:1px solid var(--line);border-radius:11px;background:#fafbfe}.ticket-message.customer{border-color:#d8d3ff;background:#f5f3ff}.ticket-message.staff{border-color:#dcefe8;background:#f5fbf8}.ticket-message.system{border-color:#d6dbe4;background:#f1f3f6}.ticket-message.system .ticket-message-meta strong,.ticket-message.system .message-role{color:#4f5969}.ticket-message-meta{display:flex;align-items:center;gap:9px;font-size:12px}.ticket-message-meta>span:last-child{margin-left:auto;color:var(--muted);font-size:11px}.ticket-message p{margin:9px 0 0;color:var(--ink);white-space:normal}.ticket-note{padding:3px 6px;border-radius:5px;background:#fff0cf;color:#825400;font-size:10px;font-weight:800;text-transform:uppercase}@media(max-width:560px){.ticket-message-meta{align-items:flex-start;flex-wrap:wrap}.ticket-message-meta>span:last-child{margin-left:0;width:100%}}
.audit-filter{margin:0}.audit-filter label{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:11px}.audit-filter select{width:auto;min-width:170px;padding:7px 9px}.audit-event{font-weight:750;color:#293247}.audit-table td{vertical-align:top}.audit-table td:nth-child(5){max-width:260px;overflow-wrap:anywhere}@media(max-width:720px){.audit-filter label{align-items:stretch;flex-direction:column}.audit-filter select{width:100%}.audit-table th:nth-child(n+5),.audit-table td:nth-child(n+5){display:none}}
.inline-form{margin:0}.inline-form .button{padding:7px 10px;font-size:12px}.security-table td{vertical-align:top}.security-agent{max-width:330px;overflow-wrap:anywhere}@media(max-width:720px){.security-table th:nth-child(n+5),.security-table td:nth-child(n+5){display:none}}
.customers-table th:last-child,.customers-table td:last-child{min-width:190px;text-align:right}.customers-table .row-actions{display:grid;grid-template-columns:repeat(2,minmax(82px,1fr));gap:8px;min-width:182px}.customers-table .row-actions form{display:block}.customers-table .row-actions .button,.customers-table .row-actions button{display:flex;align-items:center;justify-content:center;width:100%;min-height:34px;margin:0;padding:8px 10px;line-height:1.1}@media(max-width:520px){.customers-table th:nth-child(n+4),.customers-table td:nth-child(n+4){display:table-cell}.customers-table th:last-child,.customers-table td:last-child{min-width:174px}.customers-table .row-actions{grid-template-columns:1fr;min-width:142px}.customers-table .row-actions .button,.customers-table .row-actions button{min-width:142px}}
.reply-source{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:800}.reply-source i{width:8px;height:8px;border-radius:50%;background:#aab2c1}.reply-source.client{color:#087653}.reply-source.client i{background:#0c9b70}.reply-source.staff{color:#a96505}.reply-source.staff i{background:#e48b18}

/* Mobile usability pass: preserve functionality and make controls comfortable to use by touch. */
@media(max-width:850px){
  .sidebar{padding:14px 12px 10px;overflow:hidden}
  .sidebar .nav{display:flex;gap:4px;overflow-x:auto;overflow-y:hidden;padding:3px 1px 7px;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
  .sidebar .nav a,.sidebar .nav a:nth-child(n){display:flex;flex:0 0 auto;align-items:center;min-height:44px;margin:0;padding:10px 13px}
  .main{padding:20px}
  .table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
}

@media(max-width:600px){
  .main{padding:14px}
  .topbar{align-items:flex-start;flex-direction:column;gap:10px;margin-bottom:18px}
  .userbox{width:100%}
  .userbox form{margin-left:auto}
  .title-row{align-items:stretch;gap:12px}
  .title-row .button{justify-content:center;width:100%}
  .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .stat{min-height:96px;padding:14px}
  .panel{padding:15px}
  .panel-head{align-items:flex-start;flex-wrap:wrap;gap:10px}
  .panel-head > a{min-height:40px;display:inline-flex;align-items:center}
  .form-grid,.account-grid{grid-template-columns:1fr}
  .settings-nav{display:flex;flex-wrap:nowrap;overflow-x:auto;padding-bottom:6px;-webkit-overflow-scrolling:touch}
  .settings-nav a{display:flex;flex:0 0 auto;align-items:center;min-height:42px}
  .table-wrap{margin:0 -2px;border-radius:10px}
  .table-wrap table{min-width:640px}
  .table-wrap table th,.table-wrap table td{display:table-cell!important}
  input,select,textarea{font-size:16px}
  input,select,.button,button{min-height:44px}
  textarea{min-height:112px}
  .row-actions{gap:8px}
  .row-actions .button,.row-actions button{min-height:40px}
  .ticket-message{padding:13px}
  .empty-state{padding:26px 16px}
}

@media(max-width:370px){
  .stats{grid-template-columns:1fr}
}

.dashboard-ticket{position:relative;align-items:flex-start;border-radius:9px;padding:12px 9px}.dashboard-ticket:hover{background:#f7f6ff}.dashboard-ticket .ticket-chevron{margin-left:auto;color:var(--brand);font-size:24px;line-height:1}.field-help{font-size:11px;font-weight:500;color:var(--muted)}.ticket-screenshot{display:block;width:min(100%,360px);margin-top:12px;overflow:hidden;border:1px solid var(--line);border-radius:10px;background:#fff}.ticket-screenshot img{display:block;width:100%;max-height:250px;object-fit:contain;background:#f7f8fc}.ticket-screenshot span{display:block;padding:8px 10px;color:#5140e6;font-size:12px;font-weight:750;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ticket-attachment{display:block;margin-top:10px;padding:10px 12px;border:1px solid #d8d3ff;border-radius:9px;background:#f7f6ff;color:#5140e6;font-size:12px;font-weight:800;overflow-wrap:anywhere}.ticket-close-form{align-self:start}.ticket-close-form p{margin:0}
.settings-actions{display:flex;gap:9px;flex-wrap:wrap}.settings-actions .button,.settings-actions button{min-height:42px}
.ticket-messages{display:flex;flex-direction:column;gap:10px}.ticket-message{width:fit-content;max-width:min(82%,640px);margin:0}.ticket-message.theirs{align-self:flex-start}.ticket-message.mine{align-self:flex-end;border-color:#cfc8ff;background:#ece9ff}.ticket-message.mine p{color:#202036}.ticket-message-meta{gap:5px}.ticket-message-meta .message-role{margin:0;color:var(--muted);font-size:11px;font-weight:700}.ticket-message.mine .message-role{color:#6355ca}.ticket-message-meta time{margin-left:auto;color:var(--muted);font-size:11px;white-space:nowrap}.ticket-message.mine .ticket-screenshot,.ticket-message.mine .ticket-attachment{margin-left:auto}.ticket-message.mine .ticket-attachment{border-color:#cfc8ff;background:#fff;color:#5140e6}
.ticket-message.staff .message-role{font-size:0}.ticket-message.staff .message-role::after{content:'— Agent';font-size:11px}
@media(max-width:600px){.ticket-message{max-width:94%}.ticket-message-meta time{width:100%;margin:2px 0 0}.ticket-message.mine .ticket-message-meta{text-align:right;justify-content:flex-end}.ticket-message.mine .ticket-message-meta time{text-align:right}}

@media(max-width:480px){
  body{font-size:14px}
  .sidebar{padding:10px 8px 8px}
  .sidebar .brand{margin-bottom:5px}
  .sidebar .nav{margin:0 -2px;padding-bottom:5px}
  .sidebar .nav a,.sidebar .nav a:nth-child(n){min-height:42px;padding:9px 11px}
  .main{padding:12px}
  h1{font-size:22px;line-height:1.15}
  .topbar{gap:8px}
  .userbox{gap:8px;padding:6px 8px}
  .userbox small{display:block;font-size:10px}
  .panel,.stat{border-radius:11px}
  .panel{padding:13px}
  .stats{gap:8px}
  .stat{min-height:88px;padding:12px}
  .stat strong{font-size:21px;margin-top:7px}
  .list-item{gap:8px;padding:11px 2px}
  .dashboard-ticket{padding:11px 7px}
  .dashboard-ticket strong{display:block;line-height:1.3}
  .dashboard-ticket .ticket-chevron{font-size:22px}
  .ticket-message{padding:12px}
  .ticket-screenshot{width:100%}
  .settings-progress{white-space:normal}
}

/* Phone navigation and overflow containment. The desktop navigation remains untouched. */
.mobile-menu{display:none}
@media(max-width:850px){
  html,body,.shell{max-width:100%;overflow-x:hidden}
  .shell{display:block}
  .sidebar{position:relative;width:100%;height:auto;padding:10px 12px}
  .sidebar>.nav,.sidebar>.nav-label{display:none!important}
  .mobile-menu{display:block;margin:0 auto;max-width:720px}
  .mobile-menu summary{display:flex;align-items:center;justify-content:space-between;min-height:46px;padding:0 13px;border:1px solid #343b4c;border-radius:10px;background:#202634;color:#fff;font-weight:800;cursor:pointer;list-style:none}
  .mobile-menu summary::-webkit-details-marker{display:none}
  .mobile-menu-icon{width:9px;height:9px;border-right:2px solid #cfcaff;border-bottom:2px solid #cfcaff;transform:rotate(45deg) translateY(-2px);transition:transform .15s ease}
  .mobile-menu[open] .mobile-menu-icon{transform:rotate(225deg) translate(-2px,-2px)}
  .mobile-menu .nav{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;overflow:visible;margin-top:8px;padding:0}
  .mobile-menu .nav a,.sidebar .mobile-menu .nav a:nth-child(n){display:flex;align-items:center;min-width:0;min-height:46px;margin:0;padding:10px 12px;border:1px solid #343b4c;border-radius:9px;white-space:normal}
  .main{width:100%;min-width:0;overflow-x:hidden}
  .main>*{min-width:0}
  .table-wrap{max-width:100%}
}
@media(max-width:420px){
  .mobile-menu .nav{grid-template-columns:1fr}
  .mobile-menu summary{min-height:44px}
  .sidebar .brand{margin-bottom:8px}
  .topbar .crumb{max-width:100%;overflow-wrap:anywhere}
  .userbox{max-width:100%}
  .settings-form-body,.settings-fields{padding-left:14px;padding-right:14px}
  .settings-form-head,.settings-form-footer,.settings-card-head{padding-left:14px;padding-right:14px}
}

/* Itemised billing */
.invoice-layout{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(360px,.9fr);gap:18px;align-items:start}.invoice-form{display:grid;gap:14px}.invoice-form h2{margin:0}.form-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.invoice-items-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:3px 0 -4px}.invoice-items-head h3{margin:0;font-size:13px}.invoice-item{display:grid;grid-template-columns:minmax(0,1fr) 80px 112px auto;gap:8px;align-items:end;padding:12px;border:1px solid var(--line);background:#fbfcff;border-radius:10px;margin-bottom:8px}.remove-invoice-item{min-height:40px;padding:8px 9px;background:#eef0f6;color:#596477;font-size:11px}.billing-options{padding:12px;border:1px solid var(--line);border-radius:10px;background:#fafbfe}.billing-options summary{color:var(--ink);font-weight:800;cursor:pointer}.billing-options p{font-size:12px;margin:8px 0 12px}.late-fee{display:block;color:#a96505;font-weight:700;white-space:nowrap}.compact{min-height:34px!important;padding:7px 10px!important;font-size:12px}.badge.unpaid{color:#a55200;background:#fff0de}.badge.sent{color:#5140e6;background:#efedff}
.row-actions button.secondary{background:#f0eeff;color:#5140e6}
.badge.invited{color:#8c5700;background:#fff0d6}
.email-log-filter{display:flex;align-items:end;gap:10px;margin:0 0 18px}.email-log-filter label{min-width:180px}.email-log-filter button{min-height:40px}.email-preview-meta{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 22px;padding-bottom:18px;border-bottom:1px solid var(--line)}.email-preview-meta span{display:block;margin-bottom:5px;color:var(--muted);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}.email-preview-meta strong{display:block;overflow-wrap:anywhere}.email-preview h2{font-size:19px;margin-bottom:16px}.email-frame{display:block;width:100%;height:700px;border:1px solid var(--line);border-radius:10px;background:#f4f6fa}.email-text-preview{padding:22px;border:1px solid var(--line);border-radius:10px;background:#f8f9fc;color:#3d4657;line-height:1.6}
@media(max-width:700px){.email-log-filter{align-items:stretch;flex-direction:column}.email-log-filter label{min-width:0}.email-preview-meta{grid-template-columns:repeat(2,minmax(0,1fr))}.email-frame{height:620px}.email-log-table{min-width:720px}}

/* Tables become full-width record cards on phones: actions remain visible and touchable. */
.dashboard-invoice{position:relative;align-items:flex-start;border-radius:9px;padding:12px 9px}.dashboard-invoice:hover{background:#f7f6ff}.dashboard-invoice .ticket-chevron{margin-left:auto;color:var(--brand);font-size:24px;line-height:1}
@media(max-width:600px){
  .main .table-wrap{overflow:visible;margin:0;max-width:none}
  .main .table-wrap table{display:block;min-width:0!important;width:100%}
  .main .table-wrap table>tbody{display:block}
  .main .table-wrap table tr{display:block;margin:0 0 12px;padding:12px;border:1px solid var(--line);border-radius:10px;background:#fff}
  .main .table-wrap table tr:first-child{display:none}
  .main .table-wrap table td{display:block!important;padding:7px 0!important;border:0!important;overflow-wrap:anywhere}
  .main .table-wrap table td:empty{display:none!important}
  .main .table-wrap table td:last-child{padding-top:11px!important;margin-top:5px;border-top:1px solid var(--line)!important}
  .main .table-wrap .row-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));justify-content:stretch;gap:8px;width:100%}
  .main .table-wrap .row-actions>*{min-width:0;width:100%}
  .main .table-wrap .row-actions .button,.main .table-wrap .row-actions button{display:flex;align-items:center;justify-content:center;width:100%;min-height:42px;white-space:normal}
  .main .table-wrap .row-actions form:last-child:nth-child(3){grid-column:1/-1}
  .main .table-wrap .customers-table td:last-child{min-width:0;text-align:left}
  .dashboard-invoice{padding:11px 7px}
}

/* Higher-contrast invoice editing and data-entry surfaces. */
.invoice-form{border-color:#cfd8e6;box-shadow:0 14px 36px rgba(24,37,58,.10)}
.invoice-form label,.invoice-form .invoice-items-head h3{color:#24334a;font-weight:800}
.invoice-form input,.invoice-form select,.invoice-form textarea{border-color:#bdc9da;background:#fff;color:#142033;box-shadow:inset 0 1px 2px rgba(24,37,58,.03)}
.invoice-form input:focus,.invoice-form select:focus,.invoice-form textarea:focus{outline:3px solid rgba(109,93,252,.20);outline-offset:1px;border-color:#6758e8}
.invoice-form .invoice-item{border-color:#cbd6e5;background:#f6f8fc;box-shadow:0 1px 2px rgba(24,37,58,.04)}
.invoice-form .invoice-item label{font-size:12px;color:#35445b}
.invoice-form .remove-invoice-item{background:#e5eaf2;color:#334158;font-weight:800}
.invoice-form .billing-options{border-color:#cbd6e5;background:#f1f4f9}.invoice-form .billing-options summary{color:#1e2c42}
.invoice-form .muted,.invoice-form p{color:#52637a}.sidebar .nav a{color:#c0cadb}.sidebar .nav-label{color:#9ca9bf}
.cron-command{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px;background:#172033!important;color:#eef3ff!important;border-color:#35415a!important;cursor:copy}.cron-status{padding-top:8px}
@media(max-width:1000px){.invoice-layout{grid-template-columns:1fr}.invoice-form{max-width:none}}
@media(max-width:600px){.form-pair{grid-template-columns:1fr}.invoice-item{grid-template-columns:1fr 1fr}.invoice-item label:first-child{grid-column:1/-1}.invoice-item .remove-invoice-item{grid-column:1/-1;width:100%}.invoice-items-head{align-items:stretch;flex-direction:column}.invoice-items-head .button{width:100%}}

/* Customer-first services workspace */
article:has(.service-customer-picker){padding:0;overflow:hidden;border-color:#d9d5ff;background:linear-gradient(135deg,#fcfbff 0%,#f3f1ff 100%);box-shadow:0 12px 30px rgba(73,61,180,.10)}
.service-customer-picker{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:end;padding:23px 25px}.service-customer-picker:before{content:'CUSTOMER WORKSPACE';grid-column:1/-1;color:#6252df;font-size:10px;font-weight:900;letter-spacing:.14em}.service-customer-picker label{margin:0;color:#24334a;font-size:13px;font-weight:850}.service-customer-picker select{margin-top:8px;background:#fff;border-color:#bbb3ff;box-shadow:0 2px 8px rgba(73,61,180,.08)}.service-customer-picker button{min-width:148px}
article:has(.service-customer-picker)+section.grid{grid-template-columns:minmax(0,1.45fr) minmax(300px,.75fr);gap:20px;align-items:start;margin-top:20px}article:has(.service-customer-picker)+section.grid>article:first-child{overflow:hidden;border-color:#dce3ef;box-shadow:0 10px 24px rgba(24,37,58,.07)}article:has(.service-customer-picker)+section.grid>article:first-child .panel-head{padding:20px 22px;background:linear-gradient(135deg,#fff,#f7f8ff);border-bottom:1px solid #e5e9f2}article:has(.service-customer-picker)+section.grid>article:first-child .panel-head h2{font-size:19px;color:#202d42}article:has(.service-customer-picker)+section.grid>article:first-child table td:first-child strong{display:block;margin-bottom:4px;color:#202d42;font-size:14px}article:has(.service-customer-picker)+section.grid>article:first-child table tr{transition:background .15s ease}article:has(.service-customer-picker)+section.grid>article:first-child table tr:hover{background:#f8f8ff}article:has(.service-customer-picker)+section.grid>article:first-child .badge{font-weight:800;text-transform:capitalize}
article:has(.service-customer-picker)+section.grid>form{position:sticky;top:18px;border-color:#d9d5ff;background:linear-gradient(180deg,#fff 0%,#fbfaff 100%);box-shadow:0 12px 28px rgba(73,61,180,.10)}article:has(.service-customer-picker)+section.grid>form h2{margin:0;color:#2b2463;font-size:19px}article:has(.service-customer-picker)+section.grid>form p{margin:-5px 0 3px;color:#5d6477;font-size:12px;line-height:1.5}article:has(.service-customer-picker)+section.grid>form label{color:#35445b;font-size:12px;font-weight:850}article:has(.service-customer-picker)+section.grid>form input,article:has(.service-customer-picker)+section.grid>form select,article:has(.service-customer-picker)+section.grid>form textarea{background:#fff;border-color:#cdd5e5}
@media(max-width:1000px){article:has(.service-customer-picker)+section.grid{grid-template-columns:1fr}article:has(.service-customer-picker)+section.grid>form{position:static}}@media(max-width:600px){.service-customer-picker{grid-template-columns:1fr;padding:19px}.service-customer-picker button{width:100%}article:has(.service-customer-picker)+section.grid{margin-top:14px}article:has(.service-customer-picker)+section.grid>article:first-child .panel-head{padding:17px}article:has(.service-customer-picker)+section.grid>form{padding:18px}}

.customer-danger-zone{display:grid;grid-template-columns:minmax(0,1fr) minmax(330px,.9fr);gap:30px;align-items:start;margin-top:18px;border:1px solid #f0b7bd;background:linear-gradient(135deg,#fffafa,#fff3f4);box-shadow:0 10px 28px rgba(176,31,48,.08)}.danger-kicker{display:block;color:#b42332;font-size:10px;font-weight:900;letter-spacing:.14em}.customer-danger-zone h2{margin:7px 0 8px;color:#7e1824;font-size:20px}.customer-danger-zone p{margin:0;color:#7a4a50;line-height:1.55}.customer-delete-form{display:grid;gap:11px;padding:17px;border:1px solid #efc5c9;border-radius:12px;background:#fff}.customer-delete-form label{color:#5e2e34;font-size:12px;font-weight:750}.customer-delete-form input{margin-top:7px;border-color:#e7afb5;background:#fffafa}.customer-delete-form button{background:#c7273a}.customer-delete-form button:hover{background:#a91e30}@media(max-width:760px){.customer-danger-zone{grid-template-columns:1fr;gap:18px}.customer-delete-form button{width:100%}}

/* Contained history lists and admin search */
.table-wrap:has(.audit-table),.table-wrap:has(.email-log-table),.invoice-layout>article:first-child .table-wrap,section:has(.recurring-search)+article .table-wrap{max-height:520px;overflow:auto!important;overscroll-behavior:contain;border:1px solid #e1e6ef;border-radius:10px;background:#fff}.table-wrap:has(.audit-table) th,.table-wrap:has(.email-log-table) th,.invoice-layout>article:first-child .table-wrap th,section:has(.recurring-search)+article .table-wrap th{position:sticky;top:0;z-index:1;padding-top:11px;background:#f7f9fd;box-shadow:0 1px 0 #dce3ed}.invoice-search,.recurring-search{display:flex;align-items:center;gap:8px;margin-left:auto}.invoice-search input,.recurring-search input{min-width:220px;padding:9px 10px;background:#fff}.invoice-search button,.recurring-search button{min-height:38px;padding:8px 12px}.invoice-search .button,.recurring-search .button{min-height:38px;display:inline-flex;align-items:center;white-space:nowrap}@media(max-width:900px){.title-row:has(.invoice-search),.title-row:has(.recurring-search){align-items:stretch;flex-wrap:wrap}.invoice-search,.recurring-search{order:3;width:100%;margin:0}.invoice-search input,.recurring-search input{min-width:0;flex:1}}@media(max-width:600px){.table-wrap:has(.audit-table),.table-wrap:has(.email-log-table),.invoice-layout>article:first-child .table-wrap,section:has(.recurring-search)+article .table-wrap{max-height:560px}.invoice-search,.recurring-search{display:grid;grid-template-columns:1fr 1fr}.invoice-search input,.recurring-search input{grid-column:1/-1}.invoice-search .button,.recurring-search .button{justify-content:center;width:100%}}

/* Read-only incoming mailbox */
.mailbox-title{align-items:center}.mailbox-address{padding:8px 11px;border:1px solid #d9def0;border-radius:999px;background:#fff;color:#4f5c74;font-size:12px;font-weight:750}.mailbox-notice{max-width:720px}.mailbox-notice h2{margin-bottom:7px}.mailbox-notice .button{display:inline-flex;margin-top:6px}.mailbox-layout{display:grid;grid-template-columns:minmax(280px,.7fr) minmax(0,1.45fr);gap:18px;align-items:start}.mailbox-list{padding:0;overflow:hidden}.mailbox-list .panel-head{margin:0;padding:18px 19px;border-bottom:1px solid var(--line)}.mailbox-list .panel-head h2{margin:0}.mailbox-list .panel-head h2 span{display:inline-grid;place-items:center;min-width:25px;height:22px;margin-left:6px;padding:0 7px;border-radius:99px;background:#efedff;color:#5747df;font-size:11px}.mailbox-list .panel-head p{margin:5px 0 0;font-size:12px}.mailbox-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 14px;padding:13px 18px;border-bottom:1px solid var(--line);color:#667085}.mailbox-row:last-of-type{border-bottom:0}.mailbox-row:hover{background:#f7f7fe}.mailbox-row.unread{background:#f4f2ff;color:#27334a}.mailbox-row strong,.mailbox-row span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mailbox-row strong{color:#263249;font-size:13px}.mailbox-row.unread strong{font-weight:850}.mailbox-row span{font-size:12px}.mailbox-row time{grid-row:1/3;grid-column:2;color:#8790a1;font-size:10px;align-self:center;text-align:right;max-width:100px}.mailbox-message{min-width:0}.mailbox-message .panel-head{margin-bottom:18px}.mailbox-message .panel-head .button{font-size:12px;padding:8px 11px}.mailbox-message-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:13px;margin-bottom:18px;border:1px solid #e2e6ef;border-radius:10px;background:#fafbfe}.mailbox-message-meta span{display:block;margin-bottom:4px;color:#727d90;font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.mailbox-message-meta strong{display:block;overflow-wrap:anywhere;color:#344055;font-size:12px}.mailbox-message>h2{font-size:20px;overflow-wrap:anywhere}.mailbox-message pre{margin:0;padding:16px;border:1px solid #e0e5ef;border-radius:10px;background:#fbfcff;color:#293449;font:13px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere}.mailbox-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 18px;border-top:1px solid var(--line);color:#68748a;font-size:12px;font-weight:750}.mailbox-pagination .button{font-size:12px;padding:8px 11px}@media(max-width:900px){.mailbox-layout{grid-template-columns:1fr}.mailbox-list:not(.mailbox-full){max-height:390px;overflow:auto}.mailbox-title{align-items:flex-start}}@media(max-width:600px){.mailbox-title{gap:8px}.mailbox-address{max-width:100%;overflow:hidden;text-overflow:ellipsis}.mailbox-row{padding:13px 14px;grid-template-columns:minmax(0,1fr);gap:4px}.mailbox-row time{grid-row:auto;grid-column:auto;max-width:none;text-align:left}.mailbox-message-meta{grid-template-columns:1fr;gap:10px}.mailbox-message{padding:14px}.mailbox-message pre{padding:13px;font-size:12px}.mailbox-pagination{flex-wrap:wrap}.mailbox-pagination span{width:100%;order:-1;text-align:center}}

/* Mailbox actions and waiting indicators */
.nav a{display:flex;align-items:center;justify-content:space-between;gap:8px}.nav-count{display:inline-grid;flex:0 0 auto;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#6d5dfc;color:#fff;font-size:10px;font-weight:850}.nav a.active .nav-count{background:#fff;color:#5140e6}.mailbox-search{display:flex;align-items:end;gap:8px;margin:0 0 16px}.mailbox-search label{min-width:0;flex:1}.mailbox-search input{margin-top:6px}.mailbox-search .button,.mailbox-search button{min-height:40px;white-space:nowrap}.mailbox-message .panel-head{gap:9px}.mailbox-message .panel-head .inline-form{margin-left:auto}.mailbox-reply{display:grid;gap:10px;margin-top:20px;padding-top:19px;border-top:1px solid var(--line)}.mailbox-reply textarea{min-height:145px;background:#fbfcff}.mailbox-reply p{margin:-3px 0 0;font-size:12px}.mailbox-reply button{justify-self:start}@media(max-width:600px){.mailbox-search{display:grid;grid-template-columns:1fr 1fr}.mailbox-search label{grid-column:1/-1}.mailbox-search .button,.mailbox-search button{display:flex;align-items:center;justify-content:center;width:100%}.mailbox-message .panel-head{align-items:stretch}.mailbox-message .panel-head>a,.mailbox-message .panel-head .inline-form{width:100%;margin:0}.mailbox-message .panel-head .button{display:flex;align-items:center;justify-content:center;width:100%}.mailbox-reply button{justify-self:stretch;width:100%}}

/* Structured inbox rows, bulk controls and read state */
.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}.mailbox-search{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;max-width:760px}.mailbox-search input{width:100%;min-width:0;margin:0}.mailbox-search .button,.mailbox-search button{display:inline-flex;align-items:center;justify-content:center}.mailbox-bulk{overflow:hidden}.mailbox-bulkbar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 18px;background:#f8f9fd;border-bottom:1px solid var(--line)}.mailbox-bulkbar label{display:flex;align-items:center;gap:8px;color:#455168;font-size:12px;font-weight:750}.mailbox-bulkbar input,.mailbox-check input{width:17px;height:17px;margin:0;accent-color:var(--brand);cursor:pointer}.mailbox-bulkbar button{padding:8px 11px;font-size:12px}.mailbox-bulkbar button:disabled{background:#e2e6ee;color:#8390a1;cursor:not-allowed}.mailbox-row{display:grid;grid-template-columns:44px minmax(0,1fr);padding:0;border-bottom:1px solid var(--line);transition:background .15s ease}.mailbox-row:hover{background:#f7f7fe}.mailbox-row.unread{background:#f4f2ff}.mailbox-row.is-read{background:#fff}.mailbox-check{display:grid;place-items:center;margin:0;border-right:1px solid #e8ebf2;background:rgba(255,255,255,.45)}.mailbox-row-link{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;gap:3px 14px;min-width:0;padding:13px 18px;color:#667085}.mailbox-row-link strong,.mailbox-row-link span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mailbox-row-link strong{color:#263249;font-size:13px}.mailbox-row.unread .mailbox-row-link strong{font-weight:850}.mailbox-row-link span{font-size:12px}.mailbox-row-link time{grid-row:1/3;grid-column:2;align-self:center;max-width:100px;color:#8790a1;font-size:10px;text-align:right}.mailbox-status{grid-column:1;display:inline-flex;justify-self:start;align-items:center;gap:5px;margin-top:4px;padding:3px 7px;border-radius:999px;font-size:10px;font-style:normal;font-weight:800}.mailbox-status:before{content:'';width:6px;height:6px;border-radius:99px}.mailbox-status.unread{background:#e7e3ff;color:#5444dd}.mailbox-status.unread:before{background:#6d5dfc}.mailbox-status.read{background:#eef1f5;color:#647184}.mailbox-status.read:before{background:#92a0b5}.mailbox-list:not(.mailbox-bulk) .mailbox-row{display:block}.mailbox-list:not(.mailbox-bulk) .mailbox-row-link{display:grid}.mailbox-list .panel-head p b{color:#4f40d9}@media(max-width:600px){.mailbox-search{grid-template-columns:minmax(0,1fr) minmax(0,1fr);max-width:none}.mailbox-search input{grid-column:1/-1}.mailbox-search .button,.mailbox-search button{width:100%}.mailbox-bulkbar{align-items:stretch;flex-direction:column;padding:12px 14px}.mailbox-bulkbar button{width:100%}.mailbox-row{grid-template-columns:40px minmax(0,1fr)}.mailbox-row-link{padding:12px 13px;grid-template-columns:minmax(0,1fr)}.mailbox-row-link time{grid-row:auto;grid-column:1;max-width:none;text-align:left}.mailbox-status{grid-column:1}.mailbox-list:not(.mailbox-bulk) .mailbox-row-link{padding:12px 14px}}

/* Ticket actions */
.ticket-list-actions,.ticket-closed-actions{display:flex;align-items:center;gap:8px}.ticket-list-actions .inline-form,.ticket-closed-actions .inline-form{margin:0}.ticket-list-actions .button,.ticket-list-actions button{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:8px 10px;font-size:12px}.ticket-closed-actions{justify-content:center;margin-top:17px}.ticket-closed-actions .button,.ticket-closed-actions button{display:inline-flex;align-items:center;justify-content:center;min-height:40px}@media(max-width:600px){.ticket-list-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}.ticket-list-actions .button,.ticket-list-actions button{width:100%}.ticket-closed-actions{align-items:stretch;flex-direction:column}.ticket-closed-actions .inline-form,.ticket-closed-actions .button,.ticket-closed-actions button{width:100%}}

/* Ticket search and attention-first queue */
.ticket-title{align-items:flex-end}.ticket-search{display:grid;grid-template-columns:minmax(180px,1fr) minmax(170px,.72fr) auto auto;align-items:center;gap:8px;width:min(700px,100%)}.ticket-search input,.ticket-search select{min-width:0;background:#fff}.ticket-search button,.ticket-search .button{display:inline-flex;align-items:center;justify-content:center;min-height:40px;white-space:nowrap}.ticket-section{margin-top:18px;overflow:hidden}.ticket-section .panel-head{margin:0;padding:18px 19px;border-bottom:1px solid var(--line)}.ticket-section .panel-head h2{margin:0}.ticket-section .panel-head p{margin:5px 0 0;font-size:12px}.ticket-section .table-wrap{margin:0}.ticket-unread{border-color:#d9d4ff;box-shadow:0 13px 31px rgba(77,61,193,.10)}.ticket-unread .panel-head{background:linear-gradient(135deg,#faf9ff,#f2f0ff)}.ticket-section-count{display:inline-grid;place-items:center;min-width:28px;height:25px;padding:0 8px;border-radius:99px;background:#6d5dfc;color:#fff;font-size:11px;font-weight:850}@media(max-width:900px){.ticket-title{align-items:stretch;flex-direction:column}.ticket-search{width:100%;grid-template-columns:minmax(0,1fr) minmax(160px,.6fr) auto auto}}@media(max-width:600px){.ticket-search{grid-template-columns:1fr 1fr}.ticket-search input,.ticket-search select{grid-column:1/-1}.ticket-search button,.ticket-search .button{width:100%}.ticket-section .panel-head{padding:16px}.ticket-section .panel-head>div{min-width:0}}
.invoice-view-state{display:block;margin-top:5px;color:#087653;font-size:11px;font-weight:800}

/* Invitation terms and conditions */
.setup-terms{display:grid;gap:10px;padding:16px;border:1px solid #d9d5ff;border-radius:12px;background:#faf9ff}.setup-terms h2{margin:0;font-size:18px}.setup-terms>p{margin:0;color:#5b667c;font-size:13px}.terms-copy{max-height:260px;overflow:auto;padding:14px;border:1px solid #dfe4ef;border-radius:9px;background:#fff;overscroll-behavior:contain}.terms-copy pre{margin:0;color:#303b4f;font:13px/1.6 ui-sans-serif,system-ui,sans-serif;white-space:pre-wrap;overflow-wrap:anywhere}.terms-agreement{display:flex!important;align-items:flex-start;gap:9px;margin:2px 0 0;color:#253249;font-size:13px;font-weight:750;line-height:1.45}.terms-agreement input{flex:0 0 auto;width:18px;height:18px;margin:1px 0 0;accent-color:var(--brand)}.terms-count{margin:7px 0 0;color:var(--muted);font-size:12px}.terms-preview-dialog{width:min(760px,calc(100vw - 28px));max-height:min(82vh,760px);padding:0;border:0;border-radius:14px;box-shadow:0 22px 70px rgba(17,24,39,.36);color:var(--ink)}.terms-preview-dialog::backdrop{background:rgba(19,28,45,.58)}.terms-preview-dialog article{display:grid;gap:14px;padding:22px}.terms-preview-dialog p{margin:0;color:#5b667c;line-height:1.5}.terms-preview-dialog .terms-copy{max-height:min(46vh,420px)}.terms-preview-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.terms-preview-head span{display:block;margin-bottom:5px;color:#6759e7;font-size:10px;font-weight:900;letter-spacing:.12em}.terms-preview-head h2{margin:0;font-size:22px}.preview-agreement{opacity:.8}@media(max-width:600px){.setup-terms{padding:14px}.terms-copy{max-height:230px}.terms-preview-dialog article{padding:17px}.terms-preview-head{align-items:stretch;flex-direction:column}.terms-preview-head button{width:100%}}

/* Customer newsletter composer */
.mailbox-tabs{display:flex;gap:8px;margin:-5px 0 18px;border-bottom:1px solid #dce2ed}.mailbox-tabs a{display:inline-flex;align-items:center;min-height:39px;padding:0 14px;border-bottom:2px solid transparent;color:#61708a;font-size:13px;font-weight:800}.mailbox-tabs a.active{border-bottom-color:var(--brand);color:#5140df}.newsletter-composer{max-width:900px}.newsletter-composer textarea{min-height:270px;resize:vertical;background:#fbfcff}.newsletter-composer .panel-head{align-items:flex-start}.newsletter-dialog{width:min(760px,calc(100vw - 28px));max-height:min(82vh,760px);padding:0;border:0;border-radius:14px;box-shadow:0 22px 70px rgba(17,24,39,.36);color:var(--ink)}.newsletter-dialog::backdrop{background:rgba(19,28,45,.58)}.newsletter-dialog article{display:grid;gap:16px;padding:22px}.newsletter-dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.newsletter-dialog-head span{display:block;margin-bottom:5px;color:#6759e7;font-size:10px;font-weight:900;letter-spacing:.12em}.newsletter-dialog-head h2{margin:0;font-size:22px}.newsletter-dialog-head p{margin:6px 0 0;color:#5d687b;font-size:13px}.newsletter-recipient-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 13px;border:1px solid #dedafc;border-radius:10px;background:#f7f6ff}.newsletter-recipient-toolbar label{display:flex;align-items:center;gap:8px;margin:0;color:#34405a;font-size:13px;font-weight:800}.newsletter-recipient-toolbar input,.newsletter-recipient-list input{width:18px;height:18px;margin:0;accent-color:var(--brand)}.newsletter-recipient-toolbar strong{color:#5444dd;font-size:12px}.newsletter-recipient-list{max-height:min(44vh,390px);overflow:auto;border:1px solid #e0e5ef;border-radius:10px;background:#fff;overscroll-behavior:contain}.newsletter-recipient-list label{display:flex;align-items:center;gap:12px;margin:0;padding:12px 14px;border-bottom:1px solid #edf0f5;cursor:pointer}.newsletter-recipient-list label:last-child{border-bottom:0}.newsletter-recipient-list label:hover{background:#fafaff}.newsletter-recipient-list span{display:grid;gap:2px;min-width:0}.newsletter-recipient-list strong{color:#263249;font-size:13px}.newsletter-recipient-list small{overflow:hidden;color:#68758b;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.newsletter-dialog-actions{display:flex;justify-content:flex-end;gap:9px}.newsletter-dialog-actions button{min-height:40px}@media(max-width:600px){.mailbox-tabs{margin-bottom:14px;overflow:auto}.mailbox-tabs a{flex:1;justify-content:center;white-space:nowrap}.newsletter-composer{padding:16px}.newsletter-composer textarea{min-height:220px}.newsletter-dialog article{padding:17px}.newsletter-dialog-head{align-items:stretch;flex-direction:column}.newsletter-dialog-head button{width:100%}.newsletter-recipient-toolbar{align-items:flex-start;flex-direction:column}.newsletter-dialog-actions{align-items:stretch;flex-direction:column}.newsletter-dialog-actions button{width:100%}}

.customer-email-form textarea{min-height:210px;resize:vertical;background:#fbfcff}.customer-email-form+article{align-self:start}.customer-email-form+article p{line-height:1.55}
.staff-accounts-layout{grid-template-columns:minmax(0,1.55fr) minmax(320px,.75fr);align-items:start}.staff-account-list{display:grid;gap:16px}.staff-account-card{padding:20px;border:1px solid #dce2ed;border-radius:14px;background:linear-gradient(145deg,#fff,#fafbff);box-shadow:0 8px 22px rgba(35,48,76,.04)}.staff-permissions{margin:18px 0;border:0;padding:0}.staff-permissions legend{margin-bottom:10px;color:#66738b;font-size:11px;font-weight:850;text-transform:uppercase;letter-spacing:.08em}.permission-grid{display:grid;gap:8px}.permission-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 13px;border:1px solid #e3e7f0;border-radius:10px;background:#fff}.permission-row>div{display:grid;gap:3px;min-width:0}.permission-row strong{color:#29364e;font-size:13px}.permission-row small{color:#708098;font-size:12px;line-height:1.35}.permission-row select{width:142px;min-width:142px;margin:0;padding:8px 30px 8px 10px;border-color:#d6ddeb;background:#f9faff;color:#29364e;font-size:12px;font-weight:800}.permission-toggle{display:flex;align-items:center;gap:8px;min-width:142px;margin:0;color:#33425d;font-size:12px;font-weight:850}.permission-toggle input{width:18px;height:18px;margin:0;accent-color:var(--brand)}.staff-meta{display:block;margin-bottom:8px;color:var(--muted);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}.staff-account-actions{display:flex;gap:8px;justify-content:flex-end}.staff-account-actions button{padding:9px 12px;font-size:12px}.staff-invite-panel{position:sticky;top:20px}.staff-invite-panel .permission-row{padding:11px}.staff-invite-panel .permission-row select,.staff-invite-panel .permission-toggle{min-width:128px;width:128px}@media(max-width:960px){.staff-accounts-layout{grid-template-columns:1fr}.staff-invite-panel{position:static}}@media(max-width:600px){.staff-account-card{padding:15px}.permission-row{align-items:stretch;flex-direction:column;gap:10px}.permission-row select,.permission-toggle,.staff-invite-panel .permission-row select,.staff-invite-panel .permission-toggle{width:100%;min-width:0}.permission-row select{font-size:13px}.staff-account-actions{align-items:stretch;flex-direction:column}.staff-account-actions button{width:100%}}
.full-admin-note{display:none;gap:5px;margin:4px 0 14px;padding:12px 13px;border:1px solid #e2b746;border-radius:10px;background:linear-gradient(135deg,#fff9e9,#fffdf7);color:#5c4511;font-size:12px;line-height:1.4}.full-admin-note strong{display:block;color:#76530a;font-size:12px}.full-admin-note span{display:block}.is-full-admin{border-color:#e5bd5b;background:linear-gradient(145deg,#fffdf8,#fff9e9)}.is-full-admin .full-admin-note{display:block}.is-full-admin .staff-permissions{display:none}.staff-invite-panel>.full-admin-note{display:block;margin:0}.staff-invite-panel.is-full-admin .staff-permissions{display:none}@media(max-width:600px){.full-admin-note{padding:11px 12px}}
.staff-accounts-table{min-width:960px}.staff-accounts-table td{vertical-align:middle}.staff-access-summary{display:block;max-width:300px;color:#5f6d84;font-size:12px;line-height:1.4}@media(max-width:600px){.staff-accounts-table{min-width:820px}.staff-accounts-table th:nth-child(n+4),.staff-accounts-table td:nth-child(n+4){display:table-cell}.staff-accounts-table th:nth-child(2),.staff-accounts-table td:nth-child(2),.staff-accounts-table th:nth-child(5),.staff-accounts-table td:nth-child(5){display:none}}
.staff-delete-zone{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,.65fr);gap:24px;align-items:end;margin-top:18px;border-color:#f1c4ca;background:linear-gradient(135deg,#fff,#fff7f8)}.staff-delete-zone h2{margin:0 0 7px;color:#8f2331}.staff-delete-zone p{margin:0;color:#70535b}.staff-delete-zone form{margin:0}.staff-delete-zone button{width:100%}@media(max-width:700px){.staff-delete-zone{grid-template-columns:1fr;align-items:stretch}}
.nav-section-break{display:block;margin:16px 12px 7px;padding-top:15px;border-top:1px solid rgba(191,202,223,.16);color:#9ca9bf;font-size:10px;font-weight:850;letter-spacing:.11em;text-transform:uppercase}@media(max-width:850px){.nav-section-break{display:none}}@media(max-width:760px){.mobile-menu .nav-section-break{display:block;grid-column:1/-1;margin:7px 0 0;padding:12px 3px 5px;border-top:1px solid #343b4c;color:#b7c1d4}}

/* Personal sidebar arrangement control. */
.sidebar-arrange-tools{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 10px 2px}.sidebar-arrange{display:inline-grid;place-items:center;width:28px;height:28px;padding:0;border:1px solid #384155;border-radius:8px;background:#222938;color:#d8d4ff;font-size:15px;line-height:1;box-shadow:none}.sidebar-arrange:hover,.sidebar-arrange[aria-pressed="true"]{background:#6d5dfc;border-color:#887bff;color:#fff}.sidebar-arrange-hint{flex:1;color:#b7c1d4;font-size:10px;line-height:1.25;text-align:right}.sidebar.is-arranging .nav a{cursor:grab;outline:1px dashed rgba(175,165,255,.55);outline-offset:-2px}.sidebar.is-arranging .nav a:active{cursor:grabbing}.sidebar .nav a.nav-dragging{opacity:.45}.sidebar .nav a.nav-drag-over{background:#3c356f;color:#fff;box-shadow:inset 0 2px 0 #a99fff}.sidebar .nav a.nav-move-selected{background:#5649ca;color:#fff;box-shadow:0 0 0 2px rgba(179,170,255,.55)}@media(max-width:850px){.sidebar-arrange-tools{display:none}.sidebar.is-arranging .mobile-menu{display:none}.sidebar.is-arranging>.nav{display:flex!important;flex-direction:column;gap:4px;max-height:62vh;overflow:auto}.sidebar.is-arranging>.nav a{width:100%;white-space:normal}.sidebar.is-arranging>.nav-label{display:block!important;padding-top:10px}.sidebar.is-arranging .nav-section-break{display:block;margin:7px 0;padding:10px 3px 4px}.sidebar.is-arranging .brand{padding-bottom:8px}}

/* Customer record tabs. */
.customer-tabs{margin:-4px 0 20px;padding:0 6px;background:#fff;border:1px solid #e0e5ef;border-radius:12px;box-shadow:0 5px 16px rgba(32,46,72,.04)}.customer-tabs a{min-height:45px;display:inline-flex;align-items:center}.customer-tab-layout{margin-top:18px}.customer-profile-form{max-width:900px}.customer-overview-grid{grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr)}.customer-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;border:1px solid #e6eaf1;border-radius:10px;overflow:hidden}.customer-summary>div{display:grid;gap:4px;min-width:0;padding:15px;border-right:1px solid #e6eaf1}.customer-summary>div:last-child{border-right:0}.customer-summary span{color:#78849a;font-size:10px;font-weight:850;letter-spacing:.08em;text-transform:uppercase}.customer-summary strong{overflow:hidden;color:#27354d;font-size:14px;text-overflow:ellipsis;white-space:nowrap}.customer-summary small{overflow:hidden;color:#66758d;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.customer-quick-links{display:grid;gap:7px}.customer-quick-links a{display:flex;align-items:center;justify-content:space-between;padding:11px 12px;border:1px solid #e3e7f0;border-radius:9px;background:#fbfcff;color:#36445d;font-weight:800}.customer-quick-links a:hover{border-color:#cfc8ff;background:#f6f5ff;color:#5546dd}.customer-quick-links span{color:#6d5dfc}.customer-tab-notice{margin-top:18px}.customer-record-list{margin-top:18px;overflow:hidden}.customer-record-list .panel-head{padding-bottom:14px;border-bottom:1px solid #e6eaf1}.customer-service-list{display:grid;gap:9px}.customer-service-item{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px;border:1px solid #e3e7f0;border-radius:10px;background:#fbfcff}.customer-service-item>div{display:grid;gap:4px;min-width:0}.customer-service-item strong{color:#29364d}.customer-service-item span:not(.badge){color:#708098;font-size:12px}.customer-danger-zone{margin-top:18px}@media(max-width:850px){.customer-overview-grid{grid-template-columns:1fr}.customer-summary{grid-template-columns:1fr}.customer-summary>div{border-right:0;border-bottom:1px solid #e6eaf1}.customer-summary>div:last-child{border-bottom:0}}@media(max-width:600px){.customer-title{align-items:stretch}.customer-title form,.customer-title button{width:100%}.customer-tabs{margin:0 -2px 16px;border-radius:10px;overflow-x:auto}.customer-tabs a{flex:0 0 auto;padding:10px 11px}.customer-tab-layout{margin-top:14px}.customer-service-item{align-items:flex-start;flex-direction:column}.customer-service-item .badge{align-self:flex-start}.customer-record-list{margin-top:14px}.customer-record-list .panel-head{align-items:flex-start;flex-direction:column}.customer-record-list .panel-head>a{width:100%;text-align:center}}
.customer-tabs a.customer-tab-danger{color:#b42332}.customer-tabs a.customer-tab-danger:hover{background:#fff1f2;border-bottom-color:#d64050;color:#941d2c}.customer-tabs a.customer-tab-danger.active{background:#fff1f2;border-bottom-color:#c7273a;color:#a51f31}

/* Keep operational queues compact: five ticket rows and ten billing rows before scrolling. */
.ticket-section .table-wrap{max-height:330px;overflow:auto!important;overscroll-behavior:contain;border-top:1px solid #e7ebf2}.ticket-section .table-wrap th{position:sticky;top:0;z-index:1;background:#f8f9fd;box-shadow:0 1px 0 #dce3ed}.invoice-layout>article:first-child .table-wrap,section:has(.recurring-search)+article .table-wrap{max-height:610px}@media(max-width:600px){.ticket-section .table-wrap{max-height:520px}.invoice-layout>article:first-child .table-wrap,section:has(.recurring-search)+article .table-wrap{max-height:620px}}

/* Dashboard drill-downs and billing result filters. */
.dashboard-stat-link{display:block;transition:transform .15s ease,box-shadow .15s ease}.dashboard-stat-link small{display:block;margin-top:7px;color:#6252df;font-size:11px;font-weight:800}.dashboard-stat-link:hover{transform:translateY(-2px);border-color:#cfc8ff;box-shadow:0 14px 28px rgba(81,67,212,.14)}.invoice-filter-tabs{display:flex;gap:8px;margin:-6px 0 18px;overflow:auto}.invoice-filter-tabs a{flex:0 0 auto;padding:8px 12px;border:1px solid #dce2ed;border-radius:999px;background:#fff;color:#56657c;font-size:12px;font-weight:800}.invoice-filter-tabs a.active,.invoice-filter-tabs a:hover{border-color:#bcb3ff;background:#f0eeff;color:#5645df}
.online-user-count{align-self:flex-start;padding:9px 12px;border:1px solid #b9e9cd;border-radius:999px;background:#ecfaf1;color:#177444;font-size:12px;font-weight:850}.online-users-panel .panel-head p{margin:4px 0 0;color:#718098;font-size:13px}

/* Customer invoices remain readable as labelled cards on narrow screens. */
.customer-invoice-panel{overflow:hidden}.customer-invoice-table .invoice-view-state,.customer-invoice-table .late-fee{margin-top:5px}.customer-invoice-action{text-align:right;white-space:nowrap}.customer-invoice-label{display:none}@media(max-width:600px){.customer-invoice-panel{padding:12px}.customer-invoice-panel .table-wrap{overflow:visible}.customer-invoice-table,.customer-invoice-table tbody,.customer-invoice-table tr,.customer-invoice-table td{display:block;width:100%}.customer-invoice-table thead{display:none}.customer-invoice-table tr,.main .table-wrap .customer-invoice-table tbody tr:first-child{display:block;margin:0 0 12px;padding:15px;border:1px solid #e0e5ef;border-radius:12px;background:#fff;box-shadow:0 4px 12px rgba(35,48,76,.04)}.customer-invoice-table tr:last-child{margin-bottom:0}.main .table-wrap .customer-invoice-table td{display:grid!important;grid-template-columns:90px minmax(0,1fr);align-items:start;gap:14px;padding:10px 0!important;border:0!important;border-bottom:1px solid #edf0f5!important;text-align:left}.main .table-wrap .customer-invoice-table td:first-child{padding-top:0!important}.customer-invoice-label{display:block;color:#77849a;font-size:11px;font-weight:850;letter-spacing:.05em;line-height:1.45;text-transform:uppercase}.customer-invoice-value{display:block;min-width:0;color:#202938;font-size:15px;line-height:1.45;text-align:right;overflow-wrap:anywhere}.customer-invoice-table td:first-child .customer-invoice-value{font-size:17px}.customer-invoice-value .invoice-view-state,.customer-invoice-value .late-fee{margin-left:auto;text-align:right}.main .table-wrap .customer-invoice-table .customer-invoice-action{display:block!important;padding:13px 0 0!important;border-bottom:0!important;text-align:left}.customer-invoice-table .customer-invoice-action .button{display:flex;align-items:center;justify-content:center;width:100%;min-height:44px}}
.service-date-label{display:inline-block;margin-right:4px;color:var(--muted);font-size:10px;font-weight:850;letter-spacing:.07em;text-transform:uppercase}
.success,button.success{border-color:#15805d;background:#168764;color:#fff}.success:hover,button.success:hover{border-color:#0f694b;background:#0f7354;color:#fff}.success:focus-visible,button.success:focus-visible{outline:3px solid rgba(32,180,125,.32);outline-offset:2px}
