/* ==========================================================================
   DRILLPRO — LOGIN SCREEN
   Split-screen branded login. Big confident brand panel on left,
   clean form panel on right. Fully responsive — phone to 4K screens.
   Tablets (the primary target) get the side-by-side from 768px up.
   ========================================================================== */

body.dp-app-login {
    background: var(--dp-navy);
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: stretch;
    overflow-x: hidden;
}

.dp-login-shell {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;   /* Brand panel slightly larger */
    width: 100%;
    min-height: 100vh;
}

/* ============================================================
   LEFT — BRAND PANEL (the big confident statement)
   ============================================================ */
.dp-login-brand {
    background: var(--dp-navy);
    color: var(--dp-text-invert);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4vw 5vw;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

/* Subtle radial sheen so the panel isn't flat. No gradients, no images. */
.dp-login-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.05) 0%, transparent 55%),
        radial-gradient(circle at 75% 80%, rgba(255,255,255,0.03) 0%, transparent 45%);
    pointer-events: none;
}

.dp-login-brand-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Top: small "DrillPro" wordmark — product brand */
.dp-login-brand-top {
    display: flex;
    align-items: center;
    gap: 10px;
}
.dp-login-brand-mark {
    width: 10px;
    height: 10px;
    background: var(--dp-text-invert);
    border-radius: 2px;
}
.dp-login-brand-name {
    font-family: var(--dp-font-heading);
    font-size: var(--dp-fs-md);
    font-weight: var(--dp-fw-bold);
    letter-spacing: 0.02em;
    line-height: 1;
}
.dp-login-brand-sub {
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid rgba(255,255,255,0.2);
    line-height: 1;
}

/* Middle: the tagline — vertically centred, fills the available space */
.dp-login-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: var(--dp-s-7) 0;
}

.dp-login-tagline {
    max-width: 520px;
}
.dp-login-tagline h1 {
    font-family: var(--dp-font-heading);
    font-size: clamp(var(--dp-fs-2xl), 3.2vw, var(--dp-fs-4xl));
    font-weight: var(--dp-fw-bold);
    color: var(--dp-text-invert);
    line-height: 1.05;
    margin: 0 0 var(--dp-s-3);
    letter-spacing: -0.01em;
}
.dp-login-tagline p {
    font-size: clamp(var(--dp-fs-base), 1.2vw, var(--dp-fs-md));
    color: rgba(255,255,255,0.65);
    line-height: var(--dp-lh-base);
    margin: 0;
}

/* Bottom: tiny footer line */
.dp-login-footer {
    font-size: var(--dp-fs-xs);
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.04em;
}
.dp-login-footer a {
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    transition: color var(--dp-trans-fast);
}
.dp-login-footer a:hover { color: var(--dp-text-invert); }

/* ============================================================
   RIGHT — FORM PANEL
   ============================================================ */
.dp-login-form-panel {
    background: var(--dp-white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4vw 5vw;
    min-height: 100vh;
}
.dp-login-form {
    width: 100%;
    max-width: 380px;
}
.dp-login-form-logo {
    text-align: center;
    margin-bottom: var(--dp-s-6);
}
.dp-login-form-logo-img {
    height: 96px;
    width: auto;
    display: inline-block;
}
.dp-login-form h2 {
    font-size: var(--dp-fs-2xl);
    margin: 0 0 8px;
    line-height: 1.1;
}
.dp-login-form-intro {
    color: var(--dp-text-2);
    font-size: var(--dp-fs-base);
    margin: 0 0 var(--dp-s-5);
}
.dp-login-help {
    text-align: center;
    font-size: var(--dp-fs-sm);
    color: var(--dp-text-2);
    margin-top: var(--dp-s-5);
}
.dp-login-help a {
    font-weight: var(--dp-fw-medium);
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   - Phones (<768px): stack vertically, mobile-friendly logo on form
   - Tablets (768-1024px): side-by-side, snug — PRIMARY TARGET
   - Desktops (1024-1600px): comfortable side-by-side
   - Massive screens (>1600px): cap the form, let brand breathe
   ============================================================ */

/* Phone — stack the panels */
@media (max-width: 767px) {
    .dp-login-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
    .dp-login-brand {
        min-height: auto;
        padding: var(--dp-s-5) var(--dp-s-4);
        text-align: center;
        align-items: center;
    }
    .dp-login-brand-inner {
        align-items: center;
        text-align: center;
        width: 100%;
    }
    .dp-login-brand-top {
        justify-content: center;
        margin-bottom: var(--dp-s-3);
    }
    .dp-login-hero {
        padding: 0;
        align-items: center;
    }
    .dp-login-tagline h1 { font-size: var(--dp-fs-xl); }
    .dp-login-tagline p { display: none; }   /* keep mobile header tight */
    .dp-login-footer { display: none; }

    .dp-login-form-panel {
        padding: var(--dp-s-6) var(--dp-s-4);
        min-height: auto;
        align-items: flex-start;
    }
    .dp-login-form-logo-img { height: 72px; }
}

/* Tablet — primary target. Side-by-side from 768 up. */
@media (min-width: 768px) and (max-width: 1023px) {
    .dp-login-shell { grid-template-columns: 1fr 1fr; }
    .dp-login-brand { padding: var(--dp-s-7) var(--dp-s-6); }
    .dp-login-form-panel { padding: var(--dp-s-7) var(--dp-s-6); }
    .dp-login-form-logo-img { height: 80px; }
}

/* Desktop — generous comfortable layout */
@media (min-width: 1024px) and (max-width: 1599px) {
    /* Defaults already fit well here */
}

/* Huge / 4K screens — keep proportions sane on massive monitors */
@media (min-width: 1600px) {
    .dp-login-brand-inner { max-width: 640px; margin: 0 auto; width: 100%; }
    .dp-login-form { max-width: 420px; }
    .dp-login-tagline h1 { font-size: 56px; }
}

/* Driller PWA variant — phone-style, simpler */
body.dp-app-login-pwa .dp-login-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}
body.dp-app-login-pwa .dp-login-brand { display: none; }
body.dp-app-login-pwa .dp-login-form-panel {
    min-height: 100vh;
    align-items: flex-start;
    padding-top: 12vh;
}
body.dp-app-login-pwa .dp-login-form-logo-img { height: 72px; }