:root {
    --bg: #06111f;
    --bg-deep: #020813;
    --panel: rgba(12, 27, 45, 0.78);
    --panel-strong: rgba(17, 39, 64, 0.94);
    --line: rgba(112, 220, 255, 0.22);
    --line-strong: rgba(112, 220, 255, 0.48);
    --text: #eaf6ff;
    --muted: #9eb4c8;
    --cyan: #707070;
    --mint: #4f4f4f;
    --orange: #ff8a2a;
    --red: #ff4d5f;
    --blue: #2aa7ff;
    --green: #666666;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* SmartOne-style portal skin with Orion identity */
body {
    color: #24384d;
    background: #ffffff;
}

.site-shell {
    overflow: visible;
}

.site-shell::before {
    display: none;
}

.topbar {
    width: 100%;
    max-width: none;
    min-height: 70px;
    justify-content: center;
    gap: 42px;
    padding: 0 32px;
    background: #3a3636;
    border-bottom: 3px solid #efefef;
    backdrop-filter: none;
}

.topbar .brand {
    margin-right: 22px;
}

.brand-copy strong {
    color: #7a7a7a;
}

.topbar .brand-copy strong {
    color: #8b8b8b;
}

.topbar .brand-copy small {
    color: #ff7d00;
}

.topnav {
    gap: 0;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
}

.topnav a {
    display: grid;
    place-items: center;
    min-height: 70px;
    padding: 0 14px;
}

.topnav a:hover,
.topnav a.active {
    color: #111111;
    background: #ffffff;
}

.nav-cta {
    min-height: 40px;
    color: #111111;
    background: #ffffff;
    box-shadow: none;
}

.notice-band {
    width: 100%;
    margin: 0;
    padding: 34px 24px;
    color: #24384d;
    background: #fff4c8;
    text-align: center;
    line-height: 1.45;
}

.home-showcase {
    display: grid;
    place-items: center;
    min-height: 395px;
    background: #ffffff;
}

.tv-outline {
    position: relative;
    display: grid;
    place-items: center;
    width: min(420px, 75vw);
    height: 245px;
    border: 5px solid #f20d0d;
}

.tv-outline::before,
.tv-outline::after {
    content: "";
    position: absolute;
    bottom: -21px;
    width: 145px;
    height: 5px;
    background: #f20d0d;
}

.tv-outline::before {
    left: 88px;
    transform: rotate(-4deg);
}

.tv-outline::after {
    right: 88px;
    transform: rotate(4deg);
}

.hero-brand {
    transform: scale(1.65);
}

.home-copy-section {
    padding: 34px 24px 40px;
    background: #f2f7fb;
    text-align: center;
}

.home-copy-section p {
    max-width: 890px;
    margin: 0 auto 14px;
    color: #2d4057;
    font-size: 17px;
    line-height: 1.55;
}

.home-actions-row {
    display: flex;
    justify-content: center;
    gap: 18px;
    padding: 42px 20px 74px;
    background: #ffffff;
}

.feature-section,
.page-hero,
.page-section,
.portal-section,
.steps-section,
.faq-section,
.footer,
.panel-layout,
.auth-layout,
.account-strip,
.user-panel-grid {
    width: min(1180px, calc(100% - 56px));
}

.page-hero {
    padding: 54px 0 22px;
    text-align: center;
}

.page-hero h1,
.auth-copy h1,
h1 {
    color: #24384d;
    font-size: clamp(38px, 4.5vw, 58px);
    line-height: 1.05;
    letter-spacing: 0;
}

.page-hero p:not(.eyebrow),
.auth-copy p:not(.eyebrow) {
    margin-left: auto;
    margin-right: auto;
    color: #41566e;
}

.eyebrow {
    color: #4b4b4b;
    letter-spacing: 0.04em;
}

.panel,
.steps article,
.faq-grid details,
.feature-card,
.account-card {
    color: #23384d;
    background: #ffffff;
    border: 1px solid #d5dde5;
    border-radius: 0;
    box-shadow: none;
}

.panel::before {
    display: none;
}

.panel-title p,
.dashboard-cards p,
.feature-card p,
.steps p,
.faq-grid p,
.empty-note,
.diagnostics-list p,
.account-card p {
    color: #52687e;
}

input {
    color: #24384d;
    background: #ffffff;
    border: 1px solid #cbd5df;
}

.device-state,
.dashboard-cards article,
.device-row button {
    color: #24384d;
    background: #f7fafc;
    border-color: #d5dde5;
}

.device-state span,
.device-state code,
.device-row span {
    color: #52687e;
}

.button.primary,
.nav-cta {
    color: #ffffff;
    background: #4c4c4c;
    box-shadow: none;
}

.button.secondary {
    color: #ffffff;
    background: #3a3636;
    border-color: #3a3636;
}

.button.ghost {
    color: #24384d;
    background: #ffffff;
    border: 1px solid #cbd5df;
}

.button.danger {
    color: #ffffff;
    background: #d62736;
    border-color: #d62736;
}

.step,
.feature-icon {
    color: #ffffff;
    background: #555555;
}

.footer {
    color: #52687e;
    border-top: 1px solid #d5dde5;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 52% 22%, rgba(55, 217, 255, 0.16), transparent 28rem),
        radial-gradient(circle at 80% 10%, rgba(255, 138, 42, 0.12), transparent 22rem),
        linear-gradient(180deg, var(--bg), var(--bg-deep));
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.site-shell {
    position: relative;
    overflow: hidden;
}

.site-shell::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle, rgba(255,255,255,0.32) 1px, transparent 1px),
        radial-gradient(circle, rgba(53,217,255,0.22) 1px, transparent 1px);
    background-size: 112px 112px, 173px 173px;
    background-position: 18px 26px, 62px 84px;
    opacity: 0.3;
}

