:root {
  --pod-accent: #54a5be;
  --pod-accent-rgb: 84, 165, 190;
  --pod-bg: #050918;
  --pod-surface: rgba(15, 23, 42, 0.72);
  --pod-surface-strong: rgba(15, 23, 42, 0.94);
  --pod-surface-soft: rgba(255, 255, 255, 0.045);
  --pod-text: #f9fafb;
  --pod-muted: #9ca3af;
  --pod-danger: #ef4444;
  --pod-success: #22c55e;
  --pod-warning: #f59e0b;
  --pod-info: #54a5be;
  --pod-radius: 22px;
  --pod-radius-sm: 14px;
  --pod-shadow: 0 18px 45px rgba(2, 8, 23, 0.28), inset 0 1px 0 rgba(255,255,255,0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--pod-bg);
  color: var(--pod-text);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(var(--pod-accent-rgb), 0.16), transparent 30%),
    radial-gradient(circle at bottom right, rgba(15,23,42,0.9), transparent 35%),
    #020617;
}

a {
  color: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
}

.pod-muted {
  color: var(--pod-muted);
}

.pod-small {
  font-size: 0.85rem;
}

.pod-small-link {
  font-size: 0.78rem;
  color: var(--pod-muted);
}

.pod-small-link a,
.pod-small-link a:visited {
  color: #ffffff;
  text-decoration: none;
}

.pod-small-link a:hover {
  color: var(--pod-accent);
}

/* ================================
   Auth / Login
   ================================ */

.auth-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(var(--pod-accent-rgb),0.2), transparent 30%),
    linear-gradient(180deg, #050918 0%, #09111f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1100px;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
  border: 1px solid rgba(148,163,184,0.16);
}

.auth-panel {
  background: rgba(255,255,255,0.03);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-brand {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 30px;
}

.auth-logo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pod-accent), #2dd4bf);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #02131b;
}

.auth-panel h1,
.auth-card h2 {
  margin-bottom: 6px;
  letter-spacing: -0.03em;
}

.auth-panel p,
.auth-subtext,
.auth-footer {
  color: #9fb2c7;
}

.auth-benefits {
  list-style: none;
  padding: 0;
  margin-top: 20px;
  color: #d4deea;
}

.auth-benefits li {
  margin-bottom: 10px;
}

.auth-card {
  background: rgba(15, 23, 42, 0.96);
  padding: 40px;
}

.auth-footer {
  margin-top: 20px;
  font-size: 14px;
}

.auth-footer a {
  color: var(--pod-accent);
}

/* ================================
   App Shell / Header / Navigation
   ================================ */

.nav-group-menu {
  position: relative;
}

.nav-group-menu summary {
  list-style: none;
}

.nav-group-menu summary::-webkit-details-marker {
  display: none;
}

.nav-group-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 18px;
  background: rgba(var(--pod-accent-rgb), 0.9);
  border: 1px solid rgba(255,255,255,0.08);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.nav-group-pill.active,
.nav-group-pill:hover {
  background: linear-gradient(135deg, rgba(var(--pod-accent-rgb),0.34), rgba(var(--pod-accent-rgb),0.12));
  border-color: rgba(var(--pod-accent-rgb),0.48);
}

.nav-group-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 70;
  min-width: 220px;
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

.nav-group-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #e5edf7;
  text-decoration: none;
  background: transparent;
  border: none;
  box-shadow: none;
  text-transform: none;
  letter-spacing: 0;
}

.nav-group-panel a:hover {
  background: rgba(84, 165, 190, 0.14);
  transform: none;
}
.app-nav-grid {
  gap: 12px;
}

.pod-shell,
.pod-app-shell {
  min-height: 100vh;
  padding: 18px;
}

.pod-main,
.pod-main-content {
  animation: podPageFade 0.22s ease both;
}

@keyframes podPageFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.pod-main {
  max-width: 1120px;
  margin: 32px auto 40px;
  padding: 0 16px 40px;
}

.pod-header-app,
.pod-header-main,
.pod-topbar {
  position: relative;
  background: rgba(2,6,23,0.72);
  border-bottom: 1px solid rgba(148,163,184,0.14);
  backdrop-filter: blur(16px);
}

.pod-header-app {
  padding: 24px 18px 18px;
  border-radius: 20px 20px 0 0;
}

.pod-header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.pod-header-top-left {
  position: absolute;
  top: 1rem;
  left: 1rem;
}

.pod-header-top-left h1 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.pod-logo-circle,
.pod-logo-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--pod-accent);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.35);
}

.pod-logo-circle {
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 1.1rem;
  margin-top: 10px;
}

.pod-logo-mini {
  border-radius: 999px;
  letter-spacing: 0.18em;
  font-size: 0.85rem;
  padding: 4px 8px;
}

.pod-brand,
.pod-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pod-brand-text {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--pod-muted);
}

.pod-business-logo-large {
  margin-top: 4rem;
  text-align: center;
}

.pod-business-logo-large img {
  max-width: 180px;
  max-height: 180px;
  border-radius: 10px;
}

.pod-business-logo img {
  max-height: 36px;
  border-radius: 8px;
}

.pod-business-placeholder {
  color: rgba(226,232,240,0.55);
}

.pod-nav,
.pod-nav-links,
.app-nav-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.app-nav-grid {
  margin-top: 2rem;
}

.nav-btn,
.pod-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(var(--pod-accent-rgb), 0.9);
  border: 1px solid rgba(255,255,255,0.08);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.nav-btn:hover,
.pod-nav a:hover {
  color: #ffffff;
  background: rgba(var(--pod-accent-rgb), 0.72);
  transform: translateY(-1px);
}

.nav-btn.active,
.pod-nav a.active,
.nav-btn[aria-current="page"],
.pod-nav a[aria-current="page"] {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(var(--pod-accent-rgb),0.34), rgba(var(--pod-accent-rgb),0.12));
  border-color: rgba(var(--pod-accent-rgb),0.48);
  box-shadow: 0 10px 24px rgba(var(--pod-accent-rgb),0.16);
}

.nav-btn-logout {
  background: rgba(239, 68, 68, 0.82);
}

.nav-btn-logout:hover {
  background: rgba(220, 38, 38, 0.94);
}

.pod-user-chip,
.pod-role-chip,
.pod-plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(15,23,42,0.7);
  border: 1px solid rgba(148,163,184,0.18);
  color: rgba(226,232,240,0.84);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pod-footer-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 16px 26px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--pod-muted);
  font-size: 0.82rem;
}

/* ================================
   Sections / Cards / Dashboard
   ================================ */

.dashboard-command-centre {
  display: grid;
  gap: 22px;
}

.command-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.pod-kicker {
  margin: 0 0 6px;
  color: #7ddff8;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.command-date-pill {
  white-space: nowrap;
  border-radius: 999px;
  padding: 10px 14px;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-weight: 700;
}

.command-attention-card {
  border-color: rgba(84, 165, 190, 0.38);
  background:
    radial-gradient(circle at top left, rgba(84, 165, 190, 0.18), transparent 28rem),
    rgba(15, 23, 42, 0.78);
}

