:root {
    --launcher-red: #b80f1c;
    --launcher-red-dark: #950c16;
    --launcher-charcoal: #2f3338;
    --launcher-muted: #68717c;
    --launcher-border: #e2e5e8;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; margin: 0; }

body.screen-launcher {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--launcher-charcoal);
    /* LOGIN BACKGROUND IMAGE - replace only this asset path if needed */
    background-image: url('../img/bg.jpg');
    background-color: #edf0f2;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: Arial, Helvetica, sans-serif;
}

.launcher-backdrop { position: fixed; inset: 0; background: rgba(250, 251, 252, .78); z-index: -1; }
.launcher-decor { position: fixed; inset: 0; z-index: -1; overflow: hidden; color: var(--launcher-red); pointer-events: none; }
.launcher-decor__message { position: absolute; top: 26%; left: 2.5%; margin: 0; opacity: .105; font-family: "Segoe Script", cursive; font-size: clamp(20px, 2.1vw, 40px); font-style: italic; line-height: 1.25; transform: rotate(-5deg); }
.launcher-decor__message strong { font-weight: 600; }
.launcher-decor__crosses { position: absolute; bottom: 9%; left: 2%; opacity: .09; font-size: clamp(35px, 4vw, 72px); font-weight: 300; letter-spacing: .3em; line-height: 1; }
.launcher-decor__heart { position: absolute; top: 22%; right: 1%; display: flex; align-items: center; gap: 14px; opacity: .07; transform: rotate(90deg) translateX(50%); transform-origin: right top; }
.launcher-decor__heart i { font-size: clamp(100px, 12vw, 220px); }
.launcher-decor__heart span { font-size: clamp(11px, .9vw, 16px); font-weight: 800; letter-spacing: .32em; white-space: nowrap; }
.launcher-decor__wave { position: absolute; right: -13vw; bottom: -31vw; width: 62vw; height: 42vw; opacity: .1; background: var(--launcher-red); border-radius: 50% 48% 0 0; transform: rotate(-13deg); }

.launcher-header, .station-panel, .login-panel, .launcher-footer {
    background: rgba(255, 255, 255, .97);
    border: 1px solid rgba(218, 222, 226, .9);
    box-shadow: 0 12px 35px rgba(35, 42, 49, .1);
}

.launcher-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    width: min(1740px, calc(100% - 64px));
    margin: clamp(20px, 3vh, 34px) auto 0;
    padding: clamp(14px, 1.3vw, 22px) clamp(22px, 2.1vw, 40px);
    border-radius: 22px;
}

.launcher-brand { display: flex; align-items: center; gap: clamp(14px, 1.1vw, 20px); min-width: 0; }
.launcher-brand img { width: clamp(58px, 4.4vw, 80px); height: clamp(58px, 4.4vw, 80px); object-fit: contain; }
.launcher-brand h1 { margin: 0; color: var(--launcher-red); font-size: clamp(22px, 1.7vw, 32px); line-height: 1; letter-spacing: -.025em; text-transform: uppercase; }
.launcher-brand p { margin: 7px 0 0; color: var(--launcher-muted); font-size: clamp(10px, .72vw, 13px); font-style: italic; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; }
.launcher-system-title { display: flex; flex-direction: row; align-items: center; gap: 16px; padding-left: clamp(20px, 2.4vw, 46px); border-left: 1px solid var(--launcher-border); text-align: right; }
.launcher-system-title > i { color: var(--launcher-charcoal); font-size: clamp(24px, 2vw, 36px); }
.launcher-system-title div { display: flex; flex-direction: column; align-items: flex-end; }
.launcher-system-title strong { font-size: clamp(17px, 1.35vw, 25px); letter-spacing: .045em; text-transform: uppercase; }
.launcher-system-title span { margin-top: 6px; color: var(--launcher-muted); font-size: clamp(12px, .8vw, 15px); font-style: italic; }

