/* Dulux Mosaic — dark "command centre" theme, inspired by smart-building HUD displays.
   Colours are still pulled from the capstone deck's actual slide XML; this pass swaps the
   light corporate surface for a near-black glass panel look with cyan/teal glow accents. */
:root {
  --c-navy: #0B63D6;
  --c-ink: #F4F8FB;
  --c-ink-2: #05080C;
  --c-slate: #C7D3DD;
  --c-slate-muted: #8CA0B3;
  --c-border: rgba(255, 255, 255, 0.09);
  --c-border-2: rgba(255, 255, 255, 0.18);
  --c-bg: #05080C;
  --c-bg-2: #0A0F16;
  --c-card: #10161F;
  --c-card-2: #161F2B;

  --c-teal: #17C3B2;
  --c-teal-2: #22D3E8;
  --c-mint: #73FDD6;
  --c-amber: #F2B705;
  --c-indigo: #8B93FF;
  --c-pink: #F5437F;
  --c-success: #3EE08A;
  --c-success-bg: rgba(62, 224, 138, 0.12);
  --c-warn: #F2B705;
  --c-warn-bg: rgba(242, 183, 5, 0.12);
  --c-danger: #FF5C87;
  --c-danger-bg: rgba(255, 92, 135, 0.12);

  --c-harvest: var(--c-amber);
  --c-sense: var(--c-teal);
  --c-shield: var(--c-indigo);
  --c-tint: var(--c-pink);
  --c-paint: var(--c-pink);
  --c-technology: var(--c-teal-2);
  --c-platform: var(--c-navy);

  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  --glow-teal: 0 0 0 1px rgba(34, 211, 232, 0.18), 0 0 24px rgba(34, 211, 232, 0.12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Orbitron", var(--font);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background-color: var(--c-bg);
  background-image:
    linear-gradient(rgba(34, 211, 232, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 232, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  color: var(--c-slate);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; color: var(--c-ink); font-family: var(--font-display); letter-spacing: 0.01em; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  background: #070B10;
  border-bottom: 1px solid var(--c-border);
  color: #fff;
  padding: 0 28px;
  height: 64px;
}
.topbar-left { display: flex; align-items: center; gap: 32px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; border: none; background: none; color: #fff; padding: 0; }
.brand-logo { height: 42px; width: auto; display: block; flex-shrink: 0; }
.brand-word { font-size: 1.05rem; font-weight: 800; letter-spacing: -0.3px; white-space: nowrap; font-family: var(--font-display); }
.brand-word span { color: var(--c-mint); }
.topbar-nav { display: flex; gap: 4px; overflow-x: auto; }
.topbar-nav a {
  display: block; padding: 10px 14px; border-radius: 8px; font-size: 0.86rem; font-weight: 600;
  color: #7C8FA0; text-decoration: none; white-space: nowrap;
}
.topbar-nav a.active, .topbar-nav a:hover { background: rgba(34, 211, 232, 0.1); color: var(--c-teal-2); }
.topbar-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.role-select {
  background: rgba(255,255,255,0.06); color: #fff; border: 1px solid rgba(255,255,255,0.16);
  border-radius: 9px; padding: 8px 12px; font-size: 0.82rem; font-weight: 600;
}
.role-select option { color: #0E1B2A; }

/* ---------- Layout ---------- */
.page { max-width: 1240px; margin: 0 auto; padding: 32px 28px 72px; }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 26px; padding-bottom: 18px; flex-wrap: wrap; border-bottom: 1px solid rgba(34, 211, 232, 0.28); box-shadow: 0 6px 0 -4px rgba(34, 211, 232, 0.12); }
.page-header h1 { display: flex; align-items: center; gap: 12px; font-size: 1.5rem; font-weight: 800; }
.page-header h1::before {
  content: ""; width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid rgba(34, 211, 232, 0.25); border-top-color: var(--c-teal-2);
  animation: hud-spin 3.2s linear infinite;
}
@keyframes hud-spin { to { transform: rotate(360deg); } }
.page-header .subtitle { color: var(--c-slate-muted); font-size: 0.92rem; margin-top: 4px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; font-weight: 800; color: var(--c-teal-2); font-family: var(--font-display); }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.split-320 { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: start; }
.prop-list-col { display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 900px) { .grid-4, .grid-3, .grid-2, .split-320 { grid-template-columns: 1fr; } .topbar { padding: 0 14px; } .page { padding: 20px 16px 56px; } }

.card { background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card-flush { padding: 0; overflow: hidden; }
.card-header { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--c-slate-muted); margin-bottom: 12px; font-family: var(--font-display); }

/* ---------- KPI ---------- */
.kpi { display: flex; flex-direction: column; gap: 6px; }
.kpi-value { font-size: 1.7rem; font-weight: 800; color: var(--c-ink); font-family: var(--font-display); text-shadow: 0 0 18px rgba(34, 211, 232, 0.18); }
.kpi-sub { font-size: 0.8rem; font-weight: 700; }
.kpi-sub.up { color: var(--c-success); }
.kpi-sub.warn { color: var(--c-warn); }
.kpi-sub.muted { color: var(--c-slate-muted); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: none; border-radius: 10px;
  padding: 11px 18px; font-size: 0.88rem; font-weight: 700; text-decoration: none;
}
.btn-primary { background: linear-gradient(135deg, var(--c-teal-2), var(--c-navy)); color: #05141c; box-shadow: 0 0 22px rgba(34, 211, 232, 0.3); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-accent { background: var(--c-teal-2); color: #05141c; }
.btn-ghost { background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.24); }
.btn-outline { background: transparent; color: var(--c-teal-2); border: 1.5px solid rgba(34, 211, 232, 0.55); }
.btn-outline:hover { background: rgba(34, 211, 232, 0.08); }
.btn-sm { padding: 7px 12px; font-size: 0.78rem; border-radius: 8px; }

/* ---------- Pills / badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 20px; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; border: 1px solid transparent; }
.pill-success { background: var(--c-success-bg); color: var(--c-success); border-color: rgba(62, 224, 138, 0.35); }
.pill-warn { background: var(--c-warn-bg); color: var(--c-warn); border-color: rgba(242, 183, 5, 0.35); }
.pill-danger { background: var(--c-danger-bg); color: var(--c-danger); border-color: rgba(255, 92, 135, 0.35); }
.pill-neutral { background: rgba(255,255,255,0.06); color: var(--c-slate-muted); border-color: rgba(255,255,255,0.12); }
.pill-navy { background: rgba(34, 211, 232, 0.12); color: var(--c-teal-2); border-color: rgba(34, 211, 232, 0.35); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-connected { background: var(--c-success); box-shadow: 0 0 8px rgba(62, 224, 138, 0.7); }
.dot-available { background: var(--c-border-2); }

/* ---------- Rank badges (diamond) ---------- */
.rank-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 5px; transform: rotate(45deg);
  margin-right: 12px; flex-shrink: 0; vertical-align: middle;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.16);
}
.rank-badge span { display: block; transform: rotate(-45deg); font-size: 0.68rem; font-weight: 800; color: var(--c-slate-muted); font-family: var(--font-display); }
.rank-badge.r1 { background: rgba(255, 92, 135, 0.16); border-color: rgba(255, 92, 135, 0.5); }
.rank-badge.r1 span { color: var(--c-danger); }
.rank-badge.r2 { background: rgba(34, 211, 232, 0.16); border-color: rgba(34, 211, 232, 0.5); }
.rank-badge.r2 span { color: var(--c-teal-2); }
.rank-badge.r3 { background: rgba(62, 224, 138, 0.16); border-color: rgba(62, 224, 138, 0.5); }
.rank-badge.r3 span { color: var(--c-success); }

/* ---------- Chevron ribbon tag ---------- */
.chevron-tag {
  display: inline-flex; align-items: center; white-space: nowrap;
  background: linear-gradient(90deg, var(--c-navy), var(--c-teal-2));
  color: #051019; font-family: var(--font-display); font-weight: 700; font-size: 0.64rem;
  text-transform: uppercase; letter-spacing: 0.03em;
  padding: 5px 16px 5px 10px; margin: 0;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
}

/* ---------- Portfolio map (digital-twin style tile grid) ---------- */
.portfolio-map {
  display: flex; align-items: flex-end; gap: 22px; padding: 40px 22px 20px; overflow-x: auto;
  background: radial-gradient(600px 220px at 50% 100%, rgba(34, 211, 232, 0.1), transparent 70%);
  border-radius: var(--radius);
}
.map-col { display: flex; flex-direction: column; align-items: center; gap: 10px; flex-shrink: 0; cursor: pointer; }
.map-badge {
  font-family: var(--font-display); font-size: 0.66rem; font-weight: 700; color: var(--c-ink);
  background: rgba(255,255,255,0.06); border: 1px solid var(--c-border); border-radius: 20px; padding: 2px 9px;
}
.map-tile { width: 56px; border-radius: 6px 6px 3px 3px; border: 1px solid; transition: transform 0.15s ease, filter 0.15s ease; }
.map-tile.status-success { background: linear-gradient(180deg, rgba(62,224,138,0.4), rgba(62,224,138,0.05)); border-color: rgba(62,224,138,0.6); box-shadow: 0 0 16px rgba(62,224,138,0.3); }
.map-tile.status-warn { background: linear-gradient(180deg, rgba(242,183,5,0.4), rgba(242,183,5,0.05)); border-color: rgba(242,183,5,0.6); box-shadow: 0 0 16px rgba(242,183,5,0.3); }
.map-tile.status-danger { background: linear-gradient(180deg, rgba(255,92,135,0.4), rgba(255,92,135,0.05)); border-color: rgba(255,92,135,0.6); box-shadow: 0 0 16px rgba(255,92,135,0.3); }
.map-tile.status-neutral { background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.03)); border-color: rgba(255,255,255,0.28); box-shadow: 0 0 12px rgba(255,255,255,0.1); }
.map-col:hover .map-tile, .map-col.active .map-tile { transform: translateY(-6px); filter: brightness(1.3); }
.map-col.active .map-badge { border-color: var(--c-teal-2); color: var(--c-teal-2); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
th, td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--c-border); white-space: nowrap; }
th { background: #0A1119; color: var(--c-slate-muted); font-weight: 800; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; font-family: var(--font-display); }
tbody tr:hover { background: rgba(34, 211, 232, 0.04); }
tbody tr.clickable { cursor: pointer; }
td.wrap, th.wrap { white-space: normal; }
td b { color: var(--c-ink); }

/* ---------- Property / list cards ---------- */
.list-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; border: 1px solid var(--c-border); border-radius: var(--radius); background: var(--c-card);
  cursor: pointer; box-shadow: var(--shadow);
}
.list-card:hover { border-color: rgba(34, 211, 232, 0.5); }
.list-card.active { border-color: var(--c-teal-2); background: var(--c-card-2); box-shadow: var(--glow-teal); }
.list-card-title { font-weight: 800; color: var(--c-ink); font-size: 0.95rem; }
.list-card-meta { color: var(--c-slate-muted); font-size: 0.8rem; margin-top: 2px; }