.attention-header,
.panel-title-row,
.quick-actions-strip {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.attention-count {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #08111f;
  background: #54a5be;
  font-size: 1.35rem;
  font-weight: 900;
}

.attention-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.attention-item {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 18px;
  text-decoration: none;
  color: #e5edf7;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.attention-item:hover {
  transform: translateY(-2px);
  border-color: rgba(84, 165, 190, 0.45);
}

.attention-item strong {
  font-size: 2rem;
  line-height: 1;
}

.attention-item span {
  color: #cbd5e1;
  font-size: 0.9rem;
}

.attention-warning {
  border-color: rgba(250, 204, 21, 0.24);
}

.attention-danger {
  border-color: rgba(248, 113, 113, 0.28);
}

.attention-info {
  border-color: rgba(84, 165, 190, 0.32);
}

.attention-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 26px;
}

.quick-actions-strip {
  align-items: center;
}

.quick-actions-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.command-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.compact-stat {
  min-height: auto;
}

.command-panels-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
}

.command-panel-large,
.command-side-panel {
  min-width: 0;
}

.command-table {
  margin-top: 16px;
}

.stacked-list,
.next-step-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.stacked-list-item,
.next-step-list a {
  display: grid;
  gap: 4px;
  padding: 13px;
  border-radius: 16px;
  color: inherit;
  text-decoration: none;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.stacked-list-item:hover,
.next-step-list a:hover {
  border-color: rgba(84, 165, 190, 0.38);
  transform: translateY(-1px);
}

.stacked-list-item span,
.next-step-list span,
.stacked-list-item small {
  color: #94a3b8;
}

.mini-empty {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 16px;
  border-radius: 16px;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.48);
  border: 1px dashed rgba(148, 163, 184, 0.18);
}

.mini-empty strong {
  color: #e5edf7;
}

@media (max-width: 980px) {
  .command-header,
  .attention-header,
  .panel-title-row,
  .quick-actions-strip {
    flex-direction: column;
  }

  .attention-grid,
  .command-stats-grid,
  .command-panels-grid {
    grid-template-columns: 1fr;
  }

  .quick-actions-list {
    justify-content: flex-start;
  }
}
.pod-section,
.pod-dashboard-shell {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.pod-section {
  margin-top: 4rem;
}

.pod-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.pod-section-header h1,
.pod-section-header h2 {
  margin: 0 0 6px;
  letter-spacing: -0.03em;
}

.pod-section-header p {
  margin: 0;
  color: var(--pod-muted);
}

.pod-card {
  color: var(--pod-text);
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.035)), var(--pod-surface);
  border-radius: var(--pod-radius);
  padding: 18px;
  box-shadow: var(--pod-shadow);
  backdrop-filter: blur(14px);
}

.pod-card:hover {
  border-color: rgba(var(--pod-accent-rgb), 0.34);
}

.pod-cards-grid,
.pod-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.pod-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.pod-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9990 !important;
  background: rgba(2, 6, 23, 0.68);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.pod-drawer-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}



.pod-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.pod-drawer-header h3 {
  margin-bottom: 4px;
}

.pod-drawer-close {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255,255,255,0.04);
  color: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
}

.permission-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.permission-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.permission-drawer-grid {
  display: grid;
  gap: 12px;
}



.permission-drawer-grid .pod-checkbox {
  align-items: flex-start;
  padding: 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.permission-drawer-grid .pod-checkbox span {
  display: grid;
  gap: 3px;
}

.permission-drawer-grid .pod-checkbox small {
  color: #94a3b8;
  font-size: 0.78rem;
}

.pod-panels-grid {
  display: grid;
  grid-template-columns: minmax(350px, 1.2fr) minmax(350px, 1.2fr);
  gap: 16px;
}

.pod-stat {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  padding: 22px;
}

.pod-stat::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(var(--pod-accent-rgb),0.22), transparent 36%), radial-gradient(circle at bottom left, rgba(255,255,255,0.07), transparent 30%);
  pointer-events: none;
}

.pod-stat h3,
.pod-stat .pod-stat-number,
.pod-stat .pod-stat-sub {
  position: relative;
  z-index: 1;
}

.pod-stat h3 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(226, 232, 240, 0.72);
  margin-bottom: 18px;
}

.pod-stat-number {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.06em;
  color: #ffffff;
}

.pod-stat-sub {
  margin-top: 10px;
  color: rgba(226, 232, 240, 0.68);
  font-size: 0.88rem;
}

.pod-click-card {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.pod-click-card:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--pod-accent-rgb), 0.65);
  box-shadow: 0 22px 58px rgba(2, 8, 23, 0.34), 0 0 0 1px rgba(var(--pod-accent-rgb), 0.14);
}

.pod-card-title-link {
  color: inherit;
  text-decoration: none;
}

.pod-card-title-link:hover {
  color: var(--pod-accent);
}

.pod-card-header,
.pod-card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

/* ================================
   Tables
   ================================ */

.pod-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  font-size: 0.85rem;
  color: var(--pod-text);
  table-layout: auto;
}

.pod-table th,
.pod-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(55, 65, 81, 0.8);
}

.pod-table thead th,
.pod-table th {
  text-align: left;
  font-weight: 700;
  color: rgba(226, 232, 240, 0.62);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  background: rgba(15, 23, 42, 0.42);
  white-space: nowrap;
}

.pod-table tbody tr {
  transition: background 0.16s ease;
}

.pod-table tbody tr:hover {
  background: rgba(var(--pod-accent-rgb), 0.08);
}

.pod-table-users td {
  vertical-align: top;
}

.user-main-cell { min-width: 260px; }
.user-main-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.user-role-cell select { min-width: 150px; }
.user-active-cell { text-align: center; }
.user-perms-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 6px 18px; }
.user-actions-cell { vertical-align: middle; text-align: right; }

/* ================================
   Forms / Buttons / Chips
   ================================ */

.pod-form,
.pod-premium-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pod-form h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1rem;
}

.pod-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.pod-form-row,
.pod-action-row,
.pod-scan-actions,
.pod-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.pod-action-row { margin: 12px 0 18px; }
.pod-action-row .btn-outline-small,
.pod-action-row .btn-primary { white-space: nowrap; }

.pod-form-panel {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.44);
  border-radius: 18px;
  padding: 18px;
}

.pod-form-panel h4 {
  margin: 0 0 6px;
  color: #ffffff;
}

.pod-form-panel p {
  margin: 0 0 14px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.85rem;
  color: var(--pod-muted);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="color"],
input[type="password"],
select,
textarea,
.form-control {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  padding: 9px 11px;
  background: rgba(2, 6, 23, 0.62);
  color: var(--pod-text);
  font-size: 0.9rem;
}

textarea { resize: vertical; }

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(var(--pod-accent-rgb),0.72) !important;
  box-shadow: 0 0 0 3px rgba(var(--pod-accent-rgb),0.16);
}

.pod-checkbox {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--pod-muted);
}

.pod-checkbox input {
  margin: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--pod-accent);
  flex: 0 0 auto;
}

button,
.btn-primary,
.btn-outline-small {
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: none;
  padding: 9px 18px;
  background: linear-gradient(135deg, var(--pod-accent), #22d3ee);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 14px 35px rgba(var(--pod-accent-rgb), 0.28);
}

.btn-primary:hover,
.btn-outline-small:hover {
  transform: translateY(-1px);
}

.btn-outline-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: transparent;
  padding: 7px 12px;
  color: rgba(226,232,240,0.78);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  text-decoration: none;
}

