/* ============================================================
   AŞAMA 4 — LOGIN (Legatus AI ivory/ink revizyonu)
   ------------------------------------------------------------
   templates/login.html'in <style> bloğunu bu CSS ile değiştir
   (ya da style.css'in altına ekle, override eder).
   ============================================================ */

body.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-primary);
    font-family: var(--font-sans);
}

/* Centered card */
.login-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.login-card .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    color: var(--text-primary);
}
.login-card .logo svg {
    color: var(--accent);
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}
.login-card .logo span,
.login-card .logo .brand {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.login-card h1 {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin: 0 0 6px;
}

.login-card p.subtitle,
.login-card > p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 24px;
    line-height: 1.5;
}

/* Form */
.form-group {
    margin-bottom: 14px;
}
.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}
.form-group input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(200,169,106,0.15);
}
[data-theme="light"] .form-group input:focus {
    box-shadow: 0 0 0 3px rgba(138,106,47,0.10);
}

/* Remember me row */
.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 12px;
    margin: 6px 0 18px;
    font-size: 12px;
    white-space: nowrap;
}
.login-options label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    cursor: pointer;
}
.login-options input[type="checkbox"] {
    accent-color: var(--accent);
    width: 14px;
    height: 14px;
}
.login-options a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}
.login-options a:hover { text-decoration: underline; }

/* Primary button */
.login-btn {
    width: 100%;
    padding: 11px;
    background: var(--text-primary);   /* deep ink */
    color: var(--bg-secondary);
    border: 1px solid var(--text-primary);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
    margin-top: 4px;
}
.login-btn:hover:not(:disabled) {
    background: #2a2722;
    border-color: #2a2722;
}
.login-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.error-msg {
    color: var(--danger);
    font-size: 12px;
    margin-top: 12px;
    text-align: center;
    min-height: 1.2em;
}

/* ============================================================
   Force password-change modal (.modal-overlay is defined in
   style.css; .modal-box was never styled — define it here to
   match the login card.)
   ============================================================ */
.modal-overlay { backdrop-filter: blur(2px); }

.modal-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 30px;
    width: 100%;
    max-width: 400px;
    margin: 16px;
    box-shadow: var(--shadow-lg);
    animation: modalPop 0.18s ease;
}
@keyframes modalPop {
    from { opacity: 0; transform: translateY(8px) scale(0.985); }
    to   { opacity: 1; transform: none; }
}

.modal-box .modal-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    background: rgba(200,169,106,0.14);
    color: var(--accent);
}
.modal-box h2 {
    font-family: var(--font-serif);
    font-size: 21px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    text-align: center;
    margin: 0 0 8px;
}
.modal-box > p {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.5;
    margin: 0 0 22px;
}

/* Password field with show/hide toggle */
.pw-field { position: relative; }
.pw-field input { padding-right: 42px; }
.pw-toggle {
    position: absolute;
    right: 8px;
    top: 31px;
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    line-height: 0;
}
.pw-toggle:hover { color: var(--text-primary); }

/* Live requirement checklist */
.pw-reqs {
    list-style: none;
    padding: 0;
    margin: 2px 0 18px;
    font-size: 11.5px;
}
.pw-reqs li {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text-secondary);
    margin: 4px 0;
    transition: color 0.15s;
}
.pw-reqs li::before {
    content: '○';
    font-size: 10px;
    width: 12px;
    text-align: center;
}
.pw-reqs li.ok { color: var(--success, #4caf50); }
.pw-reqs li.ok::before { content: '✓'; font-weight: 700; }

/* Footer link (Kayıt ol etc.) */
.login-footer {
    margin-top: 18px;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
}
.login-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}
.login-footer a:hover { text-decoration: underline; }
