/* ── RESET & BASE  */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg-main: #030918;
    --bg-secondary: #071226;
    --card-bg: rgba(7, 18, 38, 0.7);
    --card-border: #244A8D;
    --text-primary: #FFFFFF;
    --text-muted: #5A6B8A;
    --text-blue-grey: #7A8BA8;
    --input-bg: rgba(6, 17, 36, 0.8);
    --input-border: rgba(90, 107, 138, 0.4);
    --green-start: #25E6B0;
    --green-end: #16D69B;
    --bright-blue: #075CFF;
    --required-red: #FF5A7A;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { font-size: 16px; }
body {
    background: linear-gradient(160deg, var(--bg-main) 0%, var(--bg-secondary) 50%, var(--bg-main) 100%);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.5;
    min-height: 100svh;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* ── DECORATIVE BACKGROUND CURVES ─ */
.bg-curve-top-left,
.bg-curve-mid-left,
.bg-curve-bottom-right {
    position: fixed;
    pointer-events: none;
    z-index: -1;
    border-radius: 50%;
    filter: blur(100px);
}

.bg-curve-top-left {
    top: -25%; left: -15%;
    width: 65vw; height: 65vw;
    max-width: 650px; max-height: 650px;
    background: radial-gradient(circle at center, rgba(0, 92, 255, 0.25) 0%, rgba(0, 57, 199, 0.1) 40%, transparent 70%);
}

.bg-curve-mid-left {
    top: 10%; left: -10%;
    width: 50vw; height: 50vw;
    max-width: 500px; max-height: 500px;
    background: radial-gradient(circle at center, rgba(0, 26, 112, 0.3) 0%, rgba(0, 57, 199, 0.08) 45%, transparent 70%);
}

.bg-curve-bottom-right {
    bottom: -20%; right: -10%;
    width: 55vw; height: 55vw;
    max-width: 550px; max-height: 550px;
    background: radial-gradient(circle at center, rgba(0, 207, 255, 0.15) 0%, rgba(0, 92, 255, 0.1) 40%, transparent 70%);
}

/* ── WRAPPER ─ */
.signup-wrapper {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 3vw, 40px) clamp(16px, 4vw, 32px);
    gap: clamp(10px, 1.8vh, 28px);
}

/* ─ BRAND SECTION ─ */
.brand-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(6px, 1vh, 14px);
    flex-shrink: 0;
}

.skyline-s-logo {
    width: clamp(80px, 12vw, 140px);
    height: clamp(70px, 10vw, 120px);
    display: block;
}

.company-name {
    font-size: clamp(32px, 5.5vw, 60px);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    text-align: center;
}

.subtitle {
    font-size: clamp(12px, 1.8vw, 18px);
    font-weight: 400;
    color: var(--text-blue-grey);
    text-transform: uppercase;
    letter-spacing: clamp(4px, 0.8vw, 8px);
    text-align: center;
}

/* ── SIGNUP CARD ─ */
.signup-card {
    width: min(calc(100% - 32px), 900px);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: clamp(20px, 3vw, 30px);
    padding: clamp(20px, 3.5vw, 48px) clamp(20px, 4vw, 52px);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 40px rgba(3, 9, 24, 0.5);
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 2vh, 28px);
}

.card-heading {
    font-size: clamp(24px, 3.8vw, 40px);
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.2;
}

.card-subtitle {
    font-size: clamp(14px, 2vw, 23px);
    color: var(--text-blue-grey);
    text-align: center;
    font-weight: 400;
    margin-top: clamp(-4px, -0.5vh, -8px);
}

/* ── GOOGLE BUTTON ─ */
.google-btn {
    width: 100%;
    height: clamp(52px, 6vh, 72px);
    background: rgba(26, 32, 48, 0.9);
    border: 1px solid rgba(90, 107, 138, 0.3);
    border-radius: clamp(10px, 1.8vw, 15px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 1vw, 12px);
    font-size: clamp(14px, 2vw, 20px);
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    font-family: var(--font-main);
}

.google-btn:hover { background: rgba(36, 44, 64, 0.95); }
.google-btn:active { transform: scale(0.98); }
.google-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.google-icon { flex-shrink: 0; }

/* ── DIVIDER ─ */
.divider {
    display: flex;
    align-items: center;
    gap: clamp(10px, 1.5vw, 20px);
}

.divider-line { flex: 1; height: 1px; background: rgba(90, 107, 138, 0.3); }
.divider-text { font-size: clamp(13px, 1.6vw, 18px); color: var(--text-blue-grey); white-space: nowrap; }

/* ── FORM FIELDS ─ */
.form-group { display: flex; flex-direction: column; gap: clamp(5px, 0.7vh, 8px); }

.field-label {
    font-size: clamp(14px, 1.8vw, 20px);
    font-weight: 600;
    color: var(--text-primary);
}

.required { color: var(--required-red); margin-left: 2px; }

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: clamp(10px, 1.4vw, 14px);
    height: clamp(48px, 5.5vh, 72px);
    transition: border-color 0.2s;
}