.btn-outline-small:hover {
  border-color: var(--pod-accent);
  color: #ffffff;
  background: rgba(var(--pod-accent-rgb), 0.12);
}

.full-width { width: 100%; margin-top: 10px; }
.pod-form-span { grid-column: 1 / -1; }

.pod-form-actions,
.pod-sticky-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.pod-form-actions { margin-top: 16px; }

.pod-sticky-actions {
  position: sticky;
  bottom: 12px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(14px);
}

.pod-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pod-check-chip {
  position: relative;
  cursor: pointer;
}

.pod-check-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pod-check-chip span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 9px 13px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.62);
  color: rgba(226, 232, 240, 0.82);
  font-size: 0.86rem;
  font-weight: 600;
  transition: all 0.16s ease;
}

.pod-check-chip span::before {
  content: "+";
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: rgba(226, 232, 240, 0.7);
  font-size: 0.8rem;
}

.pod-check-chip input:checked + span {
  color: #ffffff;
  border-color: rgba(var(--pod-accent-rgb), 0.72);
  background: linear-gradient(135deg, rgba(var(--pod-accent-rgb), 0.28), rgba(var(--pod-accent-rgb), 0.12));
  box-shadow: 0 10px 28px rgba(var(--pod-accent-rgb), 0.16);
}

.pod-check-chip input:checked + span::before {
  content: "✓";
  background: var(--pod-accent);
  color: #ffffff;
}

/* ================================
   Status Pills / Tags / Alerts
   ================================ */

.pod-tag,
.pod-status-pill,
.comp-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(148, 163, 184, 0.12);
  color: rgba(226,232,240,0.82);
}

.pod-status-pill-dot,
.comp-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.status-pending,
.comp-expiring {
  background: rgba(234, 179, 8, 0.14);
  color: #facc15;
  border-color: rgba(234, 179, 8, 0.5);
}

.status-approved,
.status-paid,
.comp-valid {
  background: rgba(34, 197, 94, 0.14);
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.5);
}

.status-disputed,
.status-rejected,
.comp-expired {
  background: rgba(239, 68, 68, 0.14);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.5);
}

.comp-missing,
.status-default {
  background: rgba(148, 163, 184, 0.12);
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.5);
}

.pod-alert-error,
.pod-warning-note {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #fcd34d;
}

.pod-alert-error {
  border-left: 3px solid var(--pod-danger);
}

.pod-critical-row td {
  border-left: 3px solid var(--pod-warning);
}

.pod-danger-text {
  color: #f87171 !important;
  border-color: rgba(248, 113, 113, 0.45) !important;
}

.pod-danger-text:hover {
  background: rgba(248, 113, 113, 0.12) !important;
}

/* ================================
   Usage / Billing
   ================================ */

.pod-usage-banner {
  width: min(780px, calc(100% - 32px));
  margin: 18px auto 22px;
  padding: 16px 20px;
  border-radius: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(var(--pod-accent-rgb),0.18), rgba(15,23,42,0.72));
  border: 1px solid rgba(var(--pod-accent-rgb),0.35);
  box-shadow: 0 18px 44px rgba(2, 8, 23, 0.25);
}

.pod-usage-banner strong {
  color: #ffffff;
}

.pod-usage-banner p {
  margin: 4px 0 0;
  color: var(--pod-muted);
  font-size: 0.9rem;
}

.pod-usage-meter { margin-top: 14px; }

.pod-usage-meter-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.pod-progress-shell {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
}

.pod-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pod-accent), #2dd4bf);
  transition: width 0.25s ease;
}

.pod-pricing-card,
.pod-quote-total-card {
  border-radius: 18px;
  padding: 16px;
  background: radial-gradient(circle at top right, rgba(var(--pod-accent-rgb),0.18), transparent 35%), rgba(2, 6, 23, 0.46);
  border: 1px solid rgba(var(--pod-accent-rgb), 0.25);
}

.pod-quote-total-card strong {
  display: block;
  font-size: 1.8rem;
  color: #ffffff;
  letter-spacing: -0.04em;
}

/* ================================
   Empty States
   ================================ */

.pod-empty-state {
  position: relative;
  overflow: hidden;
  padding: 34px 28px;
  border-radius: 24px;
  text-align: center;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  background: radial-gradient(circle at top right, rgba(var(--pod-accent-rgb),0.12), transparent 36%), rgba(15, 23, 42, 0.52);
}

.pod-empty-state::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), transparent);
}

.pod-empty-state-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: linear-gradient(135deg, rgba(var(--pod-accent-rgb),0.28), rgba(var(--pod-accent-rgb),0.1));
  border: 1px solid rgba(var(--pod-accent-rgb),0.3);
  color: #dff7ff;
  box-shadow: 0 12px 30px rgba(var(--pod-accent-rgb),0.12);
}

.pod-empty-state h3 {
  margin-bottom: 8px;
  color: #ffffff;
  letter-spacing: -0.03em;
}

.pod-empty-state p {
  max-width: 560px;
  margin: 0 auto;
  color: rgba(226,232,240,0.7);
  line-height: 1.6;
}

.pod-empty-state-actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ================================
   Calendar
   ================================ */

.pod-calendar-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pod-calendar-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.pod-calendar-month-label {
  font-weight: 700;
}

.pod-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.pod-calendar-legend span {
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.75rem;
  border: 1px solid rgba(148,163,184,0.6);
  color: #e5e7eb;
}

.pod-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.pod-calendar-day-name {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--pod-muted);
  padding-bottom: 2px;
}

.pod-calendar-cell,
.pod-calendar-day,
.calendar-day {
  transition: background 0.16s ease, border-color 0.16s ease;
}

.pod-calendar-cell {
  min-height: 80px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255,255,255,0.9);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pod-calendar-cell-empty {
  background: transparent;
  border: none;
}

.pod-calendar-cell-today,
.pod-calendar-day.is-today,
.calendar-day.is-today {
  border-color: rgba(var(--pod-accent-rgb), 0.65);
  box-shadow: inset 0 0 0 1px rgba(var(--pod-accent-rgb), 0.22);
}

.pod-calendar-day:hover,
.calendar-day:hover,
.pod-calendar-cell:hover {
  background: rgba(var(--pod-accent-rgb), 0.06);
  border-color: rgba(var(--pod-accent-rgb), 0.28);
}

.pod-calendar-cell-date {
  font-size: 0.75rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 2px;
}

.pod-calendar-pill,
.calendar-event {
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 0.7rem;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: transform 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease;
}

.pod-calendar-pill:hover,
.calendar-event:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(2, 8, 23, 0.28);
  z-index: 5;
}

.pod-calendar-pill-ghost,
.calendar-event.status-alternate_proposed {
  opacity: 0.68;
  border-style: dashed !important;
  background: linear-gradient(135deg, rgba(var(--pod-accent-rgb), 0.16), rgba(15, 23, 42, 0.38)) !important;
}

.pod-calendar-pill-status-pending,
.calendar-event.status-pending {
  background: rgba(234, 179, 8, 0.18);
  border: 1px solid rgba(234, 179, 8, 0.56);
  color: #ffffff;
}

.pod-calendar-pill-status-accepted,
.calendar-event.status-accepted {
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.5);
  color: #ffffff;
}

.pod-calendar-pill-status-completed,
.pod-calendar-pill-status-booked {
  background: rgba(var(--pod-accent-rgb), 0.16);
  border: 1px solid rgba(var(--pod-accent-rgb), 0.45);
  color: #ffffff;
}