/* ---------- Segmented control / tabs ---------- */
.segmented { display: inline-flex; background: rgba(255,255,255,0.05); border: 1px solid var(--c-border); border-radius: 10px; padding: 3px; gap: 2px; }
.segmented button { border: none; background: none; padding: 7px 14px; border-radius: 8px; font-size: 0.8rem; font-weight: 700; color: var(--c-slate-muted); }
.segmented button.active { background: var(--c-teal-2); color: #05141c; box-shadow: 0 0 14px rgba(34, 211, 232, 0.35); }

/* ---------- Progress ---------- */
.progress-track { height: 10px; border-radius: 6px; background: rgba(255,255,255,0.06); overflow: hidden; border: 1px solid var(--c-border); }
.progress-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--c-teal-2), var(--c-success)); box-shadow: 0 0 10px rgba(34, 211, 232, 0.5); }

/* ---------- Hero (public) ---------- */
.hero {
  background: radial-gradient(1100px 460px at 15% -10%, rgba(23,195,178,0.28), transparent 60%),
              radial-gradient(900px 420px at 100% 0%, rgba(245,67,127,0.2), transparent 55%),
              var(--c-bg);
  color: #fff; padding: 72px 28px 60px;
}
.hero-inner { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; } .hero { padding: 48px 18px 40px; } }
.hero h1 { color: #fff; font-size: 2.4rem; line-height: 1.16; font-weight: 800; letter-spacing: -0.2px; }
.hero p.lead { color: #A9BBCA; font-size: 1.05rem; margin-top: 16px; max-width: 46ch; }
.hero-cta { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.hero-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 36px; }
.hero-stat-value { font-size: 1.4rem; font-weight: 800; color: #fff; font-family: var(--font-display); }
.hero-stat-label { font-size: 0.72rem; color: var(--c-slate-muted); margin-top: 2px; }
.hero-visual { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--c-border); background: var(--c-card); box-shadow: var(--glow-teal); }

.section { padding: 56px 28px; background: var(--c-bg); }
.section-inner { max-width: 1240px; margin: 0 auto; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head h2 { font-size: 1.7rem; font-weight: 800; }
.section-head p { color: var(--c-slate-muted); margin-top: 10px; }
.section-alt { background: var(--c-bg-2); border-top: 1px solid var(--c-border); border-bottom: 1px solid var(--c-border); }
.section-dark { background: var(--c-ink-2); }
.section-dark .section-head p { color: var(--c-slate-muted); }
.section-dark h2 { color: #fff; }

.cap-card { border-radius: var(--radius-lg); padding: 22px; color: #fff; background: var(--c-card); border: 1px solid var(--c-border); position: relative; overflow: hidden; }
.cap-card .cap-chip { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 0.68rem; font-weight: 800; text-transform: uppercase; margin-bottom: 12px; font-family: var(--font-display); }
.cap-card h3 { color: #fff; font-size: 1.15rem; margin-bottom: 4px; }
.cap-card .tagline { color: var(--c-slate-muted); font-size: 0.85rem; margin-bottom: 14px; }
.cap-card ul { margin: 0; padding-left: 18px; font-size: 0.82rem; color: var(--c-slate); line-height: 1.6; }

.pillar-card { border-radius: var(--radius-lg); padding: 26px; color: #fff; box-shadow: var(--shadow); }
.pillar-card h3 { color: #fff; font-size: 1.2rem; margin-bottom: 10px; }
.pillar-card p { color: rgba(255,255,255,0.88); font-size: 0.9rem; line-height: 1.55; }

.pricing-card { border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: 24px; background: var(--c-card); display: flex; flex-direction: column; gap: 14px; }
.pricing-card.featured { border-color: var(--c-teal-2); box-shadow: var(--glow-teal); position: relative; }
.pricing-card .price { font-size: 1.8rem; font-weight: 800; color: var(--c-ink); font-family: var(--font-display); }
.pricing-card .cadence { font-size: 0.78rem; color: var(--c-slate-muted); }
.pricing-card ul { margin: 0; padding-left: 18px; font-size: 0.85rem; line-height: 1.7; color: var(--c-slate); flex: 1; }
.badge-featured { position: absolute; top: -12px; right: 20px; background: var(--c-pink); color: #fff; font-size: 0.68rem; font-weight: 800; padding: 4px 10px; border-radius: 20px; text-transform: uppercase; }

.testimonial { border-radius: var(--radius-lg); padding: 22px; background: var(--c-card); border: 1px solid var(--c-border); }
.testimonial p.quote { font-size: 0.92rem; line-height: 1.6; color: var(--c-slate); font-style: italic; }
.testimonial .who { margin-top: 14px; font-size: 0.8rem; font-weight: 800; color: var(--c-ink); }
.testimonial .who span { display: block; font-weight: 500; color: var(--c-slate-muted); font-style: normal; }

.footer { background: #070B10; color: var(--c-slate-muted); padding: 36px 28px; font-size: 0.82rem; border-top: 1px solid var(--c-border); }
.footer-inner { max-width: 1240px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

.ai-suggest { border-radius: var(--radius); border: 1px dashed rgba(34, 211, 232, 0.45); background: rgba(34, 211, 232, 0.05); padding: 16px 18px; }
.ai-suggest .tag { display: inline-flex; align-items: center; gap: 6px; font-size: 0.7rem; font-weight: 800; color: var(--c-teal-2); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; font-family: var(--font-display); }
.ai-suggest ul { margin: 0; padding-left: 18px; font-size: 0.85rem; line-height: 1.65; color: var(--c-slate); }

.device-card { display: flex; align-items: center; gap: 12px; border: 1px solid var(--c-border); border-radius: 12px; padding: 12px 14px; background: var(--c-card); }
.device-icon { font-size: 1.3rem; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.06); border-radius: 10px; }
.device-name { font-weight: 700; font-size: 0.86rem; color: var(--c-ink); }
.device-vendor { font-size: 0.74rem; color: var(--c-slate-muted); }
.device-state { margin-left: auto; font-size: 0.74rem; font-weight: 700; display: flex; align-items: center; gap: 6px; }

.empty-hint { color: var(--c-slate-muted); font-size: 0.85rem; padding: 10px 0; }

.form-input {
  padding: 11px 13px; border: 1px solid var(--c-border); border-radius: 9px; font-size: 0.88rem;
  background: rgba(255,255,255,0.04); color: var(--c-ink); font-family: var(--font);
}
.form-input::placeholder { color: var(--c-slate-muted); }
.form-input:focus { outline: none; border-color: var(--c-teal-2); box-shadow: var(--glow-teal); }
.form-input option { color: #0E1B2A; }