.input-wrapper:focus-within { border-color: var(--bright-blue); }
.input-wrapper.has-error { border-color: var(--required-red); }

.input-icon { position: absolute; left: clamp(14px, 2vw, 20px); pointer-events: none; }

.input-wrapper input {
    width: 100%; height: 100%;
    background: transparent; border: none; outline: none;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: clamp(14px, 1.8vw, 18px);
    padding-left: clamp(42px, 5vw, 60px);
    padding-right: clamp(42px, 5vw, 60px);
}

.input-wrapper input::placeholder { color: var(--text-muted); }
.input-wrapper.has-toggle input { padding-right: clamp(42px, 5vw, 60px); }

.toggle-password {
    position: absolute; right: clamp(12px, 1.6vw, 18px);
    background: transparent; border: none; cursor: pointer;
    padding: 6px; display: flex; align-items: center; justify-content: center;
}

.helper-text { font-size: clamp(11px, 1.3vw, 14px); color: var(--text-muted); margin-top: 2px; }

.error-msg {
    display: block; font-size: clamp(11px, 1.3vw, 14px);
    color: var(--required-red); min-height: clamp(13px, 1.6vh, 18px);
}

/* ── TERMS CHECKBOX ─ */
.terms-row { display: flex; flex-direction: column; gap: clamp(4px, 0.6vh, 6px); }

.checkbox-label { display: flex; align-items: flex-start; gap: clamp(8px, 1vw, 12px); cursor: pointer; }

.checkbox-label input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }

.custom-checkbox {
    width: clamp(22px, 2.8vw, 30px); height: clamp(22px, 2.8vw, 30px);
    min-width: clamp(22px, 2.8vw, 30px);
    background: rgba(6, 17, 36, 0.6);
    border: 1.5px solid rgba(90, 107, 138, 0.5);
    border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; margin-top: 2px;
}

.checkbox-label input:checked + .custom-checkbox { background: var(--bright-blue); border-color: var(--bright-blue); }

.terms-text { font-size: clamp(13px, 1.6vw, 18px); color: var(--text-blue-grey); line-height: 1.5; }
.terms-link { color: var(--bright-blue); text-decoration: none; font-weight: 500; }
.terms-link:hover { text-decoration: underline; }

/* ─ CREATE BUTTON ─ */
.create-btn {
    width: 100%; height: clamp(50px, 5.8vh, 76px);
    background: linear-gradient(110deg, var(--green-start), var(--green-end));
    border: none; border-radius: clamp(10px, 1.6vw, 16px);
    font-size: clamp(15px, 2vw, 22px); font-weight: 700;
    color: #030918; cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    font-family: var(--font-main);
}

.create-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(37, 230, 176, 0.3); }
.create-btn:active { transform: translateY(0); }
.create-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ── SECURITY INDICATOR ─ */
.security-indicator {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; margin-top: clamp(4px, 0.6vh, 8px);
}

.security-indicator span { font-size: clamp(12px, 1.4vw, 15px); color: var(--text-muted); }

/* ── LOGIN PROMPT ─ */
.login-prompt {
    text-align: center; font-size: clamp(14px, 1.7vw, 20px);
    color: var(--text-blue-grey);
}

.login-prompt a { color: var(--green-start); text-decoration: none; font-weight: 600; }
.login-prompt a:hover { text-decoration: underline; }

/* ── FOOTER ─ */
.signup-footer {
    display: flex; justify-content: center; align-items: center;
    gap: clamp(10px, 1.8vw, 20px); flex-wrap: wrap; flex-shrink: 0;
}

.signup-footer a { font-size: clamp(12px, 1.4vw, 17px); color: var(--text-muted); text-decoration: none; font-weight: 400; }
.signup-footer a:hover { color: var(--text-primary); }
.footer-sep { color: rgba(90, 107, 138, 0.5); font-size: clamp(9px, 1vw, 13px); }

/* ── SHORT SCREEN ADAPTATION ─ */
@media (max-height: 750px) {
    .signup-wrapper { gap: clamp(6px, 1vh, 10px); padding-top: 12px; padding-bottom: 12px; }
    .brand-section { gap: 4px; }
    .signup-card { gap: clamp(8px, 1.2vh, 14px); padding: clamp(14px, 2vw, 24px); }
    .card-subtitle { margin-top: -2px; }
    .divider { margin: 0; }
    .terms-row { gap: 3px; }
    .signup-footer { gap: 8px; }
}

@media (max-height: 600px) {
    .signup-wrapper { min-height: auto; padding: 12px 16px; overflow-y: auto; }
}

/* ── SMALL MOBILE (< 360px) ─ */
@media (max-width: 359px) {
    .signup-card { width: calc(100% - 24px); padding: 16px; }
    .terms-text { font-size: 12px; }
    }
/* ✅ Hide signup card until session check confirms user is not logged in */
/* Prevents flash of signup form for already-authenticated users */
.signup-card { opacity: 0; transition: opacity 0.15s ease; }
.signup-card.visible { opacity: 1; }