.pod-calendar-pill-status-rejected,
.calendar-event.status-rejected {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #ffffff;
}

.pod-calendar-pill-status-alternate {
  background: rgba(59, 130, 246, 0.18);
  border: 1px dashed rgba(59, 130, 246, 0.7);
  color: #ffffff;
}

.calendar-grid {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
  display: grid;
  grid-template-columns: 80px repeat(7, 1fr);
  grid-auto-rows: 40px;
  font-size: 0.8rem;
}

.calendar-grid-header,
.calendar-grid-body {
  display: contents;
}

.calendar-grid-header-cell,
.calendar-time-cell {
  padding: 6px 10px;
  border-right: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.calendar-grid-header-cell {
  background: rgba(15,23,42, 0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.calendar-time-cell {
  color: rgba(148,163,184,0.9);
}

.calendar-slot-cell {
  position: relative;
  border-right: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  overflow: visible;
}

.calendar-event {
  position: absolute;
  left: 4px;
  right: 4px;
  border-radius: 8px;
  padding: 2px 4px;
  font-size: 0.7rem;
  line-height: 1.2;
  cursor: default;
}

.calendar-event span {
  display: block;
}

/* ================================
   Modals / Toasts
   ================================ */

.pod-modal,
.upgrade-modal,
.pod-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.pod-modal {
  display: none;
  align-items: center;
  justify-content: center;
}

.pod-modal.is-open,
.upgrade-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.upgrade-modal.hidden,
.pod-confirm-overlay[hidden] {
  display: none;
}

.pod-modal-backdrop,
.upgrade-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(12px);
}

.pod-modal-dialog,
.upgrade-modal-card,
.pod-confirm-modal {
  position: relative;
  width: min(520px, 100%);
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 24px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.035)), rgba(15, 23, 42, 0.96);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.44);
  z-index: 1001;
}

.pod-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.pod-modal-close,
.pod-toast-close {
  border: 0;
  background: transparent;
  color: rgba(226, 232, 240, 0.65);
  font-size: 1.3rem;
  cursor: pointer;
}

.pod-modal-footer,
.upgrade-actions,
.pod-confirm-actions {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.upgrade-benefits {
  margin: 16px 0;
  color: #cbd5e1;
  text-align: left;
}

.upgrade-benefits div {
  margin-bottom: 6px;
}

.pod-confirm-overlay {
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(12px);
}

.pod-confirm-modal {
  width: min(440px, 100%);
  border-color: rgba(248, 113, 113, 0.28);
  background: radial-gradient(circle at top right, rgba(248, 113, 113, 0.13), transparent 34%), linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.035)), rgba(15, 23, 42, 0.96);
  animation: podConfirmIn 0.18s ease both;
}

@keyframes podConfirmIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.pod-confirm-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  margin-bottom: 14px;
  color: #fecaca;
  font-weight: 800;
  background: rgba(248, 113, 113, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.34);
}

.pod-confirm-modal h3,
.pod-confirm-modal p {
  margin: 0;
}

.pod-confirm-modal h3 {
  margin-bottom: 8px;
  color: #ffffff;
}

.pod-confirm-modal p {
  color: rgba(226, 232, 240, 0.72);
  line-height: 1.6;
}

.pod-confirm-danger {
  background: linear-gradient(135deg, #ef4444, #f97316) !important;
}

.pod-toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99998;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(380px, calc(100vw - 32px));
}

.pod-toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 18px 44px rgba(2, 8, 23, 0.34);
  backdrop-filter: blur(14px);
  animation: podToastIn 0.22s ease both;
}

@keyframes podToastIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.pod-toast-dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--pod-accent);
  box-shadow: 0 0 18px rgba(var(--pod-accent-rgb), 0.8);
}

.pod-toast-body { flex: 1; }

.pod-toast-body strong {
  display: block;
  color: #ffffff;
  font-size: 0.86rem;
  margin-bottom: 3px;
}

.pod-toast-body span {
  display: block;
  color: rgba(226, 232, 240, 0.76);
  font-size: 0.86rem;
  line-height: 1.4;
}

.pod-toast-success .pod-toast-dot { background: var(--pod-success); box-shadow: 0 0 18px rgba(34, 197, 94, 0.75); }
.pod-toast-danger .pod-toast-dot,
.pod-toast-error .pod-toast-dot { background: var(--pod-danger); box-shadow: 0 0 18px rgba(239, 68, 68, 0.75); }
.pod-toast-warning .pod-toast-dot { background: var(--pod-warning); box-shadow: 0 0 18px rgba(245, 158, 11, 0.75); }
.pod-toast-info .pod-toast-dot { background: var(--pod-info); }

/* ================================
   Timeline / Media / Scanner / Tours / Menus
   ================================ */

.pod-timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pod-timeline-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.pod-timeline-date {
  font-size: 0.8rem;
  color: var(--pod-muted);
  min-width: 140px;
}

.pod-timeline-content {
  background: rgba(15,23,42,0.6);
  padding: 10px;
  border-radius: 10px;
  flex: 1;
}

.pod-photo-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.pod-photo-thumb {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(148,163,184,0.3);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.pod-photo-thumb:hover { transform: scale(1.05); }

.pod-scan-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: var(--pod-radius-sm);
  background: rgba(15, 23, 42, 0.55);
}

.pod-scan-status,
.pod-scanner-hint {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--pod-muted);
}

.pod-scanner-video {
  width: 100%;
  max-width: 420px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: #000;
  display: none;
  margin-top: 12px;
}

.pod-scanner-video.is-live { display: block; }


/* Premium SaaS guided tour */
body.pod-tour-active {
  overflow-x: hidden;
}

.tour-backdrop,
.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background:
    radial-gradient(circle at 50% 30%, rgba(var(--pod-accent-rgb), 0.22), transparent 34%),
    rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(5px);
}

.tour-overlay {
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.tour-welcome-card,
.tour-finish-card,
.tour-tooltip {
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.96));
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.tour-welcome-card,
.tour-finish-card {
  width: min(720px, 100%);
  border-radius: 28px;
  padding: clamp(28px, 4vw, 46px);
  text-align: left;
  animation: podTourRise 0.28s ease both;
}

.tour-welcome-badge,
.tour-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border-radius: 999px;
  background: rgba(var(--pod-accent-rgb), 0.15);
  border: 1px solid rgba(var(--pod-accent-rgb), 0.42);
  color: #dff7ff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 7px 11px;
}

.tour-welcome-card h2,
.tour-finish-card h2 {
  margin: 18px 0 12px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.tour-welcome-card p,
.tour-finish-card p,
.tour-tooltip p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.65;
}

.tour-value-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0;
}

.tour-value-grid div,
.tour-completion-list div,
.tour-checklist-mini div {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.62);
  border-radius: 14px;
  padding: 12px 14px;
  color: #e5e7eb;
  font-weight: 700;
}

.tour-value-grid span,
.tour-completion-list span,
.tour-checklist-mini span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(var(--pod-accent-rgb), 0.18);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 900;
}

.tour-welcome-actions,
.tour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.tour-actions-right {
  display: flex;
  gap: 10px;
}

.tour-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 15px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease, background 0.16s ease;
}

