/* SAR CRM giriş sayfaları (login.php, admin_login.php) ortak stilleri */
:root {
    --brand: #d7141a;
    --brand-dark: #a50e13;
    --brand-soft: rgba(215, 20, 26, .10);
    --bg: #f4f5f7;
    --surface: #ffffff;
    --text: #16181d;
    --muted: #6b7280;
    --border: #e3e5ea;
    --input-bg: #ffffff;
    --danger-bg: #fdecec;
    --danger-text: #a4161a;
    --warn-text: #9a6700;
    --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px rgba(16, 24, 40, .08);
    --radius: 12px;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1115;
        --surface: #171a21;
        --text: #eef0f3;
        --muted: #9aa1ad;
        --border: #2a2f3a;
        --input-bg: #11141a;
        --danger-bg: rgba(215, 20, 26, .16);
        --danger-text: #ff8a8d;
        --warn-text: #f0b429;
        --brand-soft: rgba(215, 20, 26, .22);
        --shadow: 0 12px 32px rgba(0, 0, 0, .35);
    }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

.layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }

/* Sol marka paneli */
.brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 56px;
    color: #fff;
    background:
        radial-gradient(1200px 600px at -10% -20%, rgba(255,255,255,.10), transparent 60%),
        radial-gradient(800px 500px at 120% 120%, rgba(0,0,0,.35), transparent 60%),
        linear-gradient(145deg, #e3171d 0%, #b30f14 55%, #6e080b 100%);
}
.brand::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(180deg, transparent, #000 40%, #000 70%, transparent);
    pointer-events: none;
}
.brand > * { position: relative; z-index: 1; }
.brand-logo { display: flex; align-items: center; gap: 14px; }
.brand-logo .mark {
    width: 52px; height: 52px; border-radius: 14px;
    background: #fff; display: grid; place-items: center;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.brand-logo .mark img { width: 44px; height: auto; }
.brand-logo span { font-weight: 700; font-size: 20px; letter-spacing: .2px; }
.brand h1 { font-size: clamp(30px, 3.2vw, 42px); line-height: 1.15; margin: 0 0 16px; font-weight: 700; letter-spacing: -.5px; }
.brand p.lead { margin: 0; max-width: 440px; font-size: 16px; line-height: 1.6; color: rgba(255,255,255,.85); }
.features { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 14px; }
.features li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: rgba(255,255,255,.92); }
.features i {
    width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
    background: rgba(255,255,255,.14); font-size: 14px;
}
.brand-foot { font-size: 13px; color: rgba(255,255,255,.7); }

/* Sağ form alanı */
.panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.card {
    width: 100%; max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 36px 32px 28px;
}
.mobile-logo { display: none; justify-content: center; margin-bottom: 20px; }
.mobile-logo img { height: 56px; width: auto; }
.card h2 { margin: 0 0 6px; font-size: 24px; font-weight: 700; letter-spacing: -.3px; }
.card .sub { margin: 0 0 26px; color: var(--muted); font-size: 14.5px; }

.alert {
    display: none; align-items: flex-start; gap: 10px;
    background: var(--danger-bg); color: var(--danger-text);
    border-radius: 10px; padding: 11px 14px; font-size: 14px; margin-bottom: 18px;
}
.alert.show { display: flex; animation: shake .35s ease; }
.alert i { margin-top: 2px; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; }
.control { position: relative; }
.control > i.lead-icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--muted); font-size: 14px; pointer-events: none;
}
.control input {
    width: 100%; height: 46px;
    padding: 0 44px 0 40px;
    font: inherit; font-size: 15px; color: var(--text);
    background: var(--input-bg);
    border: 1px solid var(--border); border-radius: var(--radius);
    outline: none; transition: border-color .15s, box-shadow .15s;
}
.control input::placeholder { color: var(--muted); opacity: .75; }
.control input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.icon-btn {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; border: 0; border-radius: 9px;
    background: transparent; color: var(--muted); cursor: pointer;
    display: grid; place-items: center;
}
.icon-btn:hover { background: var(--brand-soft); color: var(--brand); }
.icon-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.hint { display: none; font-size: 12.5px; color: var(--warn-text); margin-top: 6px; }
.hint.show { display: block; }

.captcha-row { display: grid; grid-template-columns: auto auto 1fr; gap: 8px; align-items: center; }
.captcha-box {
    height: 46px; width: 150px;
    border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; background: #f8f9fb;
}
.captcha-box img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.refresh-btn {
    width: 46px; height: 46px; border-radius: var(--radius);
    border: 1px solid var(--border); background: var(--input-bg); color: var(--muted);
    cursor: pointer; display: grid; place-items: center; font-size: 15px;
}
.refresh-btn:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.refresh-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.captcha-row .control input { padding-left: 40px; padding-right: 12px; font-weight: 600; font-size: 17px; }
.captcha-row .control input::placeholder { font-weight: 400; font-size: 15px; }
.spin { animation: spin .6s linear; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn {
    width: 100%; height: 48px; margin-top: 8px;
    border: 0; border-radius: var(--radius);
    background: var(--brand); color: #fff;
    font: inherit; font-size: 15.5px; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    transition: background .15s, transform .05s, box-shadow .15s;
    box-shadow: 0 6px 16px rgba(215, 20, 26, .28);
}
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--brand-soft); outline-offset: 2px; }
.btn[disabled] { opacity: .75; cursor: progress; }
.loader {
    width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,.45); border-top-color: #fff;
    animation: rot .7s linear infinite; display: none;
}
.btn.loading .loader { display: inline-block; }
.btn.loading .btn-icon { display: none; }
@keyframes rot { to { transform: rotate(360deg); } }

.card-foot {
    margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    font-size: 13.5px; color: var(--muted);
}
.card-foot a { color: var(--text); text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.card-foot a:hover { color: var(--brand); }

@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; }
    .brand { display: none; }
    .mobile-logo { display: flex; }
    .panel { padding: 24px 16px; min-height: 100vh; }
    .card { padding: 28px 20px 22px; }
}
@media (max-width: 400px) {
    .captcha-row { display: flex; flex-wrap: wrap; }
    .captcha-row .control { flex: 1 0 100%; }
}
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* Yönetici girişi: koyu marka paneli, kırmızı vurgu */
.brand.admin {
    background:
        radial-gradient(900px 500px at -10% -20%, rgba(215,20,26,.35), transparent 60%),
        radial-gradient(700px 500px at 120% 120%, rgba(215,20,26,.18), transparent 60%),
        linear-gradient(150deg, #1d2129 0%, #14171d 60%, #0c0e12 100%);
}
.badge-admin {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
    background: rgba(215,20,26,.18); color: #ffb3b5;
    font-size: 12.5px; font-weight: 600; letter-spacing: .3px;
}
.card .tag {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 600; color: var(--brand);
    background: var(--brand-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 12px;
}