.topbar,
.hero,
.portal-section,
.steps-section,
.faq-section,
.footer {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
    backdrop-filter: blur(16px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    position: relative;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: conic-gradient(from 90deg, var(--red), var(--orange), var(--green), var(--blue), var(--red));
    box-shadow: 0 0 28px rgba(53, 217, 255, 0.34);
}

.brand-mark span {
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 17px solid #ffffff;
    transform: translateX(2px);
}

.brand-copy {
    display: grid;
    line-height: 1;
}

.brand-copy strong {
    letter-spacing: 0.18em;
    font-size: 18px;
}

.brand-copy small {
    color: var(--orange);
    letter-spacing: 0.45em;
    font-weight: 800;
    font-size: 10px;
    margin-top: 5px;
}

.brand.small .brand-mark {
    width: 32px;
    height: 32px;
}

.brand.small .brand-mark span {
    border-top-width: 8px;
    border-bottom-width: 8px;
    border-left-width: 13px;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: var(--muted);
    font-weight: 700;
}

.topnav a:hover {
    color: var(--text);
}

.topnav a.active {
    color: var(--mint);
}

.nav-cta,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 0;
    border-radius: 999px;
    padding: 0 22px;
    font-weight: 900;
    cursor: pointer;
}

.button.primary,
.nav-cta {
    color: #03111d;
    background: linear-gradient(135deg, var(--mint), var(--cyan));
    box-shadow: 0 14px 34px rgba(53, 217, 255, 0.26);
}

.button.secondary {
    color: var(--text);
    background: rgba(42, 167, 255, 0.18);
    border: 1px solid rgba(42, 167, 255, 0.42);
}

.button.ghost {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.button.danger {
    color: #fff;
    background: rgba(255, 77, 95, 0.16);
    border: 1px solid rgba(255, 77, 95, 0.42);
}

.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(420px, 0.98fr);
    align-items: center;
    gap: 56px;
    min-height: 720px;
    padding: 86px 0 96px;
}

.starfield {
    position: absolute;
    inset: 40px -20px;
    border-radius: 32px;
    background:
        linear-gradient(120deg, rgba(53,217,255,0.08), transparent 35%),
        linear-gradient(220deg, rgba(255,138,42,0.07), transparent 35%);
    border: 1px solid rgba(112, 220, 255, 0.08);
    opacity: 0.9;
}

.hero-copy,
.hero-panel {
    position: relative;
    z-index: 1;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--mint);
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 13px;
}

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

h1 {
    max-width: 720px;
    font-size: clamp(48px, 7vw, 92px);
    line-height: 0.92;
    letter-spacing: -0.04em;
    margin-bottom: 24px;
}

h2 {
    font-size: clamp(34px, 4vw, 56px);
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
}

h3 {
    font-size: 22px;
    margin-bottom: 8px;
}

