:root{
  --navy:#151a23;
  --navy-2:#1c222d;
  --ink:#232832;
  --muted:#6b7076;
  --line:#d2cabd;
  --bg:#e9e3d8;
  --card:#fbf9f5;
  --blue:#183a35;
  --green:#24543a;
  --amber:#6f4a10;
  --red:#8a2d27;
  --shadow:none;
  --radius:6px;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--bg)}
a{color:inherit;text-decoration:none}.muted{color:var(--muted)}
.login-body{min-height:100vh;display:grid;place-items:center;background:#07080a;color:white;padding:24px}.login-card{width:min(420px,100%);background:rgba(35,40,50,.78);border:1px solid rgba(255,255,255,.08);box-shadow:none;border-radius:6px;padding:28px;backdrop-filter:blur(10px)}.login-card h1{margin:10px 0 8px;font-size:30px;letter-spacing:-.04em}.login-card p{margin:0 0 24px;color:#183a35}.badge{display:inline-flex;padding:6px 10px;border-radius:999px;background:rgba(182,143,80,.18);color:#d3b273;font-size:12px;text-transform:uppercase;letter-spacing:.09em;font-weight:800}.form-group{margin-bottom:16px}.form-group label{display:block;margin-bottom:8px;font-weight:700;font-size:13px}.form-group input{width:100%;border:1px solid rgba(255,255,255,.08);border-radius:6px;background:rgba(255,255,255,.07);padding:14px 15px;color:white;outline:none}.form-group input:focus{border-color:#d3b273}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:6px;padding:12px 16px;font-weight:800;cursor:pointer;background:var(--blue);color:white;box-shadow:none}.btn:hover{filter:brightness(1.03)}.btn-light{background:#dcebe7;color:#183a35;box-shadow:none}.btn-small{padding:8px 11px;border-radius:6px;font-size:12px}.btn-outline{background:white;color:#294a68;border:1px solid var(--line);box-shadow:none}.full{width:100%}.error{background:rgba(138,45,39,.12);border:1px solid rgba(220,164,156,.5);color:#dca49c;padding:12px;border-radius:6px;margin-bottom:16px}.login-note{font-size:12px;color:#183a35;text-align:center;margin-top:14px}
.app-shell{display:flex;min-height:100vh}.sidebar{width:238px;background:#183a35;color:#f2eee5;position:fixed;inset:0 auto 0 0;padding:22px 18px;display:flex;flex-direction:column}.brand{display:flex;flex-direction:column;align-items:flex-start;gap:7px;margin:1px 8px 25px}.brand-logo{display:block;max-width:100%;height:auto;object-fit:contain}.brand-logo-full{width:174px}.brand-logo-icon{display:none;width:40px}.brand-area-label{display:block;color:rgba(242,238,229,.58);font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;margin-left:51px}.side-nav{display:grid;gap:6px}.side-nav a,.sidebar-foot a{display:block;padding:11px 12px;border-radius:6px;color:rgba(242,238,229,.75);font-weight:700;font-size:14px}.side-nav a:hover,.side-nav a.active{background:rgba(7,8,10,.2);color:white}.sidebar-foot{margin-top:auto;border-top:1px solid rgba(255,255,255,.08);padding-top:14px}.main{width:100%;margin-left:238px;padding:34px 38px 60px}.content{max-width:1120px;margin:0 auto}.page-header{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:22px}.kicker{margin:0 0 4px;color:#7c5e39;text-transform:uppercase;letter-spacing:.1em;font-size:11px;font-weight:900}.page-header h1{margin:0;font-size:34px;letter-spacing:-.055em;line-height:1.02}.page-intro{margin:8px 0 0;color:var(--muted)}.header-pill{background:white;border:1px solid var(--line);border-radius:999px;padding:8px 12px;color:var(--muted);font-size:12px;font-weight:800}.grid{display:grid;gap:18px}.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}.card{background:var(--card);border:1px solid rgba(35,40,50,.06);border-radius:var(--radius);box-shadow:none;padding:20px}.card h2,.card h3{margin:0 0 14px;letter-spacing:-.03em}.stat{min-height:116px}.stat-label{text-transform:uppercase;letter-spacing:.08em;font-size:11px;color:var(--muted);font-weight:900}.stat-value{font-size:30px;font-weight:900;letter-spacing:-.05em;margin:8px 0 4px}.stat-note{font-size:13px;color:var(--muted)}.hero-card{display:flex;align-items:center;justify-content:space-between;gap:18px;background:var(--card)}.actions{display:flex;gap:10px;flex-wrap:wrap}.quick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.quick-tile{border:1px solid var(--line);border-radius:6px;padding:14px;background:#e4ebf3}.quick-tile strong{display:block;margin-bottom:3px}.quick-tile span{color:var(--muted);font-size:13px}.table-card{padding:0;overflow:hidden}.card-title-row{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid var(--line)}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:15px 20px;border-bottom:1px solid var(--line);white-space:nowrap}th{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-weight:900;background:#fbf9f5}td{font-size:14px}.empty{padding:48px 20px;text-align:center}.empty strong{display:block;margin-bottom:6px}.status{display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;font-size:12px;font-weight:900}.status.active,.status.paid,.status.open{background:#e3efe8;color:#24543a}.status.warning,.status.pending{background:#f7ecd2;color:#6f4a10}.status.closed{background:#d2cabd;color:#4e535b}.status.progress{background:#e4ebf3;color:#183a35}
.status.picked-up{background:#e4ebf3;color:#294a68}.status.overdue{background:#f5e2df;color:#8a2d27}.progressbar{height:8px;border-radius:999px;background:#f4f0e8;overflow:hidden;min-width:120px}.progressbar span{display:block;height:100%;background:#183a35;border-radius:999px}.service-list{display:grid;gap:10px}.service-row{display:flex;align-items:center;justify-content:space-between;padding:12px 0;border-bottom:1px solid var(--line)}.service-row:last-child{border-bottom:0}.service-row small{display:block;color:var(--muted);margin-top:3px}.footer-note{margin-top:24px;color:var(--muted);font-size:13px;text-align:center}
@media(max-width:860px){.sidebar{position:static;width:100%;height:auto}.app-shell{display:block}.main{margin-left:0;padding:22px}.side-nav{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-2,.grid-3,.grid-4{grid-template-columns:1fr}.page-header,.hero-card{display:block}.actions{margin-top:16px}.quick-grid{grid-template-columns:1fr}}

/* Client dashboard cleanup: clearer hierarchy, friendly labels and responsive summaries. */
.client-dashboard-page .dashboard-summary-grid{align-items:stretch}
.client-dashboard-page .dashboard-account-overview{align-items:stretch}
.client-dashboard-page .dashboard-account-overview>.card{height:100%}
.client-dashboard-page .dashboard-summary-card{display:block;min-width:0;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}
.client-dashboard-page .dashboard-summary-card:hover,.client-dashboard-page .dashboard-summary-card:focus-visible{transform:translateY(-2px);border-color:rgba(24,58,53,.30);box-shadow:none;outline:none}
.client-dashboard-page .dashboard-detail-grid{align-items:stretch}
.client-dashboard-page .dashboard-account-card,.client-dashboard-page .dashboard-detail-grid>.card{height:100%}
@media(max-width:1100px){.client-dashboard-page .dashboard-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:860px){.brand{margin:0 0 18px;align-items:center}.brand-logo-full{display:none}.brand-logo-icon{display:block}.brand-area-label{margin:0}.client-dashboard-page .dashboard-account-overview{grid-template-columns:1fr}.client-dashboard-page .dashboard-detail-grid{grid-template-columns:1fr}}
@media(max-width:560px){.client-dashboard-page .dashboard-summary-grid{grid-template-columns:1fr}.client-dashboard-page .dashboard-summary-card{min-height:102px}.client-dashboard-page .page-header h1{font-size:29px}.client-dashboard-page .hero-card{padding:18px}.client-dashboard-page .actions .btn{width:100%}}
.light-form .form-group input,.light-form .form-group select,.light-form .form-group textarea,.light-form select,.light-form input,.light-form textarea, table input, table select{width:100%;border:1px solid var(--line);border-radius:6px;background:#fff;padding:12px 13px;color:var(--ink);outline:none;font:inherit}.light-form textarea{resize:vertical}.light-form .form-group input:focus,.light-form .form-group select:focus,.light-form .form-group textarea:focus{border-color:#183a35;box-shadow:none}.form-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.form-grid{display:grid;gap:14px}.check-row{display:flex;align-items:center;gap:8px;margin:0 0 16px;color:var(--muted);font-weight:700}.check-row input{width:auto}.notice{padding:12px 14px;border-radius:6px;margin-bottom:14px}.error-light{background:#f5e2df;color:#8a2d27;border:1px solid #dca49c}.admin-panels{align-items:start;margin-top:18px}.small-stat{font-size:18px;letter-spacing:-.02em;word-break:break-word}.client-form{max-width:760px}.wrap-cell{white-space:normal;line-height:1.55}.thread-card{margin-top:18px}.thread-item{border:1px solid var(--line);background:#fbf9f5;border-radius:6px;padding:14px;margin-bottom:12px}.thread-item.admin{background:#fbf9f5;border-color:#e4ebf3}.thread-item strong{display:block}.thread-item span{display:block;color:var(--muted);font-size:12px;margin-top:3px}.thread-item p{margin:10px 0 0;color:#4e535b;line-height:1.55}.reply-form{margin-top:18px;border-top:1px solid var(--line);padding-top:18px}
@media(max-width:860px){.form-row{grid-template-columns:1fr}}

/* Phase 2 admin client view tidy-up */
.admin-client-page{max-width:1180px}.admin-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:-4px 0 18px}.admin-toolbar-note{font-size:13px;color:var(--muted);font-weight:700}.admin-summary-cards{margin-bottom:22px}.compact-stat{min-height:104px;padding:18px}.admin-section-title{display:flex;align-items:flex-end;justify-content:space-between;margin:8px 0 14px}.admin-section-title h2{margin:0;font-size:22px;letter-spacing:-.04em}.admin-section-title p{margin:5px 0 0;color:var(--muted)}.clean-admin-panels{gap:18px;align-items:stretch}.admin-form-card{padding:0;overflow:hidden}.form-card-head{display:flex;gap:13px;align-items:flex-start;padding:18px 20px;border-bottom:1px solid var(--line);background:var(--card)}.form-card-head span{width:30px;height:30px;display:grid;place-items:center;border-radius:6px;background:#dcebe7;color:#294a68;font-weight:900;font-size:12px;flex:0 0 auto}.form-card-head h3{margin:0 0 3px;font-size:17px}.form-card-head p{margin:0;color:var(--muted);font-size:13px;line-height:1.35}.stacked-form{padding:18px 20px 20px}.light-form .form-group{margin-bottom:13px}.light-form .form-group label{font-size:12px;color:#4e535b;margin-bottom:7px}.light-form input,.light-form select,.light-form textarea,.ticket-admin-table input,.ticket-admin-table select{min-height:42px;border-color:#d2cabd;background:#fff}.light-form input::placeholder,.light-form textarea::placeholder,.ticket-admin-table input::placeholder{color:#183a35}.form-actions{display:flex;justify-content:flex-end;margin-top:4px}.admin-data-card{margin-top:18px}.admin-data-card .card-title-row{align-items:flex-start}.admin-data-card .card-title-row h3{margin:0 0 4px}.admin-data-card .card-title-row p{margin:0;color:var(--muted);font-size:13px}.empty-table-cell{text-align:center;color:var(--muted);padding:28px!important}.ticket-admin-table th:nth-child(5),.ticket-admin-table td:nth-child(5){min-width:220px}.ticket-admin-table th,.ticket-admin-table td{vertical-align:middle}.ticket-admin-table input,.ticket-admin-table select{padding:9px 11px;border-radius:6px}.admin-shell .sidebar{width:210px}.admin-shell .main{margin-left:210px}.admin-shell .content{max-width:1180px}
@media(max-width:980px){.clean-admin-panels,.admin-summary-cards{grid-template-columns:1fr}.admin-toolbar{display:block}.admin-toolbar-note{display:block;margin-top:10px}.admin-shell .sidebar{width:100%;position:static}.admin-shell .main{margin-left:0}.form-row{grid-template-columns:1fr}}

/* Phase 16U: shared admin-only 20i tools navigation. */
.admin-sidebar{overflow-y:auto}.admin-nav-group{margin:2px 0}.admin-nav-parent{width:100%;border:0;background:transparent;color:rgba(242,238,229,.75);display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 12px;border-radius:6px;font:inherit;font-size:14px;font-weight:700;cursor:pointer;text-align:left}.admin-nav-parent:hover,.admin-nav-group.open .admin-nav-parent{background:rgba(7,8,10,.2);color:#fff}.admin-nav-chevron{opacity:.7;transition:transform .18s ease}.admin-nav-group.open .admin-nav-chevron{transform:rotate(180deg)}.admin-nav-children{margin:4px 0 8px 10px;padding-left:9px;border-left:1px solid rgba(255,255,255,.12)}.admin-nav-children a{padding:8px 9px;font-size:12px;line-height:1.25}.admin-nav-subtitle{margin:10px 9px 4px;color:rgba(242,238,229,.58);font-size:10px;letter-spacing:.08em;text-transform:uppercase;font-weight:800}

/* Phase 2.1 - tighten Quick Add spacing */
.admin-client-page{max-width:1040px}
.admin-summary-cards{margin-bottom:16px}
.admin-section-title{margin:2px 0 10px}
.clean-admin-panels{gap:12px;align-items:start}
.admin-form-card{border-radius:6px}
.form-card-head{padding:13px 15px;gap:10px}
.form-card-head span{width:26px;height:26px;border-radius:8px;font-size:11px}
.form-card-head h3{font-size:15px;margin-bottom:1px}
.form-card-head p{font-size:12px;line-height:1.25}
.stacked-form{padding:14px 15px 15px}
.light-form .form-group{margin-bottom:10px}
.form-row{gap:10px}
.check-row{margin-bottom:10px;font-size:12px}
.form-actions{margin-top:0}
.light-form input,.light-form select,.light-form textarea,.ticket-admin-table input,.ticket-admin-table select{min-height:38px;padding:9px 10px;border-radius:6px;font-size:13px}
.light-form .form-group label{font-size:11px;margin-bottom:5px}
.light-form textarea{min-height:74px}
.admin-data-card{margin-top:14px}

@media(min-width:1120px){
  .admin-client-page .clean-admin-panels.grid-2{grid-template-columns:repeat(4,minmax(0,1fr))}
  .admin-client-page{max-width:1260px}
  .admin-client-page .form-row{grid-template-columns:1fr}
}

/* Phase 2.2 - Quick Add cache-safe compact styling */
.admin-client-page .clean-admin-panels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start!important}
.admin-client-page .admin-form-card{align-self:start!important;min-height:0!important;padding:0!important}
.admin-client-page .light-form input:not([type=checkbox]),.admin-client-page .light-form select,.admin-client-page .light-form textarea{border:1px solid #d2cabd!important;background:#fff!important;color:#232832!important;box-shadow:none}
@media(min-width:1480px){.admin-client-page .clean-admin-panels.grid-2{grid-template-columns:repeat(4,minmax(0,1fr))}.admin-client-page{max-width:1260px}.admin-client-page .form-row{grid-template-columns:1fr}}

/* Phase 2.3 - Quick Add equal height cards */
.admin-client-page .clean-admin-panels{
  align-items:stretch!important;
}
.admin-client-page .admin-form-card{
  height:100%!important;
  display:flex!important;
  flex-direction:column!important;
}
.admin-client-page .admin-form-card .stacked-form{
  flex:1 1 auto!important;
  display:flex!important;
  flex-direction:column!important;
}
.admin-client-page .admin-form-card .form-actions{
  margin-top:auto!important;
}

/* Phase 3 polish */
.notice.success-light{background:#e3efe8;border:1px solid #e3efe8;color:#24543a;border-radius:6px;padding:12px 14px;margin:0 0 16px;font-weight:700}
.client-profile-card{margin:0 0 18px}
.profile-edit-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:end}
.profile-edit-grid .form-group{margin:0!important}
.profile-edit-grid .profile-active{align-self:center;margin:0!important;padding-top:20px}
.profile-edit-grid .form-actions{margin:0!important;justify-content:flex-start!important}
.table-action-col{width:90px;text-align:right}
td .btn-danger-outline{border-color:#dca49c!important;color:#8a2d27!important;background:#fff!important;box-shadow:none}
td .btn-danger-outline:hover{background:#f5e2df!important}
.detail-card h3{margin:0 0 14px}
.detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.detail-grid>div{background:#fbf9f5;border:1px solid #f4f0e8;border-radius:6px;padding:14px}
.detail-grid span{display:block;color:#6b7076;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;margin-bottom:6px}
.detail-grid strong{font-size:16px;color:#232832;word-break:break-word}.detail-note{margin:16px 0}.progressbar.wide{margin-top:8px;height:10px}
@media(max-width:980px){.profile-edit-grid,.detail-grid{grid-template-columns:1fr}.table-action-col{width:auto}}


/* Stage 3 hotfix: Add Client form polish */
.admin-add-client-page{max-width:920px}.admin-add-card{padding:0;overflow:hidden}.admin-add-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:22px 24px;border-bottom:1px solid var(--line);background:var(--card)}.admin-add-card-head h2{margin:0 0 5px;font-size:22px;letter-spacing:-.035em}.admin-add-card-head p{margin:0;color:var(--muted);line-height:1.45}.admin-add-form{padding:24px}.admin-add-form .form-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.admin-add-form .form-group{margin:0 0 18px}.admin-add-form label{display:block;margin:0 0 8px;font-size:13px;font-weight:800;color:#232832}.admin-add-form input{width:100%!important;min-height:46px!important;border:1px solid #d2cabd!important;border-radius:6px!important;background:#fff!important;color:#232832!important;padding:12px 14px!important;outline:none!important;font:inherit!important;box-shadow:none}.admin-add-form input::placeholder{color:#8d9196!important}.admin-add-form input:focus{border-color:#183a35!important;box-shadow:none}.admin-add-actions{display:flex;align-items:center;gap:12px;margin-top:6px}.admin-add-help{font-size:13px;color:var(--muted);line-height:1.5}.admin-add-card .notice{margin:0 0 18px}@media(max-width:800px){.admin-add-form .form-row{grid-template-columns:1fr}.admin-add-card-head{display:block}.admin-add-form{padding:18px}}

/* Phase 4 - account page and admin password reset */
.account-page{max-width:1040px}.account-summary-row{margin-bottom:18px}.account-panels{align-items:start}.account-card{padding:0;overflow:hidden}.account-card-head{padding:20px 22px;border-bottom:1px solid var(--line);background:var(--card)}.account-card-head h3{margin:0 0 5px;font-size:20px}.account-card-head p{margin:0;color:var(--muted);line-height:1.45}.account-form{padding:22px}.account-form .form-actions{justify-content:flex-start;margin-top:8px}.account-form input{color:var(--ink)!important;background:#fff!important;border:1px solid #d2cabd!important}.admin-profile-split{display:grid;grid-template-columns:1fr 300px;gap:16px;padding:18px 20px 20px}.admin-profile-split .profile-edit-grid{padding:0}.password-reset-card{border:1px solid #d2cabd;border-radius:6px;background:#fbf9f5;padding:14px}.password-reset-card h4{margin:0 0 5px;font-size:15px}.password-reset-card p{margin:0 0 12px;color:var(--muted);font-size:12px;line-height:1.45}.password-reset-card .form-group{margin-bottom:10px!important}.password-reset-card input{background:#fff!important;color:#232832!important}.password-reset-card .btn-outline{width:100%}
@media(max-width:980px){.admin-profile-split{grid-template-columns:1fr}.account-panels{grid-template-columns:1fr}.account-form .form-row{grid-template-columns:1fr}}

/* Phase 4 polish - softer client profile + password reset */
.admin-client-page .admin-toolbar{margin-bottom:20px}
.admin-client-page .admin-toolbar-note{font-size:12px;color:#183a35;background:#fff;border:1px solid #e4ebf3;border-radius:999px;padding:8px 12px;box-shadow:none}
.client-profile-card{margin-bottom:24px!important}
.client-profile-card .card-title-row{padding:20px 26px;background:var(--card)}
.client-profile-card .card-title-row h3{font-size:21px}
.admin-profile-split{grid-template-columns:1fr 320px!important;gap:18px!important;padding:18px 20px 22px!important}
.profile-edit-grid{gap:14px!important}
.active-login-pill{display:flex!important;align-items:center!important;gap:10px!important;min-height:46px!important;border:1px solid #e4ebf3!important;border-radius:6px!important;background:#fbf9f5!important;padding:10px 12px!important;color:#232832!important;box-shadow:none}
.active-login-pill input{width:16px!important;height:16px!important;min-height:0!important;accent-color:#183a35}
.active-login-pill strong{display:block;font-size:13px;line-height:1.1}
.active-login-pill small{display:block;margin-top:2px;color:#6b7076;font-size:11px;font-weight:700}
.password-reset-card{position:relative;border:1px solid #d2cabd!important;background:var(--card)!important;border-radius:6px!important;padding:17px!important;box-shadow:none}
.password-reset-card .security-badge{display:inline-flex;align-items:center;border-radius:999px;background:#dcebe7;color:#294a68;font-size:10px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;padding:5px 8px;margin-bottom:10px}
.password-reset-card h4{font-size:16px!important;margin-bottom:6px!important}
.password-reset-card p{font-size:12px!important;line-height:1.5!important;margin-bottom:14px!important}
.password-reset-card input{border-radius:6px!important}
.password-reset-card .btn-outline{border-color:#e4ebf3!important;background:#fff!important;color:#232832!important;box-shadow:none}
.password-reset-card .btn-outline:hover{background:#fbf9f5!important;border-color:#e4ebf3!important}
.admin-summary-cards{margin-top:10px!important}
@media(max-width:980px){.admin-profile-split{grid-template-columns:1fr!important}.admin-client-page .admin-toolbar-note{display:inline-flex;margin-top:10px}}

/* Phase 5 - client notes */
.client-notes-grid{margin:0 0 20px;align-items:stretch}
.admin-note-card{padding:0;overflow:hidden}
.note-card-head{display:flex;gap:12px;align-items:flex-start;padding:18px 20px;border-bottom:1px solid var(--line);background:var(--card)}
.note-card-head span{display:inline-flex;align-items:center;justify-content:center;min-width:44px;height:28px;border-radius:999px;background:#dcebe7;color:#294a68;font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.06em}
.note-card-head h3{margin:0 0 4px;font-size:18px;letter-spacing:-.035em}
.note-card-head p{margin:0;color:var(--muted);font-size:13px;line-height:1.4}
.note-form{padding:18px 20px 20px}
.note-form textarea{min-height:108px!important}
.visible-note-toggle{border:1px dashed #e4ebf3;border-radius:6px;background:#fbf9f5;padding:10px 12px;margin-bottom:14px!important;color:#4e535b!important}
.notes-list{padding:16px 20px 20px;display:grid;gap:12px;max-height:420px;overflow:auto}
.note-item{border:1px solid #e4ebf3;border-radius:6px;background:#fff;padding:14px}
.note-item.client-visible{border-color:#e4ebf3;background:#fbf9f5}
.note-item.internal-only{border-color:#d2cabd;background:#fbf9f5}
.note-item-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.note-item-top strong{font-size:14px;line-height:1.25}
.note-item-top span{display:inline-flex;border-radius:999px;padding:5px 8px;font-size:10px;font-weight:900;background:#f4f0e8;color:#4e535b;white-space:nowrap}
.note-item.client-visible .note-item-top span{background:#e4ebf3;color:#183a35}
.note-item p{margin:10px 0;color:#4e535b;line-height:1.55;font-size:13px}
.note-item-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid #f4f0e8;padding-top:10px}
.note-item-foot small{color:var(--muted);font-weight:700}
.client-message-card{padding:0;overflow:hidden;background:var(--card)}
.soft-title-row{background:transparent!important}
.soft-title-row h3{margin:0 0 4px!important}
.soft-title-row p{margin:0;color:var(--muted);font-size:13px}
.client-note-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:0 20px 20px}
.client-note{border:1px solid #e4ebf3;border-radius:6px;background:#fff;padding:15px;box-shadow:none}
.client-note strong{display:block;margin-bottom:4px;font-size:14px}
.client-note small{display:block;color:#6b7076;font-weight:800;font-size:12px;margin-bottom:10px}
.client-note p{margin:0;color:#4e535b;line-height:1.55;font-size:13px}
@media(max-width:980px){.client-notes-grid,.client-note-list{grid-template-columns:1fr}.note-item-top{display:block}.note-item-top span{margin-top:8px}}


/* Phase 5.1 - notes polish, cache-safe */
.admin-client-page .client-notes-grid{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:18px!important;
  margin:8px 0 26px!important;
  align-items:stretch!important;
}
.admin-client-page .admin-note-card{
  border-radius:6px!important;
  overflow:hidden!important;
  background:#fff!important;
  border:1px solid rgba(35,40,50,.06)!important;
  box-shadow:none;
}
.admin-client-page .note-card-head{
  display:flex!important;
  align-items:flex-start!important;
  gap:12px!important;
  padding:19px 22px!important;
  border-bottom:1px solid #d2cabd!important;
  background:var(--card)!important;
}
.admin-client-page .note-card-head>span{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:46px!important;
  height:28px!important;
  border-radius:999px!important;
  background:#dcebe7!important;
  color:#294a68!important;
  font-size:10px!important;
  font-weight:900!important;
  line-height:1!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
  margin:0!important;
}
.admin-client-page .note-card-head h3{
  margin:0 0 4px!important;
  font-size:18px!important;
  line-height:1.1!important;
  letter-spacing:-.035em!important;
  color:#232832!important;
}
.admin-client-page .note-card-head p{
  margin:0!important;
  font-size:13px!important;
  line-height:1.4!important;
  color:#6b7076!important;
}
.admin-client-page .note-form{
  padding:18px 22px 22px!important;
}
.admin-client-page .note-form .form-group{margin-bottom:13px!important;}
.admin-client-page .note-form label{font-size:12px!important;color:#232832!important;}
.admin-client-page .note-form input,
.admin-client-page .note-form textarea{
  width:100%!important;
  border:1px solid #d2cabd!important;
  border-radius:6px!important;
  background:#fff!important;
  color:#232832!important;
  padding:12px 14px!important;
  font-size:14px!important;
  box-shadow:none;
}
.admin-client-page .note-form textarea{min-height:116px!important;resize:vertical!important;}
.admin-client-page .visible-note-toggle{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  border:1px dashed #e4ebf3!important;
  border-radius:6px!important;
  background:#fbf9f5!important;
  padding:12px 13px!important;
  margin:4px 0 16px!important;
  color:#4e535b!important;
  font-size:13px!important;
  font-weight:800!important;
}
.admin-client-page .visible-note-toggle input{width:16px!important;height:16px!important;accent-color:#183a35!important;}
.admin-client-page .notes-list{
  padding:16px 18px 18px!important;
  display:grid!important;
  gap:12px!important;
  max-height:430px!important;
  overflow:auto!important;
}
.admin-client-page .note-item{
  border:1px solid #e4ebf3!important;
  border-radius:6px!important;
  background:#fff!important;
  padding:14px 15px!important;
}
.admin-client-page .note-item.client-visible{background:#fbf9f5!important;border-color:#e4ebf3!important;}
.admin-client-page .note-item.internal-only{background:#e4ebf3!important;}
.admin-client-page .note-item-top{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:12px!important;
}
.admin-client-page .note-item-top strong{
  display:block!important;
  font-size:15px!important;
  line-height:1.25!important;
  color:#232832!important;
  letter-spacing:-.015em!important;
}
.admin-client-page .note-item-top span{
  display:inline-flex!important;
  align-items:center!important;
  white-space:nowrap!important;
  border-radius:999px!important;
  padding:6px 9px!important;
  background:#f4f0e8!important;
  color:#4e535b!important;
  font-size:10px!important;
  font-weight:900!important;
  text-transform:uppercase!important;
  letter-spacing:.05em!important;
}
.admin-client-page .note-item.client-visible .note-item-top span{background:#e4ebf3!important;color:#183a35!important;}
.admin-client-page .note-item p{
  margin:10px 0 0!important;
  color:#4e535b!important;
  font-size:13px!important;
  line-height:1.55!important;
}
.admin-client-page .note-item-foot{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  margin-top:12px!important;
  padding-top:12px!important;
  border-top:1px solid #f4f0e8!important;
}
.admin-client-page .note-item-foot small{font-size:12px!important;color:#6b7076!important;font-weight:800!important;}
.admin-client-page .note-item-foot .btn-danger-outline{
  background:#fff!important;
  color:#8a2d27!important;
  border:1px solid #dca49c!important;
  box-shadow:none;
}
.client-message-card{
  padding:0!important;
  overflow:hidden!important;
  background:var(--card)!important;
  border-radius:6px!important;
}
.client-message-card .soft-title-row{
  padding:22px 24px!important;
  border-bottom:1px solid #d2cabd!important;
  background:transparent!important;
}
.client-message-card .soft-title-row h3{margin:0 0 5px!important;font-size:20px!important;letter-spacing:-.035em!important;}
.client-message-card .soft-title-row p{margin:0!important;color:#6b7076!important;font-size:13px!important;}
.client-note-list{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:14px!important;
  padding:18px 24px 24px!important;
}
.client-note{
  border:1px solid #e4ebf3!important;
  border-radius:6px!important;
  background:#fff!important;
  padding:16px!important;
  box-shadow:none;
}
.client-note strong{display:block!important;font-size:15px!important;line-height:1.25!important;color:#232832!important;margin:0 0 6px!important;}
.client-note small{display:block!important;color:#6b7076!important;font-size:12px!important;font-weight:800!important;margin:0 0 10px!important;}
.client-note p{margin:0!important;color:#4e535b!important;font-size:13px!important;line-height:1.55!important;}
@media(max-width:980px){
  .admin-client-page .client-notes-grid,.client-note-list{grid-template-columns:1fr!important;}
  .admin-client-page .note-item-top{display:block!important;}
  .admin-client-page .note-item-top span{margin-top:8px!important;}
}

/* Phase 5.2 - support ticket polish */
.support-compose-page,
.ticket-detail-page{
  max-width:1180px!important;
}
.support-compose-card{
  display:grid!important;
  grid-template-columns:320px minmax(0,1fr)!important;
  gap:0!important;
  overflow:hidden!important;
  background:#fff!important;
  border:1px solid rgba(35,40,50,.06)!important;
  border-radius:6px!important;
  box-shadow:none;
}
.compose-intro{
  padding:28px!important;
  background:var(--card)!important;
  border-right:1px solid #d2cabd!important;
}
.compose-badge{
  display:inline-flex!important;
  align-items:center!important;
  border-radius:999px!important;
  padding:6px 9px!important;
  background:#dcebe7!important;
  color:#294a68!important;
  font-size:10px!important;
  font-weight:900!important;
  text-transform:uppercase!important;
  letter-spacing:.08em!important;
  margin-bottom:12px!important;
}
.compose-intro h2{
  margin:0 0 8px!important;
  font-size:24px!important;
  line-height:1.05!important;
  letter-spacing:-.045em!important;
}
.compose-intro p{
  margin:0!important;
  color:#6b7076!important;
  font-size:14px!important;
  line-height:1.55!important;
}
.compose-form{
  padding:28px!important;
}
.compose-form .form-group{
  margin-bottom:16px!important;
}
.compose-form .form-row{
  gap:14px!important;
}
.compose-form label,
.reply-form-clean label{
  display:block!important;
  margin:0 0 7px!important;
  color:#232832!important;
  font-size:12px!important;
  font-weight:900!important;
}
.compose-form input,
.compose-form select,
.compose-form textarea,
.reply-form-clean textarea{
  width:100%!important;
  border:1px solid #d2cabd!important;
  border-radius:6px!important;
  background:#fff!important;
  color:#232832!important;
  padding:13px 14px!important;
  font:inherit!important;
  outline:none!important;
  box-shadow:none;
}
.compose-form textarea,
.reply-form-clean textarea{
  min-height:150px!important;
  resize:vertical!important;
}
.compose-form input:focus,
.compose-form select:focus,
.compose-form textarea:focus,
.reply-form-clean textarea:focus{
  border-color:#183a35!important;
  box-shadow:none;
}
.compose-actions{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  padding-top:4px!important;
}
.ticket-hero{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:20px!important;
  padding:24px 26px!important;
  margin-bottom:16px!important;
  background:var(--card)!important;
  border-radius:6px!important;
}
.ticket-hero h2{
  margin:0 0 5px!important;
  font-size:28px!important;
  line-height:1.05!important;
  letter-spacing:-.05em!important;
  color:#232832!important;
}
.ticket-hero p{
  margin:0!important;
  color:#6b7076!important;
  font-size:13px!important;
}
.ticket-hero-actions{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  flex-wrap:wrap!important;
  justify-content:flex-end!important;
}
.ticket-meta-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:14px!important;
  margin-bottom:16px!important;
}
.ticket-mini-card{
  background:#fff!important;
  border:1px solid rgba(35,40,50,.06)!important;
  border-radius:6px!important;
  box-shadow:none;
  padding:16px 18px!important;
}
.ticket-mini-card span{
  display:block!important;
  color:#6b7076!important;
  font-size:11px!important;
  font-weight:900!important;
  text-transform:uppercase!important;
  letter-spacing:.07em!important;
  margin-bottom:6px!important;
}
.ticket-mini-card strong{
  display:block!important;
  color:#232832!important;
  font-size:15px!important;
  line-height:1.25!important;
}
.ticket-layout{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 340px!important;
  gap:16px!important;
  align-items:start!important;
}
.ticket-thread-panel,
.ticket-reply-panel{
  border-radius:6px!important;
  padding:0!important;
  overflow:hidden!important;
}
.thread-head{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:14px!important;
  padding:20px 22px!important;
  border-bottom:1px solid #d2cabd!important;
  background:var(--card)!important;
}
.thread-head h3,
.ticket-reply-panel h3{
  margin:0 0 5px!important;
  font-size:20px!important;
  letter-spacing:-.035em!important;
  color:#232832!important;
}
.thread-head p,
.ticket-reply-panel p{
  margin:0!important;
  color:#6b7076!important;
  font-size:13px!important;
  line-height:1.45!important;
}
.ticket-timeline{
  padding:20px 22px 22px!important;
  display:grid!important;
  gap:14px!important;
}
.ticket-message{
  display:grid!important;
  grid-template-columns:38px minmax(0,1fr)!important;
  gap:12px!important;
  align-items:start!important;
}
.ticket-avatar{
  width:38px!important;
  height:38px!important;
  border-radius:6px!important;
  display:grid!important;
  place-items:center!important;
  background:#dcebe7!important;
  color:#294a68!important;
  font-weight:900!important;
  box-shadow:none;
}
.ticket-message.admin .ticket-avatar{
  background:#e3efe8!important;
  color:#24543a!important;
}
.ticket-bubble{
  border:1px solid #e4ebf3!important;
  border-radius:6px!important;
  background:#fff!important;
  padding:14px 16px!important;
}
.ticket-message.admin .ticket-bubble{
  background:#fbf9f5!important;
  border-color:#e4ebf3!important;
}
.ticket-message-top{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  margin-bottom:8px!important;
}
.ticket-message-top strong{
  display:block!important;
  color:#232832!important;
  font-size:14px!important;
  line-height:1.25!important;
}
.ticket-message-top span{
  display:block!important;
  color:#6b7076!important;
  font-size:12px!important;
  font-weight:800!important;
  white-space:nowrap!important;
}
.ticket-bubble p{
  margin:0!important;
  color:#4e535b!important;
  font-size:14px!important;
  line-height:1.6!important;
  white-space:normal!important;
}
.ticket-reply-panel{
  padding:20px!important;
  position:sticky!important;
  top:24px!important;
}
.reply-form-clean{
  margin-top:16px!important;
}
.reply-form-clean .form-group{
  margin-bottom:14px!important;
}
.reply-form-clean textarea{
  min-height:170px!important;
}
.ticket-detail-page .status{
  text-transform:none!important;
}
@media(max-width:1040px){
  .support-compose-card,
  .ticket-layout{
    grid-template-columns:1fr!important;
  }
  .compose-intro{
    border-right:0!important;
    border-bottom:1px solid #d2cabd!important;
  }
  .ticket-reply-panel{
    position:static!important;
  }
}
@media(max-width:760px){
  .ticket-hero{
    display:block!important;
  }
  .ticket-hero-actions{
    justify-content:flex-start!important;
    margin-top:14px!important;
  }
  .ticket-meta-grid{
    grid-template-columns:1fr!important;
  }
  .compose-form .form-row{
    grid-template-columns:1fr!important;
  }
  .ticket-message-top{
    display:block!important;
  }
  .ticket-message-top span{
    margin-top:4px!important;
  }
}

/* Phase 17.2 - clickable invoice rows and edit modal */
.client-invoice-row{
  cursor:pointer;
  transition:background .16s ease,box-shadow .16s ease;
}
.client-invoice-row:hover,
.client-invoice-row:focus-visible{
  background:#e4ebf3!important;
  box-shadow:none;
  outline:0;
}
.invoice-modal-open{overflow:hidden!important;}
.invoice-edit-modal{
  position:fixed;
  inset:0;
  z-index:1000;
  display:grid;
  place-items:center;
  padding:24px;
}
.invoice-edit-modal[hidden]{display:none!important;}
.invoice-edit-backdrop{
  position:absolute;
  inset:0;
  background:rgba(7,8,10,.58);
  backdrop-filter:blur(5px);
}
.invoice-edit-dialog{
  position:relative;
  z-index:1;
  width:min(620px,100%);
  max-height:calc(100vh - 48px);
  overflow:auto;
  border:1px solid rgba(255,255,255,.7);
  border-radius:6px;
  background:#fff;
  box-shadow:0 30px 100px rgba(7,8,10,.32);
}
.invoice-edit-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding:24px 26px 20px;
  border-bottom:1px solid #d2cabd;
  background:var(--card);
}
.invoice-edit-head h3{margin:4px 0 5px!important;font-size:23px!important;}
.invoice-edit-head p{margin:0;color:#6b7076;font-size:13px;line-height:1.45;}
.invoice-edit-close{
  appearance:none;
  flex:0 0 auto;
  width:38px;
  height:38px;
  border:1px solid #e4ebf3;
  border-radius:6px;
  background:#fff;
  color:#4e535b;
  font-size:26px;
  line-height:1;
  cursor:pointer;
}
.invoice-edit-close:hover{background:#f4f0e8;}
.invoice-edit-form{padding:24px 26px 26px;}
.invoice-edit-form #edit-invoice-number[readonly]{background:#fbf9f5!important;color:#6b7076!important;}
.invoice-edit-amount{position:relative;}
.invoice-edit-amount span{position:absolute;left:13px;top:50%;z-index:1;transform:translateY(-50%);color:#6b7076;font-weight:850;}
.invoice-edit-form .invoice-edit-amount input{padding-left:28px!important;}
.invoice-edit-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-top:8px;
  padding-top:18px;
  border-top:1px solid #d2cabd;
}
.invoice-edit-actions>div{display:flex;gap:9px;}
@media(max-width:620px){
  .invoice-edit-modal{padding:12px;}
  .invoice-edit-head,.invoice-edit-form{padding-left:18px;padding-right:18px;}
  .invoice-edit-actions{align-items:stretch;flex-direction:column-reverse;}
  .invoice-edit-actions>div{display:grid;grid-template-columns:1fr 1fr;}
}

/* Phase 18 - maintenance invoice update picker and printable appendix */
.invoice-patch-notice{margin-bottom:18px!important;}
.invoice-draft-notice{
  margin-top:18px!important;
  padding:12px 14px!important;
  border:1px solid #d5e4df!important;
  border-left:3px solid #6b9d91!important;
  border-radius:6px!important;
  background:#eef5f2!important;
  color:#35514b!important;
  font-size:12px!important;
  line-height:1.5!important;
}
.invoice-draft-notice strong{color:#183a35!important;}
.invoice-update-picker{
  margin:2px 0 16px;
  padding:14px;
  border:1px solid #e4ebf3;
  border-radius:6px;
  background:#e4ebf3;
}
.invoice-update-picker[hidden]{display:none!important;}
.invoice-update-picker.attachments-disabled .invoice-update-options{opacity:.48;}
.invoice-update-picker-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:11px;
}
.invoice-update-picker-head strong{display:block;color:#232832;font-size:12px;}
.invoice-update-picker-head span{display:block;margin-top:3px;color:#6b7076;font-size:10px;line-height:1.35;}
.invoice-update-picker-head label{display:flex;align-items:center;gap:6px;white-space:nowrap;color:#4e535b;font-size:10px;font-weight:850;}
.invoice-update-picker-head label input{width:auto!important;min-height:0!important;margin:0;}
.invoice-update-options{display:grid;gap:7px;max-height:210px;overflow:auto;}
.invoice-update-option{
  display:flex;
  align-items:flex-start;
  gap:9px;
  padding:9px 10px;
  border:1px solid #e4ebf3;
  border-radius:6px;
  background:#fff;
  cursor:pointer;
}
.invoice-update-option[hidden]{display:none!important;}
.invoice-update-option:hover{border-color:#e4ebf3;background:#fbf9f5;}
.invoice-update-option input{width:auto!important;min-height:0!important;margin:3px 0 0;}
.invoice-update-option span{min-width:0;}
.invoice-update-option strong{display:block;color:#294a68;font-size:11px;line-height:1.3;}
.invoice-update-option small{display:block;margin-top:3px;color:#183a35;font-size:9px;line-height:1.35;}
.invoice-update-no-match,.invoice-update-empty{padding:12px;text-align:center;color:#183a35;font-size:11px;font-weight:750;}
.invoice-update-select-all{
  appearance:none;
  border:0;
  background:transparent;
  color:#183a35;
  font-size:10px;
  font-weight:900;
  cursor:pointer;
  white-space:nowrap;
}
.invoice-maintenance-appendix{margin-top:40px;padding-top:34px;border-top:1px solid #e4ebf3;}
.invoice-appendix-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:26px;padding-bottom:20px;border-bottom:1px solid #d2cabd;}
.invoice-appendix-head h2{margin:4px 0 7px;font-size:28px;line-height:1.05;letter-spacing:-.045em;}
.invoice-appendix-head p{margin:0;color:#6b7076;}
.invoice-appendix-head>div:last-child{text-align:right;}
.invoice-appendix-head>div:last-child span{display:block;color:#6b7076;font-size:11px;font-weight:850;}
.invoice-appendix-head>div:last-child strong{display:block;margin-top:5px;color:#232832;font-size:16px;}
.invoice-appendix-list{display:grid;gap:12px;}
.invoice-appendix-item{display:grid;grid-template-columns:76px minmax(0,1fr);gap:16px;padding:15px;border:1px solid #e4ebf3;border-radius:6px;background:#fbf9f5;break-inside:avoid;}
.invoice-appendix-date{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:70px;border-radius:6px;background:#dcebe7;color:#183a35;}
.invoice-appendix-date span{font-size:24px;font-weight:950;line-height:1;}
.invoice-appendix-date small{margin-top:5px;font-size:9px;font-weight:900;text-transform:uppercase;}
.invoice-appendix-copy>div{display:flex;gap:7px;flex-wrap:wrap;}
.invoice-appendix-copy>div span{display:inline-flex;padding:4px 7px;border-radius:999px;background:#f4f0e8;color:#294a68;font-size:8px;font-weight:900;text-transform:uppercase;letter-spacing:.06em;}
.invoice-appendix-copy h3{margin:7px 0 5px;font-size:15px;letter-spacing:-.02em;}
.invoice-appendix-copy p{margin:0;color:#294a68;font-size:11px;line-height:1.5;}
.invoice-appendix-foot{display:flex;justify-content:space-between;gap:16px;margin-top:24px;padding-top:14px;border-top:1px solid #d2cabd;color:#6b7076;font-size:10px;font-weight:800;}
@media print{
  .invoice-maintenance-appendix{break-before:page;page-break-before:always;margin-top:0;padding-top:0;border-top:0;}
  .invoice-appendix-head h2{font-size:25px;}
}
@media(max-width:620px){
  .invoice-update-picker-head,.invoice-appendix-head{flex-direction:column;}
  .invoice-appendix-head>div:last-child{text-align:left;}
  .invoice-appendix-item{grid-template-columns:58px minmax(0,1fr);}
}

/* Phase 6 — Admin support centre */
.admin-support-page .page-head,
.admin-ticket-page .page-head{
  margin-bottom:22px!important;
}
.support-admin-stats{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:14px!important;
  margin-bottom:18px!important;
}
.support-stat-card{
  display:block!important;
  text-decoration:none!important;
  background:#fff!important;
  border:1px solid #e4ebf3!important;
  border-radius:6px!important;
  padding:18px!important;
  box-shadow:none;
  color:#232832!important;
}
.support-stat-card span{
  display:block!important;
  color:#6b7076!important;
  text-transform:uppercase!important;
  letter-spacing:.08em!important;
  font-size:11px!important;
  font-weight:900!important;
  margin-bottom:8px!important;
}
.support-stat-card strong{
  display:block!important;
  font-size:28px!important;
  line-height:1!important;
}
.support-stat-card.active{
  border-color:#183a35!important;
  box-shadow:none;
}
.admin-support-card{
  padding:0!important;
  overflow:hidden!important;
}
.admin-support-toolbar{
  display:flex!important;
  justify-content:space-between!important;
  align-items:flex-start!important;
  gap:18px!important;
  padding:22px 24px!important;
  border-bottom:1px solid #d2cabd!important;
}
.admin-support-toolbar h3,
.admin-support-toolbar p{
  margin:0!important;
}
.admin-support-toolbar p{
  color:#6b7076!important;
  margin-top:5px!important;
}
.support-search-form{
  display:flex!important;
  gap:10px!important;
  align-items:center!important;
  min-width:420px!important;
}
.support-search-form input{
  height:42px!important;
  border:1px solid #d2cabd!important;
  border-radius:6px!important;
  padding:0 14px!important;
  min-width:260px!important;
  color:#232832!important;
  background:#fff!important;
}
.support-ticket-list{
  padding:10px!important;
}
.support-ticket-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 150px auto!important;
  gap:16px!important;
  align-items:center!important;
  padding:16px!important;
  border-radius:6px!important;
  border:1px solid transparent!important;
  transition:.18s ease!important;
}
.support-ticket-row:hover{
  background:#fbf9f5!important;
  border-color:#e4ebf3!important;
}
.ticket-row-top{
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  margin-bottom:8px!important;
}
.ticket-number,
.priority-chip{
  display:inline-flex!important;
  align-items:center!important;
  min-height:24px!important;
  border-radius:999px!important;
  padding:0 10px!important;
  font-size:12px!important;
  font-weight:900!important;
  background:#dcebe7!important;
  color:#183a35!important;
}
.priority-chip{
  background:#f4f0e8!important;
  color:#4e535b!important;
}
.ticket-row-main h3{
  margin:0!important;
  font-size:16px!important;
  color:#232832!important;
}
.ticket-row-main p{
  margin:5px 0 0!important;
  color:#6b7076!important;
  font-size:13px!important;
}
.ticket-row-meta{
  text-align:right!important;
  color:#4e535b!important;
  font-weight:800!important;
  font-size:13px!important;
}
.ticket-row-meta small{
  display:block!important;
  margin-top:6px!important;
  color:#183a35!important;
}
.empty-state-soft{
  margin:12px!important;
  padding:38px!important;
  text-align:center!important;
  border:1px dashed #d2cabd!important;
  border-radius:6px!important;
  background:#fbf9f5!important;
}
.empty-state-soft h3{margin:0 0 8px!important;color:#232832!important;}
.empty-state-soft p{margin:0!important;color:#6b7076!important;}
.admin-ticket-meta{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
}
.admin-ticket-grid{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 360px!important;
  gap:18px!important;
  align-items:start!important;
}
.admin-ticket-side{
  display:grid!important;
  gap:16px!important;
  position:sticky!important;
  top:24px!important;
}
.admin-ticket-action-card{
  padding:20px!important;
}
.admin-ticket-action-card h3{
  margin:0 0 6px!important;
  color:#232832!important;
}
.success-light{
  background:#e3efe8!important;
  border:1px solid #e3efe8!important;
  color:#24543a!important;
}
@media(max-width:1100px){
  .support-admin-stats,
  .admin-ticket-meta{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .admin-ticket-grid{grid-template-columns:1fr!important;}
  .admin-ticket-side{position:static!important;}
}
@media(max-width:820px){
  .admin-support-toolbar{display:block!important;}
  .support-search-form{min-width:0!important;margin-top:16px!important;flex-wrap:wrap!important;}
  .support-search-form input{min-width:0!important;width:100%!important;}
  .support-ticket-row{grid-template-columns:1fr!important;}
  .ticket-row-meta{text-align:left!important;}
}

/* Phase 7 — Admin dashboard polish */
.admin-dashboard-page .page-head{
  margin-bottom:18px!important;
}
.admin-hero-panel{
  display:flex!important;
  justify-content:space-between!important;
  align-items:center!important;
  gap:24px!important;
  padding:24px 28px!important;
  border-radius:6px!important;
  background:var(--card)!important;
  border:1px solid #e4ebf3!important;
  box-shadow:none;
  margin-bottom:18px!important;
}
.admin-hero-panel h2{
  margin:6px 0 6px!important;
  font-size:28px!important;
  color:#232832!important;
  letter-spacing:-.04em!important;
}
.admin-hero-panel p{
  margin:0!important;
  color:#6b7076!important;
  font-size:15px!important;
}
.mini-kicker{
  display:inline-flex!important;
  align-items:center!important;
  padding:5px 10px!important;
  border-radius:999px!important;
  background:#dcebe7!important;
  color:#183a35!important;
  font-size:11px!important;
  font-weight:900!important;
  text-transform:uppercase!important;
  letter-spacing:.1em!important;
}
.admin-hero-actions{
  display:flex!important;
  gap:10px!important;
  flex-wrap:wrap!important;
  justify-content:flex-end!important;
}
.phase7-stat-grid{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:14px!important;
  margin-bottom:18px!important;
}
.admin-stat-card{
  padding:18px!important;
  border-radius:6px!important;
  background:#fff!important;
  border:1px solid #d2cabd!important;
  box-shadow:none;
}
.admin-stat-card span{
  display:block!important;
  font-size:11px!important;
  font-weight:900!important;
  color:#6b7076!important;
  text-transform:uppercase!important;
  letter-spacing:.08em!important;
  margin-bottom:10px!important;
}
.admin-stat-card strong{
  display:block!important;
  font-size:26px!important;
  line-height:1!important;
  color:#232832!important;
  letter-spacing:-.04em!important;
}
.admin-stat-card small{
  display:block!important;
  margin-top:8px!important;
  color:#183a35!important;
  font-size:12px!important;
  font-weight:700!important;
}
.admin-stat-card.warning-soft{
  background:#f7ecd2!important;
  border-color:#ddbf78!important;
}
.phase7-dashboard-grid{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:18px!important;
  margin-bottom:18px!important;
}
.phase7-panel{
  padding:0!important;
  overflow:hidden!important;
}
.clean-title-row{
  padding:20px 22px!important;
  border-bottom:1px solid #d2cabd!important;
  align-items:center!important;
}
.clean-title-row h3{
  margin:0 0 5px!important;
  font-size:18px!important;
  color:#232832!important;
}
.clean-title-row p{
  margin:0!important;
  color:#6b7076!important;
  font-size:13px!important;
}
.mini-list{
  padding:10px!important;
}
.mini-list-row{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  padding:13px!important;
  border-radius:6px!important;
  color:inherit!important;
  text-decoration:none!important;
  border:1px solid transparent!important;
}
.mini-list-row:hover{
  background:#fbf9f5!important;
  border-color:#d2cabd!important;
}
.mini-list-row strong{
  display:block!important;
  color:#232832!important;
  font-size:14px!important;
  margin-bottom:4px!important;
}
.mini-list-row span,
.mini-list-row small{
  color:#6b7076!important;
  font-size:12px!important;
  font-style:normal!important;
}
.mini-list-meta{
  text-align:right!important;
  flex:0 0 auto!important;
}
.mini-list-meta em{
  display:inline-flex!important;
  margin-bottom:6px!important;
  font-style:normal!important;
}
.mini-list-pagination{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  margin:0 10px 10px!important;
  padding:12px 3px 0!important;
  border-top:1px solid #d2cabd!important;
  color:#6b7076!important;
  font-size:11px!important;
}
.mini-list-pagination-links{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  white-space:nowrap!important;
}
.mini-list-pagination-links .btn{margin:0!important;}
.mini-empty{
  padding:20px!important;
  color:#6b7076!important;
  background:#fbf9f5!important;
  border:1px dashed #d2cabd!important;
  border-radius:6px!important;
  text-align:center!important;
}
.phase7-clients-card{
  overflow:hidden!important;
}
@media(max-width:1180px){
  .phase7-stat-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
  .phase7-dashboard-grid{grid-template-columns:1fr!important;}
}
@media(max-width:820px){
  .admin-hero-panel{display:block!important;}
  .admin-hero-actions{justify-content:flex-start!important;margin-top:16px!important;}
  .phase7-stat-grid{grid-template-columns:1fr 1fr!important;}
}
@media(max-width:560px){
  .phase7-stat-grid{grid-template-columns:1fr!important;}
  .mini-list-row{display:block!important;}
  .mini-list-meta{text-align:left!important;margin-top:10px!important;}
  .mini-list-pagination{align-items:flex-start!important;flex-direction:column!important;}
  .mini-list-pagination-links{width:100%!important;justify-content:space-between!important;}
}

/* Phase 8 — Admin Billing Centre */
.admin-billing-page .notice{margin-bottom:16px}
.billing-hero-panel{align-items:center}
.billing-stat-grid{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:18px}
.billing-stat-grid .admin-stat-card{text-decoration:none;color:inherit;transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease}
.billing-stat-grid .admin-stat-card:hover,.billing-stat-grid .admin-stat-card.active{transform:translateY(-2px);border-color:rgba(24,58,53,.35);box-shadow:none}
.danger-soft{background:#f5e2df}
.phase8-billing-grid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:18px;align-items:start}
.billing-centre-card{min-width:0}
.admin-billing-table td{vertical-align:middle}
.billing-actions{display:flex;align-items:center;gap:8px;flex-wrap:nowrap}
.inline-status-form select{height:34px;border:1px solid var(--line);border-radius:6px;background:#fff;padding:0 32px 0 10px;font-size:13px;font-weight:800;color:var(--ink)}
.billing-side-card{position:sticky;top:24px;padding:22px}
.billing-side-card h3{margin-top:10px;margin-bottom:8px}
.billing-side-card>p{color:var(--muted);margin:0 0 16px;line-height:1.45}
.billing-paid-list{margin-top:8px}
.billing-paid-list .mini-list-row{padding:12px 0;border-bottom:1px solid var(--line)}
.billing-paid-list .mini-list-row:last-child{border-bottom:0}
.billing-hint{margin-top:18px;padding:14px;border-radius:6px;background:#fbf9f5;border:1px solid var(--line)}
.billing-hint p{margin:6px 0 0;color:var(--muted);font-size:13px;line-height:1.45}
.status.cancelled{background:#d2cabd;color:#4e535b}
@media (max-width:1100px){.billing-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.phase8-billing-grid{grid-template-columns:1fr}.billing-side-card{position:static}}
@media (max-width:720px){.billing-stat-grid{grid-template-columns:1fr}.billing-actions{flex-direction:column;align-items:flex-start}.inline-status-form select{width:100%}}

/* Phase 8 clean-up — Admin Billing Centre tidy patch */
.admin-billing-page{
  max-width:1180px!important;
  margin:0 auto!important;
}
.admin-billing-page .page-head,
.admin-billing-page .page-header{
  margin-bottom:18px!important;
}
.billing-clean-hero{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:24px!important;
  padding:26px 28px!important;
  margin-bottom:18px!important;
  border:1px solid #e4ebf3!important;
  border-radius:6px!important;
  background:var(--card)!important;
  box-shadow:none;
}
.billing-clean-hero h2{
  margin:8px 0 7px!important;
  font-size:28px!important;
  line-height:1.05!important;
  letter-spacing:-.04em!important;
  color:#232832!important;
}
.billing-clean-hero p{
  margin:0!important;
  max-width:680px!important;
  font-size:15px!important;
  line-height:1.45!important;
  color:#6b7076!important;
}
.billing-clean-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:10px!important;
  flex-wrap:wrap!important;
  flex:0 0 auto!important;
}
.billing-clean-stats{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:14px!important;
  margin:0 0 18px!important;
  clear:both!important;
}
.billing-clean-stat{
  display:block!important;
  min-height:118px!important;
  padding:18px!important;
  border:1px solid #d2cabd!important;
  border-radius:6px!important;
  background:#fff!important;
  text-decoration:none!important;
  color:inherit!important;
  box-shadow:none;
  overflow:hidden!important;
}
.billing-clean-stat:hover,
.billing-clean-stat.is-active{
  transform:translateY(-2px)!important;
  border-color:rgba(24,58,53,.38)!important;
  box-shadow:none;
}
.billing-clean-stat.is-warning{background:#f7ecd2!important;border-color:#ddbf78!important;}
.billing-clean-stat.is-danger{background:#f5e2df!important;border-color:#dca49c!important;}
.billing-clean-stat span{
  display:block!important;
  margin-bottom:11px!important;
  font-size:11px!important;
  font-weight:900!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
  color:#6b7076!important;
}
.billing-clean-stat strong{
  display:block!important;
  font-size:30px!important;
  line-height:1!important;
  letter-spacing:-.05em!important;
  color:#232832!important;
}
.billing-clean-stat small{
  display:block!important;
  margin-top:9px!important;
  font-size:12px!important;
  font-weight:700!important;
  color:#183a35!important;
}
.billing-clean-card{
  padding:0!important;
  margin-bottom:18px!important;
  border:1px solid #e4ebf3!important;
  border-radius:6px!important;
  background:#fff!important;
  box-shadow:none;
  overflow:hidden!important;
}
.billing-clean-toolbar{
  display:flex!important;
  justify-content:space-between!important;
  align-items:center!important;
  gap:18px!important;
  padding:20px 22px!important;
  border-bottom:1px solid #d2cabd!important;
  background:var(--card)!important;
}
.billing-clean-toolbar h3,
.billing-clean-card h3{
  margin:0 0 5px!important;
  color:#232832!important;
  font-size:18px!important;
  letter-spacing:-.02em!important;
}
.billing-clean-toolbar p,
.billing-clean-card.compact p{
  margin:0!important;
  color:#6b7076!important;
  font-size:13px!important;
  line-height:1.45!important;
}
.billing-clean-search{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  flex-wrap:wrap!important;
}
.billing-clean-search input{
  width:280px!important;
  max-width:100%!important;
  height:38px!important;
  padding:0 14px!important;
  border:1px solid #d2cabd!important;
  border-radius:6px!important;
  background:#fff!important;
  color:#232832!important;
  font-size:13px!important;
}
.billing-clean-table-wrap{
  width:100%!important;
  overflow-x:auto!important;
}
.billing-clean-table{
  width:100%!important;
  border-collapse:collapse!important;
  table-layout:auto!important;
}
.billing-clean-table th{
  padding:14px 18px!important;
  background:#fbf9f5!important;
  border-bottom:1px solid #d2cabd!important;
  color:#6b7076!important;
  font-size:11px!important;
  font-weight:900!important;
  text-transform:uppercase!important;
  letter-spacing:.08em!important;
  text-align:left!important;
  white-space:nowrap!important;
}
.billing-clean-table td{
  padding:18px!important;
  border-bottom:1px solid #f4f0e8!important;
  color:#232832!important;
  font-size:14px!important;
  vertical-align:middle!important;
}
.billing-clean-table tr:last-child td{border-bottom:0!important;}
.billing-clean-table td span:not(.status){
  display:block!important;
  margin-top:4px!important;
  color:#6b7076!important;
  font-size:12px!important;
}
.billing-invoice-no strong,
.billing-amount strong{white-space:nowrap!important;}
.billing-invoice-no a{color:var(--admin-evergreen,#183a35)!important;text-decoration:underline!important;text-underline-offset:.16em!important;}
.billing-invoice-no a:hover{opacity:.78!important;}
.billing-clean-row-actions{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  flex-wrap:wrap!important;
}
.billing-clean-row-actions select{
  min-width:118px!important;
  height:38px!important;
  border:1px solid #d2cabd!important;
  border-radius:6px!important;
  background:#fff!important;
  color:#232832!important;
  font-size:13px!important;
  font-weight:800!important;
  padding:0 34px 0 12px!important;
}
.billing-clean-bottom-grid{
  display:grid!important;
  grid-template-columns:1.35fr .85fr!important;
  gap:18px!important;
}
.billing-clean-card.compact{
  padding:22px!important;
}
.billing-paid-list-clean{
  margin-top:14px!important;
}
.billing-paid-row{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:16px!important;
  padding:13px 0!important;
  border-bottom:1px solid #f4f0e8!important;
}
.billing-paid-row:last-child{border-bottom:0!important;}
.billing-paid-row strong{color:#232832!important;}
.billing-paid-row span{
  display:block!important;
  margin-top:4px!important;
  color:#6b7076!important;
  font-size:12px!important;
}
.billing-clean-card.soft-note{
  background:var(--card)!important;
}
.status.cancelled{background:#d2cabd!important;color:#4e535b!important;}
@media(max-width:1100px){
  .billing-clean-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .billing-clean-bottom-grid{grid-template-columns:1fr!important;}
}
@media(max-width:820px){
  .billing-clean-hero,
  .billing-clean-toolbar{display:block!important;}
  .billing-clean-actions,
  .billing-clean-search{justify-content:flex-start!important;margin-top:16px!important;}
  .billing-clean-search input{width:100%!important;}
}
@media(max-width:560px){
  .billing-clean-stats{grid-template-columns:1fr!important;}
  .billing-clean-table th,
  .billing-clean-table td{padding:14px!important;}
}



/* Phase 8 final billing alignment - match Admin Dashboard / Support page */
.admin-billing-page{
  max-width:1180px!important;
  width:100%!important;
  margin:0 auto!important;
  position:static!important;
  left:auto!important;
  transform:none!important;
}
.admin-billing-page .billing-clean-hero,
.admin-billing-page .billing-clean-stats,
.admin-billing-page .billing-clean-card,
.admin-billing-page .billing-clean-bottom-grid{
  width:100%!important;
}
.admin-billing-page .page-header,
.admin-billing-page .page-head{
  max-width:1180px!important;
}

/* Phase 8 — invoice action tidy */
.billing-clean-table th:last-child,
.billing-clean-table td:last-child{
  min-width:260px!important;
}
.billing-clean-row-actions{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  flex-wrap:nowrap!important;
  white-space:nowrap!important;
}
.billing-clean-row-actions .btn-small{
  height:34px!important;
  min-width:auto!important;
  padding:0 13px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
}
.billing-clean-row-actions select{
  min-width:122px!important;
  height:38px!important;
  flex:0 0 auto!important;
}
@media (max-width: 900px){
  .billing-clean-row-actions{flex-wrap:wrap!important;}
  .billing-clean-table th:last-child,
  .billing-clean-table td:last-child{min-width:220px!important;}
}

/* Admin printable invoice */
.invoice-print-body{
  background:#e4ebf3!important;
  color:#232832!important;
  font-family:Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif!important;
}
.invoice-print-page{
  max-width:900px!important;
  margin:40px auto!important;
  padding:0 22px!important;
}
.invoice-print-actions{
  display:flex!important;
  justify-content:flex-end!important;
  gap:10px!important;
  margin-bottom:18px!important;
}
.invoice-sheet{
  background:#fff!important;
  border:1px solid #e4ebf3!important;
  border-radius:6px!important;
  box-shadow:none;
  padding:42px!important;
}
.invoice-sheet-head{
  display:flex!important;
  justify-content:space-between!important;
  gap:24px!important;
  align-items:flex-start!important;
  padding-bottom:26px!important;
  border-bottom:1px solid #d2cabd!important;
}
.invoice-sheet-head h1{
  margin:4px 0 6px!important;
  font-size:42px!important;
  line-height:1!important;
  letter-spacing:-.05em!important;
}
.invoice-sheet-head p,
.invoice-meta-grid p,
.invoice-sheet-foot p{
  color:#6b7076!important;
  margin:0!important;
}
.invoice-status-block{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-end!important;
  gap:12px!important;
}
.invoice-status-block strong{
  font-size:30px!important;
  letter-spacing:-.04em!important;
}
.invoice-meta-grid{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:18px!important;
  margin:28px 0!important;
}
.invoice-meta-grid>div{
  border:1px solid #d2cabd!important;
  border-radius:6px!important;
  padding:18px!important;
  background:#fbf9f5!important;
}
.invoice-meta-grid span{
  display:block!important;
  color:#6b7076!important;
  font-size:11px!important;
  font-weight:900!important;
  text-transform:uppercase!important;
  letter-spacing:.08em!important;
  margin-bottom:8px!important;
}
.invoice-meta-grid strong{
  display:block!important;
  font-size:18px!important;
  margin-bottom:8px!important;
}
.invoice-print-table{
  width:100%!important;
  border-collapse:collapse!important;
  margin-top:22px!important;
}
.invoice-print-table th,
.invoice-print-table td{
  padding:16px!important;
  border-bottom:1px solid #d2cabd!important;
  text-align:left!important;
}
.invoice-print-table th{
  background:#fbf9f5!important;
  color:#6b7076!important;
  font-size:11px!important;
  font-weight:900!important;
  text-transform:uppercase!important;
  letter-spacing:.08em!important;
}
.invoice-print-table .right{text-align:right!important;}
.invoice-print-table tfoot td{
  font-size:18px!important;
  font-weight:900!important;
  border-bottom:0!important;
}
.invoice-sheet-foot{
  display:flex!important;
  justify-content:space-between!important;
  gap:20px!important;
  margin-top:34px!important;
  padding-top:18px!important;
  border-top:1px solid #d2cabd!important;
  font-size:13px!important;
}
@media print{
  @page{margin:16mm;}
  .no-print{display:none!important;}
  .invoice-print-body{background:#fff!important;}
  .invoice-print-page{margin:0!important;max-width:none!important;padding:0!important;}
  .invoice-sheet{box-shadow:none;border:0!important;border-radius:0!important;padding:0!important;}
}
@media screen and (max-width: 720px){
  .invoice-sheet{padding:26px!important;}
  .invoice-sheet-head,
  .invoice-sheet-foot{flex-direction:column!important;}
  .invoice-status-block{align-items:flex-start!important;}
  .invoice-meta-grid{grid-template-columns:1fr!important;}
}

/* Phase 17 - client billing sequence, fitted table and editable status */
.client-section-grid.client-billing-grid{
  grid-template-columns:minmax(285px,.72fr) minmax(0,1.78fr)!important;
}
.invoice-number-help{
  display:block;
  margin-top:6px;
  color:#183a35;
  font-size:11px;
  line-height:1.3;
}
.client-billing-card,
.client-billing-table-wrap{overflow:visible!important;}
.client-billing-table{
  width:100%!important;
  min-width:0!important;
  table-layout:fixed!important;
}
.client-billing-table th,
.client-billing-table td{
  padding:14px 10px!important;
  font-size:12px!important;
  vertical-align:middle!important;
}
.client-billing-table th:nth-child(1),.client-billing-table td:nth-child(1){width:17%!important;}
.client-billing-table th:nth-child(2),.client-billing-table td:nth-child(2){width:14%!important;}
.client-billing-table th:nth-child(3),.client-billing-table td:nth-child(3){width:27%!important;}
.client-billing-table th:nth-child(4),.client-billing-table td:nth-child(4){width:13%!important;}
.client-billing-table th:nth-child(5),.client-billing-table td:nth-child(5){width:20%!important;}
.client-billing-table th:nth-child(6),.client-billing-table td:nth-child(6){width:9%!important;}
.client-billing-table td:nth-child(1),
.client-billing-description{
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.client-billing-status-form{margin:0!important;}
.client-billing-status{
  width:100%!important;
  min-width:0!important;
  height:38px!important;
  padding:0 26px 0 10px!important;
  border:1px solid #e4ebf3!important;
  border-radius:6px!important;
  font-size:12px!important;
  font-weight:850!important;
}
.client-billing-status.paid{background:#e3efe8!important;color:#24543a!important;border-color:#e3efe8!important;}
.client-billing-status.pending{background:#f7ecd2!important;color:#6f4a10!important;border-color:#ddbf78!important;}
.client-billing-status.overdue{background:#f5e2df!important;color:#8a2d27!important;border-color:#dca49c!important;}
.client-billing-status.cancelled{background:#e4ebf3!important;color:#294a68!important;border-color:#d2cabd!important;}
.client-billing-action-cell{position:relative!important;text-align:center!important;overflow:visible!important;}
.client-billing-menu{display:inline-block!important;}
.client-billing-menu summary{width:38px!important;height:38px!important;}
.client-billing-menu .billing-action-menu-panel{right:0!important;text-align:left!important;}
.client-billing-menu form{margin:0!important;}
.billing-action-danger{
  appearance:none;
  display:block;
  width:100%;
  padding:10px 11px;
  border:0;
  border-radius:6px;
  background:transparent;
  color:#8a2d27;
  text-align:left;
  font:inherit;
  font-size:13px;
  font-weight:850;
  cursor:pointer;
}
.billing-action-danger:hover{background:#f5e2df;}
@media print{
  .invoice-sheet-head{display:flex!important;flex-direction:row!important;justify-content:space-between!important;align-items:flex-start!important;}
  .invoice-status-block{align-items:flex-end!important;text-align:right!important;margin-left:auto!important;}
}
@media(max-width:1150px){
  .client-section-grid.client-billing-grid{grid-template-columns:1fr!important;}
}
@media(max-width:760px){
  .client-billing-table-wrap{overflow-x:auto!important;}
  .client-billing-table{min-width:720px!important;}
}


/* Phase 8 — make Billing History fit without horizontal scroll */
.admin-billing-page .billing-clean-card{
  overflow:hidden!important;
}
.admin-billing-page .billing-clean-table-wrap{
  width:100%!important;
  overflow-x:visible!important;
}
.admin-billing-page .billing-clean-table{
  width:100%!important;
  min-width:0!important;
  table-layout:fixed!important;
}
.admin-billing-page .billing-clean-table th,
.admin-billing-page .billing-clean-table td{
  padding:22px 16px!important;
  font-size:14px!important;
  vertical-align:middle!important;
}
.admin-billing-page .billing-clean-table th:nth-child(1),
.admin-billing-page .billing-clean-table td:nth-child(1){width:12%!important;}
.admin-billing-page .billing-clean-table th:nth-child(2),
.admin-billing-page .billing-clean-table td:nth-child(2){width:17%!important;}
.admin-billing-page .billing-clean-table th:nth-child(3),
.admin-billing-page .billing-clean-table td:nth-child(3){width:10%!important;}
.admin-billing-page .billing-clean-table th:nth-child(4),
.admin-billing-page .billing-clean-table td:nth-child(4){width:25%!important;}
.admin-billing-page .billing-clean-table th:nth-child(5),
.admin-billing-page .billing-clean-table td:nth-child(5){width:9%!important;}
.admin-billing-page .billing-clean-table th:nth-child(6),
.admin-billing-page .billing-clean-table td:nth-child(6){width:9%!important;}
.admin-billing-page .billing-clean-table th:nth-child(7),
.admin-billing-page .billing-clean-table td:nth-child(7){width:18%!important; min-width:0!important;}
.admin-billing-page .billing-clean-table td:nth-child(4),
.admin-billing-page .billing-clean-table td:nth-child(2){
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.admin-billing-page .billing-clean-row-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:7px!important;
  flex-wrap:nowrap!important;
  white-space:nowrap!important;
  max-width:100%!important;
}
.admin-billing-page .billing-clean-row-actions select{
  min-width:104px!important;
  width:104px!important;
  height:36px!important;
  font-size:13px!important;
  padding:0 26px 0 10px!important;
}
.admin-billing-page .billing-clean-row-actions .btn-small{
  height:36px!important;
  min-width:50px!important;
  padding:0 10px!important;
  font-size:13px!important;
}
.admin-billing-page .billing-clean-row-actions .btn-small[href*="invoice-print"]{
  min-width:48px!important;
}
@media (max-width:1180px){
  .admin-billing-page .billing-clean-table-wrap{overflow-x:auto!important;}
  .admin-billing-page .billing-clean-table{min-width:1040px!important;}
}


/* Phase 8 — compact invoice action menu */
.admin-billing-page .billing-clean-table th:nth-child(7),
.admin-billing-page .billing-clean-table td:nth-child(7){
  width:13%!important;
  min-width:0!important;
}
.admin-billing-page .billing-clean-table th:nth-child(4),
.admin-billing-page .billing-clean-table td:nth-child(4){width:30%!important;}
.admin-billing-page .billing-clean-table-wrap{
  overflow-x:visible!important;
}
.admin-billing-page .billing-clean-table{
  min-width:0!important;
}
.admin-billing-page .billing-clean-row-actions{
  gap:10px!important;
  position:relative!important;
}
.admin-billing-page .billing-clean-row-actions select{
  width:112px!important;
  min-width:112px!important;
}
.billing-action-menu{
  position:relative!important;
  flex:0 0 auto!important;
}
.billing-action-menu summary{
  list-style:none!important;
  width:40px!important;
  height:36px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:1px solid #d2cabd!important;
  border-radius:6px!important;
  background:#fff!important;
  color:#232832!important;
  font-size:18px!important;
  font-weight:900!important;
  line-height:1!important;
  cursor:pointer!important;
  box-shadow:0 8px 20px rgba(35,40,50,.04)!important;
}
.billing-action-menu summary::-webkit-details-marker{display:none!important;}
.billing-action-menu[open] summary,
.billing-action-menu summary:hover{
  border-color:rgba(24,58,53,.55)!important;
  box-shadow:0 10px 26px rgba(24,58,53,.13)!important;
}
.billing-action-menu-panel{
  position:absolute!important;
  right:0!important;
  top:44px!important;
  z-index:30!important;
  min-width:160px!important;
  padding:8px!important;
  border:1px solid #e4ebf3!important;
  border-radius:6px!important;
  background:#fff!important;
  box-shadow:0 20px 46px rgba(35,40,50,.16)!important;
}
.billing-action-menu-panel a{
  display:block!important;
  padding:10px 11px!important;
  border-radius:6px!important;
  color:#232832!important;
  text-decoration:none!important;
  font-size:13px!important;
  font-weight:850!important;
  white-space:nowrap!important;
}
.billing-action-menu-panel a:hover{
  background:#e4ebf3!important;
  color:#183a35!important;
}
@media (max-width:1180px){
  .admin-billing-page .billing-clean-table-wrap{overflow-x:auto!important;}
  .admin-billing-page .billing-clean-table{min-width:920px!important;}
}

/* Phase 8 — final Billing History fit: keep status + three-dot menu inside the card */
.admin-billing-page .billing-clean-table-wrap{
  overflow-x:visible!important;
}
.admin-billing-page .billing-clean-table{
  width:100%!important;
  min-width:0!important;
  table-layout:fixed!important;
}
.admin-billing-page .billing-clean-table th,
.admin-billing-page .billing-clean-table td{
  padding:18px 12px!important;
  font-size:13px!important;
  line-height:1.25!important;
}
.admin-billing-page .billing-clean-table th:nth-child(1),
.admin-billing-page .billing-clean-table td:nth-child(1){width:12%!important;}
.admin-billing-page .billing-clean-table th:nth-child(2),
.admin-billing-page .billing-clean-table td:nth-child(2){width:16%!important;}
.admin-billing-page .billing-clean-table th:nth-child(3),
.admin-billing-page .billing-clean-table td:nth-child(3){width:10%!important;}
.admin-billing-page .billing-clean-table th:nth-child(4),
.admin-billing-page .billing-clean-table td:nth-child(4){width:32%!important;}
.admin-billing-page .billing-clean-table th:nth-child(5),
.admin-billing-page .billing-clean-table td:nth-child(5){width:8%!important;}
.admin-billing-page .billing-clean-table th:nth-child(6),
.admin-billing-page .billing-clean-table td:nth-child(6){width:7%!important;}
.admin-billing-page .billing-clean-table th:nth-child(7),
.admin-billing-page .billing-clean-table td:nth-child(7){width:15%!important;}
.admin-billing-page .billing-clean-table td:nth-child(1),
.admin-billing-page .billing-clean-table td:nth-child(2),
.admin-billing-page .billing-clean-table td:nth-child(3),
.admin-billing-page .billing-clean-table td:nth-child(4){
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.admin-billing-page .billing-clean-table td:nth-child(4){
  white-space:nowrap!important;
}
.admin-billing-page .billing-clean-table td:nth-child(2) strong,
.admin-billing-page .billing-clean-table td:nth-child(2) span{
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.admin-billing-page .billing-clean-row-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:6px!important;
  flex-wrap:nowrap!important;
  white-space:nowrap!important;
  max-width:100%!important;
}
.admin-billing-page .billing-clean-row-actions select{
  width:96px!important;
  min-width:96px!important;
  height:34px!important;
  padding:0 24px 0 9px!important;
  border-radius:6px!important;
  font-size:12px!important;
}
.admin-billing-page .billing-action-menu summary{
  width:34px!important;
  height:34px!important;
  border-radius:6px!important;
  font-size:16px!important;
}
.admin-billing-page .billing-action-menu-panel{
  right:0!important;
  top:40px!important;
}
.admin-billing-page .status{
  padding:7px 10px!important;
  font-size:12px!important;
  line-height:1!important;
  white-space:nowrap!important;
}
@media (max-width:980px){
  .admin-billing-page .billing-clean-table-wrap{overflow-x:auto!important;}
  .admin-billing-page .billing-clean-table{min-width:900px!important;}
}

/* Phase 8 final billing table fit: split status dropdown and actions */
.admin-billing-page .billing-clean-table-wrap{
  overflow-x: visible !important;
}

.admin-billing-page .billing-clean-table{
  width:100% !important;
  min-width:0 !important;
  table-layout:fixed !important;
}

.admin-billing-page .billing-clean-table th,
.admin-billing-page .billing-clean-table td{
  padding:24px 18px !important;
  vertical-align:middle !important;
}

.admin-billing-page .billing-clean-table th:nth-child(1),
.admin-billing-page .billing-clean-table td:nth-child(1){width:13% !important;}
.admin-billing-page .billing-clean-table th:nth-child(2),
.admin-billing-page .billing-clean-table td:nth-child(2){width:17% !important;}
.admin-billing-page .billing-clean-table th:nth-child(3),
.admin-billing-page .billing-clean-table td:nth-child(3){width:10% !important;}
.admin-billing-page .billing-clean-table th:nth-child(4),
.admin-billing-page .billing-clean-table td:nth-child(4){width:31% !important;}
.admin-billing-page .billing-clean-table th:nth-child(5),
.admin-billing-page .billing-clean-table td:nth-child(5){width:9% !important;}
.admin-billing-page .billing-clean-table th:nth-child(6),
.admin-billing-page .billing-clean-table td:nth-child(6){width:12% !important;}
.admin-billing-page .billing-clean-table th:nth-child(7),
.admin-billing-page .billing-clean-table td:nth-child(7){width:8% !important;}

.admin-billing-page .billing-clean-table td:nth-child(1),
.admin-billing-page .billing-clean-table td:nth-child(2),
.admin-billing-page .billing-clean-table td:nth-child(3),
.admin-billing-page .billing-clean-table td:nth-child(4){
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
.admin-billing-page .billing-clean-table td:nth-child(4){white-space:nowrap !important;}
.admin-billing-page .billing-clean-table td:nth-child(2) strong,
.admin-billing-page .billing-clean-table td:nth-child(2) span{
  display:block !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}

.admin-billing-page .billing-status-form{margin:0 !important;}
.admin-billing-page .billing-status-select{
  width:128px !important;
  max-width:100% !important;
  height:44px !important;
  border-radius:6px !important;
  border:1px solid #e4ebf3 !important;
  background:#fff !important;
  padding:0 36px 0 14px !important;
  font-size:14px !important;
  font-weight:800 !important;
  color:#232832 !important;
}
.admin-billing-page .billing-status-select.paid{background:#e3efe8 !important;color:#24543a !important;border-color:#e3efe8 !important;}
.admin-billing-page .billing-status-select.pending{background:#f7ecd2 !important;color:#6f4a10 !important;border-color:#ddbf78 !important;}
.admin-billing-page .billing-status-select.overdue{background:#f5e2df !important;color:#8a2d27 !important;border-color:#dca49c !important;}
.admin-billing-page .billing-status-select.cancelled{background:#e4ebf3 !important;color:#294a68 !important;border-color:#d2cabd !important;}

.admin-billing-page .billing-dot-only{
  justify-content:flex-start !important;
  gap:0 !important;
  min-width:0 !important;
}
.admin-billing-page .billing-dot-only .billing-action-menu summary{
  width:44px !important;
  height:44px !important;
  min-width:44px !important;
  padding:0 !important;
  display:grid !important;
  place-items:center !important;
}
.admin-billing-page .billing-action-menu-panel{
  right:0 !important;
}

@media (max-width: 1180px){
  .admin-billing-page .billing-clean-table-wrap{overflow-x:auto !important;}
  .admin-billing-page .billing-clean-table{min-width:900px !important;}
}

/* Invoice email actions: preserve both the labelled action and overflow menu. */
.client-first-page .client-billing-table-wrap{
  overflow-x:auto !important;
}
.client-first-page .client-billing-table{
  min-width:760px !important;
  table-layout:fixed !important;
}
.client-first-page .client-billing-table th:nth-child(1),
.client-first-page .client-billing-table td:nth-child(1){width:15% !important;}
.client-first-page .client-billing-table th:nth-child(2),
.client-first-page .client-billing-table td:nth-child(2){width:12% !important;}
.client-first-page .client-billing-table th:nth-child(3),
.client-first-page .client-billing-table td:nth-child(3){width:24% !important;}
.client-first-page .client-billing-table th:nth-child(4),
.client-first-page .client-billing-table td:nth-child(4){width:11% !important;}
.client-first-page .client-billing-table th:nth-child(5),
.client-first-page .client-billing-table td:nth-child(5){width:16% !important;}
.client-first-page .client-billing-table th:nth-child(6),
.client-first-page .client-billing-table td:nth-child(6){width:22% !important;}
.client-first-page .client-billing-action-cell .client-billing-row-actions{
  align-items:center !important;
  flex-wrap:nowrap !important;
  gap:6px !important;
  justify-content:flex-end !important;
}
.client-first-page .client-billing-action-cell .client-billing-row-actions form{
  margin:0 !important;
}
.client-first-page .client-billing-action-cell .btn-small{
  white-space:nowrap !important;
}
.admin-billing-page .billing-clean-table-wrap{
  overflow-x:auto !important;
}
.admin-billing-page .billing-clean-table{
  min-width:1080px !important;
  table-layout:fixed !important;
}
.admin-billing-page .billing-clean-table th:nth-child(1),
.admin-billing-page .billing-clean-table td:nth-child(1){width:12% !important;}
.admin-billing-page .billing-clean-table th:nth-child(2),
.admin-billing-page .billing-clean-table td:nth-child(2){width:16% !important;}
.admin-billing-page .billing-clean-table th:nth-child(3),
.admin-billing-page .billing-clean-table td:nth-child(3){width:9% !important;}
.admin-billing-page .billing-clean-table th:nth-child(4),
.admin-billing-page .billing-clean-table td:nth-child(4){width:25% !important;}
.admin-billing-page .billing-clean-table th:nth-child(5),
.admin-billing-page .billing-clean-table td:nth-child(5){width:8% !important;}
.admin-billing-page .billing-clean-table th:nth-child(6),
.admin-billing-page .billing-clean-table td:nth-child(6){width:12% !important;}
.admin-billing-page .billing-clean-table th:nth-child(7),
.admin-billing-page .billing-clean-table td:nth-child(7){width:18% !important;}
.admin-billing-page .billing-clean-row-actions{
  align-items:center !important;
  flex-wrap:nowrap !important;
  gap:6px !important;
  white-space:nowrap !important;
}
.admin-billing-page .billing-clean-row-actions form{
  margin:0 !important;
}

/* Phase 9 — Admin Hosting Centre */
.admin-services-page .services-hero-panel,
.admin-services-page .services-filter-card,
.admin-services-page .service-centre-card {
  overflow: visible;
}

.services-stat-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 14px !important;
  margin-bottom: 18px !important;
}

.admin-services-page .services-stat-grid .admin-stat-card {
  min-height: 104px !important;
}

.services-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
  gap: 22px;
  align-items: start;
  margin-top: 22px;
}

.service-centre-card .card-title-row {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
}

.service-list {
  display: grid;
  gap: 0;
}

.service-health-row,
.domain-health-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.service-health-row:last-child,
.domain-health-row:last-child {
  border-bottom: 0;
}

.service-row-top {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 5px;
}

.service-row-top strong {
  font-size: 1.02rem;
  color: var(--ink);
}

.service-health-row p,
.domain-health-row p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.35;
}

.service-mini-grid,
.domain-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.service-mini-grid span,
.domain-meta-row span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbf9f5;
  color: var(--muted);
  font-size: .82rem;
}

.service-mini-grid b,
.domain-meta-row b {
  color: var(--ink);
}

.disk-meter {
  width: 100%;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #f4f0e8;
  margin: 4px 0 8px;
}

.disk-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #24543a;
}

.disk-meter span.warning {
  background: #ddbf78;
}

.disk-meter span.danger {
  background: #dca49c;
}

.service-health-row small {
  color: var(--muted);
  font-weight: 700;
}

.services-filter-card .support-search-form select {
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid #e4ebf3;
  background: #fff;
  padding: 0 14px;
  color: var(--ink);
  font-weight: 700;
}

@media (max-width: 1150px) {
  .services-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .services-two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .services-stat-grid {
    grid-template-columns: 1fr !important;
  }
  .service-health-row,
  .domain-health-row {
    grid-template-columns: 1fr;
  }
  .service-health-row .btn,
  .domain-health-row .btn {
    width: fit-content;
  }
}


/* Phase 9 force fix — Hosting stats across */
.admin-services-page .services-stat-grid{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:18px!important;width:100%!important;margin:0 0 22px!important;align-items:stretch!important;}
.admin-services-page .services-stat-grid>.admin-stat-card{width:auto!important;max-width:none!important;min-width:0!important;margin:0!important;min-height:112px!important;display:flex!important;flex-direction:column!important;justify-content:center!important;}
@media(max-width:1150px){.admin-services-page .services-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}}
@media(max-width:720px){.admin-services-page .services-stat-grid{grid-template-columns:1fr!important;}}

/* Phase 10 - Client-first admin layout */
.client-first-page{
  max-width:1260px!important;
}
.client-first-hero{
  display:flex!important;
  justify-content:space-between!important;
  align-items:center!important;
  gap:22px!important;
  padding:24px 28px!important;
  margin:14px 0 18px!important;
  border-radius:6px!important;
  background:var(--card)!important;
  border:1px solid rgba(35,40,50,.07)!important;
  box-shadow:none;
}
.client-first-hero h2{
  margin:8px 0 6px!important;
  color:#232832!important;
  font-size:30px!important;
  letter-spacing:-.055em!important;
  line-height:1!important;
}
.client-first-hero p{
  margin:0!important;
  color:#6b7076!important;
  font-weight:700!important;
}
.pill-label,
.client-plan-pill{
  display:inline-flex!important;
  align-items:center!important;
  width:max-content!important;
  border-radius:999px!important;
  padding:7px 10px!important;
  background:#dcebe7!important;
  color:#183a35!important;
  font-size:11px!important;
  font-weight:900!important;
  text-transform:uppercase!important;
  letter-spacing:.08em!important;
}
.client-first-actions{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  flex-wrap:wrap!important;
  justify-content:flex-end!important;
}
.client-first-stats{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:14px!important;
  margin:0 0 18px!important;
}
.client-first-stats .stat-card{
  display:block!important;
  background:#fff!important;
  border:1px solid rgba(35,40,50,.06)!important;
  border-radius:6px!important;
  padding:18px 20px!important;
  box-shadow:none;
  text-decoration:none!important;
  color:#232832!important;
  min-height:122px!important;
}
.client-first-stats .stat-card.warn{
  background:#f7ecd2!important;
  border-color:#ddbf78!important;
}
.client-first-stats .stat-card span,
.mini-data-card span{
  display:block!important;
  color:#6b7076!important;
  font-weight:900!important;
  font-size:12px!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
  margin-bottom:10px!important;
}
.client-first-stats .stat-card strong,
.mini-data-card strong{
  display:block!important;
  color:#232832!important;
  font-size:30px!important;
  line-height:1!important;
  letter-spacing:-.045em!important;
  margin-bottom:8px!important;
}
.client-first-stats .stat-card small,
.mini-data-card small{
  display:block!important;
  color:#183a35!important;
  font-size:13px!important;
  font-weight:800!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.client-section-tabs{
  display:flex!important;
  gap:8px!important;
  flex-wrap:wrap!important;
  background:#fff!important;
  border:1px solid rgba(35,40,50,.06)!important;
  border-radius:6px!important;
  padding:8px!important;
  margin:0 0 18px!important;
  box-shadow:none;
}
.client-section-tabs a{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:40px!important;
  padding:0 15px!important;
  border-radius:6px!important;
  color:#4e535b!important;
  text-decoration:none!important;
  font-weight:900!important;
  font-size:13px!important;
}
.client-section-tabs a.active,
.client-section-tabs a:hover{
  background:#183a35!important;
  color:#fff!important;
  box-shadow:none;
}
.client-section-grid{
  display:grid!important;
  grid-template-columns:minmax(300px, .75fr) minmax(0, 1.65fr)!important;
  gap:18px!important;
  align-items:start!important;
  margin-bottom:18px!important;
}
.client-section-grid.three{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
.client-section-grid.client-notes-grid{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
}
.compact-section-form{
  height:auto!important;
  min-height:0!important;
}
.compact-section-form .stacked-form{
  padding:16px!important;
}
.phase10-profile-form{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:14px!important;
}
.phase10-profile-form .form-actions{
  grid-column:1 / -1!important;
}
.password-reset-panel{
  padding:24px!important;
}
.password-reset-panel h3{
  margin:10px 0 7px!important;
  font-size:20px!important;
  letter-spacing:-.035em!important;
}
.password-reset-panel p{
  color:#6b7076!important;
  margin:0 0 16px!important;
  font-weight:700!important;
  line-height:1.45!important;
}
.mini-data-card{
  padding:20px!important;
  border-radius:6px!important;
}
.mini-data-card strong{
  font-size:21px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.client-first-actions-cell{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  flex-wrap:wrap!important;
}
.client-first-actions-cell form{margin:0!important;}
.status.picked{
  background:#e4ebf3!important;
  color:#294a68!important;
}
.client-first-page .table-wrap table td,
.client-first-page .table-wrap table th{
  vertical-align:middle!important;
}
@media(max-width:1150px){
  .client-first-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .client-section-grid,.client-section-grid.client-notes-grid{grid-template-columns:1fr!important;}
  .phase10-profile-form{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:720px){
  .client-first-hero{display:block!important;}
  .client-first-actions{justify-content:flex-start!important;margin-top:14px!important;}
  .client-first-stats,.client-section-grid.three,.phase10-profile-form{grid-template-columns:1fr!important;}
  .client-section-tabs{overflow:auto!important;flex-wrap:nowrap!important;}
  .client-section-tabs a{white-space:nowrap!important;}
}

/* Phase 10B — client-first admin tidy */
.client-table-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end;}
.client-table-actions .btn{white-space:nowrap;}
.admin-dashboard-page .admin-hero-panel,
.admin-billing-page .billing-clean-hero,
.admin-services-page .admin-hero-panel,
.admin-support-page .admin-hero-panel{border:1px solid rgba(182,143,80,.14);}
.client-first-page .client-section-tabs{position:sticky;top:0;z-index:5;background:rgba(251,249,245,.92);backdrop-filter:blur(12px);padding:10px;border-radius:6px;border:1px solid rgba(210,202,189,.7);box-shadow:none;}
.client-first-page .client-section-tabs a{font-weight:900;}
.client-first-page .client-first-hero{border:1px solid rgba(182,143,80,.18);}
.watchlist-note{font-size:13px;color:#183a35;margin-top:6px;}
@media (max-width: 980px){.client-table-actions{justify-content:flex-start}.client-table-actions .btn{flex:1;text-align:center}.client-first-page .client-section-tabs{position:relative;top:auto;}}

/* Phase 10B profile clean-up — calmer client overview */
.client-overview-clean-grid{
  display:grid!important;
  grid-template-columns:minmax(0,1.35fr) minmax(320px,.75fr)!important;
  gap:18px!important;
  align-items:start!important;
  margin-bottom:18px!important;
}
.clean-client-profile-card{
  padding:0!important;
  overflow:hidden!important;
}
.clean-profile-head{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:18px!important;
  padding:22px 24px!important;
  border-bottom:1px solid #d2cabd!important;
  background:var(--card)!important;
}
.clean-profile-head h3{
  margin:7px 0 5px!important;
  font-size:22px!important;
  letter-spacing:-.04em!important;
}
.clean-profile-head p{
  margin:0!important;
  color:#6b7076!important;
  font-weight:700!important;
  line-height:1.45!important;
}
.clean-login-toggle{
  flex:0 0 auto!important;
  min-width:190px!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  border:1px solid #e4ebf3!important;
  border-radius:6px!important;
  background:#fff!important;
  padding:12px 14px!important;
  box-shadow:none;
  cursor:pointer!important;
  color:#232832!important;
}
.clean-login-toggle input{
  width:18px!important;
  height:18px!important;
  min-height:0!important;
  accent-color:#183a35!important;
}
.clean-login-toggle strong{
  display:block!important;
  font-size:13px!important;
  line-height:1.1!important;
}
.clean-login-toggle small{
  display:block!important;
  margin-top:3px!important;
  font-size:11px!important;
  color:#6b7076!important;
  font-weight:800!important;
}
.clean-profile-form{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:14px 16px!important;
  padding:22px 24px 24px!important;
}
.clean-profile-form .form-group{
  margin:0!important;
}
.clean-profile-form .form-group.wide{
  grid-column:span 1!important;
}
.clean-profile-form label{
  color:#232832!important;
  font-size:12px!important;
  font-weight:900!important;
}
.clean-profile-form input{
  width:100%!important;
  min-height:46px!important;
  border-radius:6px!important;
  color:#232832!important;
  background:#fff!important;
  border:1px solid #d2cabd!important;
  padding:12px 14px!important;
  font-size:14px!important;
  box-shadow:none;
}
.clean-profile-form input:focus{
  border-color:#183a35!important;
  box-shadow:none;
}
.clean-profile-actions{
  grid-column:1 / -1!important;
  display:flex!important;
  justify-content:flex-start!important;
  padding-top:4px!important;
}
.clean-security-card{
  padding:22px!important;
  border:1px solid rgba(24,58,53,.12)!important;
  background:var(--card)!important;
}
.clean-security-card h3{
  margin:10px 0 8px!important;
  font-size:21px!important;
  letter-spacing:-.04em!important;
}
.clean-security-card p{
  margin:0 0 18px!important;
  color:#6b7076!important;
  font-weight:700!important;
  line-height:1.5!important;
}
.clean-security-card .form-group{
  margin-bottom:12px!important;
}
.clean-security-card input{
  min-height:46px!important;
  border-radius:6px!important;
  color:#232832!important;
  background:#fff!important;
  border:1px solid #d2cabd!important;
}
.clean-security-card .btn-outline{
  min-height:42px!important;
}
@media(max-width:1100px){
  .client-overview-clean-grid{grid-template-columns:1fr!important;}
  .clean-login-toggle{min-width:0!important;}
}
@media(max-width:720px){
  .clean-profile-head{display:block!important;}
  .clean-login-toggle{margin-top:14px!important;}
  .clean-profile-form{grid-template-columns:1fr!important;}
}


/* Phase 11 - Website Updates / Logs Centre */
.side-nav a[href="updates.php"]{ }
.updates-centre-page .admin-hero,
.updates-centre-page .admin-filter-card,
.updates-centre-page .updates-log-card{max-width:1160px;margin-left:auto;margin-right:auto;}
.updates-stats-row{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:18px!important;max-width:1160px;margin:18px auto!important;}
.updates-filter-card{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 24px!important;}
.updates-filter-card h3{margin:0 0 4px;font-size:20px;letter-spacing:-.03em;}
.updates-filter-card p{margin:0;color:#6b7076;}
.updates-filter-card .admin-search-form{display:flex;gap:10px;align-items:center;flex-wrap:wrap;justify-content:flex-end;}
.updates-filter-card .admin-search-form input{min-width:280px;}
.updates-log-card{overflow:hidden;}
.admin-update-log-list{display:flex;flex-direction:column;}
.admin-update-row{display:grid;grid-template-columns:86px minmax(0,1fr) auto;gap:18px;align-items:flex-start;padding:22px 24px;border-top:1px solid #d2cabd;background:#fff;}
.admin-update-row:first-child{border-top:0;}
.update-date-box{width:70px;min-height:70px;border-radius:6px;background:#fbf9f5;border:1px solid #e4ebf3;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;}
.update-date-box strong{font-size:26px;line-height:1;color:#232832;}
.update-date-box span{font-size:11px;text-transform:uppercase;font-weight:900;letter-spacing:.06em;color:#6b7076;margin-top:4px;}
.update-row-top{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:4px;}
.update-row-top h4{margin:0;font-size:18px;letter-spacing:-.03em;}
.update-row-main p{margin:7px 0 0;line-height:1.55;color:#4e535b;}
.update-row-actions{display:flex;align-items:flex-start;justify-content:flex-end;}
.updates-workspace-grid{grid-template-columns:minmax(320px,420px) minmax(0,1fr)!important;align-items:start!important;}
.update-compose-card .form-card-head span{min-width:46px;}
.client-update-timeline-card{overflow:hidden;}
.update-timeline{position:relative;padding:8px 20px 22px;}
.update-timeline:before{content:"";position:absolute;left:33px;top:22px;bottom:22px;width:2px;background:#d2cabd;}
.update-timeline-item{position:relative;display:grid;grid-template-columns:28px minmax(0,1fr);gap:14px;padding:14px 0;}
.timeline-dot{position:relative;z-index:1;width:14px;height:14px;border-radius:50%;background:#183a35;border:4px solid #dcebe7;margin:8px 0 0 7px;}
.update-timeline-item.paid .timeline-dot{background:#24543a;border-color:#e3efe8;}
.update-timeline-item.progress .timeline-dot{background:#183a35;border-color:#e4ebf3;}
.update-timeline-item.pending .timeline-dot{background:#6f4a10;border-color:#f7ecd2;}
.timeline-body{background:#fff;border:1px solid #d2cabd;border-radius:6px;padding:16px 18px;box-shadow:none;}
.timeline-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:7px;}
.timeline-top>span:first-child,.timeline-meta{font-size:12px;font-weight:800;color:#6b7076;text-transform:uppercase;letter-spacing:.06em;}
.timeline-body h4{margin:0 0 4px;font-size:18px;letter-spacing:-.03em;}
.timeline-body p{margin:10px 0 0;line-height:1.55;color:#4e535b;}
.timeline-delete-form{margin-top:12px;}
.mini-pill{display:inline-flex;align-items:center;border-radius:999px;padding:8px 12px;background:#dcebe7;color:#294a68;font-weight:900;font-size:12px;}
.empty-timeline{padding:28px;border:1px dashed #183a35;border-radius:6px;background:#fbf9f5;display:flex;flex-direction:column;gap:5px;color:#6b7076;}
.empty-timeline strong{color:#232832;}
.client-updates-page .client-update-hero,
.client-updates-page .client-visible-timeline-card{max-width:980px;margin-left:auto;margin-right:auto;}
.client-update-hero{display:flex;align-items:center;justify-content:space-between;gap:22px;padding:26px!important;margin-bottom:18px;}
.client-update-hero h2{margin:8px 0 6px;font-size:28px;letter-spacing:-.04em;}
.client-update-hero p{margin:0;color:#6b7076;}
.client-update-mini-stats{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end;}
.client-update-mini-stats span{display:flex;flex-direction:column;gap:3px;min-width:112px;border:1px solid #d2cabd;background:#fff;border-radius:6px;padding:14px 16px;color:#6b7076;font-weight:800;}
.client-update-mini-stats strong{font-size:24px;color:#232832;line-height:1;}
.public-update-timeline{display:flex;flex-direction:column;}
.public-update-item{display:grid;grid-template-columns:92px minmax(0,1fr);gap:18px;padding:24px;border-top:1px solid #d2cabd;}
.public-update-item:first-child{border-top:0;}
.public-update-date{width:78px;height:78px;border-radius:6px;background:#fbf9f5;border:1px solid #e4ebf3;display:flex;flex-direction:column;align-items:center;justify-content:center;}
.public-update-date strong{font-size:28px;line-height:1;color:#232832;}
.public-update-date span{font-size:11px;text-transform:uppercase;font-weight:900;color:#6b7076;margin-top:5px;}
.public-update-top{display:flex;align-items:center;gap:12px;justify-content:space-between;flex-wrap:wrap;}
.public-update-top h4{margin:0;font-size:20px;letter-spacing:-.03em;}
.public-update-body p{margin:10px 0 0;color:#4e535b;line-height:1.6;font-size:15px;}
@media (max-width:1100px){.updates-stats-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}.updates-workspace-grid{grid-template-columns:1fr!important}.admin-update-row{grid-template-columns:70px 1fr}.update-row-actions{grid-column:2}.updates-filter-card{align-items:flex-start;flex-direction:column}.updates-filter-card .admin-search-form{justify-content:flex-start;width:100%}.updates-filter-card .admin-search-form input{min-width:0;flex:1}}
@media (max-width:680px){.updates-stats-row{grid-template-columns:1fr!important}.admin-update-row,.public-update-item{grid-template-columns:1fr}.update-date-box,.public-update-date{width:100%;height:auto;min-height:62px}.client-update-hero{flex-direction:column;align-items:flex-start}.client-update-mini-stats{width:100%;justify-content:flex-start}.client-update-mini-stats span{flex:1;min-width:130px}.update-timeline:before{display:none}.update-timeline-item{grid-template-columns:1fr}.timeline-dot{display:none}}


/* Phase 11 patch - clean Updates filter/search card */
.updates-filter-clean{
  display:grid!important;
  grid-template-columns:minmax(240px, 0.85fr) minmax(520px, 1.6fr)!important;
  align-items:end!important;
  gap:24px!important;
  padding:24px 26px!important;
  overflow:visible!important;
}
.updates-filter-copy .phase-pill{
  margin-bottom:10px!important;
}
.updates-filter-clean h3{
  margin:0 0 6px!important;
  font-size:24px!important;
  line-height:1.1!important;
  letter-spacing:-.04em!important;
}
.updates-filter-clean p{
  margin:0!important;
  color:#6b7076!important;
  font-size:15px!important;
  line-height:1.45!important;
}
.updates-search-form{
  display:grid!important;
  grid-template-columns:minmax(260px,1fr) 150px 150px auto auto!important;
  gap:12px!important;
  align-items:end!important;
  justify-content:stretch!important;
  width:100%!important;
}
.updates-search-field{
  display:flex!important;
  flex-direction:column!important;
  gap:7px!important;
  min-width:0!important;
}
.updates-search-field label{
  font-size:11px!important;
  line-height:1!important;
  text-transform:uppercase!important;
  letter-spacing:.08em!important;
  font-weight:900!important;
  color:#6b7076!important;
}
.updates-search-form input,
.updates-search-form select{
  width:100%!important;
  height:46px!important;
  min-height:46px!important;
  border-radius:6px!important;
  border:1px solid #d2cabd!important;
  background:#fff!important;
  color:#232832!important;
  font-size:14px!important;
  font-weight:700!important;
  padding:0 15px!important;
  box-shadow:none;
  outline:none!important;
}
.updates-search-form input::placeholder{
  color:#183a35!important;
  font-weight:600!important;
}
.updates-search-form input:focus,
.updates-search-form select:focus{
  border-color:#183a35!important;
  box-shadow:none;
}
.updates-search-btn,
.updates-clear-btn{
  height:46px!important;
  min-height:46px!important;
  padding:0 20px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  white-space:nowrap!important;
  border-radius:6px!important;
}
.updates-clear-btn{
  background:#fff!important;
}
@media(max-width:1180px){
  .updates-filter-clean{
    grid-template-columns:1fr!important;
    align-items:start!important;
  }
  .updates-search-form{
    grid-template-columns:minmax(220px,1fr) 150px 150px auto!important;
  }
  .updates-clear-btn{
    grid-column:1 / -1!important;
    justify-self:start!important;
  }
}
@media(max-width:760px){
  .updates-search-form{
    grid-template-columns:1fr!important;
  }
  .updates-search-btn,
  .updates-clear-btn{
    width:100%!important;
  }
}


/* Phase 13 — Backups / SSL / Health tracker */
.side-nav a[href="health.php"]{position:relative;}
.admin-health-page .health-stat-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:18px;margin:0 0 22px;}
.health-hero-panel{align-items:center;}
.health-filter-card .admin-support-toolbar{align-items:end;}
.health-search-form{display:grid;grid-template-columns:minmax(260px,1fr) 170px 190px auto auto;gap:12px;align-items:end;}
.health-search-form input,.health-search-form select{height:44px;border:1px solid var(--border);border-radius:6px;padding:0 14px;background:#fff;font-weight:800;color:var(--ink);}
.global-health-list{display:flex;flex-direction:column;}
.global-health-row{display:grid;grid-template-columns:1.25fr .7fr 1.5fr auto;gap:18px;align-items:center;padding:22px;border-top:1px solid var(--border);}
.global-health-row:first-child{border-top:0;}
.global-health-row strong{display:block;font-size:15px;color:var(--ink);}
.global-health-row span,.global-health-row small{display:block;color:var(--muted);font-weight:800;}
.health-note-preview{color:var(--muted);font-weight:750;line-height:1.45;}
.health-row-actions{display:flex;gap:10px;align-items:center;justify-content:flex-end;white-space:nowrap;}
.health-workspace-grid{grid-template-columns:minmax(360px,.95fr) minmax(520px,1.45fr);align-items:start;}
.health-check-form .form-grid.two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.health-timeline{display:flex;flex-direction:column;gap:14px;}
.health-log-item{display:grid;grid-template-columns:18px 1fr;gap:14px;padding:18px;border:1px solid var(--border);border-radius:6px;background:#fff;box-shadow:none;}
.health-log-icon{width:14px;height:14px;border-radius:50%;margin-top:7px;background:#e4ebf3;box-shadow:none;}
.health-log-item.active .health-log-icon{background:#a8c9b4;box-shadow:none;}
.health-log-item.overdue .health-log-icon{background:#dca49c;box-shadow:none;}
.health-log-top{display:flex;justify-content:space-between;gap:14px;align-items:center;margin-bottom:4px;}
.health-log-top h4{margin:0;font-size:17px;}
.health-log-body p{margin:10px 0 0;color:var(--ink);line-height:1.55;}
.health-log-actions{display:flex;justify-content:space-between;align-items:center;margin-top:14px;gap:12px;}
.health-log-actions form{margin:0;}
@media(max-width:1100px){.admin-health-page .health-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.health-search-form{grid-template-columns:1fr 1fr;}.health-workspace-grid{grid-template-columns:1fr;}.global-health-row{grid-template-columns:1fr;align-items:start;}.health-row-actions{justify-content:flex-start;}}
@media(max-width:720px){.admin-health-page .health-stat-grid,.health-check-form .form-grid.two,.health-search-form{grid-template-columns:1fr;}}


/* Phase 13B — Client health tab tidy-up */
.client-health-layout{
  display:grid!important;
  grid-template-columns:minmax(360px,440px) minmax(0,1fr)!important;
  gap:24px!important;
  align-items:start!important;
  margin-top:22px!important;
}
.health-compose-card,.health-timeline-panel{
  overflow:hidden!important;
  padding:0!important;
  border-radius:6px!important;
}
.health-card-head,.health-timeline-head{
  padding:24px 26px 20px!important;
  border-bottom:1px solid var(--border)!important;
  background:var(--card)!important;
}
.health-card-head h3,.health-timeline-head h3{
  margin:6px 0 4px!important;
  font-size:24px!important;
  letter-spacing:-.035em!important;
}
.health-card-head p,.health-timeline-head p{
  margin:0!important;
  color:var(--muted)!important;
  line-height:1.45!important;
}
.health-compact-form{padding:24px 26px 26px!important;}
.health-field-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:16px!important;
}
.health-field-grid .form-group{margin:0!important;min-width:0!important;}
.health-field-grid .form-group.full{grid-column:1 / -1!important;}
.health-field-grid label{font-size:12px!important;letter-spacing:-.01em!important;}
.health-field-grid input,.health-field-grid select,.health-field-grid textarea{
  min-height:48px!important;
  font-size:15px!important;
  border-radius:6px!important;
}
.health-field-grid textarea{min-height:116px!important;line-height:1.45!important;}
.health-visibility-toggle{
  display:flex!important;
  align-items:flex-start!important;
  gap:12px!important;
  padding:14px 15px!important;
  margin:18px 0!important;
  border:1px solid var(--border)!important;
  border-radius:6px!important;
  background:#fbf9f5!important;
  color:var(--ink)!important;
}
.health-visibility-toggle input{
  width:18px!important;
  height:18px!important;
  margin:2px 0 0!important;
  flex:0 0 auto!important;
}
.health-visibility-toggle span{display:flex!important;flex-direction:column!important;gap:2px!important;line-height:1.25!important;}
.health-visibility-toggle strong{font-size:14px!important;}
.health-visibility-toggle small{color:var(--muted)!important;font-size:12px!important;}
.health-form-actions{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:10px!important;
  align-items:center!important;
}
.health-timeline-head{
  display:flex!important;
  justify-content:space-between!important;
  gap:18px!important;
  align-items:flex-start!important;
}
.health-timeline-inner{
  padding:22px!important;
  display:flex!important;
  flex-direction:column!important;
  gap:14px!important;
}
.health-entry{
  display:grid!important;
  grid-template-columns:18px minmax(0,1fr)!important;
  gap:16px!important;
  padding:18px!important;
  border:1px solid var(--border)!important;
  border-radius:6px!important;
  background:#fff!important;
  box-shadow:none;
}
.health-entry-dot{
  width:14px!important;
  height:14px!important;
  border-radius:999px!important;
  margin-top:8px!important;
  background:#183a35!important;
  box-shadow:none;
}
.health-entry.active .health-entry-dot{background:#a8c9b4!important;box-shadow:none;}
.health-entry.overdue .health-entry-dot{background:#dca49c!important;box-shadow:none;}
.health-entry-body{min-width:0!important;}
.health-entry-top{
  display:flex!important;
  justify-content:space-between!important;
  gap:16px!important;
  align-items:flex-start!important;
}
.health-entry-top h4{margin:0 0 3px!important;font-size:18px!important;letter-spacing:-.02em!important;}
.health-entry-top p{margin:0!important;color:var(--muted)!important;font-size:12px!important;text-transform:uppercase!important;font-weight:800!important;letter-spacing:.04em!important;line-height:1.45!important;}
.health-entry-note{
  margin-top:13px!important;
  padding:13px 14px!important;
  border-radius:6px!important;
  background:#fbf9f5!important;
  color:var(--ink)!important;
  line-height:1.55!important;
}
.health-entry-actions{
  display:flex!important;
  justify-content:space-between!important;
  gap:12px!important;
  align-items:center!important;
  margin-top:14px!important;
}
.health-entry-actions form{margin:0!important;}
.health-entry-actions .btn{box-shadow:none;}
@media(max-width:1100px){
  .client-health-layout{grid-template-columns:1fr!important;}
}
@media(max-width:720px){
  .health-field-grid{grid-template-columns:1fr!important;}
  .health-timeline-head,.health-entry-top,.health-entry-actions{flex-direction:column!important;align-items:flex-start!important;}
}


/* Phase 13C — Health tab 50/50 layout */
@media (min-width:1101px){
  .client-first-page .client-health-layout,
  .admin-client-page .client-health-layout{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    gap:24px!important;
    align-items:start!important;
    margin-top:22px!important;
  }
  .client-first-page .health-compose-card,
  .client-first-page .health-timeline-panel,
  .admin-client-page .health-compose-card,
  .admin-client-page .health-timeline-panel{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }
  .client-first-page .health-field-grid,
  .admin-client-page .health-field-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
.health-visibility-toggle{
  justify-content:flex-start!important;
  align-items:center!important;
}
.health-visibility-toggle input{
  position:static!important;
  display:block!important;
}
.health-form-actions .btn{white-space:nowrap!important;}


/* Phase 14 — Admin Global Search */
.admin-search-page .page-header { margin-bottom: 22px; }
.search-hero-panel { align-items: center; gap: 24px; }
.global-search-form {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: min(560px, 100%);
}
.global-search-form input {
    width: 100%;
    min-height: 52px;
    border: 1px solid rgba(148, 163, 184, .35);
    border-radius: 18px;
    padding: 0 18px;
    background: #fff;
    color: #232832;
    font-weight: 800;
    box-shadow:none;
}
.global-search-form input:focus { outline: 2px solid rgba(91, 108, 255, .22); border-color: rgba(91, 108, 255, .48); }
.search-stat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.search-results-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}
.search-start-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 18px;
    margin-top: 18px;
}
.search-wide-card { grid-column: 1 / -1; }
.search-result-card { overflow: visible; }
.search-result-list {
    display: grid;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, .18);
}
.search-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, .20);
    border-radius: 18px;
    background: var(--card);
}
.search-result-row h4 {
    margin: 5px 0 3px;
    font-size: 16px;
    line-height: 1.2;
    color: #232832;
}
.search-result-row p {
    margin: 0;
    color: #6b7076;
    font-weight: 700;
    line-height: 1.45;
}
.result-type,
.soft-count {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(91, 108, 255, .10);
    color: #183a35;
    font-size: 11px;
    font-weight: 1000;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.soft-count { letter-spacing: 0; min-width: 30px; justify-content: center; }
.result-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 9px;
}
.result-chips span {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 999px;
    background: #fbf9f5;
    border: 1px solid rgba(148, 163, 184, .18);
    color: #4e535b;
    font-size: 12px;
    font-weight: 900;
}
.result-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.search-empty-card {
    padding: 28px;
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.search-empty-card h3 { margin: 12px 0 8px; font-size: 24px; }
.search-empty-card p { margin: 0; color: #6b7076; font-weight: 750; line-height: 1.55; }
.compact-results .search-result-row { padding: 12px; }
@media (max-width: 1180px) {
    .search-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .search-results-grid, .search-start-grid { grid-template-columns: 1fr; }
    .search-wide-card { grid-column: auto; }
    .search-hero-panel { align-items: stretch; }
    .global-search-form { min-width: 0; }
}
@media (max-width: 760px) {
    .global-search-form { flex-direction: column; align-items: stretch; }
    .search-result-row { align-items: flex-start; flex-direction: column; }
    .result-actions { width: 100%; }
    .result-actions .btn { flex: 1; justify-content: center; }
}


/* Phase 14B — Global search summary cards across */
.admin-search-page .search-stat-grid,
.admin-search-page .admin-stat-grid.search-stat-grid{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:14px!important;
  margin:0 0 18px!important;
  width:100%!important;
  align-items:stretch!important;
}
.admin-search-page .search-stat-grid>.admin-stat-card{
  min-width:0!important;
  width:auto!important;
  max-width:none!important;
  margin:0!important;
  min-height:112px!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
}
.admin-search-page .search-stat-grid>.admin-stat-card strong{
  font-size:28px!important;
}
@media(max-width:1150px){
  .admin-search-page .search-stat-grid,
  .admin-search-page .admin-stat-grid.search-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:720px){
  .admin-search-page .search-stat-grid,
  .admin-search-page .admin-stat-grid.search-stat-grid{grid-template-columns:1fr!important;}
}

/* Phase 15D — Hosting tab layout tidy-up */
.client-hosting-right-stack{
  display:grid!important;
  gap:18px!important;
  align-content:start!important;
}
.client-hosting-right-stack .admin-data-card{
  margin-top:0!important;
}
.client-hosting-right-stack .linked-20i-card .card-title-row{
  gap:14px!important;
}
.client-hosting-right-stack .linked-20i-card th,
.client-hosting-right-stack .linked-20i-card td{
  padding-top:13px!important;
  padding-bottom:13px!important;
}
@media (max-width: 900px){
  .client-hosting-right-stack{gap:14px!important;}
}

/* Phase 16B — Read-only 20i client hosting view */
.twentyi-client-hosting-section .client-section-head{
  align-items:flex-start!important;
  gap:18px!important;
}
.client-sync-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:999px;
  background:#e4ebf3;
  color:#294a68;
  font-size:12px;
  font-weight:900;
  white-space:nowrap;
}
.twentyi-client-package-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  margin-top:18px;
}
.twentyi-client-package-card{
  border:1px solid #d2cabd;
  border-radius:6px;
  background:#fff;
  padding:18px;
  box-shadow:none;
}
.twentyi-card-top{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start;
  margin-bottom:14px;
}
.twentyi-card-top strong{
  display:block;
  color:#232832;
  font-size:18px;
  word-break:break-word;
}
.twentyi-card-top small{
  display:block;
  margin-top:4px;
  color:#6b7076;
  font-weight:800;
  text-transform:capitalize;
}
.twentyi-card-meta{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin:12px 0 14px;
}
.twentyi-card-meta span{
  display:block;
  border:1px solid #f4f0e8;
  border-radius:6px;
  background:#fbf9f5;
  padding:10px 12px;
}
.twentyi-card-meta small{
  display:block;
  color:#183a35;
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.06em;
  margin-bottom:3px;
}
.twentyi-card-meta b{
  display:block;
  color:#232832;
  font-size:12px;
  font-weight:900;
  word-break:break-word;
}
.twentyi-storage-block{
  margin-top:10px;
}
.twentyi-client-note{
  margin:12px 0 0;
  color:#6b7076;
  font-size:12px;
  line-height:1.5;
  font-weight:750;
}
.twentyi-admin-package-list{
  display:grid;
  gap:12px;
}
.twentyi-admin-package-row{
  border:1px solid #d2cabd;
  border-radius:6px;
  background:#fff;
  padding:14px;
}
.twentyi-admin-package-top,
.twentyi-admin-package-foot{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}
.twentyi-admin-package-top strong{
  display:block;
  font-size:15px;
  color:#232832;
  word-break:break-word;
}
.twentyi-admin-package-top small,
.twentyi-admin-package-foot span{
  display:block;
  color:#6b7076;
  font-size:11px;
  font-weight:800;
}
.twentyi-admin-package-meta{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:8px;
  margin:12px 0;
}
.twentyi-admin-package-meta span{
  border:1px solid #f4f0e8;
  border-radius:6px;
  background:#fbf9f5;
  padding:9px;
  color:#6b7076;
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.twentyi-admin-package-meta b{
  display:block;
  margin-top:3px;
  color:#232832;
  font-size:11px;
  text-transform:none;
  letter-spacing:0;
  word-break:break-word;
}
.twentyi-storage-line small{
  display:block;
  margin-top:6px;
  color:#6b7076;
  font-size:11px;
  font-weight:800;
}
@media(max-width:1200px){
  .twentyi-admin-package-meta{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:900px){
  .twentyi-client-package-grid{grid-template-columns:1fr;}
  .twentyi-client-hosting-section .client-section-head{flex-direction:column;}
  .client-sync-pill{white-space:normal;}
}
@media(max-width:640px){
  .twentyi-card-meta{grid-template-columns:1fr;}
  .twentyi-admin-package-top,
  .twentyi-admin-package-foot{flex-direction:column;}
  .twentyi-admin-package-meta{grid-template-columns:1fr;}
}

/* Phase 16B Hotfix — clean read-only 20i hosting layout */
.twentyi-readonly-clean-card{
  overflow:hidden;
}
.twentyi-readonly-clean-card .card-title-row{
  gap:16px;
  align-items:flex-start;
}
.twentyi-readable-table-wrap{
  width:100%;
  overflow-x:auto;
  border:1px solid #f4f0e8;
  border-radius:6px;
  background:#fff;
}
.twentyi-readable-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  min-width:860px;
}
.twentyi-readable-table th,
.twentyi-readable-table td{
  padding:12px 14px;
  border-bottom:1px solid #f4f0e8;
  text-align:left;
  vertical-align:top;
  font-size:12px;
}
.twentyi-readable-table th{
  color:#8d9196;
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  background:#fbf9f5;
}
.twentyi-readable-table td strong{
  display:block;
  color:#232832;
  font-size:13px;
  line-height:1.25;
  word-break:break-word;
}
.twentyi-readable-table td small,
.twentyi-compact-storage small{
  display:block;
  margin-top:4px;
  color:#6b7076;
  font-size:10px;
  font-weight:800;
}
.twentyi-readable-table tr:last-child td{
  border-bottom:0;
}
.twentyi-compact-storage{
  min-width:150px;
}
.twentyi-compact-storage .progressbar{
  height:7px;
  margin-bottom:4px;
}
.manual-hosting-card{
  opacity:.96;
}
.manual-hosting-card .card-title-row h3:after{
  content:'Legacy';
  display:inline-block;
  margin-left:8px;
  padding:4px 8px;
  border-radius:999px;
  background:#fbf9f5;
  color:#183a35;
  font-size:9px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.08em;
  vertical-align:middle;
}
@media(max-width:900px){
  .twentyi-readonly-clean-card .card-title-row{flex-direction:column;}
  .twentyi-readable-table{min-width:760px;}
}

/* Phase 16F — client-friendly 20i hosting status cards */
.phase16f-client-section{overflow:hidden;}
.phase16f-package-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;}
.phase16f-package-card{border:1px solid rgba(35,40,50,.08);border-radius:6px;background:var(--card);box-shadow:none;padding:18px;}
.phase16f-package-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px;}
.phase16f-package-hero strong{display:block;color:#232832;font-size:18px;line-height:1.15;letter-spacing:-.035em;word-break:break-word;}
.phase16f-package-hero small{display:block;margin-top:5px;color:#6b7076;font-size:12px;font-weight:850;}
.phase16f-health-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0;}
.phase16f-health-item{border:1px solid #f4f0e8;border-radius:6px;background:#fff;padding:12px;min-height:88px;}
.phase16f-health-item span{display:block;color:#8d9196;font-size:10px;font-weight:950;letter-spacing:.08em;text-transform:uppercase;margin-bottom:5px;}
.phase16f-health-item strong{display:block;color:#232832;font-size:13px;line-height:1.2;word-break:break-word;}
.phase16f-health-item small{display:block;color:#6b7076;font-size:10px;font-weight:800;margin-top:5px;line-height:1.25;}
.phase16f-health-item.ok{background:#e3efe8;border-color:#e3efe8;}
.phase16f-health-item.managed{background:#fbf9f5;border-color:#e4ebf3;}
.phase16f-health-item.watch{background:#f7ecd2;border-color:#ddbf78;}
.phase16f-storage-card{border:1px solid #f4f0e8;border-radius:6px;background:#fff;padding:13px;margin-top:12px;}
.phase16f-storage-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;}
.phase16f-storage-head span{color:#8d9196;font-size:10px;font-weight:950;letter-spacing:.08em;text-transform:uppercase;}
.phase16f-storage-head strong{color:#232832;font-size:13px;font-weight:950;}
.phase16f-storage-card .progressbar{height:9px;margin-bottom:8px;}
.phase16f-storage-card small{display:block;color:#6b7076;font-size:11px;font-weight:850;}
.phase16f-sync-row{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:12px;border-top:1px solid #f4f0e8;padding-top:10px;}
.phase16f-sync-row span{color:#6b7076;font-size:10px;font-weight:850;}
.phase16f-admin-card{overflow:hidden;}
.phase16f-admin-package-list{display:grid;gap:14px;}
.phase16f-admin-package-card{border:1px solid #d2cabd;border-radius:6px;background:#fff;padding:15px;box-shadow:none;}
.phase16f-admin-package-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px;}
.phase16f-admin-package-top strong{display:block;color:#232832;font-size:15px;line-height:1.2;word-break:break-word;}
.phase16f-admin-package-top small{display:block;margin-top:4px;color:#6b7076;font-size:11px;font-weight:850;}
.phase16f-admin-health-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;}
.phase16f-admin-storage-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(190px,.7fr);gap:14px;align-items:center;border:1px solid #f4f0e8;border-radius:6px;background:#fbf9f5;padding:12px;margin-top:12px;}
.phase16f-admin-storage-row span{display:block;color:#8d9196;font-size:10px;font-weight:950;text-transform:uppercase;letter-spacing:.08em;margin-bottom:3px;}
.phase16f-admin-storage-row strong{display:block;color:#232832;font-size:12px;font-weight:900;}
.phase16f-admin-storage-bar .progressbar{height:8px;margin-bottom:4px;}
.phase16f-admin-storage-bar small{display:block;color:#6b7076;font-size:10px;font-weight:850;text-align:right;}
.phase16f-admin-sync-row{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;border-top:1px solid #f4f0e8;margin-top:12px;padding-top:11px;}
.phase16f-admin-sync-row span{color:#6b7076;font-size:10px;font-weight:850;}
@media(max-width:1200px){.phase16f-package-grid{grid-template-columns:1fr}.phase16f-health-grid,.phase16f-admin-health-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.phase16f-admin-storage-row{grid-template-columns:1fr;}}
@media(max-width:640px){.phase16f-package-hero,.phase16f-admin-package-top{flex-direction:column}.phase16f-health-grid,.phase16f-admin-health-grid{grid-template-columns:1fr}.phase16f-sync-row,.phase16f-admin-sync-row{align-items:flex-start;flex-direction:column}.phase16f-admin-storage-bar small{text-align:left;}}


/* Phase 16F Hotfix — unclutter read-only hosting cards */
.phase16f-admin-card .card-title-row{
  align-items:flex-start;
  gap:18px;
  margin-bottom:14px;
}
.phase16f-admin-card .card-title-row p{
  max-width:620px;
  margin-top:4px;
  line-height:1.45;
}
.phase16f-admin-package-list{
  gap:16px;
}
.phase16f-admin-package-card{
  padding:16px 16px 14px;
  border-radius:6px;
  box-shadow:none;
}
.phase16f-admin-package-top{
  margin-bottom:10px;
  padding-bottom:10px;
  border-bottom:1px solid #f4f0e8;
}
.phase16f-admin-package-top strong{
  font-size:16px;
  letter-spacing:-.02em;
}
.phase16f-admin-package-top small{
  font-size:10px;
  line-height:1.35;
}
.phase16f-admin-health-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.phase16f-admin-card .phase16f-health-item{
  min-height:auto;
  padding:11px 12px;
  border-radius:6px;
}
.phase16f-admin-card .phase16f-health-item span{
  font-size:9px;
  margin-bottom:4px;
}
.phase16f-admin-card .phase16f-health-item strong{
  font-size:12px;
  line-height:1.22;
}
.phase16f-admin-card .phase16f-health-item small{
  font-size:9px;
  line-height:1.25;
}
.phase16f-admin-storage-row{
  grid-template-columns:1fr;
  gap:8px;
  margin-top:10px;
  padding:11px 12px;
  border-radius:6px;
}
.phase16f-admin-storage-row strong{
  font-size:12px;
  line-height:1.25;
}
.phase16f-admin-storage-bar small{
  text-align:left;
}
.phase16f-admin-sync-row{
  gap:8px;
  margin-top:10px;
  padding-top:10px;
}
.phase16f-admin-sync-row span{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:4px 8px;
  border-radius:999px;
  background:#fbf9f5;
  border:1px solid #f4f0e8;
}
.phase16f-admin-sync-row .btn{
  margin-left:auto;
}
.manual-hosting-card{
  margin-top:16px;
}
@media(max-width:1200px){
  .phase16f-admin-health-grid{grid-template-columns:1fr;}
  .phase16f-admin-sync-row .btn{margin-left:0;}
}

/* Phase 16I — Backup tab organised by package */
.backup-tab-card{overflow:hidden;}
.backup-package-list{display:grid;gap:16px;}
.backup-package-card{border:1px solid #e4ebf3;border-radius:6px;background:#fff;padding:18px;box-shadow:none;}
.backup-package-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px;padding-bottom:14px;border-bottom:1px solid #f4f0e8;}
.backup-package-head h4{margin:0;color:#232832;font-size:18px;line-height:1.2;letter-spacing:-.02em;word-break:break-word;}
.backup-package-head p{margin:4px 0 0;color:#6b7076;font-size:12px;font-weight:850;}
.backup-latest-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;}
.backup-latest-mini{border:1px solid #e4ebf3;background:#e4ebf3;border-radius:6px;padding:13px;min-height:94px;}
.backup-latest-mini.muted{border-color:#d2cabd;background:#fbf9f5;}
.backup-latest-mini span{display:block;color:#6b7076;font-size:10px;font-weight:950;letter-spacing:.08em;text-transform:uppercase;margin-bottom:8px;}
.backup-latest-mini strong{display:block;color:#232832;font-size:14px;font-weight:950;line-height:1.25;}
.backup-latest-mini small{display:block;color:#6b7076;font-size:11px;font-weight:850;line-height:1.35;margin-top:7px;word-break:break-word;}
.backup-package-foot{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-top:14px;padding-top:12px;border-top:1px solid #f4f0e8;}
.backup-package-foot span{display:inline-flex;align-items:center;min-height:26px;padding:5px 9px;border-radius:999px;background:#fbf9f5;border:1px solid #f4f0e8;color:#6b7076;font-size:10px;font-weight:850;}
.backup-package-foot .btn{margin-left:auto;}
.backup-raw-mini{margin-top:12px;border-top:1px solid #f4f0e8;padding-top:10px;}
.backup-raw-mini summary{cursor:pointer;color:#294a68;font-weight:950;font-size:12px;}
.backup-raw-mini pre{max-height:260px;overflow:auto;margin:10px 0 0;padding:14px;border-radius:6px;background:#232832;color:#d2cabd;font-size:11px;line-height:1.55;}
@media(max-width:1200px){.backup-latest-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.backup-package-foot .btn{margin-left:0;}}
@media(max-width:640px){.backup-package-head{flex-direction:column}.backup-latest-grid{grid-template-columns:1fr;}}

/* Phase 16M — client storage/backup display polish */
.phase16m-storage-progress span{
  min-width:0;
  transition:width .25s ease;
}
.phase16m-storage-progress span[style*="width:2"]{
  min-width:7px;
}
.phase16f-storage-head strong{
  white-space:nowrap;
}
.phase16f-storage-card small{
  line-height:1.35;
}
.phase16f-sync-row span{
  white-space:normal;
}
/* Phase 19: admin-only AI maintenance summaries */
.ai-summary-card{margin-bottom:24px;padding:24px;background:var(--card);border:1px solid #d2cabd}
.ai-summary-head,.ai-summary-editor-meta,.ai-summary-save-row{display:flex;align-items:center;justify-content:space-between;gap:18px}
.ai-summary-head h3{margin:8px 0 6px}.ai-summary-head p{margin:0;color:var(--muted,#6b7076)}
.ai-summary-controls{display:grid;grid-template-columns:1.2fr 1fr 1fr auto;align-items:end;gap:14px;margin-top:22px;padding:18px;border-radius:6px;background:#fff;border:1px solid #e4ebf3}
.ai-summary-controls .form-group{margin:0}.ai-summary-controls .btn{min-height:44px}
.ai-summary-list{display:grid;gap:16px;margin-top:18px}.ai-summary-editor{padding:20px;border-radius:6px;background:#fff;border:1px solid #e4ebf3}
.ai-summary-editor-meta{margin-bottom:16px}.ai-summary-editor-meta>div{display:flex;flex-direction:column;gap:3px}.ai-summary-editor-meta span{color:var(--muted,#6b7076);font-size:.86rem}
.ai-summary-editor textarea{line-height:1.6}.ai-approve-check{display:flex;align-items:center;gap:9px;font-weight:700}.ai-summary-notice{margin-bottom:18px}
.invoice-ai-summary{margin:20px 0;padding:20px;border-radius:6px;background:#e4ebf3;border:1px solid #d2cabd;page-break-inside:avoid}
.invoice-ai-summary>span{display:block;margin-bottom:8px;font-size:.72rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#6b7076}.invoice-ai-summary p{margin:0;line-height:1.55;white-space:normal}
.invoice-work-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:24px 0 12px;padding-bottom:10px;border-bottom:1px solid #e4ebf3}.invoice-work-heading span{font-size:.78rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#232832}.invoice-work-heading small{color:#6b7076;font-weight:700}
.invoice-maintenance-appendix .invoice-appendix-item{display:grid;grid-template-columns:88px minmax(0,1fr);align-items:start;gap:18px}.invoice-maintenance-appendix .invoice-appendix-copy{grid-column:2;grid-row:1;min-width:0}.invoice-maintenance-appendix .invoice-appendix-date{grid-column:1;grid-row:1;justify-self:start;min-width:78px;text-align:center;border:1px solid #e4ebf3;border-radius:6px;background:#e4ebf3;padding:10px 8px}.invoice-maintenance-appendix .invoice-appendix-date span{display:block;font-size:1.35rem;font-weight:900;line-height:1;color:#232832}.invoice-maintenance-appendix .invoice-appendix-date small{display:block;margin-top:6px;font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:#6b7076}
@media(max-width:560px){.invoice-maintenance-appendix .invoice-appendix-item{grid-template-columns:74px minmax(0,1fr);gap:12px}.invoice-maintenance-appendix .invoice-appendix-date{min-width:70px}}
@media(max-width:850px){.ai-summary-controls{grid-template-columns:1fr 1fr}.ai-summary-controls .btn{grid-column:1/-1}.ai-summary-head{align-items:flex-start}.ai-summary-save-row{align-items:flex-start;flex-direction:column}}
@media(max-width:560px){.ai-summary-controls{grid-template-columns:1fr}.ai-summary-card{padding:18px}.ai-summary-head{flex-direction:column}}
.ai-note-label-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.ai-note-label-row label{margin:0!important}.ai-note-polish-btn{display:inline-flex;align-items:center;gap:6px;border:1px solid #e4ebf3;border-radius:999px;background:#e4ebf3;color:#183a35;padding:7px 10px;font:inherit;font-size:11px;font-weight:900;cursor:pointer}.ai-note-polish-btn:hover{background:#e4ebf3}.ai-note-polish-btn span{font-size:14px}
.invoice-title-help,.invoice-title-ai-status{display:block;margin-top:6px;color:#6b7076;font-size:11px;line-height:1.4}.invoice-title-ai-status:empty{display:none}.invoice-title-ai-status.is-error{color:#8a2d27}
.ai-note-modal[hidden]{display:none}.ai-note-modal{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:22px}.ai-note-modal-backdrop{position:absolute;inset:0;background:rgba(7,8,10,.58);backdrop-filter:blur(5px)}.ai-note-modal-panel{position:relative;z-index:1;width:min(680px,100%);max-height:calc(100vh - 44px);overflow:auto;border-radius:6px;background:#fff;padding:28px;box-shadow:0 30px 90px rgba(7,8,10,.32)}.ai-note-modal-panel h3{margin:10px 40px 8px 0;font-size:26px;letter-spacing:-.04em}.ai-note-modal-panel>p{margin:0 0 20px;color:#6b7076;line-height:1.5}.ai-note-modal-panel textarea{width:100%;min-height:190px;resize:vertical;border:1px solid #e4ebf3;border-radius:6px;padding:15px;color:#232832;background:#fff;font:inherit;line-height:1.55;outline:none}.ai-note-modal-panel textarea:focus{border-color:#183a35;box-shadow:0 0 0 4px rgba(24,58,53,.10)}.ai-note-modal-close{position:absolute;top:18px;right:18px;width:36px;height:36px;border:0;border-radius:50%;background:#e4ebf3;color:#4e535b;font-size:24px;line-height:1;cursor:pointer}.ai-note-modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.ai-note-loading{display:flex;align-items:center;gap:10px;margin:0 0 14px;padding:12px 14px;border-radius:6px;background:#fbf9f5;color:#183a35;font-weight:800}.ai-note-loading span{width:16px;height:16px;border:2px solid #e4ebf3;border-top-color:#183a35;border-radius:50%;animation:ai-note-spin .8s linear infinite}.ai-note-modal-open{overflow:hidden}@keyframes ai-note-spin{to{transform:rotate(360deg)}}
@media(max-width:560px){.ai-note-label-row{align-items:flex-start;flex-direction:column}.ai-note-modal{padding:12px}.ai-note-modal-panel{padding:22px}.ai-note-modal-actions{flex-direction:column-reverse}.ai-note-modal-actions .btn{width:100%}}
.invoice-brand-block{min-width:0}.invoice-brand-logo{display:block;width:230px;max-width:70%;height:auto;object-fit:contain;margin:0 0 24px}.invoice-brand-block .kicker{margin-top:0}
@media print{.invoice-brand-logo{width:205px;max-width:62%;margin-bottom:20px;print-color-adjust:exact;-webkit-print-color-adjust:exact}}
@media(max-width:560px){.invoice-brand-logo{width:190px;max-width:75%;margin-bottom:18px}}
/* Phase 19: keep all six client workspace summary cards on one desktop row */
@media(min-width:1151px){.client-first-stats{grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:12px!important}.client-first-stats .stat-card{min-width:0!important;padding:17px 16px!important}.client-first-stats .stat-card strong{font-size:27px!important}.client-first-stats .stat-card span{font-size:11px!important}.client-first-stats .stat-card small{font-size:12px!important}}

/* Client mobile navigation is loaded by includes/sidebar.php for cache-safe platform coverage. */
.mobile-nav-toggle{display:none}
@media(max-width:560px){
  .client-dashboard-page .main{padding:18px 14px 36px}
  .client-dashboard-page .page-header{margin-bottom:16px}
  .client-dashboard-page .page-header h1{font-size:28px}
  .client-dashboard-page .page-intro{font-size:13px;line-height:1.45}
  .client-dashboard-page .header-pill{display:none}
  .client-dashboard-page .grid{gap:12px}
  .client-dashboard-page .card{padding:16px;border-radius:6px}
  .client-dashboard-page .dashboard-account-overview{gap:12px}
  .client-dashboard-page .dashboard-account-overview .service-row{padding:9px 0;font-size:13px}
  .client-dashboard-page .dashboard-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px!important;margin-top:12px!important}
  .client-dashboard-page .dashboard-summary-card{min-height:0;padding:15px;text-align:center}
  .client-dashboard-page .dashboard-summary-card .stat-value{font-size:25px;margin:6px 0 3px}
  .client-dashboard-page .dashboard-summary-card .stat-note{font-size:11px;line-height:1.35}
  .client-dashboard-page .hero-card,.client-dashboard-page .client-message-card,.client-dashboard-page .dashboard-recent-hosting,.client-dashboard-page .dashboard-recent-hosting+section{margin-top:12px!important}
  .client-dashboard-page .hero-card h2{font-size:20px}
  .client-dashboard-page .hero-card p{font-size:13px;line-height:1.45}
  .client-dashboard-page .actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px}
  .client-dashboard-page .actions .btn{width:auto;padding:11px 10px;font-size:13px}
  .client-dashboard-page .client-message-card .soft-title-row{padding:17px 16px!important}
  .client-dashboard-page .client-note-list{gap:10px!important;padding:12px 16px 16px!important}
  .client-dashboard-page .client-note{padding:13px!important}
  .client-dashboard-page .service-row{padding:10px 0}
}

/* Phase 22B — keep invoice overflow actions visible and operable. */
.client-first-page .client-billing-card,
.admin-billing-page .billing-clean-table-card{overflow:visible!important;}
.client-first-page .client-billing-action-cell,
.admin-billing-page .billing-clean-table td:last-child{overflow:visible!important;}
.client-first-page .client-billing-menu,
.admin-billing-page .billing-action-menu{position:relative!important;z-index:1!important;}
.client-first-page .client-billing-menu[open],
.admin-billing-page .billing-action-menu[open]{z-index:60!important;}
.client-first-page .client-billing-menu summary,
.admin-billing-page .billing-action-menu summary{display:grid!important;place-items:center!important;min-width:36px!important;width:36px!important;height:36px!important;padding:0!important;overflow:visible!important;}
.client-first-page .client-billing-menu .billing-action-menu-panel,
.admin-billing-page .billing-action-menu .billing-action-menu-panel{top:calc(100% + 8px)!important;right:0!important;z-index:70!important;}

@media (min-width:761px){
  .client-first-page .client-billing-table-wrap{overflow:visible!important;overflow-x:visible!important;overflow-y:visible!important;}
  .client-first-page .client-billing-table{width:100%!important;min-width:0!important;}
  .client-first-page .client-billing-table th:nth-child(1),.client-first-page .client-billing-table td:nth-child(1){width:14%!important;}
  .client-first-page .client-billing-table th:nth-child(2),.client-first-page .client-billing-table td:nth-child(2){width:12%!important;}
  .client-first-page .client-billing-table th:nth-child(3),.client-first-page .client-billing-table td:nth-child(3){width:21%!important;}
  .client-first-page .client-billing-table th:nth-child(4),.client-first-page .client-billing-table td:nth-child(4){width:10%!important;}
  .client-first-page .client-billing-table th:nth-child(5),.client-first-page .client-billing-table td:nth-child(5){width:18%!important;}
  .client-first-page .client-billing-table th:nth-child(6),.client-first-page .client-billing-table td:nth-child(6){width:25%!important;}
}
@media (min-width:1181px){
  .admin-billing-page .billing-clean-table-wrap{overflow:visible!important;}
  .admin-billing-page .billing-clean-table{width:100%!important;min-width:0!important;}
}
@media (max-width:760px){
  .client-first-page .client-billing-menu[open] .billing-action-menu-panel{position:static!important;width:max-content!important;margin-top:8px!important;}
}
@media (max-width:1180px){
  .admin-billing-page .billing-action-menu[open] .billing-action-menu-panel{position:static!important;width:max-content!important;margin-top:8px!important;}
}
