/* =========================================================
   CHAINKAI AUTH (Login / Register) - Organic-inspired layout
   Uses the main theme's CSS variables (--ck-*) for dark/light.
   ========================================================= */

.ck-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.ck-auth-shell {
    width: 100%;
    max-width: 980px;
    border-radius: 24px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    min-height: 620px;
    background: var(--ck-card-bg);
    backdrop-filter: var(--ck-glass-blur);
    border: 1px solid var(--ck-border);
    box-shadow: var(--ck-shadow);
}

/* LEFT BRAND PANEL */
.ck-auth-brand {
    background: var(--ck-gradient);
    color: #fff;
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.ck-auth-brand::before {
    content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%;
    background: rgba(255,255,255,0.08); top: -100px; right: -100px;
}
.ck-auth-brand::after {
    content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%;
    background: rgba(255,255,255,0.06); bottom: -80px; left: -60px;
}

.ck-auth-brand .ck-logo { color: #fff; position: relative; z-index: 1; }
.ck-auth-brand .ck-logo .ck-logo-mark { background: rgba(255,255,255,0.18); }

.ck-auth-copy { position: relative; z-index: 1; margin-top: 60px; }
.ck-auth-copy h1 { font-size: 36px; line-height: 1.25; font-weight: 800; margin: 0 0 16px; max-width: 380px; }
.ck-auth-copy p { font-size: 15px; color: rgba(255,255,255,0.78); max-width: 360px; line-height: 1.7; margin: 0; }

/* Mini feed preview */
.ck-feed-preview {
    position: relative; z-index: 1; margin-top: 36px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: var(--ck-radius);
    padding: 16px;
    backdrop-filter: blur(6px);
}
.ck-fp-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ck-fp-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: #fff; color: var(--ck-accent);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 14px; flex-shrink: 0;
}
.ck-fp-meta { font-size: 12.5px; }
.ck-fp-meta b { display: block; font-size: 13.5px; }
.ck-fp-meta span { color: rgba(255,255,255,0.6); }
.ck-fp-text { font-size: 13.5px; line-height: 1.6; color: rgba(255,255,255,0.85); margin-bottom: 12px; }
.ck-fp-actions { display: flex; gap: 18px; font-size: 12px; color: rgba(255,255,255,0.6); }
.ck-fp-actions span { display: flex; align-items: center; gap: 5px; }

.ck-auth-foot { position: relative; z-index: 1; font-size: 13px; color: rgba(255,255,255,0.55); }

/* RIGHT FORM PANEL */
.ck-auth-form-panel {
    padding: 48px 52px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ck-tabs {
    display: flex;
    background: var(--ck-card-bg-alt);
    border-radius: var(--ck-radius-pill);
    padding: 4px;
    margin-bottom: 30px;
    gap: 4px;
}
.ck-tab {
    flex: 1; text-align: center; padding: 11px 0;
    font-size: 14px; font-weight: 700; color: var(--ck-text-muted);
    border-radius: var(--ck-radius-pill); cursor: pointer; user-select: none;
    transition: all .2s ease;
}
.ck-tab.active { background: var(--ck-card-bg-solid); color: var(--ck-text); box-shadow: var(--ck-shadow); }

.ck-auth-head h2 { font-size: 28px; font-weight: 800; margin: 0 0 6px; }
.ck-auth-head p { font-size: 14px; color: var(--ck-text-muted); margin: 0 0 26px; }

.ck-field { margin-bottom: 16px; }
.ck-field label {
    display: block; font-size: 12.5px; font-weight: 700; color: var(--ck-text-muted);
    margin-bottom: 7px; letter-spacing: 0.2px;
}
.ck-input-wrap { position: relative; }
.ck-input-wrap svg {
    position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
    opacity: 0.45; pointer-events: none; fill: none; stroke: currentColor;
    color: var(--ck-text);
}
.ck-input-wrap input {
    width: 100%;
    background: var(--ck-input-bg);
    border: 1.5px solid var(--ck-border);
    border-radius: var(--ck-radius-sm);
    padding: 13px 16px 13px 42px;
    font-family: inherit; font-size: 14px; color: var(--ck-text);
    outline: none; transition: border-color .2s, background .2s;
}
.ck-input-wrap input::placeholder { color: var(--ck-text-muted); }
.ck-input-wrap input:focus { border-color: var(--ck-accent-2); }

.ck-input-wrap .ck-toggle-pass {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    opacity: 0.45; cursor: pointer; background: none; border: none; padding: 0;
    display: flex; align-items: center; color: var(--ck-text);
}
.ck-input-wrap .ck-toggle-pass:hover { opacity: 0.85; }

.ck-row-between { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; font-size: 13px; }
.ck-remember { display: flex; align-items: center; gap: 8px; color: var(--ck-text-muted); cursor: pointer; }
.ck-remember input { width: 15px; height: 15px; accent-color: var(--ck-accent-2); cursor: pointer; }

.ck-divider {
    display: flex; align-items: center; gap: 12px; margin: 24px 0;
    font-size: 12px; color: var(--ck-text-muted); text-transform: uppercase; letter-spacing: 1px;
}
.ck-divider::before, .ck-divider::after { content: ""; flex: 1; height: 1px; background: var(--ck-border); }

.ck-switch-line { text-align: center; margin-top: 26px; font-size: 13.5px; color: var(--ck-text-muted); }
.ck-switch-line a { color: var(--ck-accent-2); font-weight: 700; }
.ck-switch-line a:hover { text-decoration: underline; }

.ck-form-stage { position: relative; }
.ck-form-section { display: none; }
.ck-form-section.active { display: block; animation: ck-fade-slide .35s ease; }
@keyframes ck-fade-slide { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.ck-name-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ck-terms-line { font-size: 12.5px; color: var(--ck-text-muted); line-height: 1.6; margin-bottom: 22px; }

.ck-form-notice {
    border-radius: var(--ck-radius-sm);
    padding: 12px 16px;
    font-size: 13.5px;
    margin-bottom: 18px;
    border: 1px solid var(--ck-border);
}
.ck-form-notice.error { background: rgba(220,80,80,0.1); color: #ff8a8a; border-color: rgba(220,80,80,0.25); }
.ck-form-notice.success { background: rgba(0,212,176,0.1); color: var(--ck-accent-2); border-color: rgba(0,212,176,0.25); }

@media (max-width: 860px) {
    .ck-auth-shell { grid-template-columns: 1fr; min-height: auto; }
    .ck-auth-brand { display: none; }
    .ck-auth-form-panel { padding: 40px 28px; }
}