.hero-text {
    max-width: 620px;
    color: var(--muted);
    font-size: 20px;
    line-height: 1.55;
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-panel {
    min-height: 520px;
}

.constellation-card {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border-radius: 30px;
    background:
        radial-gradient(circle at 50% 45%, rgba(53, 217, 255, 0.18), transparent 34%),
        rgba(8, 20, 35, 0.76);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.constellation-card svg {
    width: min(72%, 420px);
    filter: drop-shadow(0 0 22px rgba(53, 217, 255, 0.35));
}

.constellation-card line {
    stroke: rgba(121, 255, 209, 0.58);
    stroke-width: 2;
}

.constellation-card circle {
    fill: var(--cyan);
    stroke: #ffffff;
    stroke-width: 1.8;
}

.pulse {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 999px;
    border: 1px solid rgba(53, 217, 255, 0.24);
    animation: pulse 3.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(0.9); opacity: 0.35; }
    50% { transform: scale(1.18); opacity: 0.85; }
}

.device-card {
    position: absolute;
    right: 28px;
    bottom: 30px;
    width: min(86%, 440px);
    border-radius: 22px;
    background: rgba(2, 8, 19, 0.82);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 30px 70px rgba(0,0,0,0.45);
    overflow: hidden;
}

.device-header {
    display: flex;
    gap: 8px;
    padding: 16px;
    background: rgba(255,255,255,0.06);
}

.device-header span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--muted);
}

.device-screen {
    padding: 18px;
}

.screen-title {
    color: var(--mint);
    font-weight: 900;
    margin-bottom: 14px;
}

.screen-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 12px;
    color: var(--muted);
    border-top: 1px solid rgba(255,255,255,0.08);
}

.screen-row span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    color: var(--text);
    font-weight: 900;
}

.screen-row.active {
    color: var(--text);
    background: rgba(53, 217, 255, 0.1);
}

.portal-section,
.steps-section,
.faq-section {
    padding: 92px 0;
}

.feature-section,
.page-hero,
.page-section,
.panel-layout {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.feature-section {
    padding: 86px 0;
}

.page-hero {
    position: relative;
    padding: 84px 0 42px;
}

.compact-hero {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.page-hero h1 {
    font-size: clamp(46px, 6vw, 78px);
    margin-bottom: 18px;
}

.page-hero p:not(.eyebrow) {
    max-width: 760px;
    color: var(--muted);
    font-size: 19px;
    line-height: 1.55;
}

.page-section {
    padding-top: 34px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.feature-card {
    display: grid;
    gap: 14px;
    min-height: 260px;
    padding: 28px;
    border-radius: 24px;
    background: rgba(12, 27, 45, 0.72);
    border: 1px solid rgba(112, 220, 255, 0.18);
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    background: rgba(17, 39, 64, 0.88);
}

.feature-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    color: #03111d;
    font-weight: 1000;
}

.feature-icon.cyan { background: var(--cyan); }
.feature-icon.green { background: var(--green); }
.feature-icon.orange { background: var(--orange); }

.feature-card p {
    color: var(--muted);
    line-height: 1.55;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 34px;
}

.section-heading p:not(.eyebrow) {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.55;
}

.section-heading.compact {
    max-width: 640px;
}

.portal-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 22px;
    margin-bottom: 22px;
}

.panel-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.42fr) minmax(0, 1fr);
    gap: 22px;
    padding-bottom: 92px;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(560px, 1fr);
    align-items: start;
    gap: 32px;
    padding: 86px 0 110px;
}

.auth-copy h1 {
    font-size: clamp(44px, 6vw, 78px);
}

.auth-copy p:not(.eyebrow) {
    color: var(--muted);
    font-size: 19px;
    line-height: 1.55;
}

.auth-grid {
    display: grid;
    gap: 20px;
}

.auth-card {
    display: grid;
    gap: 16px;
}

.account-strip {
    display: grid;
    grid-template-columns: 1.2fr 0.7fr 1fr;
    gap: 18px;
}

.account-card {
    padding: 22px;
    border-radius: 22px;
    background: rgba(12, 27, 45, 0.72);
    border: 1px solid rgba(112, 220, 255, 0.18);
}

.account-card strong {
    display: block;
    margin: 10px 0 6px;
    font-size: 28px;
    word-break: break-word;
}

.account-card p {
    color: var(--muted);
    margin-bottom: 0;
}

.user-panel-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.44fr) minmax(0, 1fr);
    gap: 22px;
    padding-bottom: 96px;
}

.user-panel-grid .dashboard-panel {
    grid-row: span 2;
}

