/* ================================================================
   KOSTAS — Login Page
   Diseño: split-screen · azul navy elegante · tema claro
   ================================================================ */

@import url('variables.css');

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    background: var(--primary);
    display: flex;
    align-items: stretch;
    min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }

/* ================================================================
   SPLIT WRAPPER
   ================================================================ */
.login-split {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ================================================================
   PANEL IZQUIERDO — Marca / Kostas
   ================================================================ */
.login-panel-left {
    flex: 0 0 54%;
    background: var(--primary);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px 56px;
    position: relative;
    overflow: hidden;
}

/* Decoración geométrica */
.login-deco-circle-1 {
    position: absolute;
    width: 520px; height: 520px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.06);
    top: -120px; right: -160px;
    pointer-events: none;
}
.login-deco-circle-2 {
    position: absolute;
    width: 340px; height: 340px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.04);
    top: -60px; right: -80px;
    pointer-events: none;
}
.login-deco-circle-3 {
    position: absolute;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: rgba(255,255,255,.025);
    bottom: -160px; left: -120px;
    pointer-events: none;
}
.login-deco-dot-grid {
    position: absolute;
    bottom: 60px; right: 56px;
    width: 120px; height: 120px;
    background-image: radial-gradient(rgba(255,255,255,.18) 1.5px, transparent 1.5px);
    background-size: 16px 16px;
    pointer-events: none;
}
.login-deco-k {
    position: absolute;
    right: 48px; top: 50%;
    transform: translateY(-50%);
    font-size: 260px;
    font-weight: 900;
    color: rgba(255,255,255,.04);
    line-height: 1;
    letter-spacing: -8px;
    pointer-events: none;
    user-select: none;
}

/* Header del panel */
.panel-header { position: relative; z-index: 2; }
.panel-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}
.panel-logo-icon {
    width: 42px; height: 42px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    color: var(--white);
    font-size: 18px;
    backdrop-filter: blur(8px);
}
.panel-logo-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -.5px;
}
.panel-logo-name em { font-style: normal; color: var(--brand-300); }

/* Cuerpo principal del panel */
.panel-body {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 0;
}
.panel-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--brand-300);
    margin-bottom: 20px;
}
.panel-eyebrow span {
    width: 28px; height: 1px;
    background: var(--brand-400);
    display: inline-block;
}
.panel-title {
    font-size: clamp(28px, 3.5vw, 46px);
    font-weight: 800;
    color: var(--white);
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 16px;
}
.panel-title .accent { color: var(--brand-300); }
.panel-desc {
    font-size: 15px;
    color: rgba(255,255,255,.6);
    line-height: 1.75;
    max-width: 400px;
    margin-bottom: 40px;
}

/* Feature bullets */
.panel-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.panel-feature {
    display: flex;
    align-items: center;
    gap: 14px;
}
.pf-icon {
    width: 36px; height: 36px;
    border-radius: var(--radius);
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.1);
    display: flex; align-items: center; justify-content: center;
    color: var(--brand-300);
    font-size: 14px;
    flex-shrink: 0;
}
.pf-text strong {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--white);
    line-height: 1.2;
}
.pf-text span {
    font-size: 12px;
    color: rgba(255,255,255,.45);
}

/* Footer del panel */
.panel-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.panel-footer-copy {
    font-size: 12px;
    color: rgba(255,255,255,.3);
}
.panel-footer-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255,255,255,.4);
    transition: color var(--t-fast);
    padding: 6px 0;
}
.panel-footer-link:hover { color: var(--brand-300); }

/* ================================================================
   PANEL DERECHO — Formulario
   ================================================================ */
.login-panel-right {
    flex: 0 0 46%;
    background: var(--white);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Topbar mínimo */
.form-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 40px;
    border-bottom: 1px solid var(--border);
}
.form-topbar-back {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    transition: color var(--t-fast);
    padding: 6px 0;
}
.form-topbar-back:hover { color: var(--primary); }
.form-topbar-back i { font-size: 11px; }
.form-topbar-logo {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -.3px;
}
.form-topbar-logo em { font-style: normal; color: var(--primary-light); }