.tour-btn:hover { transform: translateY(-1px); }
.tour-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.tour-btn-primary {
  background: linear-gradient(135deg, var(--pod-accent), #8bd7eb);
  color: #04111a;
  box-shadow: 0 14px 32px rgba(var(--pod-accent-rgb), 0.28);
}

.tour-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.tour-btn-ghost {
  background: transparent;
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.tour-tooltip {
  position: absolute;
  width: min(390px, calc(100vw - 28px));
  border-radius: 22px;
  padding: 20px;
  z-index: 10001;
  animation: podTourRise 0.22s ease both;
}

.tour-tooltip-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.tour-step-count {
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.tour-progress-bar {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  margin-bottom: 16px;
}

.tour-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pod-accent), #d7f7ff);
  transition: width 0.24s ease;
}

.tour-tooltip h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.tour-step-cta {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(var(--pod-accent-rgb), 0.11);
  border: 1px solid rgba(var(--pod-accent-rgb), 0.26);
  color: #e0f8ff;
  font-weight: 750;
}

.tour-checklist-mini {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.tour-checklist-mini div {
  padding: 9px 10px;
  font-size: 0.82rem;
  font-weight: 750;
  color: #94a3b8;
}

.tour-checklist-mini div.is-done {
  color: #f8fafc;
  border-color: rgba(var(--pod-accent-rgb), 0.28);
}

.tour-highlight {
  position: relative !important;
  z-index: 9999 !important;
  border-radius: 14px !important;
  box-shadow:
    0 0 0 4px rgba(var(--pod-accent-rgb), 0.95),
    0 0 0 10px rgba(var(--pod-accent-rgb), 0.22),
    0 22px 60px rgba(0, 0, 0, 0.45) !important;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.tour-finish-card {
  text-align: center;
  max-width: 620px;
}

.tour-finish-icon {
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pod-accent), #d7f7ff);
  color: #04111a;
  font-size: 2rem;
  font-weight: 1000;
  box-shadow: 0 18px 46px rgba(var(--pod-accent-rgb), 0.3);
}

.tour-completion-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0;
  text-align: left;
}

@keyframes podTourRise {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 720px) {
  .tour-value-grid,
  .tour-completion-list {
    grid-template-columns: 1fr;
  }

  .tour-welcome-actions,
  .tour-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .tour-actions-right,
  .tour-btn {
    width: 100%;
  }

  .tour-actions-right {
    flex-direction: column;
  }
}

.pod-actions-menu {
  position: relative;
  display: inline-block;
}

.pod-actions-menu summary {
  list-style: none;
  cursor: pointer;
}

.pod-actions-menu summary::-webkit-details-marker { display: none; }

.pod-actions-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.45);
  padding: 8px;
  z-index: 40;
}

.pod-actions-menu-panel form { margin: 0; }

.pod-actions-menu-link {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--pod-text);
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
}

.pod-actions-menu-link:hover { background: rgba(148, 163, 184, 0.12); }
.pod-actions-menu-link--danger { color: #fca5a5; }

.pod-alt-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

details[open] .pod-alt-block { margin-top: 6px; }

.portal-security-option {
  margin-top: 14px;
  margin-bottom: 10px;
}

.portal-security-option .pod-checkbox {
  align-items: flex-start;
}

.portal-security-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--pod-accent);
}

.pod-definition-list { margin: 0; }
.pod-definition-list > div { display: flex; gap: 8px; margin-bottom: 6px; }
.pod-definition-list dt { flex: 0 0 110px; font-weight: 700; color: var(--pod-muted); }
.pod-definition-list dd { margin: 0; flex: 1 1 auto; }

/* ================================
   Responsive
   ================================ */

@media (max-width: 900px) {
  .auth-shell,
  .pod-panels-grid {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    display: none;
  }

  .pod-section-header,
  .pod-card-header,
  .pod-card-header-row,
  .pod-footer-main {
    flex-direction: column;
  }
}

@media (max-width: 860px) {
  .nav-btn,
  .pod-nav a {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .pod-calendar-cell {
    min-height: 96px;
  }

  .pod-calendar-controls {
    flex-direction: column;
    align-items: flex-end;
  }
}

@media (max-width: 700px) {
  .pod-usage-banner {
    align-items: flex-start;
  }
}


/* ================================
   SaaS polish pass – May styling fixes
   ================================ */

/* Keep page helper text directly under the title instead of floating right. */
.pod-section-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}
.pod-section-header > h1,
.pod-section-header > h2,
.pod-section-header > p {
  grid-column: 1;
}
.pod-section-header > p,
.pod-section-header > div:first-child > p {
  margin-top: 4px;
  max-width: 720px;
}
.pod-section-header > .pod-action-row,
.pod-section-header > div:last-child:not(:first-child) {
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-self: end;
}

/* Prevent table content, especially dashboard notes, escaping cards. */
.pod-card { overflow: hidden; }
/* Headers should NOT break anywhere */
.pod-table th {
  vertical-align: top;
  white-space: nowrap;
}

/* Body cells can still wrap if needed */
.pod-table td {
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: normal;
}
.pod-table td {
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: normal;
  
}
.pod-table-dashboard-schedule {
  table-layout: auto;
min-width:500px;
}

.pod-table-dashboard-schedule th {
  white-space: nowrap;
  vertical-align: top;
}

/* Start */
.pod-table-dashboard-schedule th:nth-child(1) {
  min-width: 110px;
}

/* Project */
.project-progress-grid {
  display: grid;
  gap: 18px;
}

.project-progress-card {
  display: grid;
  gap: 16px;
  border-color: rgba(84, 165, 190, 0.18);
}

.project-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.project-health-pill {
  white-space: nowrap;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 0.74rem;
  font-weight: 800;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.health-good {
  color: #86efac;
  background: rgba(34, 197, 94, 0.11);
  border-color: rgba(34, 197, 94, 0.24);
}

.health-warning {
  color: #fde68a;
  background: rgba(250, 204, 21, 0.11);
  border-color: rgba(250, 204, 21, 0.24);
}

.health-danger {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.11);
  border-color: rgba(248, 113, 113, 0.24);
}

.project-progress-meter-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.project-progress-meter-row div {
  display: grid;
  gap: 2px;
}

.project-progress-meter-row strong {
  font-size: 1.35rem;
}

.project-progress-meter-row span {
  color: #94a3b8;
  font-size: 0.86rem;
}

.project-progress-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.13);
}

.project-progress-bar div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #54a5be, #7ddff8);
}

.project-next-step {
  display: grid;
  gap: 3px;
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(84, 165, 190, 0.10);
  border: 1px solid rgba(84, 165, 190, 0.18);
}

.project-next-step span {
  color: #7ddff8;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.project-next-step strong {
  color: #e5edf7;
}

.project-milestone-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.project-milestone {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  border-radius: 14px;
  font-size: 0.88rem;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.13);
}

.project-milestone.is-complete {
  color: #dffbea;
  border-color: rgba(34, 197, 94, 0.18);
}

.project-milestone.is-pending {
  color: #94a3b8;
}

.milestone-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-weight: 900;
  background: rgba(148, 163, 184, 0.14);
}

.project-milestone.is-complete .milestone-icon {
  color: #08111f;
  background: #86efac;
}

.project-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #cbd5e1;
  font-size: 0.82rem;
}

.project-card-meta span {
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(148, 163, 184, 0.10);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.project-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 2px;
}