.mini-form {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.playlist-editor {
    margin-top: 26px;
    padding-top: 24px;
    border-top: 1px solid rgba(112, 220, 255, 0.16);
}

.panel-layout .dashboard-panel {
    grid-row: span 2;
}

.dashboard-panel {
    min-height: 540px;
}

.dashboard-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 22px;
}

.dashboard-top h2 {
    font-size: clamp(30px, 4vw, 48px);
    margin-bottom: 0;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.dashboard-cards article {
    min-height: 170px;
    padding: 20px;
    border-radius: 18px;
    background: rgba(2, 8, 19, 0.42);
    border: 1px solid rgba(112, 220, 255, 0.16);
}

.dashboard-cards strong {
    display: block;
    margin: 12px 0;
    font-size: 24px;
    word-break: break-word;
}

.dashboard-cards p {
    color: var(--muted);
    line-height: 1.45;
    margin-bottom: 0;
}

.metric-label {
    color: var(--mint);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 22px;
}

.compact-actions {
    margin-top: 16px;
}

.panel-device-state {
    margin-top: 8px;
}

.panel {
    position: relative;
    padding: 28px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(16, 35, 58, 0.96), rgba(8, 20, 35, 0.92));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(121,255,209,0.09), transparent 45%, rgba(255,138,42,0.07));
}

.panel > * {
    position: relative;
    z-index: 1;
}

.panel-title {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
}

.panel-title p {
    color: var(--muted);
    margin: 0;
}

.step {
    display: grid;
    place-items: center;
    min-width: 44px;
    height: 44px;
    border-radius: 14px;
    color: #03111d;
    background: var(--mint);
    font-weight: 1000;
}

label {
    display: grid;
    gap: 8px;
    color: var(--text);
    font-weight: 800;
}

input {
    width: 100%;
    min-height: 54px;
    border-radius: 14px;
    border: 1px solid rgba(112, 220, 255, 0.24);
    color: var(--text);
    background: rgba(2, 8, 19, 0.48);
    padding: 0 16px;
    outline: none;
}

input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(53, 217, 255, 0.12);
}

.inline-field {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.hint,
.form-message {
    color: var(--muted);
    margin: 14px 0 0;
}

.form-message[data-type="error"] {
    color: var(--red);
}

.form-message[data-type="warning"] {
    color: var(--orange);
}

.form-message[data-type="success"] {
    color: var(--mint);
}

.device-state {
    display: grid;
    gap: 10px;
    min-height: 126px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(2, 8, 19, 0.42);
    border: 1px solid rgba(255,255,255,0.1);
}

.device-state strong {
    font-size: 22px;
}

.device-state span,
.device-state code {
    color: var(--muted);
}

.device-state code {
    font-family: Consolas, ui-monospace, monospace;
}

.device-state.synced {
    border-color: rgba(121, 255, 209, 0.42);
}

.device-state.pending_validation {
    border-color: rgba(255, 138, 42, 0.5);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.steps article,
.faq-grid details {
    padding: 26px;
    border-radius: 22px;
    background: rgba(12, 27, 45, 0.72);
    border: 1px solid rgba(112, 220, 255, 0.18);
}

.steps span {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 18px;
    border-radius: 14px;
    color: #03111d;
    background: var(--orange);
    font-weight: 1000;
}

.steps p,
.faq-grid p {
    color: var(--muted);
    line-height: 1.55;
    margin-bottom: 0;
}

.faq-grid {
    display: grid;
    gap: 14px;
}

.faq-search {
    max-width: 520px;
    margin-bottom: 18px;
}

.device-list {
    display: grid;
    gap: 12px;
}

.device-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: stretch;
}

.device-row button {
    border: 1px solid rgba(112, 220, 255, 0.16);
    color: var(--text);
    background: rgba(2, 8, 19, 0.38);
    border-radius: 16px;
    padding: 14px;
    text-align: left;
    cursor: pointer;
}

.device-row.active button:first-child,
.device-row button:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(53, 217, 255, 0.12);
    outline: none;
}

.device-row strong,
.device-row span {
    display: block;
}

.device-row span {
    color: var(--muted);
    margin-top: 5px;
    font-size: 14px;
}

.icon-action {
    min-width: 76px;
    text-align: center !important;
    font-weight: 900;
}

