/* ============================================================
   PUNTUALIZA — Auth Page (shadcn Authentication Layout)
   ============================================================ */

/* ── CSS Variables / Tokens (Prospect Finance palette) ── */
:root {
    /* ─ Core colors ─ */
    --ptz-background: #FEFAF3;
    --ptz-foreground: #2F2C25;
    --ptz-card: #FFFFFF;
    --ptz-card-foreground: #2F2C25;

    /* ─ Primary ─ */
    --ptz-primary: #2F2C25;
    --ptz-primary-foreground: #FEFAF3;

    /* ─ Secondary / Muted / Accent ─ */
    --ptz-secondary: #F1EADD;
    --ptz-secondary-foreground: #2F2C25;
    --ptz-muted: #F1EADD;
    --ptz-muted-foreground: rgba(47, 44, 37, 0.5);
    --ptz-accent: #F1EADD;
    --ptz-accent-foreground: #2F2C25;

    /* ─ Semantic ─ */
    --ptz-destructive: #EF4444;
    --ptz-destructive-foreground: #FEFAF3;

    /* ─ Borders / Inputs ─ */
    --ptz-border: rgba(47, 44, 37, 0.12);
    --ptz-input: rgba(47, 44, 37, 0.12);
    --ptz-ring: rgba(47, 44, 37, 0.30);

    /* ─ Radius ─ */
    --ptz-radius-sm: 6px;
    --ptz-radius: 9px;
    --ptz-radius-md: 9px;
    --ptz-radius-lg: 12px;
    --ptz-radius-xl: 1rem;

    /* ─ Shadows ─ */
    --ptz-shadow-sm: 0px 2px 18px rgba(0, 0, 0, 0.08);
    --ptz-shadow: 0px 2px 18px rgba(0, 0, 0, 0.12);

    /* ─ Typography ─ */
    --ptz-font: 'BDO Grotesk', Arial, sans-serif;
    --ptz-font-heading: 'Libre Caslon Condensed', 'Times New Roman', serif;
    --ptz-font-badges: 'Roboto Mono', 'Trebuchet MS', monospace;
    --ptz-transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Global Reset ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: var(--ptz-font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    color: var(--ptz-foreground);
    background: var(--ptz-background);
}

/* ══════════════════════════════════════════
   AUTH CONTAINER — Split Layout
   ══════════════════════════════════════════ */
.ptz-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    width: 100%;
}

/* ── Left Panel (Dark Branding) ── */
.ptz-auth__brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px;
    background: var(--ptz-primary);
    color: var(--ptz-primary-foreground);
    overflow: hidden;
}

/* Subtle grid pattern overlay */
.ptz-auth__brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.ptz-auth__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.ptz-auth__logo-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--ptz-radius);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ptz-primary-foreground);
}

.ptz-auth__logo-text {
    font-family: var(--ptz-font-heading);
    font-size: 18px;
    font-weight: 400;
    letter-spacing: -0.025em;
    color: var(--ptz-primary-foreground);
}

.ptz-auth__quote {
    position: relative;
    z-index: 1;
}

.ptz-auth__quote blockquote {
    font-size: 17px;
    font-weight: 400;
    line-height: 1.65;
    color: var(--ptz-primary-foreground);
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.ptz-auth__quote-author {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}

/* ── Right Panel (Form) ── */
.ptz-auth__form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--ptz-background);
    position: relative;
}

/* Top-right link */
.ptz-auth__top-link {
    position: absolute;
    top: 32px;
    right: 32px;
}

.ptz-auth__top-link a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 24px;
    border-radius: var(--ptz-radius);
    font-family: var(--ptz-font);
    font-size: 14px;
    font-weight: 500;
    color: var(--ptz-foreground);
    background: transparent;
    border: none;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
}

.ptz-auth__top-link a:hover {
    background: var(--ptz-accent);
    color: var(--ptz-accent-foreground);
}

/* ── Form Container ── */
.ptz-auth__form-wrap {
    width: 100%;
    max-width: 350px;
}

.ptz-auth__form-header {
    text-align: center;
    margin-bottom: 24px;
}

.ptz-auth__form-title {
    font-family: var(--ptz-font-heading);
    font-size: 24px;
    font-weight: 400;
    letter-spacing: -0.025em;
    color: var(--ptz-foreground);
    margin-bottom: 8px;
    line-height: 1.2;
}