@media (max-width: 760px) {
  .project-progress-top,
  .project-progress-meter-row {
    flex-direction: column;
  }

  .project-milestone-list {
    grid-template-columns: 1fr;
  }
}

.project-command-page {
  display: grid;
  gap: 18px;
}
/* PROJECT DETAIL - MORE MENU OVERLAY FIX */
.project-command-header,
.project-command-actions,
.project-command-page,
.pod-card {
  overflow: visible !important;
}

.project-command-actions {
  position: relative !important;
  z-index: 400 !important;
}

.pod-actions-menu {
  position: relative !important;
  z-index: 500 !important;
}

.pod-actions-menu summary {
  position: relative !important;
  z-index: 501 !important;
  pointer-events: auto !important;
}

.pod-actions-menu-panel {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  z-index: 99999 !important;

  overflow: visible !important;
  pointer-events: auto !important;

  min-width: 220px;
}

.pod-actions-menu-panel a,
.pod-actions-menu-panel button {
  position: relative !important;
  z-index: 100000 !important;
  pointer-events: auto !important;
}

.project-command-header {
  display: grid;
  gap: 16px;
  border-color: rgba(84, 165, 190, 0.26);
  background:
    radial-gradient(circle at top left, rgba(84, 165, 190, 0.15), transparent 30rem),
    rgba(15, 23, 42, 0.84);
}

.project-command-main h2 {
  margin-bottom: 6px;
}

.project-command-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.project-command-status strong {
  font-size: 1.25rem;
}

.project-command-status span:not(.project-health-pill) {
  color: #94a3b8;
}

.project-command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.timeline-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-filter {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255,255,255,0.04);
  color: #cbd5e1;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 800;
}

.timeline-filter.active,
.timeline-filter:hover {
  color: #08111f;
  background: #54a5be;
  border-color: #54a5be;
}

.enhanced-timeline-item {
  display: grid;
  grid-template-columns: 42px 150px 1fr;
  gap: 12px;
  align-items: start;
}

.timeline-type-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(84, 165, 190, 0.12);
  border: 1px solid rgba(84, 165, 190, 0.24);
}

.timeline-type-pill {
  width: fit-content;
  display: inline-flex;
  margin-bottom: 4px;
  border-radius: 999px;
  padding: 4px 8px;
  color: #7ddff8;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(84, 165, 190, 0.10);
}

.portal-settings-grid,
.client-portal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.portal-advanced-actions summary {
  cursor: pointer;
  list-style: none;
}

.portal-advanced-actions summary span {
  display: grid;
  gap: 4px;
}

.portal-advanced-actions summary small {
  color: #94a3b8;
}

.portal-danger-zone {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.client-project-portal {
  display: grid;
  gap: 18px;
}

.client-portal-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  background:
    radial-gradient(circle at top left, rgba(84, 165, 190, 0.16), transparent 28rem),
    rgba(15, 23, 42, 0.84);
}

.client-status-card {
  min-width: 210px;
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(84, 165, 190, 0.22);
}

.client-status-card span {
  color: #7ddff8;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.client-status-card strong {
  font-size: 1.25rem;
}

.client-schedule-list,
.client-progress-list {
  display: grid;
  gap: 12px;
}

.client-schedule-item,
.client-progress-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.client-schedule-item span,
.client-progress-date {
  color: #94a3b8;
  font-size: 0.86rem;
}

.client-progress-card {
  grid-template-columns: 130px 1fr;
}

@media (max-width: 900px) {
  .portal-settings-grid,
  .client-portal-grid {
    grid-template-columns: 1fr;
  }

  .client-portal-hero,
  .client-schedule-item,
  .client-progress-card {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .enhanced-timeline-item {
    grid-template-columns: 38px 1fr;
  }

  .enhanced-timeline-item .pod-timeline-date {
    grid-column: 2;
  }
}
.pod-table-dashboard-schedule th:nth-child(2) {
  min-width: 180px;
}

/* Subcontractor */
.pod-table-dashboard-schedule th:nth-child(3) {
  min-width: 160px;
}

/* Status */
.pod-table-dashboard-schedule th:nth-child(4) {
  min-width: 150px;
}


/* Dashboard empty states should be calmer than full page empty states. */
.pod-empty-state-dashboard {
  padding: 26px 22px;
  text-align: left;
  border-style: solid;
  background: rgba(15, 23, 42, 0.38);
}
.pod-empty-state-dashboard .pod-empty-state-icon {
  width: 44px;
  height: 44px;
  margin: 0 0 14px;
  border-radius: 14px;
  font-size: 1.1rem;
  box-shadow: none;
}
.pod-empty-state-dashboard p {
  margin: 0;
  max-width: 100%;
}

/* Compact quote status card. */
.pod-quote-total-card {
  min-height: auto;
  padding: 14px 16px;
}
.pod-quote-total-card strong {
  font-size: 1.25rem;
  line-height: 1.1;
  margin-top: 4px;
}

/* Edit project document cards need their own breathing room. */
.pod-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  align-items: start;
}
.pod-document-upload-card {
  margin-top: 0;
}
.pod-document-upload-card .pod-form-grid {
  gap: 18px;
}
.pod-document-upload-card .pod-form-actions {
  margin-top: 4px;
}

/* Cleaner table actions. */
.pod-action-stack,
.pod-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pod-action-stack form { margin: 0; }
.pod-action-stack .btn-outline-small,
.pod-action-stack .pod-small-link {
  margin: 0 !important;
  min-height: 32px;
}
.pod-action-stack .pod-small-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: transparent;
  padding: 7px 12px;
  color: rgba(226,232,240,0.84);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.pod-action-stack .pod-small-link:hover {
  border-color: var(--pod-accent);
  color: #ffffff;
  background: rgba(var(--pod-accent-rgb), 0.12);
}

/* Settings hub cards, including users and feature flags moved out of the main nav. */
.pod-settings-hub {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.pod-settings-link-card {
  display: block;
  padding: 16px;
  border-radius: 18px;
  text-decoration: none;
  background: rgba(15, 23, 42, 0.44);
  border: 1px solid rgba(148, 163, 184, 0.18);
}
.pod-settings-link-card:hover {
  border-color: rgba(var(--pod-accent-rgb), 0.55);
  background: rgba(var(--pod-accent-rgb), 0.10);
}
.pod-settings-link-card strong {
  display: block;
  margin-bottom: 6px;
  color: #ffffff;
}

.pod-feature-flag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.pod-feature-flag-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.42);
}
.pod-feature-flag-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 8px;
}

@media (max-width: 760px) {
  .pod-section-header {
    grid-template-columns: 1fr;
  }
  .pod-section-header > .pod-action-row,
  .pod-section-header > div:last-child:not(:first-child) {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }
}
.pod-drawer[hidden] {
  display: none !important;
}