.activity-log {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.activity-log li {
    padding: 12px 0;
    color: var(--muted);
    border-bottom: 1px solid rgba(112, 220, 255, 0.12);
}

.activity-log span {
    display: inline-block;
    min-width: 54px;
    color: var(--mint);
    font-weight: 900;
}

.empty-note,
.diagnostics-list p {
    color: var(--muted);
    line-height: 1.55;
}

#api-status[data-status="online"] {
    color: var(--mint);
}

#api-status[data-status="offline"] {
    color: var(--red);
}

.hidden-input {
    display: none;
}

.portal-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 50;
    max-width: min(420px, calc(100vw - 48px));
    padding: 16px 18px;
    border-radius: 16px;
    color: var(--text);
    background: rgba(8, 20, 35, 0.96);
    border: 1px solid var(--line-strong);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
}

.portal-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.portal-toast[data-type="success"] {
    border-color: rgba(121, 255, 209, 0.46);
}

.portal-toast[data-type="error"] {
    border-color: rgba(255, 77, 95, 0.55);
}

summary {
    cursor: pointer;
    font-weight: 900;
    font-size: 19px;
}

details p {
    margin-top: 14px;
}

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 36px 0 48px;
    color: var(--muted);
    border-top: 1px solid rgba(112, 220, 255, 0.16);
}

@media (max-width: 900px) {
    .topnav,
    .nav-cta {
        display: none;
    }

    .hero,
    .portal-grid,
    .steps,
    .form-grid,
    .feature-grid,
    .panel-layout,
    .auth-layout,
    .account-strip,
    .user-panel-grid,
    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
        padding-top: 58px;
    }

    .hero-panel {
        min-height: 420px;
    }

    .inline-field {
        grid-template-columns: 1fr;
    }

    .footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 560px) {
    .topbar,
    .hero,
    .feature-section,
    .page-hero,
    .page-section,
    .panel-layout,
    .auth-layout,
    .account-strip,
    .user-panel-grid,
    .portal-section,
    .steps-section,
    .faq-section,
    .footer {
        width: min(100% - 24px, 1180px);
    }

    .panel {
        padding: 20px;
        border-radius: 18px;
    }

    .hero-actions,
    .form-actions {
        display: grid;
    }

    .device-row {
        grid-template-columns: 1fr;
    }
}

/* Final unified light portal skin */
html,
body {
    color: #25384d;
    background: #ffffff !important;
}

.site-shell {
    background: #ffffff;
}

.site-shell::before,
.starfield,
.pulse {
    display: none !important;
}

.topbar {
    width: 100%;
    max-width: none;
    min-height: 52px;
    margin: 0 auto;
    padding: 0 72px;
    background: #393534 !important;
    border-bottom: 0;
}

body::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    z-index: -1;
    height: 58px;
    background: #06111f;
}

.topnav a {
    min-height: 52px;
    padding: 0 13px;
    color: #ffffff;
}

.topbar .brand-mark {
    width: 32px;
    height: 32px;
}

.topbar .brand-mark span {
    border-top-width: 8px;
    border-bottom-width: 8px;
    border-left-width: 13px;
}

.topbar .brand-copy strong {
    font-size: 14px;
}

.topbar .brand-copy small {
    font-size: 8px;
    margin-top: 4px;
}

.topnav a.active,
.topnav a:hover {
    color: #4b4b4b;
    background: #ffffff;
}

.notice-band {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 32px 24px;
    color: #001f3b;
    background: #fff3c6 !important;
    border: 0;
}

.home-showcase,
.home-actions-row,
.feature-section,
.steps-section,
.faq-section,
.portal-section,
.page-section,
.panel-layout,
.auth-layout,
.account-strip,
.user-panel-grid,
.footer {
    background: #ffffff !important;
}

.home-copy-section {
    background: #f3f8fc !important;
}

.feature-section,
.steps-section,
.faq-section {
    width: 100% !important;
    max-width: none !important;
    padding-left: 72px;
    padding-right: 72px;
}

.page-hero,
.page-section,
.portal-section,
.panel-layout,
.auth-layout,
.account-strip,
.user-panel-grid,
.footer {
    width: 100% !important;
    max-width: none !important;
    padding-left: 72px;
    padding-right: 72px;
}

.home-copy-section p {
    max-width: 1180px;
}

.home-actions-row {
    width: 100%;
}

.home-showcase {
    width: 100%;
}

.feature-section,
.steps-section,
.faq-section {
    padding-top: 72px;
    padding-bottom: 72px;
}