.ptz-auth__form-description {
    font-size: 14px;
    color: var(--ptz-muted-foreground);
    line-height: 1.5;
}

/* ── Form Elements ── */
.ptz-auth__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ptz-auth__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ptz-auth__label {
    font-size: 14px;
    font-weight: 500;
    color: var(--ptz-foreground);
    line-height: 1;
}

.ptz-auth__input {
    width: 100%;
    padding: 0 18px;
    height: 48px;
    border: 1px solid transparent;
    border-radius: var(--ptz-radius);
    font-family: var(--ptz-font);
    font-size: 14px;
    color: var(--ptz-foreground);
    background: rgba(47, 44, 37, 0.06);
    transition: border-color 0.2s ease;
    outline: none;
}

.ptz-auth__input::placeholder {
    color: var(--ptz-muted-foreground);
}

.ptz-auth__input:focus {
    border-color: var(--ptz-border);
}

.ptz-auth__input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Password field wrapper */
.ptz-auth__password-wrap {
    position: relative;
}

.ptz-auth__password-wrap .ptz-auth__input {
    padding-right: 42px;
}

.ptz-auth__toggle-password {
    position: absolute;
    right: 1px;
    top: 1px;
    bottom: 1px;
    width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ptz-muted-foreground);
    border-radius: 0 var(--ptz-radius-sm) var(--ptz-radius-sm) 0;
    transition: color var(--ptz-transition);
}

.ptz-auth__toggle-password:hover {
    color: var(--ptz-foreground);
}

/* Submit button */
.ptz-auth__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    padding: 0 24px;
    border-radius: var(--ptz-radius);
    font-family: var(--ptz-font);
    font-size: 14px;
    font-weight: 500;
    background: var(--ptz-primary);
    color: var(--ptz-primary-foreground);
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    outline: none;
    margin-top: 4px;
}

.ptz-auth__submit:hover {
    background: #3D3A32;
}

.ptz-auth__submit:focus-visible {
    outline: 2px solid var(--ptz-ring);
    outline-offset: 2px;
}

.ptz-auth__submit:disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Loading spinner inside button */
.ptz-auth__spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ptzAuthSpin 0.6s linear infinite;
}

.ptz-auth__submit--loading .ptz-auth__spinner {
    display: inline-block;
}

.ptz-auth__submit--loading .ptz-auth__submit-text {
    display: none;
}

@keyframes ptzAuthSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ── OR Divider ── */
.ptz-auth__divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0;
}

.ptz-auth__divider::before,
.ptz-auth__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--ptz-border);
}

.ptz-auth__divider span {
    font-size: 12px;
    color: var(--ptz-muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* ── Error Alert ── */
.ptz-auth__error {
    display: none;
    padding: 12px 16px;
    border: 1px solid var(--ptz-destructive);
    border-radius: var(--ptz-radius-sm);
    background: #FEF2F2;
    color: var(--ptz-destructive);
    font-size: 14px;
    line-height: 1.5;
    animation: ptzAuthFadeIn 0.2s ease;
}

.ptz-auth__error.visible {
    display: block;
}

@keyframes ptzAuthFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Footer Text ── */
.ptz-auth__footer {
    text-align: center;
    margin-top: 24px;
}

.ptz-auth__footer-text {
    font-size: 12px;
    color: var(--ptz-muted-foreground);
    line-height: 1.5;
}

.ptz-auth__footer-text a {
    color: var(--ptz-foreground);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: var(--ptz-muted-foreground);
    transition: text-decoration-color var(--ptz-transition);
}

.ptz-auth__footer-text a:hover {
    text-decoration-color: var(--ptz-foreground);
}

/* ══════════════════════════════════════════
   RESPONSIVE — Single column on mobile
   ══════════════════════════════════════════ */
@media (max-width: 768px) {
    .ptz-auth {
        grid-template-columns: 1fr;
    }

    .ptz-auth__brand {
        display: none;
    }

    .ptz-auth__form-panel {
        min-height: 100vh;
        padding: 24px;
    }

    .ptz-auth__top-link {
        position: static;
        text-align: center;
        margin-bottom: 24px;
    }

    .ptz-auth__form-wrap {
        max-width: 400px;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .ptz-auth {
        grid-template-columns: 0.8fr 1.2fr;
    }

    .ptz-auth__brand {
        padding: 32px;
    }

    .ptz-auth__quote blockquote {
        font-size: 15px;
    }
}