/* ============================================================
   KAVURALIM — AUTH / GİRİŞ EKRANI
   İkiye bölünmüş: solda kavrum görseli, sağda krema formu
============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }

html, body {
    background-color: #F6F1E9;
    color: #2B211B;
    min-height: 100vh;
    min-height: 100dvh;
}

/* --- İkiye bölünmüş yapı --- */
.split-layout {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
}

/* --- SOL: Görsel alanı --- */
.image-section {
    flex: 1.2;
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
}
/* Arka plan görseli ayrı katmanda — yavaş "Ken Burns" zoom animasyonu */
.image-section::before {
    content: '';
    position: absolute;
    inset: -3%;
    background: url('../assets/img/roastery-inside.jpg') center/cover no-repeat;
    animation: kenburns 26s ease-in-out infinite alternate;
    z-index: 0;
}
@keyframes kenburns {
    from { transform: scale(1) translate(0, 0); }
    to   { transform: scale(1.12) translate(1.5%, -1.5%); }
}
@media (prefers-reduced-motion: reduce) {
    .image-section::before { animation: none; }
}

/* Sıcak espresso degradesi — mavi yerine kahve */
.image-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(135deg, rgba(28, 18, 12, 0.92) 0%, rgba(62, 42, 32, 0.55) 55%, rgba(200, 121, 30, 0.28) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10%;
    color: #F6F1E9;
}

.image-overlay h1 {
    font-size: 4rem;
    line-height: 1.08;
    margin-bottom: 22px;
    font-weight: 800;
    letter-spacing: -1.5px;
    animation: fadeRight 1s ease-out;
}
.image-overlay h1 span {
    color: #E8A24A;
    /* İnce ışıltı — kavrulmuş çekirdek parlaklığı */
    text-shadow: 0 0 26px rgba(232, 162, 74, 0.35);
}

.image-overlay p {
    font-size: 1.2rem;
    font-weight: 300;
    color: #E4D8C6;
    max-width: 450px;
    line-height: 1.6;
    animation: fadeRight 1s ease-out 0.2s backwards;
}

/* --- SAĞ: Form alanı --- */
.form-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #F9F4EC;
    background-image: radial-gradient(circle at 15% 15%, rgba(200, 121, 30, 0.05), transparent 45%),
                       radial-gradient(circle at 85% 85%, rgba(200, 121, 30, 0.05), transparent 45%);
    position: relative;
    box-shadow: -20px 0 60px rgba(45, 30, 20, 0.10);
    z-index: 10;
    padding: 30px 20px;
}

.login-box {
    width: 100%;
    max-width: 440px;
    padding: 44px 40px;
    background: #FFFFFF;
    border: 1px solid #EFE6D8;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(45, 30, 20, 0.04), 0 20px 45px rgba(45, 30, 20, 0.08);
    animation: fadeUp 0.8s ease-out;
    position: relative;
    overflow: hidden;
}
/* Üstte ince amber marka çizgisi */
.login-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #C8791E, #E8A24A, #B5451F);
}