.pod-drawer {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  left: auto !important;
  z-index: 100000 !important;
  width: min(720px, 100vw) !important;
  height: 100vh !important;
  padding: 22px !important;
  overflow-y: auto !important;
  background: rgba(15, 23, 42, 0.98) !important;
  border-left: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: -24px 0 70px rgba(0,0,0,0.35);
  transform: translateX(110%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.pod-drawer.is-open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.project-command-header.pod-card {
  overflow: visible !important;
}

.project-command-actions,
.pod-actions-menu {
  position: relative;
  overflow: visible !important;
  z-index: 100;
}

.pod-actions-menu-panel {
  z-index: 100000 !important;
}




/* === PATCH 12: consolidated template CSS === */

/* Consolidated from pod/templates/business/app_owner_dashboard.html */
.pod-flags-list {
    display:flex;
    flex-direction:column;
    gap:0.1rem;
    font-size:0.8rem;
  }


/* Consolidated from pod/templates/business/billing.html */
.pod-plan-price {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
  }
  .pod-plan-price span {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-left: 0.2rem;
  }
  .pod-plan-features {
    margin: 1rem 0;
    padding-left: 1.1rem;
    list-style: disc;
  }
  .pod-plan-current {
    border: 1px solid color-mix(in srgb, var(--pod-accent) 60%, transparent);
    box-shadow: 0 0 18px color-mix(in srgb, var(--pod-accent) 20%, transparent);
  }


/* Consolidated from pod/templates/business/invoices.html */
.invoice-layout {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    color: #000000;
    padding: 32px;
    border-radius: 8px;
    box-shadow: 0 0 12px rgba(0,0,0,0.15);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  }

  .invoice-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
  }

  .invoice-header-left h1 {
    font-size: 24px;
    margin: 0 0 8px 0;
  }

  .invoice-header-right {
    text-align: right;
    font-size: 13px;
  }

  .invoice-logo img {
    max-height: 60px;
    display: block;
  }

  .invoice-meta,
  .invoice-to {
    font-size: 13px;
    margin-bottom: 16px;
  }

  .invoice-to strong {
    display: block;
    margin-bottom: 4px;
  }

  .invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 13px;
  }

  .invoice-table th,
  .invoice-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e0e0e0;
  }

  .invoice-table th {
    text-align: left;
    background: #f5f5f5;
    font-weight: 600;
  }

  .invoice-table td.amount,
  .invoice-table th.amount {
    text-align: right;
    white-space: nowrap;
  }

  .invoice-totals {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
    font-size: 14px;
  }

  .invoice-totals table {
    border-collapse: collapse;
    min-width: 240px;
  }

  .invoice-totals td {
    padding: 4px 0;
  }

  .invoice-totals td.label {
    text-align: right;
    padding-right: 12px;
    color: #555;
  }

  .invoice-totals td.value {
    text-align: right;
    font-weight: 600;
  }

  .invoice-footer-note {
    margin-top: 24px;
    font-size: 12px;
    color: #777;
  }

  .invoice-amount-with-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .invoice-actions-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
  }

  .invoice-status-form {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }

  .invoice-status-form select {
    font-size: 0.85rem;
    padding: 4px 6px;
  }

  /* Print tweaks (for the popup window) */
  @media print {
    body {
      background: #ffffff !important;
    }

    .invoice-layout {
      box-shadow: none;
      border-radius: 0;
      margin: 0;
      width: auto;
      max-width: none;
    }
  }


/* Consolidated from pod/templates/business/reports.html */
.pod-card + .pod-card {
    margin-top: 1.5rem;
  }

  .heatmap-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
  }
  .heatmap-table th,
  .heatmap-table td {
    padding: 6px 8px;
    border: 1px solid rgba(255,255,255,0.06);
    text-align: center;
    white-space: nowrap;
  }
  .heatmap-table th {
    background: rgba(255,255,255,0.04);
    text-align: center;
  }

  /* Simple intensity levels for counts */
  .heat-0 { background: transparent; }
  .heat-1 { background: rgba(84,165,190,0.20); }
  .heat-2 { background: rgba(84,165,190,0.35); }
  .heat-3 { background: rgba(84,165,190,0.50); }
  .heat-4 { background: rgba(84,165,190,0.65); }
  .heat-5,
  .heat-6,
  .heat-7,
  .heat-8,
  .heat-9 { background: rgba(84,165,190,0.80); }

  /* Make the report printable */
  @media print {
    .pod-top-nav,
    .pod-main-nav,
    .pod-footer,
    .pod-btn,
    .btn,
    .btn-secondary,
    .btn-outline-small,
    .pod-section-header {
      display: none !important;
    }
    body {
      background: #ffffff !important;
      color: #000000 !important;
    }
    .pod-section {
      padding: 0;
      margin: 0;
    }
    .pod-card {
      box-shadow: none;
      border-radius: 0;
      border: 1px solid #ddd;
    }
  }


/* === PATCH 12: permanent nav/dropdown/drawer stabilisation === */
.pod-card,
.pod-shell,
.pod-header-app,
.pod-header-main,
.pod-header,
.pod-topbar,
.pod-nav,
.pod-nav-links,
.app-nav-grid {
  overflow: visible !important;
}

.pod-header-app,
.pod-header-main,
.pod-header,
.pod-topbar {
  position: relative !important;
  z-index: 6000 !important;
}

.pod-nav,
.pod-nav-links,
.app-nav-grid {
  position: relative !important;
  z-index: 6100 !important;
}

.nav-group-menu,
.nav-dropdown {
  position: relative !important;
  z-index: 6200 !important;
  overflow: visible !important;
}

.nav-group-menu[open],
.nav-dropdown[open] {
  z-index: 9999 !important;
}

.nav-group-menu > summary,
.nav-dropdown > summary,
.nav-group-menu summary,
.nav-dropdown summary {
  position: relative !important;
  z-index: 6201 !important;
  pointer-events: auto !important;
}

.nav-group-menu > summary::before,
.nav-group-menu > summary::after,
.nav-dropdown > summary::before,
.nav-dropdown > summary::after,
.nav-group-menu summary::before,
.nav-group-menu summary::after,
.nav-dropdown summary::before,
.nav-dropdown summary::after {
  pointer-events: none !important;
}

.nav-group-menu[open] > summary {
  pointer-events: auto !important;
}

.nav-group-panel,
.nav-dropdown-menu {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 0 !important;
  min-width: 220px !important;
  z-index: 10000 !important;
  pointer-events: auto !important;
  overflow: visible !important;
}

.nav-group-panel a,
.nav-dropdown-menu a {
  position: relative !important;
  z-index: 10001 !important;
  pointer-events: auto !important;
}

.nav-group-panel a:hover,
.nav-group-panel a.active,
.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
  background: rgba(84, 165, 190, 0.26) !important;
  color: #ffffff !important;
}

.pod-main {
  position: relative !important;
  z-index: 1 !important;
}

