:root{
    --bg:#020617;
    --panel:rgba(8,18,38,.88);
    --panel-strong:rgba(12,25,50,.94);
    --line:rgba(143,190,255,.18);
    --line-strong:rgba(143,190,255,.32);
    --text:#f8fafc;
    --muted:#9fb0c8;
    --blue:#38bdf8;
    --blue-2:#6366f1;
    --danger:#ff6b6b;
    --shadow:0 30px 90px rgba(0,0,0,.45);
    --ease:cubic-bezier(.22,1,.36,1);
}

*{ box-sizing:border-box; }

html{
    min-height:100%;
    color-scheme:dark;
}

body{
    min-height:100vh;
    margin:0;
    color:var(--text);
    font-family:Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        linear-gradient(120deg, rgba(2,6,23,.90), rgba(4,13,31,.82)),
        url("unidock-welcome-bg.png") center/cover no-repeat fixed,
        #020617;
    -webkit-font-smoothing:antialiased;
    text-rendering:optimizeLegibility;
}

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

button,
input{
    font:inherit;
}

.auth-page{
    min-height:100vh;
    display:grid;
    grid-template-columns:minmax(320px, .95fr) minmax(360px, 520px);
    gap:clamp(28px, 5vw, 72px);
    align-items:center;
    width:min(90vw, 1440px);
    margin:0 auto;
    padding:42px 0;
}

.auth-copy{
    max-width:640px;
}

.brand-link{
    display:inline-flex;
    align-items:center;
    gap:14px;
    margin-bottom:52px;
}

.brand-link img{
    width:56px;
    height:56px;
    object-fit:contain;
    filter:drop-shadow(0 0 14px rgba(56,189,248,.34));
}

.brand-text{
    display:grid;
    gap:2px;
}

.brand-name{
    font-family:Outfit, Inter, sans-serif;
    font-size:22px;
    font-weight:900;
    letter-spacing:0;
}

.brand-caption{
    color:var(--muted);
    font-size:12px;
    font-weight:700;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.eyebrow{
    display:inline-flex;
    width:max-content;
    padding:8px 14px;
    border:1px solid var(--line);
    border-radius:999px;
    background:rgba(76,152,255,.13);
    color:#bfe7ff;
    font-size:11px;
    font-weight:900;
    letter-spacing:.12em;
    text-transform:uppercase;
}

.auth-copy h1{
    margin:22px 0 18px;
    max-width:720px;
    font-family:Outfit, Inter, sans-serif;
    font-size:clamp(42px, 5.4vw, 82px);
    line-height:.98;
    letter-spacing:0;
}

.auth-copy p{
    max-width:590px;
    margin:0;
    color:var(--muted);
    font-size:16px;
    line-height:1.8;
}

.auth-highlights{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:12px;
    margin-top:34px;
}

.mini-stat{
    min-height:108px;
    padding:16px;
    border:1px solid rgba(143,190,255,.13);
    border-radius:18px;
    background:rgba(8,18,38,.58);
}

.mini-stat strong{
    display:block;
    margin-bottom:6px;
    color:#fff;
    font-size:14px;
}

.mini-stat span{
    display:block;
    color:var(--muted);
    font-size:12.5px;
    line-height:1.55;
}

.auth-panel{
    position:relative;
    overflow:hidden;
    border:1px solid var(--line);
    border-radius:28px;
    background:linear-gradient(180deg, var(--panel-strong), var(--panel));
    box-shadow:var(--shadow);
}

.auth-panel::before{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    background:
        radial-gradient(circle at 18% 0%, rgba(56,189,248,.18), transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,.04), transparent 24%);
}

.auth-panel-inner{
    position:relative;
    padding:30px;
}

.panel-head{
    margin-bottom:24px;
}

.panel-head h2{
    margin:0 0 8px;
    font-family:Outfit, Inter, sans-serif;
    font-size:32px;
    line-height:1.1;
    letter-spacing:0;
}

.panel-head p{
    margin:0;
    color:var(--muted);
    font-size:14px;
    line-height:1.65;
}

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

.alert{
    margin:0 0 18px;
    padding:13px 14px;
    border-radius:14px;
    font-size:13px;
    font-weight:750;
    line-height:1.55;
}

.alert.success{
    color:#cbffe8;
    border:1px solid rgba(34,197,94,.28);
    background:rgba(22,163,74,.13);
}

.alert.error{
    color:#ffd6d6;
    border:1px solid rgba(248,113,113,.30);
    background:rgba(127,29,29,.20);
}

.alert.info{
    color:#dff5ff;
    border:1px solid rgba(56,189,248,.30);
    background:rgba(14,116,144,.17);
}

.field{
    display:grid;
    gap:8px;
}

.field label{
    color:#dce9ff;
    font-size:13px;
    font-weight:800;
}

.field input{
    width:100%;
    min-height:50px;
    padding:0 15px;
    color:var(--text);
    border:1px solid rgba(143,190,255,.16);
    border-radius:14px;
    outline:none;
    background:rgba(2,8,23,.62);
    transition:border-color .22s ease, box-shadow .22s ease, background .22s ease;
}

.field input::placeholder{
    color:rgba(159,176,200,.62);
}

.field input:focus{
    border-color:rgba(56,189,248,.76);
    background:rgba(3,12,31,.82);
    box-shadow:0 0 0 4px rgba(56,189,248,.12);
}

.form-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-top:-2px;
}

.checkline{
    display:inline-flex;
    align-items:center;
    gap:8px;
    color:var(--muted);
    font-size:13px;
}

.checkline input{
    width:16px;
    height:16px;
    accent-color:var(--blue);
}

.soft-link{
    color:#9bdcff;
    font-size:13px;
    font-weight:800;
}