.feature-grid,
.steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-section .section-heading,
.steps-section .section-heading,
.faq-section .section-heading {
    color: #25384d;
}

h1,
h2,
h3,
.dashboard-top h2,
.dashboard-cards strong,
.account-card strong,
.device-state strong,
.feature-card h3,
.steps h3,
summary {
    color: #24384d !important;
    text-shadow: none !important;
}

.eyebrow,
.metric-label {
    color: #4b4b4b !important;
}

.feature-grid,
.steps,
.dashboard-cards {
    gap: 18px;
}

.feature-card,
.steps article,
.faq-grid details,
.panel,
.account-card,
.dashboard-cards article,
.device-state,
.device-row button {
    color: #24384d !important;
    background: #ffffff !important;
    border: 1px solid #d5dde5 !important;
    border-radius: 2px !important;
    box-shadow: none !important;
}

.feature-card:hover {
    background: #f8fbfd !important;
    border-color: #9ec8da !important;
}

.feature-card p,
.steps p,
.faq-grid p,
.panel-title p,
.dashboard-cards p,
.account-card p,
.device-state span,
.device-state code,
.device-row span,
.activity-log li,
.empty-note,
.diagnostics-list p,
.footer {
    color: #52687e !important;
}

input {
    color: #24384d !important;
    background: #ffffff !important;
    border: 1px solid #cbd5df !important;
}

.button,
.nav-cta {
    border-radius: 999px;
    box-shadow: none !important;
}

.button.primary,
.nav-cta {
    color: #ffffff !important;
    background: #4c4c4c !important;
}

.button.secondary {
    color: #ffffff !important;
    background: #2f2f2f !important;
    border-color: #2f2f2f !important;
}

.button.ghost {
    color: #242424 !important;
    background: #ffffff !important;
    border: 1px solid #bfc5cb !important;
}

.button.danger {
    color: #ffffff !important;
    background: #d62736 !important;
    border-color: #d62736 !important;
}

.step,
.feature-icon,
.steps span {
    color: #ffffff !important;
    background: #555555 !important;
    border-radius: 8px !important;
}

.footer {
    border-top: 1px solid #d5dde5 !important;
}

.portal-toast {
    color: #24384d !important;
    background: #ffffff !important;
    border: 1px solid #777777 !important;
}

@media (max-width: 900px) {
    .topbar {
        width: 100%;
        padding: 0 18px;
        justify-content: space-between;
    }
}

/* Centered SmartOne-style header with language selector */
.topbar {
    display: flex !important;
    justify-content: center !important;
    padding: 0 !important;
}