@media (max-width: 760px) {
  .pod-header-app {
    display: grid !important;
    gap: 14px !important;
  }

  .pod-header-top-left {
    position: static !important;
    width: 100% !important;
    z-index: auto !important;
  }

  .app-nav-grid {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .nav-group-panel,
  .nav-dropdown-menu {
    min-width: min(260px, calc(100vw - 36px)) !important;
  }
}
.pwa-install-card {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  padding: 16px;
  background: #111;
  color: #fff;
  z-index: 9999;
  display: none;
}

.pwa-install-card.is-visible {
  display: block;
}

.pwa-install-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.pwa-install-actions {
  display: flex;
  gap: 8px;
}
/* Project detail More dropdown overlay fix */
.project-actions,
.project-action-bar,
.project-detail-actions,
.pod-page-actions {
  position: relative !important;
  z-index: 7000 !important;
  overflow: visible !important;
}

.project-actions details,
.project-action-bar details,
.project-detail-actions details,
.pod-page-actions details,
.more-actions-menu {
  position: relative !important;
  z-index: 8000 !important;
  overflow: visible !important;
}

.project-actions details[open],
.project-action-bar details[open],
.project-detail-actions details[open],
.pod-page-actions details[open],
.more-actions-menu[open] {
  z-index: 12000 !important;
}

.project-actions summary,
.project-action-bar summary,
.project-detail-actions summary,
.pod-page-actions summary,
.more-actions-menu summary {
  position: relative !important;
  z-index: 8001 !important;
  pointer-events: auto !important;
}

.project-actions summary::before,
.project-actions summary::after,
.project-action-bar summary::before,
.project-action-bar summary::after,
.project-detail-actions summary::before,
.project-detail-actions summary::after,
.pod-page-actions summary::before,
.pod-page-actions summary::after,
.more-actions-menu summary::before,
.more-actions-menu summary::after {
  pointer-events: none !important;
}

.project-actions .nav-group-panel,
.project-action-bar .nav-group-panel,
.project-detail-actions .nav-group-panel,
.pod-page-actions .nav-group-panel,
.more-actions-menu .nav-group-panel,
.more-actions-panel {
  position: absolute !important;
  top: 100% !important;
  right: 0 !important;
  left: auto !important;
  z-index: 12001 !important;
  pointer-events: auto !important;
  overflow: visible !important;
}

.project-actions .nav-group-panel a,
.project-action-bar .nav-group-panel a,
.project-detail-actions .nav-group-panel a,
.pod-page-actions .nav-group-panel a,
.more-actions-menu .nav-group-panel a,
.more-actions-panel a,
.more-actions-panel button {
  position: relative !important;
  z-index: 12002 !important;
  pointer-events: auto !important;
}

/* Patch 14: selectable subbie price-list parser */
.price-card-parser-panel {
  margin-top: 16px;
}

.price-card-search {
  width: 100%;
  margin: 12px 0 14px;
}

.price-card-picker {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.price-card-select-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 8px;
  align-items: stretch;
}

.price-card-item {
  text-align: left;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.62);
  color: inherit;
  border-radius: 16px;
  padding: 12px 14px;
  cursor: pointer;
}

.price-card-item strong,
.price-card-item span,
.price-card-item small {
  display: block;
}

.price-card-item span,
.price-card-item small {
  margin-top: 4px;
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.84rem;
}

.price-card-item.is-selected {
  border-color: rgba(84, 165, 190, 0.82);
  background: rgba(84, 165, 190, 0.20);
  box-shadow: 0 0 0 1px rgba(84, 165, 190, 0.28) inset;
}

.price-card-qty-label {
  display: grid;
  gap: 4px;
  align-content: center;
  font-size: 0.72rem;
  color: rgba(226, 232, 240, 0.72);
}

.price-card-qty-label input {
  width: 100%;
  min-width: 0;
}

@media (max-width: 640px) {
  .price-card-select-row {
    grid-template-columns: 1fr;
  }

  .price-card-picker {
    max-height: 52vh;
  }
}


/* FULL RESTORE: project detail More dropdown must escape command header/card stacking */
.project-command-page,
.project-command-page .pod-card,
.project-command-header,
.project-command-main,
.project-command-actions {
  overflow: visible !important;
}

.project-command-header {
  position: relative !important;
  z-index: 60 !important;
}

.project-command-actions {
  position: relative !important;
  z-index: 9000 !important;
}

.project-command-actions .pod-actions-menu,
.project-command-page .pod-actions-menu {
  position: relative !important;
  z-index: 9100 !important;
}

.project-command-actions .pod-actions-menu[open],
.project-command-page .pod-actions-menu[open] {
  z-index: 99999 !important;
}

.project-command-actions .pod-actions-menu summary,
.project-command-page .pod-actions-menu summary {
  position: relative !important;
  z-index: 9101 !important;
  pointer-events: auto !important;
}

.project-command-actions .pod-actions-menu summary::before,
.project-command-actions .pod-actions-menu summary::after,
.project-command-page .pod-actions-menu summary::before,
.project-command-page .pod-actions-menu summary::after {
  pointer-events: none !important;
}

.project-command-actions .pod-actions-menu-panel,
.project-command-page .pod-actions-menu-panel {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  left: auto !important;
  z-index: 100000 !important;
  min-width: 240px !important;
  overflow: visible !important;
  pointer-events: auto !important;
}

.project-command-actions .pod-actions-menu-panel a,
.project-command-actions .pod-actions-menu-panel button,
.project-command-page .pod-actions-menu-panel a,
.project-command-page .pod-actions-menu-panel button {
  position: relative !important;
  z-index: 100001 !important;
  pointer-events: auto !important;
}

/* =========================================================
   CLIENT PORTAL POLISH
========================================================= */

.client-project-portal {
  max-width: 1080px;
}

.client-portal-hero {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 24px;
  padding: 28px;
  border: 1px solid rgba(84, 165, 190, 0.18);
  background:
    radial-gradient(circle at top right, rgba(84, 165, 190, 0.18), transparent 34%),
    rgba(255,255,255,0.03);
}

.client-portal-hero h2 {
  margin-bottom: 10px;
}

.client-reference-pill,
.client-count-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(84, 165, 190, 0.12);
  color: #7ddff8;
  border: 1px solid rgba(84, 165, 190, 0.22);
  margin-top: 12px;
}

.client-status-card {
  min-width: 220px;
  border-radius: 20px;
  padding: 20px;
  background: rgba(84, 165, 190, 0.12);
  border: 1px solid rgba(84, 165, 190, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.client-status-card span {
  color: #94a3b8;
  font-size: 0.84rem;
}

.client-status-card strong {
  font-size: 1.25rem;
  color: #fff;
  margin-top: 6px;
}

.client-portal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.client-progress-card-main h3 {
  font-size: 2.4rem;
  margin: 8px 0;
}

.client-progress-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  margin: 14px 0;
}

.client-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #54a5be;
}

.client-next-visit-card {
  border: 1px solid rgba(84, 165, 190, 0.16);
}

.client-visit-details {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.client-visit-details div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.035);
}

.client-visit-details strong {
  color: #94a3b8;
  font-size: 0.82rem;
}

.client-visit-details span {
  color: #fff;
}

.client-schedule-list,
.client-progress-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.client-schedule-item,
.client-progress-card {
  display: grid;
  grid-template-columns: minmax(160px, 0.7fr) minmax(0, 1.3fr);
  gap: 16px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.07);
}

.client-schedule-item strong,
.client-progress-card strong {
  display: block;
  color: #fff;
}

.client-schedule-item span,
.client-progress-date {
  color: #94a3b8;
}

.client-progress-card p {
  margin: 6px 0 0;
  color: #cbd5e1;
  line-height: 1.55;
}

.client-help-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.client-portal-footer {
  text-align: center;
  color: #64748b;
  font-size: 0.86rem;
  padding: 20px;
}

@media (max-width: 760px) {
  .client-portal-hero,
  .client-help-card {
    flex-direction: column;
  }

  .client-status-card {
    min-width: 0;
  }

  .client-portal-grid,
  .client-schedule-item,
  .client-progress-card {
    grid-template-columns: 1fr;
  }

  .client-portal-hero {
    padding: 22px;
  }
}