/**
 * Sunpal portal auth — semantic overrides on Pico CSS.
 * H-A-H Phase 5: extracted from layouts/portal-auth.blade.php inline styles.
 * Load after vendor/pico.min.css. Keep branded split hero as custom CSS.
 */

:root {
    color-scheme: light;
    --ink: #090b0d;
    --muted: #666d70;
    --line: #dfe2e0;
    --green: #168b3d;

    --pico-font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    --pico-font-family-sans-serif: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    --pico-background-color: #fff;
    --pico-color: var(--ink);
    --pico-h1-color: var(--ink);
    --pico-h2-color: var(--ink);
    --pico-h3-color: var(--ink);
    --pico-primary: var(--green);
    --pico-primary-background: var(--ink);
    --pico-primary-hover: var(--green);
    --pico-primary-hover-background: var(--green);
    --pico-primary-inverse: #fff;
    --pico-border-radius: 4px;
    --pico-form-element-border-color: var(--line);
    --pico-form-element-background-color: #fff;
    --pico-form-element-color: var(--ink);
    --pico-form-element-placeholder-color: var(--muted);
    --pico-form-element-active-background-color: #fff;
    --pico-muted-color: var(--muted);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--ink);
    background: #fff;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

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

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(380px, 0.55fr);
    min-height: 100dvh;
    max-width: none;
    margin: 0;
    padding: 0;
}

.auth-visual {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 100dvh;
    padding: clamp(32px, 5vw, 72px);
    color: #fff;
    background-color: #071c12;
    background-image:
        linear-gradient(0deg, rgba(3, 7, 5, 0.78), rgba(3, 7, 5, 0.04) 70%),
        var(--auth-visual-image);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}
.auth-visual div { max-width: 650px; }
.auth-visual span {
    display: block;
    margin-bottom: 14px;
    color: #9be2ae;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}
.auth-visual h1 {
    margin: 0 0 18px;
    font-size: clamp(44px, 6vw, 86px);
    font-weight: 650;
    line-height: 0.94;
    letter-spacing: 0;
    color: #fff;
}
.auth-visual p {
    max-width: 560px;
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 18px;
    line-height: 1.6;
}

.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: none;
    margin: 0;
    padding: clamp(30px, 5vw, 76px);
}
.brand {
    display: inline-flex;
    align-items: center;
    margin-bottom: 72px;
}
.brand img {
    display: block;
    width: 180px;
    max-width: 70%;
    height: auto;
}
.auth-panel h2 {
    margin: 0 0 12px;
    color: var(--ink);
    font-size: 34px;
    line-height: 1.05;
}
.auth-panel > p {
    margin: 0 0 30px;
    color: var(--muted);
    line-height: 1.6;
}

label {
    display: block;
    margin-bottom: 20px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
}
/* 16px minimum — iOS Safari zooms focused inputs under 16px. */
input,
select,
textarea {
    width: 100%;
    height: 52px;
    margin-top: 8px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.25;
}
textarea {
    height: auto;
    min-height: 52px;
    padding: 12px 14px;
}
input:focus,
select:focus,
textarea:focus {
    border-color: var(--green);
    outline: 3px solid rgba(22, 139, 61, 0.13);
}

button {
    width: 100%;
    min-height: 52px;
    margin: 0;
    border: 0;
    border-radius: 4px;
    background: var(--ink);
    color: #fff;
    font: 750 15px/1 inherit;
    cursor: pointer;
}
button:hover { background: var(--green); }

.social-actions {
    display: grid;
    gap: 10px;
    margin-bottom: 22px;
}
.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    color: var(--ink);
    font: 750 14px/1 inherit;
}
.social-btn:hover {
    border-color: var(--green);
    color: var(--green);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.auth-divider:before,
.auth-divider:after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.notice,
.error {
    margin-bottom: 18px;
    padding: 13px 14px;
    border: 1px solid #a9dbb7;
    background: #eef9f1;
    color: #11652d;
    line-height: 1.5;
}
.error {
    border-color: #efb3ae;
    background: #fff2f1;
    color: #9d251c;
}

.fine-print { margin-top: 24px !important; font-size: 12px; }
.back {
    display: inline-block;
    margin-top: 36px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 820px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-visual {
        min-height: 42dvh;
        padding: 28px;
        background-position: center;
    }
    .auth-visual h1 { font-size: 44px; }
    .auth-visual p { font-size: 15px; }
    .auth-panel { padding: 34px 24px 50px; }
    .brand { margin-bottom: 42px; }
}
