:root {
    --portal-bg: #061812;
    --portal-panel: rgba(12, 43, 32, 0.9);
    --portal-line: rgba(151, 231, 177, 0.17);
    --portal-green: #8ee8a3;
    --portal-cyan: #5edbd0;
    --portal-gold: #f1cb78;
    --portal-ink: #effff4;
    --portal-muted: #91afa0;
}

.platform-gate {
    position: relative;
    z-index: 500;
    min-height: 100vh;
    overflow: hidden;
    color: var(--portal-ink);
    background:
        radial-gradient(circle at 12% 18%, rgba(67, 214, 151, 0.16), transparent 28rem),
        radial-gradient(circle at 88% 76%, rgba(94, 219, 208, 0.12), transparent 30rem),
        linear-gradient(145deg, #061711, #08241a 55%, #061812);
}

.platform-gate::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.23;
    background-image:
        linear-gradient(rgba(151, 231, 177, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(151, 231, 177, 0.045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.platform-header,
.platform-footer,
.platform-shell {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 2rem));
    margin-inline: auto;
}

.platform-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 82px;
    border-bottom: 1px solid var(--portal-line);
}

.platform-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: inherit;
    text-decoration: none;
}

.platform-brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(142, 232, 163, 0.32);
    border-radius: 13px;
    background: linear-gradient(145deg, rgba(142, 232, 163, 0.22), rgba(94, 219, 208, 0.09));
    color: var(--portal-green);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.78rem;
    font-weight: 850;
}

.platform-brand > span:last-child { display: grid; gap: 0.08rem; }
.platform-brand strong { font-size: 1rem; letter-spacing: 0.02em; }
.platform-brand small { color: var(--portal-muted); font-size: 0.61rem; }
.platform-secure { display: inline-flex; align-items: center; gap: 0.48rem; color: var(--portal-muted); font-size: 0.66rem; }
.platform-secure i { width: 7px; height: 7px; border-radius: 50%; background: var(--portal-green); box-shadow: 0 0 0 5px rgba(142,232,163,.08), 0 0 16px rgba(142,232,163,.5); }

.platform-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.72fr);
    align-items: center;
    gap: clamp(2rem, 7vw, 6rem);
    min-height: calc(100vh - 156px);
    padding-block: 3rem;
}

