
:root{
  --navy:#08275b;
  --navy2:#0f3d7a;
  --gold:#c69517;
  --gold2:#e5bd52;
  --bg:#f4f7fb;
  --card:#fff;
  --text:#172033;
  --muted:#6b7484;
  --line:#dde3ec;
  --green:#1e7d56;
  --shadow:0 12px 32px rgba(20,42,74,.10);
}
*{box-sizing:border-box}
body{margin:0;font-family:Inter,Arial,sans-serif;background:var(--bg);color:var(--text)}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
.app-header{position:sticky;top:0;z-index:20;background:white;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;padding:12px 4%;gap:20px}
.brand{display:flex;align-items:center;gap:16px}
.brand img{width:165px;max-height:72px;object-fit:contain}
.brand h1{font-size:1.2rem;margin:0;color:var(--navy)}
.brand p{margin:3px 0 0;color:var(--muted);font-size:.84rem}
.role-switch{display:flex;gap:8px;flex-wrap:wrap}
.role-switch button,.feature-card button,.section-title button{border:1px solid var(--line);background:white;padding:10px 14px;border-radius:10px;font-weight:800;color:var(--navy)}
.role-switch button.active{background:var(--navy);color:white;border-color:var(--navy)}
.shell{max-width:1240px;margin:24px auto;padding:0 18px 40px}
.hero{background:linear-gradient(135deg,var(--navy),var(--navy2));color:white;border-radius:22px;padding:28px;display:flex;justify-content:space-between;align-items:center;gap:30px;box-shadow:var(--shadow);border-bottom:4px solid var(--gold)}
.hero h2{font-size:2rem;margin:10px 0}
.hero p{max-width:700px;color:#dce8f7;line-height:1.55}
.pill{display:inline-block;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);border-radius:999px;padding:6px 10px;font-size:.8rem}
.quick-stats{display:grid;grid-template-columns:repeat(3,1fr);min-width:360px;gap:10px}
.quick-stats div{background:rgba(255,255,255,.10);padding:16px;border-radius:14px;text-align:center}
.quick-stats strong{display:block;font-size:1.5rem;color:#fff}
.quick-stats span{font-size:.78rem;color:#dce8f7}
.panel{display:none;margin-top:20px}
.active-panel{display:block}
.grid-2{display:grid;grid-template-columns:1.15fr .85fr;gap:20px}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:18px}
.card,.feature-card,.metric{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:20px;box-shadow:var(--shadow)}
.card h3{margin-top:0;color:var(--navy)}
.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
label{display:flex;flex-direction:column;gap:7px;font-weight:800;font-size:.88rem;color:#33415a}
.full{grid-column:1/-1}
input,select,textarea{border:1px solid var(--line);border-radius:10px;padding:12px;background:#fff;color:var(--text)}
textarea{resize:vertical}
.estimate{display:flex;justify-content:space-between;align-items:center;padding:16px;background:#f7f9fc;border:1px solid var(--line);border-radius:12px;margin-top:16px}
.estimate p{margin:4px 0 0;color:var(--muted);font-size:.82rem}
.estimate>strong{font-size:1.7rem;color:var(--navy)}
.primary{width:100%;margin-top:14px;background:var(--navy);color:white;border:0;border-radius:11px;padding:13px;font-weight:900}
.feature-card h4{color:var(--navy);margin-top:0}
.feature-card p,.muted{color:var(--muted);line-height:1.5}
.job-list{display:flex;flex-direction:column;gap:12px}
.job{border:1px solid var(--line);border-radius:14px;padding:14px;background:#fff}
.job:hover{border-color:#b9c7da}
.job-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.job h4{margin:0;color:var(--navy)}
.job p{margin:6px 0;color:var(--muted);font-size:.9rem}
.status{display:inline-block;border-radius:999px;padding:6px 9px;font-size:.76rem;font-weight:900;background:#edf2f8;color:var(--navy)}
.status.completed{background:#e7f6ef;color:var(--green)}
.status.emergency{background:#fff0ee;color:#a42c1f}
.job-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.job-actions button{border:1px solid var(--line);background:white;padding:8px 10px;border-radius:9px;font-weight:800}
.section-title{display:flex;justify-content:space-between;align-items:center;gap:10px}
.empty-state{color:var(--muted);padding:28px 8px;text-align:center}
.tech-form{display:grid;gap:12px}
.tech-form .row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.dashboard-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:18px}
.metric span{display:block;color:var(--muted);font-size:.82rem}
.metric strong{font-size:1.8rem;color:var(--navy)}
.settings-list{display:grid;gap:12px}
hr{border:0;border-top:1px solid var(--line);margin:22px 0}
.toast{position:fixed;right:18px;bottom:18px;background:var(--navy);color:white;padding:12px 16px;border-radius:12px;box-shadow:var(--shadow);opacity:0;transform:translateY(10px);pointer-events:none;transition:.2s}
.toast.show{opacity:1;transform:translateY(0)}
@media(max-width:900px){
  .app-header{align-items:flex-start;flex-direction:column}
  .brand img{width:140px}
  .grid-2,.grid-3,.dashboard-grid{grid-template-columns:1fr}
  .hero{flex-direction:column;align-items:flex-start}
  .quick-stats{min-width:0;width:100%}
}
@media(max-width:620px){
  .form-grid{grid-template-columns:1fr}
  .full{grid-column:auto}
  .quick-stats{grid-template-columns:1fr}
  .brand h1{font-size:1rem}
  .brand p{font-size:.75rem}
}

.membership-card{
  display:flex;justify-content:space-between;align-items:center;gap:24px;
  padding:22px;margin-bottom:18px;border-radius:18px;background:#fff;
  border:1px solid var(--line);box-shadow:var(--shadow);border-left:5px solid var(--gold);
}
.membership-card h3{margin:8px 0;color:var(--navy)}
.membership-card p{margin:0;color:var(--muted);max-width:720px;line-height:1.5}
.membership-badge{display:inline-block;padding:6px 10px;border-radius:999px;background:#fff7df;color:#7b5a00;font-weight:900;font-size:.78rem}
.membership-price{min-width:180px;text-align:right}
.membership-price strong{font-size:2rem;color:var(--navy)}
.membership-price span{color:var(--muted)}
.membership-price button{display:block;width:100%;margin-top:10px;border:0;border-radius:10px;padding:11px;background:var(--navy);color:#fff;font-weight:900}
.membership-price small{display:block;margin-top:8px;color:var(--muted);font-weight:700}
.membership-price small.active-member{color:var(--green)}
.dashboard-grid{grid-template-columns:repeat(6,1fr)}
@media(max-width:1000px){.dashboard-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:700px){
  .membership-card{flex-direction:column;align-items:flex-start}
  .membership-price{width:100%;text-align:left}
  .dashboard-grid{grid-template-columns:1fr 1fr}
}

.header-actions{margin-left:auto;display:flex;align-items:center;gap:10px}
.install-btn,.account-actions button{border:1px solid var(--line);background:white;padding:9px 12px;border-radius:10px;font-weight:800;color:var(--navy)}
.account-badge{font-size:.76rem;background:#eef3f9;color:var(--navy);padding:7px 10px;border-radius:999px;font-weight:900}
.account-bar{display:flex;justify-content:space-between;align-items:center;gap:16px;background:white;border:1px solid var(--line);padding:14px 16px;border-radius:16px;margin-bottom:16px;box-shadow:var(--shadow)}
.account-bar>div:first-child{display:flex;flex-direction:column;gap:4px}
.account-bar span{color:var(--muted);font-size:.82rem}
.account-actions{display:flex;gap:8px;flex-wrap:wrap}
.billing-note{font-size:.68rem!important;font-weight:500!important;line-height:1.35}
.app-benefits{margin-top:0;margin-bottom:18px}
.app-footer{max-width:1240px;margin:0 auto 30px;padding:18px;display:flex;justify-content:space-between;gap:20px;color:var(--muted);font-size:.82rem}
.app-footer div{display:flex;flex-direction:column;gap:4px}
.app-footer strong{color:var(--navy)}
@media(max-width:900px){
  .header-actions{margin-left:0}
  .account-bar,.app-footer{flex-direction:column;align-items:flex-start}
}

.job-costs{margin:14px 0;border-top:1px solid var(--line)}
.job-costs>div{display:flex;justify-content:space-between;gap:16px;padding:8px 0}
.job-costs dt{color:var(--muted);overflow-wrap:anywhere}
.job-costs dd{margin:0;white-space:nowrap;font-weight:700}
.job-costs .job-total{border-top:1px solid var(--line);font-weight:800}
.job-total dt{color:var(--navy)}
.job-report{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
.job-report p{white-space:pre-wrap;overflow-wrap:anywhere}

[hidden]{display:none !important}
#authPanel{max-width:560px;margin:20px auto} #authError,#appError{color:#a32323} .job textarea{width:100%} .job-actions select{max-width:220px} #usersList{margin-top:20px} .account-entry{padding:8px 0;border-bottom:1px solid #ddd}
