/* Modern LoadPro contractor and administrator workspace. */
:root {
  --portal-nav: #0a0a0a;
  --portal-nav-soft: #171717;
  --portal-blue: #0877df;
  --portal-cyan: #31b6f3;
  --portal-orange: #ff8b2c;
  --portal-ink: #152536;
  --portal-muted: #5f7183;
  --portal-line: #dce4eb;
  --portal-canvas: #f4f5f3;
  --portal-card: #fff;
  --portal-success: #13845e;
  --portal-radius: 14px;
  --portal-shadow: 0 16px 42px rgba(15,35,52,.08);
}

body { background: var(--portal-canvas); color: var(--portal-ink); }

.sidebar {
  width: 264px;
  padding: 30px 22px 24px;
  background: var(--portal-nav);
  border-right: 1px solid #ffffff12;
}
.sidebar .brand { padding: 2px 10px 22px; font-size: 21px; }
.sidebar .brand .mark { display: none; }
.sidebar nav { margin-top: 28px; gap: 5px; }
.sidebar nav::before {
  content: "WORKSPACE";
  padding: 0 14px 10px;
  color: #71808d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
}
.sidebar nav a {
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #b7c2cb;
  font-size: 13px;
  transition: background .18s ease,color .18s ease,border-color .18s ease;
}
.sidebar nav a span { width: 20px; color: #7f92a2; text-align: center; }
.sidebar nav a:hover { background: #ffffff0d; color: #fff; }
.sidebar nav a.active,.sidebar nav a[aria-current="page"] {
  border-color: #ffffff12;
  border-left-color: var(--portal-cyan);
  background: linear-gradient(90deg,#0c76d62b,#ffffff09);
  color: #fff;
  text-decoration: none;
}
.sidebar-bottom { border-top: 1px solid #ffffff16; padding-top: 18px; }
.sidebar-bottom a,.sidebar-bottom button { min-height: 38px; display: flex; align-items: center; color: #a9b6c0; }

main { margin-left: 264px; padding: 0 clamp(22px,3.2vw,48px) 70px; }
main > header {
  position: sticky;
  z-index: 20;
  top: 0;
  height: 92px;
  margin: 0 calc(clamp(22px,3.2vw,48px) * -1) 26px;
  padding: 0 clamp(22px,3.2vw,48px);
  background: rgba(244,245,243,.94);
  border-bottom: 1px solid rgba(220,228,235,.85);
  backdrop-filter: blur(14px);
}
main > header p { color: var(--portal-blue); font-size: 11px; letter-spacing: .14em; }
main > header h1 { font-size: clamp(24px,2.6vw,36px); letter-spacing: -.035em; }

.account-banner {
  min-height: 190px;
  padding: 32px 36px;
  border: 0;
  border-radius: var(--portal-radius);
  background:
    radial-gradient(circle at 88% 20%,rgba(49,182,243,.25),transparent 30%),
    linear-gradient(125deg,#091b2c,#0b4c7d);
  box-shadow: var(--portal-shadow);
}
.account-banner h2 { font-size: clamp(25px,3vw,38px); letter-spacing: -.04em; }
.account-banner p { max-width: 560px; color: #c0d2df; font-size: 14px; }
.tier { border: 1px solid #ffffff21; border-radius: 999px; background: #ffffff12; color: #d8efff; }
.credit { min-width: 190px; }
.credit strong { font-size: 42px; }
.account-banner .primary { min-height: 48px; padding-inline: 22px; }

.primary,.secondary,.outline-button {
  min-height: 44px;
  border-radius: 8px;
  font-size: 13px;
  transition: transform .16s ease,box-shadow .16s ease,background .16s ease;
}
.primary { background: linear-gradient(135deg,var(--portal-blue),#1694e8); box-shadow: 0 8px 22px #0877df25; }
.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 26px #0877df38; }
.secondary { border: 1px solid var(--portal-line); background: #fff; }

.stats { gap: 16px; margin: 22px 0; }
.stats article {
  min-height: 116px;
  padding: 22px;
  border-color: var(--portal-line);
  border-radius: var(--portal-radius);
  box-shadow: 0 8px 28px rgba(15,35,52,.045);
}
.stat-icon { width: 45px; height: 45px; border-radius: 10px; }
.stats p { font-size: 11px; letter-spacing: .08em; }
.stats strong { font-size: 30px; }

.panel,.ahri-resource-card,.industry-resources,.billing-panel,.billing-card {
  border-color: var(--portal-line);
  border-radius: var(--portal-radius);
  box-shadow: 0 10px 32px rgba(15,35,52,.05);
}
.panel-head { min-height: 82px; padding: 22px 26px; }
.panel-head h2 { font-size: 20px; letter-spacing: -.02em; }
.panel-head p { font-size: 11px; }
.panel-head small { color: var(--portal-muted); }
.tools input,.tools select {
  min-height: 44px;
  padding: 10px 13px;
  border-radius: 8px;
  font-size: 13px;
}
.tools .project-intake-action { min-height: 44px; padding: 10px 18px; white-space: nowrap; }

.table-wrap { border-radius: 0 0 var(--portal-radius) var(--portal-radius); }
table { min-width: 900px; }
th { padding: 15px 22px; background: #f7f9fa; color: #657786; font-size: 11px; }
td { padding: 18px 22px; font-size: 13px; }
td strong { font-size: 14px; }
tbody tr:hover { background: #f7fbfe; }
.status { padding: 7px 11px; border-radius: 999px; }
.project-actions { gap: 7px; }
.project-actions button { min-height: 38px; border-radius: 7px; }
.project-notes-button {
  width: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 1px solid #cfe0ec;
  border-radius: 9px;
  background: #eef7fd;
  color: var(--portal-blue);
  cursor: pointer;
}
.project-notes-button:hover { background: #dff1fd; transform: translateY(-1px); }
.project-notes-button svg { width: 17px; height: 17px; }
.project-notes-button span { font-size: 9px; font-weight: 800; }
.due-date-badge { padding: 8px 11px; font-size: 11px; line-height: 1.2; }

.project-notes-dialog { width: min(1040px,96vw); max-width: none; }
.project-notes-shell { min-height: min(760px,90vh); background: #f5f7f8; }
.project-notes-body { display: grid; grid-template-columns: minmax(300px,.9fr) minmax(380px,1.1fr); gap: 20px; padding: 24px; }
.project-note-editor,.project-note-history { padding: 24px; border: 1px solid var(--portal-line); border-radius: 13px; background: #fff; }
.project-note-editor { align-self: start; }
.project-note-editor label { display: block; margin-bottom: 10px; color: var(--portal-ink); font-size: 14px; font-weight: 800; }
.project-note-editor textarea { width: 100%; min-height: 330px; resize: vertical; padding: 16px; border: 1px solid #cbd9e3; border-radius: 10px; color: var(--portal-ink); line-height: 1.6; }
.project-note-editor > div { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; }
#project-note-status { color: var(--portal-muted); font-size: 11px; }
.project-note-history-head { margin-bottom: 18px; }
.project-note-history-head p { margin: 0 0 5px; color: var(--portal-blue); font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.project-note-history-head h3 { margin: 0; font-size: 20px; }
#project-note-list h4 { margin: 22px 0 9px; padding-bottom: 8px; border-bottom: 1px solid var(--portal-line); font-size: 12px; }
#project-note-list h4:first-child { margin-top: 0; }
.saved-project-note { display: grid; grid-template-columns: 70px 1fr; gap: 14px; padding: 13px 0; }
.saved-project-note time { color: var(--portal-blue); font-size: 11px; font-weight: 800; }
.saved-project-note p { margin: 0; white-space: pre-wrap; line-height: 1.55; font-size: 13px; }
.project-note-empty { min-height: 250px; display: grid; place-content: center; gap: 6px; color: var(--portal-muted); text-align: center; }
.project-note-empty strong { color: var(--portal-ink); }

.bottom-grid { gap: 18px; }
.activity li { padding: 15px 0; }

.admin-review-panel {
  border: 1px solid #b9d9f2;
  background: linear-gradient(180deg,#f7fbff,#fff 130px);
}
.admin-review-panel .panel-head { border-bottom-color: #cfe3f2; }
.admin-review-panel .panel-head > div:first-child p::before { content: "◆ "; color: var(--portal-orange); }
.admin-review-count { border-radius: 10px; background: #e7f3fd; }
.admin-workflow-guide { border-bottom: 1px solid #dbe8f2; background: #f7fbff; }
.admin-workflow-guide div > span { background: var(--portal-blue); color: #fff; }
.admin-access-note { border-radius: 8px; }

body.admin-account main > header p { color: var(--portal-orange); }
body.admin-account .sidebar nav::before { content: "ADMINISTRATION"; }
body.admin-account .sidebar .admin-command-nav {
  border-color: #ff8b2c33;
  background: linear-gradient(90deg,#ff8b2c20,#ffffff08);
  color: #ffe0c5;
}
body.admin-account .sidebar .admin-command-nav span { color: var(--portal-orange); }
body.admin-account .account-banner {
  background:
    radial-gradient(circle at 88% 18%,rgba(255,139,44,.28),transparent 31%),
    linear-gradient(125deg,#17110c,#533019 62%,#143650);
}
body.admin-account .account-banner .tier { color: #ffe3ca; }
body.admin-account .admin-review-panel { margin: 22px 0; box-shadow: 0 18px 50px rgba(15,35,52,.1); }
body.admin-account .stats.portal-overview { display: none; }
body.admin-account .industry-resources.portal-overview { margin-top: 22px; }
.completed-manuals-card{grid-column:1/-1}.completed-manuals-body{padding:18px 22px}.completed-manuals-form{display:grid;grid-template-columns:1fr .65fr 1.25fr auto;align-items:end;gap:12px;margin-top:16px;padding-top:16px;border-top:1px solid #dbe8f2}.completed-manuals-form label{display:grid;gap:6px;color:var(--muted);font-size:8px;font-weight:800;text-transform:uppercase}.completed-manuals-form select,.completed-manuals-form input{min-height:42px;border:1px solid #bdced9;border-radius:7px;background:#fff;padding:8px;color:var(--ink);font:9px Manrope,sans-serif;text-transform:none}.completed-manual-list{display:grid;gap:9px}.completed-manual-item{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:12px;border:1px solid #dbe8f2;border-radius:9px;background:#f8fbfd}.completed-manual-item strong,.completed-manual-item small{display:block}.completed-manual-item strong{font-size:10px}.completed-manual-item small{margin-top:3px;color:var(--muted);font-size:8px}.completed-manual-item button{border:0;border-radius:6px;background:#e7f3fd;color:var(--blue);padding:9px 11px;font-size:8px;font-weight:800;cursor:pointer}@media(max-width:900px){.completed-manuals-form{grid-template-columns:1fr 1fr}.completed-manual-file{grid-column:1/-1}}@media(max-width:620px){.completed-manuals-form{grid-template-columns:1fr}.completed-manual-file{grid-column:auto}.completed-manual-item{grid-template-columns:auto 1fr}.completed-manual-item button{grid-column:1/-1}}

.industry-news-grid { gap: 15px; padding: 22px; }
.industry-news-card { border: 1px solid var(--portal-line); border-radius: 11px; box-shadow: none; }
.industry-resource-links a { min-height: 42px; border-radius: 8px; }

.news-source-buttons { display: flex; align-items: center; gap: 8px; }
.news-source-buttons a {
  min-height: 36px;
  padding: 9px 13px;
  border-radius: 7px;
  background: linear-gradient(135deg,var(--portal-blue),#1694e8);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.news-source-buttons a:hover { transform: translateY(-1px); box-shadow: 0 8px 18px #0877df2e; }
.portal-app-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.portal-app-actions a { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

dialog {
  border-radius: 16px;
  box-shadow: 0 36px 100px rgba(7,23,39,.35);
}
dialog::backdrop { background: rgba(7,23,39,.74); backdrop-filter: blur(4px); }
.modal-head { padding: 24px 28px; }
.modal-head h2 { font-size: 23px; letter-spacing: -.025em; }
.close { width: 44px; height: 44px; border-radius: 50%; }
.close:hover { background: #edf3f7; }
.modal-actions { padding: 18px 28px; }

.intake-dialog { width: min(1180px,96vw); }
.intake-section,.project-file-list-card,.project-analysis-callout,.intake-progress-shell {
  border-radius: 12px;
}
.clean-grid label,.intake-form label { color: #4e6477; }
.clean-grid input,.clean-grid select,.clean-grid textarea,.intake-form input,.intake-form select,.intake-form textarea {
  border-radius: 8px;
  border-color: #cfdbe4;
  background: #fff;
}

.billing-hero,.billing-summary,.billing-history { border-radius: var(--portal-radius); }
.billing-package-card { border-radius: 12px; }
.billing-page .billing-price strong,.billing-panel .billing-price strong { font-size: 32px; line-height: 1.1; }
.billing-page .billing-price span,.billing-panel .billing-price span { font-size: 11px; font-weight: 600; }
.billing-page .billing-account-strip strong,.billing-panel .billing-account-strip strong { font-size: 17px; }
.billing-page .billing-account-strip small,.billing-panel .billing-account-strip small { font-size: 10px; }
.billing-page .billing-calc-grid span,.billing-panel .billing-calc-grid span { font-size: 9px; }
.billing-page .billing-calc-grid strong,.billing-panel .billing-calc-grid strong { font-size: 18px; }
.billing-page .billing-calc-grid .billing-calc-total strong,.billing-panel .billing-calc-grid .billing-calc-total strong { font-size: 24px; }
.billing-page .billing-discount-scale span,.billing-panel .billing-discount-scale span { font-size: 10px; }
.billing-page .billing-discount-scale b,.billing-panel .billing-discount-scale b { font-size: 11px; }
.billing-page .billing-cart-item > strong { font-size: 14px; }
.billing-page .billing-cart-summary strong { font-size: 21px; }
.billing-page .billing-preview-body > span { font-size: 14px; }

@media (max-width: 1050px) {
  .sidebar { width: 226px; }
  main { margin-left: 226px; }
  .stats { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 760px) {
  body { padding-bottom: 78px; }
  .sidebar {
    position: fixed;
    z-index: 100;
    inset: auto 0 0;
    width: 100%;
    height: 72px;
    padding: 8px 10px max(8px,env(safe-area-inset-bottom));
    border-top: 1px solid #ffffff18;
    border-right: 0;
  }
  .sidebar .brand,.sidebar-bottom,.sidebar nav::before { display: none; }
  .sidebar nav {
    display: grid;
    grid-template-columns: repeat(5,minmax(64px,1fr));
    gap: 3px;
    margin: 0;
    overflow-x: auto;
  }
  .sidebar nav a {
    min-height: 54px;
    padding: 6px 4px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    font-size: 10px;
    text-align: center;
  }
  .sidebar nav a:nth-child(n+6) { display: none; }
  .sidebar nav a span { width: auto; font-size: 17px; }
  main { margin: 0; padding: 0 15px 36px; }
  main > header { height: 76px; margin: 0 -15px 18px; padding: 0 18px; }
  .account-banner { padding: 25px; }
  .stats { grid-template-columns: repeat(2,1fr); }
  .panel-head { align-items: flex-start; }
  .tools { width: 100%; }
  .tools input { width: 100%; }
  .news-source-buttons { width: 100%; flex-wrap: wrap; }
  .project-notes-body { grid-template-columns: 1fr; padding: 14px; }
  .project-note-editor textarea { min-height: 220px; }
}

@media (max-width: 500px) {
  .stats { grid-template-columns: 1fr; }
  .account-banner { display: block; }
  .account-banner .credit { margin: 22px 0; padding: 18px 0 0; border-left: 0; border-top: 1px solid #ffffff24; }
  .account-banner .primary { width: 100%; }
}