.topbar-inner {
    width: min(1180px, calc(100% - 40px));
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.topbar-inner .brand {
    margin-right: 42px;
}

.topbar-inner .topnav {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.language-picker {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 16px;
    color: #ffffff;
}

.language-current {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    color: #ffffff;
    background: transparent;
    border: 0;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.language-current:hover,
.language-picker.open .language-current {
    background: rgba(255, 255, 255, 0.08);
}

.language-flag {
    position: relative;
    width: 26px;
    height: 16px;
    flex: 0 0 26px;
    overflow: hidden;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.flag-us {
    background: repeating-linear-gradient(
        to bottom,
        #b22234 0,
        #b22234 1.23px,
        #ffffff 1.23px,
        #ffffff 2.46px
    );
}

.flag-us::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 11px;
    height: 8.6px;
    background: #3c3b6e;
}

.flag-es {
    background: linear-gradient(to bottom, #aa151b 0 25%, #f1bf00 25% 75%, #aa151b 75% 100%);
}

.language-code {
    font-size: 12px;
}

.language-caret {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
}

.language-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 40;
    min-width: 150px;
    padding: 6px;
    display: none;
    background: #ffffff;
    border: 1px solid #d6d6d6;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.language-picker.open .language-menu {
    display: grid;
    gap: 2px;
}

.language-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 34px;
    padding: 0 10px;
    color: #202020;
    background: #ffffff;
    border: 0;
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.language-menu .language-flag {
    border-color: rgba(0, 0, 0, 0.18);
}

.language-menu button:hover,
.language-menu button.active {
    background: #eeeeee;
}

@media (max-width: 900px) {
    .topbar-inner {
        width: calc(100% - 24px);
        justify-content: space-between;
    }

    .topbar-inner .brand {
        margin-right: 0;
    }

    .language-current {
        min-height: 48px;
    }
}

/* Client login and SmartOne-style dashboard */
.client-login {
    min-height: 640px;
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 536px);
    align-items: center;
    gap: 110px;
    padding-top: 92px !important;
    padding-bottom: 92px !important;
    background: #ffffff !important;
}

.login-intro {
    max-width: 560px;
    color: #405a78;
}

.login-intro h1,
.login-intro h2,
.login-intro p {
    margin: 0;
    color: #405a78 !important;
    font-weight: 400;
}

.login-intro h1 {
    display: inline;
    margin-left: 16px;
    font-size: 46px;
    line-height: 1.1;
}

.login-intro h2 {
    margin-top: 16px;
    font-size: 34px;
}

.login-intro p {
    margin-top: 18px;
    font-size: 23px;
}

.login-intro hr {
    margin: 30px 0 0;
    border: 0;
    border-top: 1px solid #d6dde4;
}

.login-lock {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 34px;
    vertical-align: -4px;
    border-radius: 5px;
    background: #405a78;
}

.login-lock::before {
    content: "";
    position: absolute;
    left: 9px;
    top: -22px;
    width: 26px;
    height: 28px;
    border: 6px solid #405a78;
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
}

.login-lock.create {
    background: #555555;
}

.login-lock.create::before {
    border-color: #555555;
}

.client-login-card {
    display: grid;
    gap: 22px;
    padding: 16px;
    color: #304963;
    background: #ffffff;
    border: 1px solid #d5dde5;
    border-radius: 6px;
}

.client-login-card label {
    display: grid;
    gap: 10px;
    color: #344960 !important;
    font-size: 16px !important;
    font-weight: 400 !important;
}

.client-login-card input:not([type="checkbox"]) {
    min-height: 58px;
    padding: 0 18px;
    color: #405a78 !important;
    font-size: 24px !important;
    font-weight: 400 !important;
    background: #ffffff !important;
    border: 1px solid #c9d3dd !important;
    border-radius: 5px;
}

.client-login-card input::placeholder {
    color: #6f7d8b !important;
    opacity: 1 !important;
}

.remember-line {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 8px !important;
}

.remember-line input {
    width: 20px;
    height: 20px;
}

.remember-line span {
    color: #344960 !important;
    font-size: 16px !important;
}

.captcha-box {
    min-height: 98px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 18px 26px;
    background: #f7f7f7;
    border: 1px solid #d8d8d8;
}

.captcha-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: #23a455;
}

.captcha-box strong {
    color: #111111 !important;
    font-size: 13px;
    letter-spacing: 0.12em;
}

.client-login-button {
    min-height: 54px;
    color: #ffffff;
    background: #29a94a;
    border: 0;
    border-radius: 4px;
    font-size: 22px;
    cursor: pointer;
}

.client-login-links {
    margin: 0 -16px -16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #f5f5f5;
    border-top: 1px solid #d5dde5;
}

.client-login-links.single {
    grid-template-columns: 1fr;
}

.client-login-links button,
.client-login-links a {
    min-height: 72px;
    display: grid;
    place-items: center;
    color: #0070b8;
    background: transparent;
    border: 0;
    font-size: 23px;
    cursor: pointer;
}

.client-login-links a {
    grid-column: 1 / -1;
    border-top: 1px solid #d5dde5;
}

.verification-box {
    display: grid;
    gap: 12px;
    padding: 16px;
    background: #fff7d8;
    border: 1px solid #e6cc75;
}

.verification-box[hidden] {
    display: none;
}

.verification-box p {
    margin: 0;
    color: #405a78;
}

.client-dashboard {
    display: grid;
    grid-template-columns: 265px minmax(0, 1fr);
    gap: 24px;
    max-width: 1210px !important;
    margin: 0 auto;
    padding-top: 16px !important;
    padding-bottom: 36px !important;
}

.client-sidebar {
    display: grid;
    align-content: start;
    gap: 18px;
}

.client-box {
    color: #304963;
    background: #ffffff;
    border: 1px solid #d5dde5;
    border-radius: 3px;
    overflow: hidden;
}

.client-box header,
.dashboard-title {
    min-height: 46px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: #ffffff;
    background: #4d4d4d;
    font-size: 18px;
}

.client-box-body {
    padding: 14px;
}

.client-box-body strong {
    display: block;
    color: #405a78 !important;
    font-size: 18px;
    text-transform: uppercase;
}

.client-box-body p,
.client-box-body a {
    color: #405a78;
    font-size: 18px;
}

.client-box-body hr {
    border: 0;
    border-top: 1px solid #d8d8d8;
}

.client-box footer {
    padding: 14px;
    background: #f6f6f6;
    border-top: 1px solid #d5dde5;
}

.client-box button {
    width: 100%;
    min-height: 38px;
    color: #111111;
    background: #ffffff;
    border: 1px solid #d5dde5;
    border-radius: 3px;
    font-size: 16px;
    cursor: pointer;
}

.info-note {
    padding: 14px;
    color: #006477 !important;
    background: #d1eef4;
    border: 1px solid #b9dfe7;
    border-radius: 3px;
    text-align: center;
}

.dashboard-main {
    border: 1px solid #d5dde5;
    border-radius: 3px;
    overflow: hidden;
}

.twofa-panel {
    margin: 12px;
    border: 1px solid #df2e45;
    border-radius: 3px;
    overflow: hidden;
}

.twofa-panel div {
    padding: 14px;
    color: #ffffff;
    background: #df2e45;
}

.twofa-panel h2,
.twofa-panel p {
    margin: 0 0 8px;
    color: inherit !important;
}

.twofa-panel h2 {
    font-size: 26px !important;
    line-height: 1.15 !important;
    font-weight: 400 !important;
}

.twofa-panel p {
    font-size: 16px !important;
    line-height: 1.45 !important;
}

.twofa-panel > p {
    padding: 16px;
    color: #24384d !important;
}

.client-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding: 0 12px 28px;
}