.launcher-main {
    display: grid;
    grid-template-columns: minmax(0, 1.72fr) minmax(370px, .88fr);
    align-items: center;
    gap: clamp(24px, 2.1vw, 40px);
    width: min(1740px, calc(100% - 64px));
    margin: 0 auto;
    padding: clamp(28px, 4vh, 52px) 0;
}

.station-panel, .login-panel { border-radius: 20px; }
.station-panel { padding: clamp(24px, 2vw, 38px); }
.station-panel__header { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: clamp(20px, 2vw, 32px); }
.section-kicker, .login-panel__intro > span { display: block; margin-bottom: 5px; color: var(--launcher-red); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.station-title { display: flex; align-items: center; gap: 14px; }
.station-title > span { display: grid; width: clamp(44px, 3.2vw, 58px); height: clamp(44px, 3.2vw, 58px); place-items: center; color: #fff; background: var(--launcher-red); border-radius: 13px; box-shadow: 0 7px 16px rgba(184, 15, 28, .17); }
.station-panel h2 { position: relative; margin: 0; padding-bottom: 10px; font-size: clamp(25px, 1.8vw, 34px); letter-spacing: -.025em; }
.station-panel h2::after { position: absolute; bottom: 0; left: 0; width: 54px; height: 3px; background: var(--launcher-red); border-radius: 3px; content: ''; }
.system-status { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 8px 13px; color: #247a4d; background: #ebf7f0; border: 1px solid #c7e9d5; border-radius: 999px; font-size: 12px; font-weight: 700; }
.system-status i { width: 8px; height: 8px; background: #2fa467; border-radius: 50%; box-shadow: 0 0 0 3px rgba(47, 164, 103, .14); }

.station-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.2vw, 22px); }
.station-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(13px, 1vw, 18px); min-height: clamp(100px, 7.2vw, 126px); padding: clamp(17px, 1.35vw, 25px); color: var(--launcher-charcoal); background: #fff; border: 1px solid var(--launcher-border); border-radius: 16px; box-shadow: 0 4px 15px rgba(35, 42, 49, .055); text-decoration: none; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.station-card:hover, .station-card:focus-visible { color: var(--launcher-charcoal); border-color: rgba(184, 15, 28, .55); box-shadow: 0 9px 24px rgba(92, 26, 32, .13); transform: translateY(-2px); outline: none; }
.station-card__icon { display: grid; width: clamp(46px, 3.4vw, 62px); height: clamp(46px, 3.4vw, 62px); place-items: center; color: var(--launcher-red); background: #fbecef; border: 1px solid #f5d7dc; border-radius: 14px; font-size: clamp(20px, 1.55vw, 28px); }
.station-card__text { display: flex; flex-direction: column; min-width: 0; }
.station-card__text strong { font-size: clamp(16px, 1.1vw, 21px); }
.station-card__text small { margin-top: 5px; color: var(--launcher-muted); font-size: clamp(12px, .8vw, 15px); }
.station-card__status { align-self: flex-start; margin-top: 8px; padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.station-card__status--activated { color: #247a4d; background: #ebf7f0; border: 1px solid #c7e9d5; }
.station-card__status--ready { color: #875d12; background: #fff7df; border: 1px solid #efdca1; }
.station-card--ready .station-card__icon { color: #9a6b12; background: #fff7df; border-color: #efdca1; }
.station-card__status--inactive { color: #6b737c; background: #f1f3f5; border: 1px solid #dde1e5; }
.station-card--inactive { color: #747c84; background: #f8f9fa; cursor: not-allowed; box-shadow: none; }
.station-card--inactive .station-card__icon { color: #8b9299; background: #eef0f2; border-color: #e0e3e6; }
.station-card__chevron { color: #a4abb2; font-size: 14px; transition: color .2s ease, transform .2s ease; }
.station-card:hover .station-card__chevron { color: var(--launcher-red); transform: translateX(3px); }

.launch-kiosk { display: flex; align-items: center; justify-content: center; gap: 13px; min-height: 58px; margin-top: clamp(20px, 2vw, 32px); padding: 13px 22px; color: #fff; background: var(--launcher-red); border: 1px solid var(--launcher-red); border-radius: 14px; font-size: clamp(13px, .9vw, 16px); font-weight: 800; letter-spacing: .07em; text-decoration: none; text-transform: uppercase; transition: background .2s ease, border-color .2s ease, box-shadow .2s ease; }
.launch-kiosk:hover, .launch-kiosk:focus-visible { color: #fff; background: var(--launcher-red-dark); border-color: var(--launcher-red-dark); box-shadow: 0 8px 19px rgba(184, 15, 28, .2); outline: none; }

.login-panel { align-self: center; padding: clamp(26px, 2.3vw, 44px); }
.login-panel__icon { display: grid; width: clamp(58px, 4.1vw, 76px); height: clamp(58px, 4.1vw, 76px); margin: 0 auto 18px; place-items: center; color: #fff; background: var(--launcher-red); border-radius: 50%; font-size: clamp(25px, 1.8vw, 34px); box-shadow: 0 8px 20px rgba(184, 15, 28, .2); }
.login-panel__intro { text-align: center; }
.login-panel__intro h2 { margin: 0; color: var(--launcher-red); font-size: clamp(20px, 1.45vw, 27px); letter-spacing: -.02em; text-transform: uppercase; }
.login-panel__intro p { margin: 8px 0 0; color: var(--launcher-muted); font-size: clamp(12px, .8vw, 15px); font-style: italic; }
.login-fields { margin-top: clamp(24px, 2vw, 34px); }
.login-fields label { display: block; margin: 0 0 7px; color: #4d555d; font-size: 13px; font-weight: 700; }
.login-control { position: relative; margin-bottom: 18px; }
.login-control > i { position: absolute; top: 50%; left: 15px; z-index: 2; color: #8a929a; transform: translateY(-50%); }
.login-control .form-control { height: 48px; padding: 10px 46px 10px 43px; color: var(--launcher-charcoal); background: #fafbfc; border: 1px solid #d8dde2; border-radius: 8px; font-size: 14px; box-shadow: none; }
.login-control .form-control:focus { background: #fff; border-color: var(--launcher-red); box-shadow: 0 0 0 3px rgba(184, 15, 28, .09); }
.password-toggle { position: absolute; top: 50%; right: 7px; z-index: 3; display: grid; width: 36px; height: 36px; padding: 0; place-items: center; color: #737c85; background: transparent; border: 0; border-radius: 6px; transform: translateY(-50%); }
.password-toggle:hover { color: var(--launcher-red); }
.password-toggle:focus-visible { color: var(--launcher-red); outline: 2px solid rgba(184, 15, 28, .35); }
.login-submit { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 50px; margin-top: 8px; color: #fff; background: var(--launcher-red); border: 1px solid var(--launcher-red); border-radius: 8px; font-size: 14px; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; transition: background .2s ease, border-color .2s ease, box-shadow .2s ease; }
.login-submit:hover, .login-submit:focus { background: var(--launcher-red-dark); border-color: var(--launcher-red-dark); box-shadow: 0 7px 17px rgba(184, 15, 28, .18); outline: none; }
.support-note { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin-top: clamp(20px, 1.7vw, 28px); padding: clamp(14px, 1.2vw, 18px); color: var(--launcher-muted); background: #fafbfc; border: 1px solid var(--launcher-border); border-radius: 13px; }
.support-note__icon { display: grid; width: 38px; height: 38px; place-items: center; color: var(--launcher-red); background: #fbecef; border-radius: 10px; font-size: 17px; }
.support-note__text { display: flex; flex-direction: column; }
.support-note__text small { font-size: 11px; }
.support-note__text strong { margin-top: 2px; color: var(--launcher-charcoal); font-size: 13px; }
.support-note__arrow { color: #a4abb2; font-size: 11px; }

.launcher-footer { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 8px; width: min(1740px, calc(100% - 64px)); margin: 0 auto clamp(18px, 2.5vh, 28px); padding: 11px 20px; color: var(--launcher-muted); border-radius: 10px; font-size: 12px; text-align: center; }
.launcher-footer i { color: var(--launcher-red); }

@media (max-width: 1100px) {
    .launcher-main { grid-template-columns: minmax(0, 1.3fr) minmax(330px, .8fr); }
    .launcher-header, .launcher-main, .launcher-footer { width: min(100% - 36px, 1740px); }
    .station-card { padding: 15px; }
}

@media (max-width: 860px) {
    .launcher-header { align-items: flex-start; }
    .launcher-system-title { display: none; }
    .launcher-main { grid-template-columns: 1fr; align-items: start; }
    .login-panel { width: 100%; }
}

@media (max-width: 590px) {
    .launcher-header, .launcher-main, .launcher-footer { width: calc(100% - 24px); }
    .launcher-brand h1 { font-size: 18px; }
    .launcher-brand img { width: 50px; height: 50px; }
    .station-panel__header { align-items: flex-start; flex-direction: column; }
    .station-grid { grid-template-columns: 1fr; }
}

@media (max-height: 760px) and (min-width: 861px) {
    .launcher-header { margin-top: 14px; padding-block: 10px; }
    .launcher-brand img { width: 54px; height: 54px; }
    .launcher-main { padding-block: 18px; }
    .station-panel, .login-panel { padding: 22px; }
    .station-panel__header { margin-bottom: 16px; }
    .station-card { min-height: 90px; padding-block: 14px; }
    .launch-kiosk { min-height: 50px; margin-top: 16px; }
    .login-panel__icon { width: 54px; height: 54px; margin-bottom: 12px; }
    .login-fields { margin-top: 18px; }
    .login-control { margin-bottom: 12px; }
    .login-control .form-control { height: 44px; }
    .support-note { margin-top: 16px; padding-top: 14px; }
    .launcher-footer { margin-bottom: 12px; padding-block: 7px; }
}

/* Phase 4D.3: compact desktop control-portal proportions. */
.launcher-backdrop { background: rgba(250, 251, 252, .84); }
.launcher-header {
    width: min(1580px, calc(100% - 52px));
    margin-top: clamp(14px, 2vh, 24px);
    padding: 11px 24px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(35, 42, 49, .08);
}
.launcher-brand { gap: 13px; }
.launcher-brand img { width: 52px; height: 52px; }
.launcher-brand h1 { font-size: clamp(19px, 1.35vw, 25px); }
.launcher-brand p { margin-top: 5px; font-size: 10px; }
.launcher-system-title { gap: 12px; padding-left: 28px; }
.launcher-system-title > i { font-size: 25px; }
.launcher-system-title strong { font-size: clamp(15px, 1.05vw, 19px); }
.launcher-system-title span { margin-top: 4px; font-size: 12px; }
.launcher-main {
    grid-template-columns: minmax(0, 1.65fr) minmax(330px, .95fr);
    gap: clamp(20px, 1.8vw, 30px);
    width: min(1580px, calc(100% - 52px));
    padding: clamp(15px, 2.2vh, 25px) 0;
}
.station-panel, .login-panel { border-radius: 16px; box-shadow: 0 10px 28px rgba(35, 42, 49, .09); }
.station-panel { padding: clamp(17px, 1.45vw, 23px); }
.station-panel__header { gap: 16px; margin-bottom: 14px; }
.station-title { gap: 11px; }
.station-title > span { width: 40px; height: 40px; border-radius: 10px; font-size: 15px; }
.station-panel h2 { padding-bottom: 7px; font-size: clamp(22px, 1.45vw, 27px); }
.station-panel h2::after { width: 42px; height: 2px; }
.system-status { gap: 6px; padding: 6px 10px; font-size: 10px; }
.system-status i { width: 6px; height: 6px; box-shadow: 0 0 0 2px rgba(47, 164, 103, .14); }
.station-grid { gap: 10px 12px; }
.station-card {
    min-height: 76px;
    gap: 12px;
    padding: 11px 13px;
    border-radius: 11px;
    box-shadow: 0 3px 10px rgba(35, 42, 49, .045);
}
.station-card:hover, .station-card:focus-visible { box-shadow: 0 6px 16px rgba(92, 26, 32, .1); transform: translateY(-1px); }
.station-card__icon { width: 38px; height: 38px; border-radius: 9px; font-size: 17px; }
.station-card__text strong { overflow: hidden; font-size: clamp(14px, .95vw, 17px); line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.station-card__text small { margin-top: 3px; font-size: 11px; }
.station-card__status { margin-top: 5px; padding: 2px 7px; font-size: 9px; }
.station-card__chevron { font-size: 11px; }
.station-card--inactive:hover { border-color: var(--launcher-border); box-shadow: none; transform: none; }
.launch-kiosk { min-height: 46px; margin-top: 14px; padding: 9px 18px; border-radius: 10px; font-size: 12px; }
.login-panel { padding: clamp(21px, 1.8vw, 30px); }
.login-panel__icon { width: 48px; height: 48px; margin-bottom: 12px; font-size: 21px; box-shadow: 0 6px 15px rgba(184, 15, 28, .17); }
.login-panel__intro > span { margin-bottom: 4px; font-size: 9px; }
.login-panel__intro h2 { font-size: clamp(19px, 1.3vw, 24px); }
.login-panel__intro p { margin-top: 5px; font-size: 11px; }
.login-fields { margin-top: 19px; }
.login-fields label { margin-bottom: 5px; font-size: 12px; }
.login-control { margin-bottom: 12px; }
.login-control .form-control { height: 44px; font-size: 13px; }
.login-submit { height: 46px; margin-top: 5px; font-size: 12px; }
.support-note { gap: 10px; margin-top: 16px; padding: 11px 12px; border-radius: 10px; }
.support-note__icon { width: 34px; height: 34px; border-radius: 8px; font-size: 15px; }
.support-note__text small { font-size: 10px; }
.support-note__text strong { font-size: 12px; }
.launcher-footer { width: min(1580px, calc(100% - 52px)); margin-bottom: 14px; padding: 8px 18px; font-size: 11px; }

@media (max-width: 1100px) and (min-width: 861px) {
    .launcher-header, .launcher-main, .launcher-footer { width: calc(100% - 32px); }
    .launcher-main { grid-template-columns: minmax(0, 1.58fr) minmax(310px, .92fr); gap: 16px; }
}

@media (max-height: 800px) and (min-width: 861px) {
    .launcher-header { margin-top: 10px; padding-block: 8px; }
    .launcher-brand img { width: 44px; height: 44px; }
    .launcher-main { padding-block: 10px; }
    .station-panel, .login-panel { padding: 16px; }
    .station-panel__header { margin-bottom: 10px; }
    .station-title > span { width: 36px; height: 36px; }
    .station-panel h2 { font-size: 22px; }
    .station-grid { gap: 8px 10px; }
    .station-card { min-height: 68px; padding: 8px 11px; }
    .station-card__icon { width: 34px; height: 34px; }
    .station-card__status { margin-top: 3px; }
    .launch-kiosk { min-height: 42px; margin-top: 10px; }
    .login-panel__icon { width: 42px; height: 42px; margin-bottom: 8px; }
    .login-fields { margin-top: 14px; }
    .login-control { margin-bottom: 9px; }
    .login-control .form-control { height: 42px; }
    .login-submit { height: 44px; }
    .support-note { margin-top: 12px; padding-block: 9px; }
    .launcher-footer { margin-bottom: 8px; padding-block: 6px; }
}
