/* ==========================================================
   Crysta – Auth pages (login / register)
   ========================================================== */
:root {
    --c-pine: #102a23;
    --c-leaf: #aafc75;
    --c-primary: #2f6b1a;
    --c-primary-2: #245414;
    --c-text: #102a23;
    --c-muted: #56665f;
    --c-placeholder: #8a9992;
    --c-input: #f4f6f2;
    --c-border: #dde5da;
    --c-link: #2f6b1a;
    --c-error: #b4322a;
    --c-success: #1d7f52;
    --radius: 6px;
    --panel-width: 50%;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
    font-family: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--c-text);
    background: #fff;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Layout ---------- */
.auth {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: var(--panel-width) 1fr;
    min-height: 100vh;
}

.auth__panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    background: rgba(255, 255, 255, .72);
    -webkit-backdrop-filter: blur(28px);
    backdrop-filter: blur(28px);
}

.auth__card { width: 100%; max-width: 340px; text-align: center; }

.auth__logo { display: inline-block; margin-bottom: 14px; line-height: 0; }

.auth__title {
    font-size: 1.55rem;
    font-weight: 500;
    margin-bottom: 26px;
    letter-spacing: -.01em;
}

.auth__showcase {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.auth__tagline {
    position: relative;
    font-size: clamp(2rem, 3.2vw, 2.6rem);
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
    letter-spacing: -.015em;
}

/* ---------- Google button ---------- */
.btn-google {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    height: 48px;
    padding: 0 18px;
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    color: var(--c-text);
    font-size: .9rem;
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s;
}
.btn-google:hover { border-color: #c7d3cd; box-shadow: 0 4px 14px rgba(16, 42, 35, .06); }
.btn-google__icon {
    display: flex;
    padding-right: 14px;
    border-right: 1px solid var(--c-border);
}

.divider { color: var(--c-muted); font-size: .82rem; margin: 24px 0 22px; }

/* ---------- Fields ---------- */
.field { margin-bottom: 16px; text-align: left; }

.input-wrap { position: relative; }

.input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    background: var(--c-input);
    border: 1px solid transparent;
    border-radius: var(--radius);
    font: inherit;
    font-size: .88rem;
    color: var(--c-text);
    outline: none;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.input::placeholder { color: var(--c-placeholder); }
.input:focus {
    background: #fff;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(47, 107, 26, .15);
}
.input--icon { padding-right: 48px; }
.input.is-invalid { border-color: var(--c-error); background: #fff; }

.field__error { margin-top: 6px; font-size: .76rem; color: var(--c-error); }
.field__error--block { margin: -6px 0 12px; text-align: left; }

.toggle-pass {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    background: none;
    border: 0;
    border-radius: 6px;
    color: #8a9992;
    cursor: pointer;
}
.toggle-pass:hover { color: var(--c-text); }
.toggle-pass .icon-eye { display: none; }
.toggle-pass.is-visible .icon-eye { display: block; }
.toggle-pass.is-visible .icon-eye-off { display: none; }

/* ---------- Checkbox row ---------- */
.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 22px;
    font-size: .82rem;
}

.checkbox {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--c-muted);
    cursor: pointer;
    text-align: left;
}
.checkbox input { position: absolute; opacity: 0; pointer-events: none; }
.checkbox__box {
    flex: none;
    width: 16px;
    height: 16px;
    border: 1.5px solid #b9c7c0;
    border-radius: 4px;
    background: #fff;
    transition: background .15s, border-color .15s;
}
.checkbox input:checked + .checkbox__box {
    background: var(--c-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.6L12 5.4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
    border-color: var(--c-primary);
}
.checkbox input:focus-visible + .checkbox__box { box-shadow: 0 0 0 3px rgba(47, 107, 26, .25); }

.link { color: var(--c-link); text-decoration: none; font-weight: 500; }
.link:hover { text-decoration: underline; }

/* ---------- Primary button ---------- */
.btn-primary {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: var(--radius);
    background: var(--c-primary);
    color: #fff;
    font: inherit;
    font-size: .92rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s, box-shadow .2s, filter .2s;
}
.btn-primary:hover { background: var(--c-primary-2); }
.btn-primary:active { transform: translateY(1px); }

.switch { margin-top: 18px; font-size: .86rem; color: var(--c-muted); }

.alert {
    margin-bottom: 18px;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: .82rem;
    text-align: left;
}
.alert--success { background: #e3f3ea; color: var(--c-success); }

/* ---------- Showcase: crystal-clear, over floating glass crystals ---------- */
body { background: linear-gradient(160deg, #f6fbf2 0%, #eef6ec 55%, #e6f3ea 100%); }
.auth__panel { background: rgba(255, 255, 255, .7); -webkit-backdrop-filter: blur(28px) saturate(140%); backdrop-filter: blur(28px) saturate(140%);
    border-right: 1px solid rgba(255, 255, 255, .9); box-shadow: 20px 0 60px -40px rgba(16, 42, 35, .35); }
.auth__showcase { position: relative; flex-direction: column; gap: 26px; background: transparent; color: var(--c-text); }
.auth__tagline { color: var(--c-pine); font-weight: 800; letter-spacing: -.035em; max-width: 460px; position: relative; }
.auth__points { list-style: none; display: grid; gap: 10px; color: var(--c-muted); font-size: .92rem; padding: 18px 22px; border-radius: 16px;
    background: rgba(255, 255, 255, .55); border: 1px solid rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); position: relative; }
.auth__points li { display: flex; gap: 10px; align-items: center; }
.auth__points li::before { content: ""; width: 9px; height: 9px; flex: none; background: var(--c-leaf); transform: rotate(45deg); border: 1.5px solid var(--c-pine); }
.auth__title { font-weight: 700; letter-spacing: -.02em; }

/* Floating crystals */
.auth-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.crystals .shape { position: absolute; display: block; animation: drift 14s ease-in-out infinite; filter: drop-shadow(0 18px 30px rgba(16, 42, 35, .12)); }
.crystals .shape polygon:first-child { fill-opacity: .85; }
.auth-bg .shape--hex     { width: 250px; top: -70px;   left: calc(var(--panel-width) - 120px); animation-delay: -2s; }
.auth-bg .shape--gem     { width: 210px; top: -90px;   left: 68%; }
.auth-bg .shape--shard   { width: 150px; top: 8%;      right: -40px; animation-delay: -6s; }
.auth-bg .shape--chip    { width: 64px;  top: 30%;     left: 57%; animation-duration: 10s; }
.auth-bg .shape--prism   { width: 170px; bottom: -40px; left: calc(var(--panel-width) - 95px); animation-delay: -4s; }
.auth-bg .shape--halfhex { width: 200px; bottom: -30px; left: 63%; animation-delay: -8s; }
.auth-bg .shape--tri     { width: 120px; bottom: 16%;  right: 5%; animation-delay: -3s; }
.crystals .dots { position: absolute; top: 27%; left: 76%; width: 130px; height: 110px; background-image: radial-gradient(#9fc2ae 1.2px, transparent 1.3px); background-size: 14px 14px; }
@keyframes drift { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-12px) rotate(3deg); } }
@media (prefers-reduced-motion: reduce) { .crystals .shape { animation: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    :root { --panel-width: 100%; }
    .auth { grid-template-columns: 1fr; }
    .auth__showcase { display: none; }
    .auth-bg .shape--hex   { left: -60px; }
    .auth-bg .shape--prism { left: auto; right: -40px; }
    .crystals .dots        { display: none; }
}

.auth__lead { margin: -14px 0 22px; color: var(--c-muted); font-size: .88rem; line-height: 1.5; text-align: center; }

/* Lime on deep green */
.btn-primary { background: #aafc75; color: #102a23; font-weight: 700; }
.btn-primary:hover { background: #98ef5f; }
.checkbox input:checked + .checkbox__box { background-color: #102a23; border-color: #102a23; }