/* Área central del formulario */
.form-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}
.form-box {
    width: 100%;
    max-width: 380px;
}

/* Cabecera del formulario */
.form-heading {
    margin-bottom: 32px;
}
.form-heading-icon {
    width: 52px; height: 52px;
    background: var(--primary-xlight);
    border: 1px solid var(--brand-200);
    border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary-mid);
    font-size: 20px;
    margin-bottom: 20px;
}
.form-heading h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -.5px;
    margin-bottom: 6px;
}
.form-heading p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Alerta de error */
.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: var(--danger-light);
    border: 1px solid #FECACA;
    border-radius: var(--radius);
    margin-bottom: 24px;
    animation: slideDown .3s ease;
}
.login-alert i { color: var(--danger); font-size: 15px; margin-top: 1px; flex-shrink: 0; }
.login-alert-text {
    font-size: 13.5px;
    color: #7F1D1D;
    line-height: 1.5;
    font-weight: 500;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Grupos de campos */
.field-group { margin-bottom: 18px; }
.field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-body);
    margin-bottom: 7px;
}
.field-wrap { position: relative; }
.field-icon-left {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 14px;
    pointer-events: none;
    transition: color var(--t-fast);
}
.field-input {
    width: 100%;
    padding: 12px 44px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: var(--font);
    color: var(--text-primary);
    background: var(--bg-input);
    transition: all var(--t-fast);
    outline: none;
}
.field-input:focus {
    border-color: var(--primary-light);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}
.field-input:focus + .field-focus-bar { transform: scaleX(1); }
.field-input::placeholder { color: var(--text-light); }
.field-wrap:focus-within .field-icon-left { color: var(--primary-light); }

.field-icon-right {
    position: absolute;
    right: 13px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 14px;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all var(--t-fast);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.field-icon-right:hover { color: var(--primary); background: var(--primary-xlight); }

/* Botón de submit */
.btn-login {
    width: 100%;
    padding: 14px 24px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font);
    display: flex; align-items: center; justify-content: center; gap: 10px;
    transition: all var(--t-normal);
    box-shadow: var(--shadow-brand);
    margin-top: 24px;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}
.btn-login::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.1) 0%, transparent 50%);
}
.btn-login:hover {
    background: var(--primary-mid);
    transform: translateY(-1px);
    box-shadow: var(--shadow-brand-lg);
}
.btn-login:active { transform: translateY(0); }

.btn-login-arrow {
    width: 26px; height: 26px;
    border-radius: 6px;
    background: rgba(255,255,255,.15);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
    transition: transform var(--t-fast);
}
.btn-login:hover .btn-login-arrow { transform: translateX(3px); }

/* Divisor */
.form-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 0;
}
.form-divider hr { flex: 1; border: none; border-top: 1px solid var(--border); }
.form-divider span { font-size: 12px; color: var(--text-light); white-space: nowrap; }

/* Credenciales por defecto */
.default-creds {
    margin-top: 20px;
    background: var(--primary-xlight);
    border: 1px solid var(--brand-200);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.default-creds i { color: var(--primary-mid); font-size: 14px; margin-top: 2px; flex-shrink: 0; }
.dc-text { font-size: 12.5px; color: var(--primary-mid); line-height: 1.7; }
.dc-text strong { font-weight: 700; }

/* Footer del formulario */
.form-footer {
    padding: 20px 40px;
    border-top: 1px solid var(--border);
    text-align: center;
}
.form-footer p { font-size: 12px; color: var(--text-light); }
.form-footer a { color: var(--primary-light); font-weight: 600; }
.form-footer a:hover { color: var(--primary); }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 900px) {
    .login-panel-left { display: none; }
    .login-panel-right { flex: 0 0 100%; }
    .form-center { padding: 32px 24px; }
}
@media (max-width: 480px) {
    .form-topbar { padding: 16px 20px; }
    .form-center  { padding: 24px 20px; }
    .form-footer  { padding: 16px 20px; }
}