.platform-intro { max-width: 690px; }
.platform-eyebrow,
.platform-apps-heading p,
.portal-auth-title small {
    margin: 0;
    color: var(--portal-cyan);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.platform-intro h1 {
    margin: 1rem 0 1.2rem;
    color: var(--portal-ink);
    font-size: clamp(2.65rem, 5.3vw, 5.4rem);
    line-height: 1.06;
    letter-spacing: -0.055em;
}

.platform-intro h1 em { color: var(--portal-green); font-style: normal; }
.platform-lead { max-width: 620px; margin: 0; color: var(--portal-muted); font-size: 0.92rem; line-height: 1.9; }
.platform-capabilities { display: grid; grid-template-columns: repeat(3, minmax(100px, 1fr)); max-width: 520px; margin-top: 2.2rem; border: 1px solid var(--portal-line); border-radius: 17px; background: rgba(255,255,255,.025); }
.platform-capabilities div { display: grid; gap: 0.1rem; padding: 0.9rem 1rem; }
.platform-capabilities div + div { border-left: 1px solid var(--portal-line); }
.platform-capabilities strong { color: var(--portal-green); font-family: 'Orbitron', sans-serif; font-size: 1.05rem; }
.platform-capabilities span { color: var(--portal-muted); font-size: 0.6rem; }

.platform-auth-card {
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid rgba(151,231,177,.21);
    border-radius: 24px;
    background: linear-gradient(155deg, rgba(18,56,42,.94), rgba(6,29,22,.92));
    box-shadow: 0 30px 80px rgba(0,0,0,.34), inset 0 1px rgba(255,255,255,.06);
    backdrop-filter: blur(18px);
}

.portal-auth-title { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.portal-auth-title div { display: grid; gap: 0.3rem; }
.portal-auth-title h2 { margin: 0; font-size: 1.42rem; }
.portal-auth-title p { margin: 0; color: var(--portal-muted); font-size: 0.68rem; line-height: 1.55; }
.portal-auth-tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.35rem; padding: 0.3rem; border: 1px solid var(--portal-line); border-radius: 12px; background: rgba(2,18,13,.42); }
.portal-auth-tabs button { min-height: 39px; border: 0; border-radius: 9px; background: transparent; color: var(--portal-muted); cursor: pointer; font-weight: 700; }
.portal-auth-tabs button.active { background: rgba(142,232,163,.12); color: var(--portal-green); box-shadow: inset 0 0 0 1px rgba(142,232,163,.13); }
.portal-auth-form { display: grid; gap: 0.85rem; margin-top: 1rem; }
.portal-auth-form label { display: grid; gap: 0.38rem; }
.portal-auth-form label > span { color: #cde4d5; font-size: 0.65rem; font-weight: 700; }
.portal-auth-form input { width: 100%; min-height: 49px; padding: 0.7rem 0.78rem; border: 1px solid rgba(151,231,177,.16); border-radius: 11px; outline: 0; background: rgba(2,18,13,.52); color: var(--portal-ink); }
.portal-auth-form input:focus { border-color: rgba(94,219,208,.58); box-shadow: 0 0 0 3px rgba(94,219,208,.09); }
.portal-auth-submit { display: flex; align-items: center; justify-content: space-between; min-height: 50px; padding: 0.7rem 0.9rem; border: 0; border-radius: 11px; background: linear-gradient(135deg, #a4efa9, #43d697 58%, #5edbd0); color: #052118; cursor: pointer; font-weight: 850; }
.portal-auth-submit:disabled { cursor: wait; filter: saturate(.55); }
.portal-auth-links { display: flex; justify-content: flex-end; }
.portal-auth-link { padding: 0; border: 0; background: transparent; color: #79e5bc; cursor: pointer; font-size: 0.63rem; font-weight: 700; }
.portal-auth-link:hover { text-decoration: underline; }
.portal-auth-notice { padding: 0.68rem 0.75rem; border: 1px solid transparent; border-radius: 10px; font-size: 0.66rem; line-height: 1.55; }
.portal-auth-notice.error { border-color: rgba(240,132,125,.28); background: rgba(240,132,125,.09); color: #ffc1bb; }
.portal-auth-notice.success { border-color: rgba(142,232,163,.28); background: rgba(142,232,163,.09); color: #baf3c8; }
.portal-auth-tip { margin: 0.2rem 0 0; color: #688c7a; font-size: 0.56rem; line-height: 1.55; text-align: center; }

.platform-apps { grid-column: 1 / -1; width: 100%; }
.platform-apps-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.platform-apps-heading h2 { margin: 0.35rem 0 0.25rem; font-size: clamp(1.65rem, 3vw, 2.45rem); }
.platform-apps-heading span { color: var(--portal-muted); font-size: 0.7rem; }
.platform-apps-heading button { min-height: 41px; padding: 0.55rem 0.85rem; border: 1px solid rgba(240,132,125,.22); border-radius: 10px; background: rgba(240,132,125,.06); color: #efb0aa; cursor: pointer; }
.platform-app-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.platform-app-card { position: relative; display: grid; align-content: start; min-height: 330px; overflow: hidden; padding: 1.55rem; border: 1px solid var(--portal-line); border-radius: 21px; background: linear-gradient(150deg, rgba(20,61,46,.93), rgba(7,31,24,.94)); color: inherit; text-align: left; text-decoration: none; cursor: pointer; transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.platform-app-card::after { content: ''; position: absolute; right: -45px; bottom: -55px; width: 170px; height: 170px; border: 1px solid rgba(142,232,163,.12); border-radius: 50%; box-shadow: 0 0 0 34px rgba(142,232,163,.025), 0 0 0 68px rgba(142,232,163,.018); }
.platform-app-card:hover { transform: translateY(-5px); border-color: rgba(142,232,163,.38); box-shadow: 0 24px 60px rgba(0,0,0,.26); }
.platform-app-card.slurry { background: linear-gradient(150deg, rgba(24,62,60,.94), rgba(6,31,29,.94)); }
.platform-app-card.soil { background: linear-gradient(150deg, rgba(57,55,31,.87), rgba(25,33,22,.94)); }
.platform-app-card.map { background: linear-gradient(150deg, rgba(48,42,76,.92), rgba(20,25,48,.96)); }
.platform-app-icon { display: grid; place-items: center; width: 62px; height: 62px; margin-bottom: 1.5rem; border: 1px solid rgba(142,232,163,.25); border-radius: 18px; background: rgba(142,232,163,.1); color: var(--portal-green); font-family: 'Orbitron', sans-serif; font-size: 0.74rem; font-weight: 850; }
.slurry .platform-app-icon { border-color: rgba(94,219,208,.28); background: rgba(94,219,208,.1); color: var(--portal-cyan); font-family: inherit; font-size: 1.25rem; }
.soil .platform-app-icon { border-color: rgba(241,203,120,.28); background: rgba(241,203,120,.09); color: var(--portal-gold); font-family: inherit; font-size: 1.25rem; }
.map .platform-app-icon { border-color: rgba(172,155,255,.32); background: rgba(172,155,255,.1); color: #c9bcff; font-family: inherit; font-size: 1.25rem; }
.platform-app-card > small { color: var(--portal-muted); font-family: 'Orbitron', sans-serif; font-size: 0.51rem; letter-spacing: .12em; }
.platform-app-card > strong { margin-top: 0.45rem; font-size: 1.45rem; }
.platform-app-card > p { margin: 0.75rem 0 1.25rem; color: var(--portal-muted); font-size: 0.72rem; line-height: 1.75; }
.platform-enter { position: relative; z-index: 1; align-self: end; margin-top: auto; color: var(--portal-green); font-size: 0.7rem; font-weight: 800; }
.slurry .platform-enter { color: var(--portal-cyan); }
.soil .platform-enter { color: var(--portal-gold); }
.map .platform-enter { color: #c9bcff; }
.platform-footer { display: flex; justify-content: space-between; min-height: 60px; color: #648676; font-size: 0.58rem; }

.suite-home-button { min-height: 38px; padding: .5rem .7rem; border: 1px solid rgba(142,232,163,.18); border-radius: 10px; background: rgba(142,232,163,.06); color: #bceec8; cursor: pointer; font-size: .65rem; }

@media (max-width: 1080px) {
    .platform-app-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .platform-shell { grid-template-columns: 1fr; min-height: auto; padding-block: 2.5rem; }
    .platform-intro { max-width: none; }
    .platform-intro h1 { font-size: clamp(2.5rem, 9vw, 4.4rem); }
    .platform-auth-card { max-width: 600px; width: 100%; }
    .platform-app-grid { grid-template-columns: 1fr; }
    .platform-app-card { min-height: 260px; }
}

@media (max-width: 560px) {
    .platform-header { min-height: 70px; }
    .platform-secure, .platform-brand small { display: none; }
    .platform-shell { width: min(100% - 1.2rem, 1180px); padding-block: 2rem; }
    .platform-intro h1 { font-size: 2.4rem; }
    .platform-capabilities { grid-template-columns: repeat(3, 1fr); }
    .platform-capabilities div { padding: .7rem .6rem; }
    .platform-apps-heading { align-items: start; }
    .platform-apps-heading h2 { font-size: 1.45rem; }
    .platform-footer { width: calc(100% - 1.2rem); }
    .platform-footer span { display: none; }
}
