/* HCCTS internal workspace. Public intake and Firebase authentication retain their existing layout. */
#app:not(.guest-mode){--bg:#f4f5f7;--brand:#214e73;--brand-dark:#153952;--brand-hover:#183e5d;--brand-light:#eaf0f5;--brand-subtle:#f2f6f9;--border:#e3e7ec;--text:#182b40;--text-2:#3e5063;--text-3:#687687;--sh-md:0 8px 26px rgba(21,39,59,.06)}
#app:not(.guest-mode) .app-body{background:var(--bg)}
#app:not(.guest-mode) .app-header{background:#fff;color:var(--text);border-bottom:1px solid var(--border);box-shadow:none}
#app:not(.guest-mode) .hdr-title{color:var(--text);font-weight:750;letter-spacing:-.025em}
#app:not(.guest-mode) .hdr-sub{color:var(--text-3)}
#app:not(.guest-mode) .hdr-sync-btn{color:var(--text-2);border:1px solid var(--border);background:#fff;border-radius:9px;min-height:36px;padding:7px 12px}
#app:not(.guest-mode) .hdr-user{color:#fff;background:#183d5a;border:0;width:36px;height:36px;font-size:12px;box-shadow:none}
.hdr-identity{text-align:right;line-height:1.35;min-width:0}
.hdr-person{font-size:12px;font-weight:700;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hdr-role{font-size:10px;color:var(--text-3);margin-top:2px}
.guest-mode .hdr-identity{display:none}
#app:not(.guest-mode) .page-header{align-items:center;padding:0 0 25px;gap:20px}
#app:not(.guest-mode) .page-title{font-size:28px;line-height:1.2;font-weight:700;letter-spacing:-.04em;color:#182b40}
#app:not(.guest-mode) .page-sub{font-size:13px;margin-top:7px;color:#687687;line-height:1.6}
.page-eyebrow{font-size:10px;font-weight:750;text-transform:uppercase;letter-spacing:.16em;color:#7a6945;margin-bottom:9px}
#app:not(.guest-mode) .page:not(#page-new){padding:32px 30px 12px;max-width:1480px}
#app:not(.guest-mode) .section-title{padding:27px 0 13px;color:#657386;font-size:10px;letter-spacing:.12em}
#app:not(.guest-mode) .ticket-list,#app:not(.guest-mode) .team-list{padding:0;gap:14px}
#app:not(.guest-mode) .ticket-list{align-items:stretch}
#app:not(.guest-mode) .ticket-card{padding:22px;border-radius:12px;border:1px solid var(--border);box-shadow:0 2px 3px rgba(21,39,59,.015);display:flex;flex-direction:column}
#app:not(.guest-mode) .ticket-card:hover{border-color:#aebfcd;box-shadow:0 8px 22px rgba(21,39,59,.06);transform:none}
#app:not(.guest-mode) .tc-title{font-size:15px;line-height:1.5;font-weight:650;color:#1c3045}
#app:not(.guest-mode) .tc-top{margin-bottom:14px}
#app:not(.guest-mode) .tc-badges{margin-bottom:15px;gap:6px}
#app:not(.guest-mode) .tc-meta{line-height:1.7;font-size:11px;gap:5px}
#app:not(.guest-mode) .tc-actions{padding-top:15px;margin-top:18px;border-color:#edf0f3}
#app:not(.guest-mode) .tc-act-btn{background:#f8fafb;border-color:#e2e8ed;color:#214e73;font-size:11px;box-shadow:none}
#app:not(.guest-mode) .tc-act-btn.resolve{color:#20624e;background:#eff7f3;border-color:#d4e8df}
#app:not(.guest-mode) .badge{font-size:9px;font-weight:650;letter-spacing:.025em;border-radius:5px;padding:4px 7px}
#app:not(.guest-mode) .btn{font-size:12px;min-height:40px;padding:10px 15px;border-radius:8px;box-shadow:0 1px 2px #10253c08;white-space:nowrap}
#app:not(.guest-mode) .btn-primary{background:var(--brand);color:#fff}
#app:not(.guest-mode) .filter-bar{padding:18px;margin-bottom:22px;background:#fff;border:1px solid var(--border);border-radius:12px}
#app:not(.guest-mode) .search-input{background:#f8fafb;border:1px solid #e7ecf0;border-radius:8px}
#app:not(.guest-mode) .f-chip{border-radius:6px;font-weight:600;font-size:11px;background:#fff}
#app:not(.guest-mode) .f-chip.active{background:#183d5a;border-color:#183d5a;color:#fff}
#app:not(.guest-mode) .home-greeting{margin:0;padding:30px;border:1px solid #24445e;border-radius:14px;background:#142f48;box-shadow:none;display:flex;align-items:center;justify-content:space-between;gap:22px}
#app:not(.guest-mode) .home-greeting::before,#app:not(.guest-mode) .home-greeting::after{display:none}
#app:not(.guest-mode) .home-greeting .page-eyebrow{color:#d6bc86;margin-bottom:13px}
#app:not(.guest-mode) .greeting-name{font-size:28px;font-weight:600;letter-spacing:-.035em;line-height:1.25}
#app:not(.guest-mode) .greeting-date{font-size:12px;color:#b9c8d6;margin-top:10px}
.home-description{font-size:13px;line-height:1.6;color:#cbd7e2;margin-top:8px;max-width:510px}
.home-action{background:#fff;color:#1c3953;flex-shrink:0;border:0;font:600 12px var(--font);padding:13px 18px;border-radius:8px;cursor:pointer;display:inline-flex;align-items:center;gap:12px;min-height:44px}
#app:not(.guest-mode) .stat-chips{padding:0;margin:18px 0 0;gap:14px;grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
#app:not(.guest-mode) .stat-chip{padding:22px;border-radius:12px;box-shadow:none;border-color:var(--border)}
#app:not(.guest-mode) .stat-chip::before{display:none}
#app:not(.guest-mode) .chip-val{font-size:32px;letter-spacing:-.04em;color:#193249;font-weight:600}
#app:not(.guest-mode) .chip-lbl{font-size:11px;color:#657386;margin-top:9px}
#app:not(.guest-mode) .chip-bar{height:2px;margin-top:18px;opacity:.6}
#app:not(.guest-mode) .team-member-card{padding:23px 20px;border-radius:12px;box-shadow:none;align-items:flex-start}
#app:not(.guest-mode) .tm-avatar{background:#eaf0f5 !important;color:#214b6c;border:1px solid #dce6ee;border-radius:11px;font-size:13px;width:42px;height:42px}
#app:not(.guest-mode) .tm-name{font-size:14px;margin-top:1px}
#app:not(.guest-mode) .tm-role{font-size:11px;line-height:1.8;margin-top:4px}
#app:not(.guest-mode) .tm-badge{background:#f2f5f7;color:#526579;border-radius:5px;padding:4px 8px;margin-top:12px;font-size:10px;font-weight:500}
#app:not(.guest-mode) .tm-edit-btn{border-radius:6px;font-size:11px;min-height:36px;background:#fff}
#app:not(.guest-mode) .dispatch-filter-grid{margin:0;padding:18px;border:1px solid var(--border);border-radius:12px;background:#fff;gap:10px}
#app:not(.guest-mode) .dispatch-filter-grid .form-input,#app:not(.guest-mode) .dispatch-filter-grid .form-select{font-size:12px;min-width:0;background:#f9fafb;border-color:#e3e8ed;min-height:42px}
#analytics-body{column-count:auto;display:grid;grid-template-columns:minmax(0,1fr);gap:20px}
.analytics-context{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:11px;color:#69788b}
.analytics-context strong{font-weight:600;color:#314b62}
.report-range{display:inline-flex;align-items:center;gap:7px;background:#fff;border:1px solid var(--border);border-radius:6px;padding:7px 10px;color:#536578;white-space:nowrap}
#analytics-body .metric-grid{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:0}
#analytics-body .metric-card{min-width:0;background:#fff;border:1px solid var(--border);border-radius:12px;padding:23px;box-shadow:0 2px 3px #10253c03}
.metric-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#647486;font-size:11px;font-weight:550}
.metric-heading .ico{color:#8495a5;width:17px;height:17px}
#analytics-body .metric-val{font-size:34px;font-weight:600;line-height:1.2;color:#193249;margin:17px 0 10px;letter-spacing:-.045em}
.metric-unit{font-size:13px;letter-spacing:0;color:#6b7b8c;margin-left:5px;font-weight:450}
.metric-note{font-size:10px;color:#788696;line-height:1.5}
.report-panel{background:#fff;border:1px solid var(--border);border-radius:12px;padding:24px;min-width:0;box-shadow:0 2px 3px #10253c03}
.report-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding-bottom:23px}
.report-panel h2{font-size:15px;font-weight:650;letter-spacing:-.025em;color:#20394f;margin:0}
.report-panel-head p{font-size:11px;color:#788696;margin-top:5px;line-height:1.6}
.report-tag{font-size:10px;color:#6c7c8d;border:1px solid #e5eaf0;background:#f8fafb;border-radius:5px;padding:4px 8px;white-space:nowrap}
.report-bars{display:flex;flex-direction:column;gap:20px}
.report-bar-label{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;font-size:12px;color:#41586d;margin-bottom:9px}
.report-bar-label span:first-child{min-width:0;overflow-wrap:anywhere}
.report-bar-label strong{font-size:12px;font-weight:650;color:#233e55;font-variant-numeric:tabular-nums;white-space:nowrap}
.report-bar-label small{color:#7a8896;font-size:10px;font-weight:400;margin-left:6px}
.report-track{height:7px;background:#f0f3f6;border-radius:3px;overflow:hidden}
.report-fill{height:100%;background:#315b79;border-radius:3px;min-width:2px}
.report-panel.categories .report-fill{background:#8b9fad}
.report-footnote{font-size:10px;color:#788696;border-top:1px solid #edf0f3;padding-top:16px;margin-top:24px;line-height:1.6}
.report-empty{font-size:12px;color:#718091;padding:22px 0;line-height:1.7}
.report-reopened{grid-column:1/-1}
.report-reopen-row{display:flex;justify-content:space-between;align-items:center;gap:18px;border-top:1px solid #edf0f3;padding:14px 0;color:#687687;font-size:12px}
.report-reopen-row span{overflow-wrap:anywhere;min-width:0}
.report-ticket-link{border:0;background:none;padding:4px 0;font:600 12px var(--font);color:#214e73;cursor:pointer;text-align:left;overflow-wrap:anywhere;min-width:0}
#admin-config-body{column-count:auto;display:grid;grid-template-columns:minmax(0,1fr);gap:18px}
#admin-config-body > .detail-section{background:#fff;border:1px solid var(--border);border-radius:12px;padding:24px;margin:0;min-width:0}
#admin-config-body .ds-label{color:#20394f;letter-spacing:0;font-size:14px;text-transform:none;margin-bottom:16px;padding-bottom:16px}
#admin-config-body .ds-label::before{display:none}
#app:not(.guest-mode) .app-main-footer{max-width:1480px;margin:28px auto 22px;padding:18px 30px 0;border-top:0;color:#8994a0;font-size:10px}
#app:not(.guest-mode) .footer-brand,#app:not(.guest-mode) .footer-brand strong,#app:not(.guest-mode) .footer-links a{color:#68798a;font-weight:500}
#app:not(.guest-mode) .empty-state{grid-column:1/-1;border:1px dashed #d9e2e9;border-radius:12px;background:#fff}
#app:not(.guest-mode) :focus-visible{outline:2px solid #537998;outline-offset:3px}
.sidebar-caption{display:none}
@media(min-width:768px){
  #app:not(.guest-mode):not(.is-hidden){grid-template-columns:224px minmax(0,1fr);grid-template-rows:72px minmax(0,1fr)}
  #app:not(.guest-mode) .app-header{height:72px;padding:0 26px}
  #app:not(.guest-mode) .hdr-logo{height:38px;width:38px;border:1px solid #edf0f3;border-radius:9px}
  #app:not(.guest-mode) .hdr-title{font-size:15px}
  #app:not(.guest-mode) .hdr-sub{font-size:10px;margin-top:3px}
  #app:not(.guest-mode) .hdr-right{gap:16px}
  #app:not(.guest-mode) .desktop-sidebar{background:#112c44;border-right:0;padding:24px 12px}
  #app:not(.guest-mode) .sidebar-brand{margin:0 10px 20px;padding:0 0 25px;border-bottom:1px solid #ffffff12;gap:10px}
  #app:not(.guest-mode) .sidebar-brand-mark{display:none}
  #app:not(.guest-mode) .sidebar-brand-title{font-size:12px;letter-spacing:.01em;font-weight:650;color:#f3f6f9}
  #app:not(.guest-mode) .sidebar-brand-sub{color:#91a7ba;font-size:10px;margin-top:4px}
  #app:not(.guest-mode) .sidebar-nav-item{margin:3px 0;padding:12px 13px;gap:12px;border-radius:7px;color:#aebfce;font-size:12px;font-weight:500;line-height:1.5;min-height:44px}
  #app:not(.guest-mode) .sidebar-nav-item.active{background:#28445c;box-shadow:inset 2px 0 #d4bb87;color:#fff}
  #app:not(.guest-mode) .sidebar-nav-item.active .sn-icon{color:#dbc390}
  #app:not(.guest-mode) .sidebar-nav-item:hover{background:#213e56}
  #app:not(.guest-mode) .sn-icon .ico{width:17px;height:17px;stroke-width:1.7}
  .sidebar-caption{display:block;margin-top:auto;padding:32px 12px 0;color:#95aabd;font-size:10px;line-height:1.7}
  .sidebar-caption strong{display:block;color:#c4d0db;font-size:11px;font-weight:500;margin-bottom:3px}
}
@media(min-width:1150px){
  #analytics-body{grid-template-columns:repeat(2,minmax(0,1fr))}
  #analytics-body .metric-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  #admin-config-body{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
  #app:not(.guest-mode) .page:not(#page-new){padding:38px 38px 12px}
  #app:not(.guest-mode) .ticket-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  #app:not(.guest-mode) .team-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(min-width:1600px){#app:not(.guest-mode) .team-list{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:767px){
  .hdr-identity{display:none}
  #app:not(.guest-mode) .page:not(#page-new){padding:22px 16px 12px}
  #app:not(.guest-mode) .page-header{gap:12px;align-items:flex-start;padding-bottom:20px}
  #app:not(.guest-mode) .page-title{font-size:25px}
  #app:not(.guest-mode) .page-sub{font-size:12px}
  #app:not(.guest-mode) .home-greeting{padding:23px;display:block}
  #app:not(.guest-mode) .greeting-name{font-size:24px}
  .home-action{margin-top:20px}
  #app:not(.guest-mode) .stat-chips{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  #app:not(.guest-mode) .stat-chip{padding:18px}
  #app:not(.guest-mode) .chip-val{font-size:28px}
  #app:not(.guest-mode) .ticket-card{padding:18px}
  #app:not(.guest-mode) .filter-bar{padding:13px}
  #analytics-body{gap:14px}
  #analytics-body .metric-grid{gap:10px}
  #analytics-body .metric-card{padding:17px 14px}
  #analytics-body .metric-val{font-size:29px}
  .metric-heading{font-size:10px;line-height:1.5;align-items:flex-start}
  .metric-heading .ico{display:none}
  .report-panel{padding:20px}
  .analytics-context{align-items:flex-start;flex-wrap:wrap;line-height:1.6}
  .report-reopen-row{align-items:flex-start;flex-direction:column;gap:4px}
  #app:not(.guest-mode) .app-main-footer{padding:16px 16px 0;margin-bottom:calc(var(--nav-h) + var(--safe-bottom) + 20px)}
  #app:not(.guest-mode) .bottom-nav{border-top:1px solid #dfe6ec;box-shadow:0 -4px 15px #15334e05}
}
@media(prefers-reduced-motion:reduce){.page,.ticket-card{animation:none !important;transition:none !important}}
.workload-panel{margin-top:18px;background:#fff;border:1px solid var(--border);border-radius:10px;padding:0 18px}
.workload-panel summary{padding:17px 0;font-size:12px;font-weight:650;color:#2d485e;cursor:pointer}
.workload-panel summary span{font-weight:400;font-size:11px;color:#718296;margin-left:12px}
#app:not(.guest-mode) .workload-panel .team-list{padding-bottom:18px}
@media(min-width:1150px){
  #app:not(.guest-mode) .dispatch-filter-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .dispatch-filter-daterange{grid-column:span 2}
  #app:not(.guest-mode) .workload-panel .team-list{grid-template-columns:repeat(4,minmax(0,1fr))}
  #app:not(.guest-mode) .workload-panel .team-member-card{padding:16px 12px;gap:10px}
}
@media(max-width:479px){.workload-panel summary span{display:block;margin:5px 0 0 17px}}