/* --- Logo --- */
.logo { margin-bottom: 36px; text-align: left; display: flex; flex-direction: column; align-items: flex-start; }
.logo img { margin-bottom: 16px; }
.logo i { font-size: 38px; color: #C8791E; margin-bottom: 15px; }
.logo h2 { font-size: 26px; font-weight: 800; color: #241812; letter-spacing: -0.5px; margin-bottom: 4px; }
.logo p {
    font-size: 13px;
    color: #A2764A;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* --- Input grupları --- */
.input-group { margin-bottom: 25px; }
.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #6B5A4C;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-wrapper i {
    position: absolute;
    left: 16px;
    color: #B4A594;
    font-size: 18px;
    transition: all 0.3s ease;
    pointer-events: none;
}

.input-icon-wrapper input {
    width: 100%;
    padding: 16px 16px 16px 45px;
    border: 2px solid #E4D8C6;
    border-radius: 12px;
    font-size: 16px; /* iOS zoom önleme */
    color: #2B211B;
    background: #FBF6EE;
    outline: none;
    transition: all 0.3s ease;
}

.input-icon-wrapper input::placeholder { color: #B4A594; }

/* Tarayıcı autofill (Chrome vb.) mavi arka planını ezip tema rengine uydur */
.input-icon-wrapper input:-webkit-autofill,
.input-icon-wrapper input:-webkit-autofill:hover,
.input-icon-wrapper input:-webkit-autofill:focus {
    -webkit-text-fill-color: #2B211B;
    -webkit-box-shadow: 0 0 0 1000px #FBF6EE inset;
    box-shadow: 0 0 0 1000px #FBF6EE inset;
    transition: background-color 9999s ease-in-out 0s;
}
.input-icon-wrapper input.input-error:-webkit-autofill,
.input-icon-wrapper input.input-error:-webkit-autofill:hover,
.input-icon-wrapper input.input-error:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #FDF3F1 inset;
    box-shadow: 0 0 0 1000px #FDF3F1 inset;
}

.input-icon-wrapper input:focus {
    background: #FFFDF9;
    border-color: #C8791E;
    box-shadow: 0 0 0 4px rgba(200, 121, 30, 0.12);
}
.input-icon-wrapper input:focus + i { color: #C8791E; }

/* Şifre alanına özel: sağ tarafta göz ikonu yer aç */
.input-icon-wrapper input#password { padding-right: 48px; }

.toggle-password {
    position: absolute;
    right: 8px;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    color: #B4A594;
    font-size: 16px;
    cursor: pointer;
    pointer-events: auto;
    background: transparent;
    background-color: transparent;
    border: none;
    outline: none;
    box-shadow: none;
    border-radius: 8px;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-appearance: none;
    appearance: none;
    transition: color 0.2s ease, background-color 0.2s ease;
}
.toggle-password:hover,
.toggle-password:focus-visible {
    color: #C8791E;
    background-color: rgba(200, 121, 30, 0.08);
}
.toggle-password:focus-visible {
    box-shadow: 0 0 0 3px rgba(200, 121, 30, 0.2);
}
.toggle-password i { position: static; font-size: 16px; pointer-events: none; }

/* --- Hata durumu: input border'ı kırmızıya döner --- */
.input-icon-wrapper input.input-error {
    border-color: #C0392B;
    background: #FDF3F1;
}
.input-icon-wrapper input.input-error:focus {
    box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.12);
}
.input-icon-wrapper input.input-error + i { color: #C0392B; }

/* --- Giriş butonu --- */
.btn-primary {
    width: 100%;
    padding: 16px;
    background: #241812;
    color: #F6F1E9;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    letter-spacing: 0.2px;
    position: relative;
    overflow: hidden;
}
/* Hover'da soldan sağa kayan ışık parıltısı */
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: -120%;
    width: 60%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.28), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}
.btn-primary:hover::after { left: 130%; }

.btn-primary i { margin-left: 10px; transition: transform 0.3s ease; }

.btn-primary:hover {
    background: linear-gradient(135deg, #C8791E 0%, #A75F14 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(200, 121, 30, 0.34);
}
.btn-primary:hover i { transform: translateX(4px); }

.btn-primary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(200, 121, 30, 0.28);
}

.btn-primary:disabled,
.btn-primary.is-loading {
    opacity: 0.85;
    cursor: not-allowed;
    transform: none;
}
.btn-primary:disabled:hover,
.btn-primary.is-loading:hover {
    background: #241812;
    transform: none;
    box-shadow: none;
}

/* Buton içindeki dönen yükleme ikonu (fa-spinner fa-spin ile birlikte kullanılır) */
.btn-primary .fa-spinner { margin-right: 10px; }

/* Erişilebilirlik: klavye ile odaklanan input/label alanları */
.input-icon-wrapper input:focus-visible {
    outline: none;
}

/* --- Hata mesajı --- */
#error-msg {
    color: #C0392B;
    background: #FBEEEA;
    border: 1px solid #EAC3BA;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    margin-top: 20px;
    text-align: center;
    display: none;
    animation: shake 0.4s ease-in-out;
}

/* --- Footer --- */
.login-footer { margin-top: 40px; text-align: center; }
.login-footer p { font-size: 12px; color: #B4A594; font-weight: 500; }
.login-footer i { margin-right: 5px; color: #C8791E; }

/* ============================================================
   ANİMASYONLAR
============================================================ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeRight {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ============================================================
   TABLET (≤ 900px)
============================================================ */
@media (max-width: 900px) {
    .split-layout {
        flex-direction: column;
        min-height: 100vh;
        min-height: 100dvh;
    }
    .image-section {
        flex: none;
        min-height: 260px;
        height: 35vh;
    }
    .image-overlay {
        padding: 8% 7%;
        justify-content: flex-end;
    }
    .image-overlay h1 { font-size: 2.2rem; margin-bottom: 10px; }
    .image-overlay p { font-size: 1rem; }

    .form-section {
        flex: 1;
        border-radius: 30px 30px 0 0;
        margin-top: -30px;
        box-shadow: 0 -10px 40px rgba(45, 30, 20, 0.12);
        padding: 30px 15px;
        align-items: flex-start;
    }
    .login-box { padding: 20px 10px; }
}

/* ============================================================
   TELEFON (≤ 600px)
============================================================ */
@media (max-width: 600px) {
    .image-section { min-height: 220px; height: 28vh; }
    .image-overlay h1 { font-size: 1.8rem; }
    .image-overlay p { font-size: 0.9rem; line-height: 1.4; }

    .login-box { padding: 20px 16px; box-shadow: none; border: none; }
    .logo { margin-bottom: 25px; }
    .logo img { margin-bottom: 12px; }
    .logo i { font-size: 32px; margin-bottom: 10px; }
    .logo h2 { font-size: 24px; }

    .input-group { margin-bottom: 18px; }
    .input-icon-wrapper input { padding: 14px 14px 14px 42px; }

    .login-footer { margin-top: 25px; }
    .login-footer p { font-size: 11px; }
}

/* ============================================================
   ÇOK KÜÇÜK TELEFON (≤ 380px)
============================================================ */
@media (max-width: 380px) {
    .image-section { min-height: 180px; height: 24vh; }
    .image-overlay { padding: 6% 5%; }
    .image-overlay h1 { font-size: 1.5rem; }
}

/* ============================================================
   PANEL — TABLO SATIR SEÇME
============================================================ */
.selectable-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.selectable-row:hover { background-color: #FBF6EE; }
.selectable-row.selected-row {
    background-color: rgba(200, 121, 30, 0.14) !important;
    border-left: 4px solid #C8791E !important;
}