.tool-card {
    min-height: 172px;
    display: grid;
    grid-template-rows: 1fr auto;
    align-items: center;
    justify-items: center;
    overflow: hidden;
    color: #24384d;
    background: #ffffff;
    border: 1px solid #d5dde5;
    border-radius: 3px;
    text-align: center;
    cursor: pointer;
}

.tool-card footer {
    width: 100%;
    min-height: 50px;
    display: grid;
    place-items: center;
    color: #0070b8;
    background: #f7f7f7;
    border-top: 1px solid #d5dde5;
    font-weight: 800;
}

.tool-card strong {
    color: inherit !important;
    font-size: 24px;
}

.tool-card.metric-card strong {
    color: #2f2f2f !important;
    font-family: Georgia, serif;
    font-size: 70px;
    line-height: 1;
    font-weight: 400;
}

.tool-card.metric-card span {
    margin-top: -22px;
    font-size: 24px;
}

.tool-card.search-card {
    align-content: start;
    padding: 14px;
    color: #ffffff;
    background: #df2e45;
    border-color: #df2e45;
}

.search-card h3 {
    width: 100%;
    margin: 0 0 12px;
    padding-bottom: 8px;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(255,255,255,0.7);
}

.search-card form {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 48px;
}

.search-card input {
    min-height: 44px;
    border-radius: 3px 0 0 3px !important;
}

.search-card button {
    border: 0;
    background: #ffffff;
    font-size: 28px;
    cursor: pointer;
}

.search-card strong {
    margin-top: 18px;
    color: #ffffff !important;
}

.tool-card.color {
    color: #ffffff;
}

.tool-card.color footer {
    color: #0070b8;
    background: #ffffff;
}

.tool-card.green { background: #29a94a; border-color: #29a94a; }
.tool-card.dark { background: #303841; border-color: #303841; }
.tool-card.slate { background: #76818a; border-color: #76818a; }
.tool-card.blue { background: #1088f2; border-color: #1088f2; }
.tool-card.teal { background: #21a5b4; border-color: #21a5b4; }
.tool-card.yellow { background: #ffc107; border-color: #ffc107; }

.tool-symbol {
    display: block;
    color: inherit;
    font-size: 64px;
    line-height: 1;
}

.tool-icon.monitor {
    width: 86px;
    height: 56px;
    border: 8px solid currentColor;
    border-radius: 6px;
    position: relative;
}

.tool-icon.monitor::after {
    content: "";
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: -22px;
    height: 8px;
    background: currentColor;
    box-shadow: 0 14px 0 currentColor;
}

.hidden-dashboard-tools {
    display: none !important;
}

@media (max-width: 980px) {
    .client-login,
    .client-dashboard,
    .client-tools-grid {
        grid-template-columns: 1fr;
    }

    .client-login {
        gap: 36px;
        padding-top: 48px !important;
    }
}