.primary-action{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    min-height:52px;
    width:100%;
    margin-top:4px;
    border:0;
    border-radius:15px;
    color:#fff;
    cursor:pointer;
    font-weight:900;
    background:linear-gradient(180deg, var(--blue), var(--blue-2));
    box-shadow:0 18px 34px rgba(56,189,248,.18), inset 0 1px 0 rgba(255,255,255,.24);
    transition:transform .22s var(--ease), filter .22s ease;
}

.secondary-action{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:44px;
    padding:0 14px;
    border:1px solid rgba(143,190,255,.20);
    border-radius:13px;
    color:#dff5ff;
    cursor:pointer;
    background:rgba(255,255,255,.07);
    font-size:13px;
    font-weight:900;
    transition:border-color .22s ease, background .22s ease, transform .22s var(--ease);
}

.secondary-action:hover,
.secondary-action:focus-visible{
    transform:translateY(-1px);
    border-color:var(--line-strong);
    background:rgba(255,255,255,.10);
}

.verify-row{
    display:grid;
    grid-template-columns:auto 1fr;
    gap:12px;
    align-items:center;
    margin-top:-4px;
}

.verify-hint{
    color:var(--muted);
    font-size:12.5px;
    line-height:1.45;
}

.primary-action:hover,
.primary-action:focus-visible{
    transform:translateY(-2px);
    filter:brightness(1.04);
}

.divider{
    display:grid;
    grid-template-columns:1fr auto 1fr;
    gap:12px;
    align-items:center;
    margin:6px 0;
    color:var(--muted);
    font-size:12px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.08em;
}

.divider::before,
.divider::after{
    content:"";
    height:1px;
    background:rgba(143,190,255,.15);
}

.social-grid{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:12px;
}

.social-button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    min-height:48px;
    border:1px solid rgba(143,190,255,.17);
    border-radius:14px;
    color:#eff6ff;
    cursor:pointer;
    background:rgba(255,255,255,.06);
    font-weight:850;
    transition:border-color .22s ease, background .22s ease, transform .22s var(--ease);
}

.social-button:hover,
.social-button:focus-visible{
    transform:translateY(-1px);
    border-color:var(--line-strong);
    background:rgba(255,255,255,.09);
}

.social-mark{
    display:grid;
    place-items:center;
    width:24px;
    height:24px;
    border-radius:50%;
    font-size:14px;
    font-weight:950;
}

.social-mark.google{
    color:#1f2937;
    background:#fff;
}

.social-mark.facebook{
    color:#fff;
    background:#1877f2;
}

.switch-auth{
    margin:22px 0 0;
    color:var(--muted);
    text-align:center;
    font-size:14px;
}

.switch-auth a{
    color:#9bdcff;
    font-weight:900;
}

.back-link{
    display:inline-flex;
    align-items:center;
    gap:8px;
    margin-top:18px;
    color:var(--muted);
    font-size:13px;
    font-weight:800;
}

.back-link:hover,
.soft-link:hover,
.switch-auth a:hover{
    color:#d9f3ff;
}

@media (max-width: 1040px){
    body{
        background-attachment:scroll;
    }

    .auth-page{
        grid-template-columns:1fr;
        gap:28px;
        padding:28px 0;
    }

    .brand-link{
        margin-bottom:34px;
    }

    .auth-copy{
        max-width:100%;
    }

    .auth-copy p{
        max-width:760px;
    }
}

@media (max-width: 760px){
    html,
    body{
        min-height:100%;
    }

    body{
        background:
            linear-gradient(180deg, rgba(2,6,23,.74), rgba(2,6,23,.94)),
            url("unidock-welcome-bg.png") center top/cover no-repeat,
            #020617;
    }

    .auth-page{
        display:flex;
        flex-direction:column;
        justify-content:flex-start;
        width:100%;
        min-height:100dvh;
        gap:14px;
        padding:16px 14px 22px;
    }

    .auth-copy{
        display:flex;
        align-items:center;
        justify-content:space-between;
        width:100%;
        max-width:none;
        min-height:54px;
    }

    .brand-link{
        gap:10px;
        margin:0;
    }

    .brand-link img{
        width:44px;
        height:44px;
    }

    .brand-name{
        font-size:20px;
    }

    .brand-caption{
        font-size:10px;
        letter-spacing:.06em;
    }

    .eyebrow,
    .auth-copy h1,
    .auth-copy p,
    .auth-highlights{
        display:none;
    }

    .auth-panel{
        width:100%;
        border-radius:22px;
    }

    .auth-panel-inner{
        padding:18px;
    }

    .panel-head{
        margin-bottom:16px;
    }

    .panel-head h2{
        font-size:28px;
    }

    .panel-head p{
        font-size:13px;
        line-height:1.55;
    }

    .auth-form{
        gap:12px;
    }

    .field{
        gap:6px;
    }

    .field label{
        font-size:12px;
    }

    .field input{
        min-height:46px;
        border-radius:12px;
    }

    .primary-action{
        min-height:48px;
        border-radius:13px;
    }

    .secondary-action{
        min-height:42px;
        width:100%;
    }

    .social-grid{
        grid-template-columns:repeat(2, minmax(0, 1fr));
        gap:10px;
    }

    .social-button{
        min-height:44px;
        font-size:13px;
    }

    .form-row{
        align-items:flex-start;
        flex-direction:column;
        gap:10px;
    }

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

    .verify-hint,
    .switch-auth,
    .back-link{
        font-size:12px;
    }
}

@media (max-width: 380px){
    .auth-page{
        padding:12px 10px 18px;
    }

    .auth-panel-inner{
        padding:16px;
    }

    .social-grid{
        grid-template-columns:1fr;
    }
}
