﻿@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
    /* KURUMSAL VORT TEMASI BÜTÜNLÜĞÜ */
    --bg: #f8faf9; /* Dışarısı ile aynı off-white arkaplan */
    --panel: #ffffff; /* Jilet gibi beyaz kartlar */
    --sidebar: #14322d; /* Sol Menü: Asil Çam Yeşili */
    --sidebar-text: #ffffff; /* Menü yazıları beyaz */

    --accent: #14322d; /* Vurgu ve Butonlar: Çam Yeşili */
    --accent-hover: #23524a; /* Açık Çam Yeşili */
    --accent2: #e11d48; /* Alarmlar: Sofistike koyu kırmızı */
    --success: #059669; /* Başarılı: Sofistike zümrüt yeşili */

    --text: #0f172a; /* Kurumsal mat siyah */
    --muted: #64748b; /* Açıklamalar için gri */
    --border: #e2e8f0; /* İnce zarif çerçeveler */
    --input-bg: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ==========================================
   SIDEBAR (SOL MENÜ - PRESTİJLİ KOYU YEŞİL)
   ========================================== */
.sidebar {
    width: 280px;
    background: var(--sidebar);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    box-shadow: 4px 0 20px rgba(0,0,0,0.05);
    z-index: 10;
}

    .sidebar h2 {
        margin-top: 0;
        margin-bottom: 40px;
        font-size: 1.4rem;
        color: var(--sidebar-text);
        font-weight: 700;
        letter-spacing: -0.5px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

.nav-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 14px 20px;
    text-align: left;
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.nav-btn:hover {
    color: var(--sidebar-text);
    background: rgba(255, 255, 255, 0.1);
}

.nav-btn.active {
    background: var(--sidebar-text);
    color: var(--sidebar);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-weight: 600;
}

/* SAHA AJANI KARTI (SOL MENÜ ALTI) */
.ajan-card {
    margin-top: auto;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: #e2e8f0;
}

    .ajan-card small {
        display: block;
        margin-top: 4px;
        color: rgba(255,255,255,0.5);
        font-family: 'IBM Plex Mono', monospace;
    }

.led {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.led-aktif {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: ledNabiz 1.8s ease-in-out infinite;
}

.led-pasif {
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

@keyframes ledNabiz {
    0%, 100% {
        box-shadow: 0 0 8px #10b981;
    }

    50% {
        box-shadow: 0 0 16px 4px rgba(16, 185, 129, 0.55);
    }
}

/* "CANLI İZLE" checkbox etiketindeki kırmızı nabız noktası */
.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    display: inline-block;
    margin-right: 2px;
    animation: liveDotNabiz 1.5s ease-in-out infinite;
}

@keyframes liveDotNabiz {
    0%, 100% {
        box-shadow: 0 0 6px #ef4444;
    }

    50% {
        box-shadow: 0 0 12px 3px rgba(239, 68, 68, 0.55);
    }
}

/* ==========================================
   ANA İÇERİK VE BEYAZ KARTLAR
   ========================================== */
.main-content {
    flex: 1;
    padding: 40px 50px;
    overflow-y: auto;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

    .tab-content.active {
        display: block;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.card-title {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
}

/* ==========================================
   BUTONLAR VE HİZALAMA
   ========================================== */
.actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
    align-items: center;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

    .btn-primary:hover {
        background: var(--accent-hover);
        transform: translateY(-2px);
    }

.btn-secondary {
    background: #f1f5f9;
    color: var(--text);
    border: 1px solid var(--border);
}

    .btn-secondary:hover {
        background: #e2e8f0;
    }

.btn-export {
    background: var(--success);
    color: #fff;
}

    .btn-export:hover {
        background: #047857;
    }

.btn-danger {
    background: var(--accent2);
    color: #fff;
}

    .btn-danger:hover {
        background: #be123c;
    }

/* ==========================================
   FORM ELEMANLARI VE LİSTELER
   ========================================== */
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.field {
    flex: 1;
    min-width: 200px;
}

label {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 8px;
    font-weight: 500;
}

input, select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--input-bg);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
}

    input:focus, select:focus {
        outline: none;
        border-color: var(--accent);
    }

.adres-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
}

    .adres-list label {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 0.9rem;
        color: var(--text);
        background: var(--panel);
        padding: 8px 14px;
        border-radius: 100px;
        cursor: pointer;
        margin-bottom: 0;
        border: 1px solid var(--border);
    }

    .adres-list input {
        width: auto;
        margin: 0;
        accent-color: var(--accent);
    }

/* ==========================================
   HIZLI ZAMAN İZLEME MENÜSÜ
   ========================================== */
.quick-time-container {
    margin-bottom: 24px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.quick-time-label {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 500;
    margin-right: 8px;
}

.quick-time-btn {
    background-color: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 8px 16px;
}

    .quick-time-btn:hover {
        background-color: var(--border);
    }

/* ==========================================
   CANLI KARTLAR VE LİSTE ITEM'LARI
   ========================================== */
.status {
    font-size: 0.9rem;
    color: var(--muted);
    display: inline-block;
}

canvas {
    max-height: 450px;
    width: 100%;
}

.grup-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
}

.grup-info h4 {
    margin: 0 0 6px 0;
    font-size: 1.05rem;
    color: var(--text);
    font-weight: 600;
}

.grup-info span {
    font-size: 0.85rem;
    color: var(--muted);
}

/* ==========================================
   T1/T2/T3... CANLI ANLIK DEĞER KARTLARI
   (app.js -> canliKartlariCiz() tarafından
   .live-card / .live-card-title / .live-card-value /
   .live-card-time / .alarm-tehlike class'larıyla üretiliyor
   — eskiden burada tanımı yoktu, eklendi)
   ========================================== */
#canliKartlarAlani {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 16px !important;
    margin-bottom: 25px !important;
}

.live-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    text-align: center;
    transition: transform 0.2s ease;
}

    .live-card:hover {
        transform: translateY(-2px);
    }

    .live-card.alarm-tehlike {
        border-left-color: var(--accent2);
        box-shadow: 0 0 0 1px var(--accent2);
    }

.live-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.live-card-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    font-family: 'IBM Plex Mono', monospace;
}

.live-card-time {
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--muted);
}

/* ==========================================
   İSTATİSTİK KARTLARI (Maks / Min / Ortalama)
   app.js -> anaGrafigiYenile() tarafından
   #istatistikKartlari içine basılıyor.
   (Önceki 4 kere tekrarlanan sürüm buraya
   tek ve nihai haliyle indirildi)
   ========================================== */
#istatistikKartlari {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 20px !important;
    margin-bottom: 30px !important;
}

    #istatistikKartlari > div {
        background: var(--panel) !important;
        border: 1px solid var(--border) !important;
        border-radius: 16px !important;
        padding: 20px !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.02) !important;
        text-align: center;
        user-select: none;
    }

    #istatistikKartlari h4 {
        font-size: 1rem !important;
        font-weight: 700 !important;
        color: var(--text) !important;
        margin: 0 0 12px 0 !important;
        border-bottom: 1px solid var(--border);
        padding-bottom: 8px;
        letter-spacing: 0.5px;
    }

    #istatistikKartlari .stat-grid,
    #istatistikKartlari > div > div {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
        width: 100% !important;
    }

        #istatistikKartlari .stat-cell,
        #istatistikKartlari > div > div > div {
            background: var(--bg) !important;
            padding: 8px 4px !important;
            border-radius: 8px !important;
            border: 1px solid var(--border) !important;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-width: 0; /* taşmayı önler */
        }

    #istatistikKartlari span.label,
    #istatistikKartlari font,
    #istatistikKartlari small {
        font-size: 0.55rem !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.2px;
        display: block;
        margin-bottom: 3px;
        background: transparent !important;
        white-space: nowrap;
    }

    #istatistikKartlari span.value,
    #istatistikKartlari b,
    #istatistikKartlari strong,
    #istatistikKartlari .stat-cell span,
    #istatistikKartlari div div div span:last-child {
        color: var(--text) !important; /* Net okunabilirlik — koyu temada da otomatik uyum sağlar */
        opacity: 1 !important;
        background: transparent !important;
        font-size: 0.95rem !important;
        font-weight: 700 !important;
        font-family: 'IBM Plex Mono', monospace !important;
    }

/* ==========================================
   İSKELET (SKELETON) YÜKLEME EFEKTİ
   "Yükleniyor..." yazıları yerine kullanılır
   ========================================== */
@keyframes skeletonAkis {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, var(--border) 0%, rgba(255,255,255,0.6) 50%, var(--border) 100%);
    background-size: 400px 100%;
    animation: skeletonAkis 1.4s ease-in-out infinite;
    border-radius: 8px;
}

body.dark-mode .skeleton {
    background: linear-gradient(90deg, var(--border) 0%, rgba(255,255,255,0.08) 50%, var(--border) 100%);
    background-size: 400px 100%;
}

.skeleton-card {
    height: 64px;
    border-radius: 12px;
}

.skeleton-chip {
    height: 34px;
    width: 110px;
    border-radius: 100px;
    display: inline-block;
    margin: 0 8px 8px 0;
}

.skeleton-canvas {
    height: 380px;
    border-radius: 16px;
}

/* ==========================================
   GRAFİK LEGEND / SEÇİLİ ADRES CHIP'LERİ
   Chart.js'in kendi legend'ı yerine tıklanabilir
   marka renklerine uygun chip şeridi
   ========================================== */
.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.legend-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
    font-family: inherit;
}

    .legend-chip:hover {
        border-color: var(--chip-color, var(--accent));
        transform: translateY(-1px);
    }

    .legend-chip.inactive {
        opacity: 0.4;
    }

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--chip-color, var(--accent));
    flex-shrink: 0;
}

/* ==========================================
   ADRES ARAMA / FİLTRELEME KUTUSU
   ========================================== */
.adres-search-wrap {
    position: relative;
    margin-bottom: 10px;
}

    .adres-search-wrap .search-icon {
        position: absolute;
        left: 13px;
        top: 50%;
        transform: translateY(-50%);
        width: 16px;
        height: 16px;
        color: var(--muted);
        pointer-events: none;
    }

    .adres-search-wrap input {
        padding-left: 38px !important;
    }

/* ==========================================
   KORANLIK (DARK MODE) TEMA
   Sidebar'daki tema düğmesiyle açılıp kapanır,
   tercih localStorage'da saklanır
   ========================================== */
body.dark-mode {
    --bg: #0e1613;
    --panel: #16221f;
    --sidebar: #0a1512;
    --sidebar-text: #ffffff;
    --accent: #34d399;
    --accent-hover: #10b981;
    --text: #e8f3ef;
    --muted: #8ba39b;
    --border: #24322e;
    --input-bg: #16221f;
}

    body.dark-mode .sidebar {
        box-shadow: 4px 0 20px rgba(0,0,0,0.3);
    }

    body.dark-mode .modal-overlay {
        background: rgba(0, 0, 0, 0.75);
    }

.theme-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .theme-toggle:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }

    .theme-toggle svg {
        width: 16px;
        height: 16px;
    }

/* ==========================================
   MOBİL / TABLET: AÇILIR-KAPANIR SIDEBAR
   ========================================== */
.menu-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 500;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--sidebar);
    color: #fff;
    border: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    cursor: pointer;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 90;
}

    .sidebar-overlay.open {
        display: block;
    }

@media (max-width: 900px) {
    .menu-toggle {
        display: flex;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 260px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 100;
    }

        .sidebar.open {
            transform: translateX(0);
        }

    .main-content {
        padding: 90px 20px 40px;
    }
}

/* ==========================================
   MODAL (ALARM POPUP)
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--panel);
    border: 1px solid var(--border);
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

/* ==========================================
   GİRİŞ (LOGIN) EKRANI — Split-Screen Kurumsal Vitrin
   ========================================== */
.login-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    background: var(--bg);
    overflow: hidden;
}

.login-shell {
    display: flex;
    width: 100%;
    height: 100%;
}

/* ---------- SOL: MARKA PANELİ ---------- */
.login-brand {
    position: relative;
    flex: 1 1 46%;
    max-width: 640px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background: radial-gradient(circle at 18% 20%, rgba(220, 242, 236, 0.07), transparent 42%), radial-gradient(circle at 82% 78%, rgba(220, 242, 236, 0.06), transparent 46%), linear-gradient(160deg, #0d211d 0%, var(--sidebar) 55%, #1a3c35 100%);
    overflow: hidden;
}

    /* İnce arka plan ızgarası — sahte "mühendislik çizim kağıdı" hissi */
    .login-brand::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
        background-size: 42px 42px;
        mask-image: radial-gradient(circle at 40% 35%, #000 0%, transparent 72%);
        pointer-events: none;
    }

.login-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 380px;
    width: 100%;
    animation: loginCardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-logo {
    width: 54px;
    height: 54px;
    margin-bottom: 24px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-brand-inner h1 {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 12px;
}

.login-brand-inner p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 36px;
}

.login-preview-chart {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 14px;
}

    .login-preview-chart svg {
        width: 100%;
        height: 100px;
        display: block;
    }

.login-preview-cards {
    display: flex;
    gap: 10px;
}

.login-preview-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .login-preview-card span {
        font-size: 0.62rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: rgba(255, 255, 255, 0.5);
        font-weight: 600;
    }

    .login-preview-card b {
        font-family: 'IBM Plex Mono', monospace;
        font-size: 1rem;
        color: #fff;
    }

/* ---------- SAĞ: GİRİŞ FORMU ---------- */
.login-form-panel {
    flex: 1 1 54%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow-y: auto;
}

.login-card {
    width: 100%;
    max-width: 380px;
    text-align: left;
    animation: loginCardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s backwards;
}

@keyframes loginCardIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card h2 {
    color: var(--accent);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 6px;
}

.login-card > p {
    color: var(--muted);
    margin-bottom: 28px;
    font-size: 0.9rem;
}

.login-card .field {
    margin-bottom: 18px;
    text-align: left;
}

.login-card input[type="text"],
.login-card input[type="password"] {
    padding: 13px 16px;
    font-size: 0.95rem;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-card input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(20, 50, 45, 0.08);
}

/* İkonlu input'lar (kullanıcı adı / şifre) */
.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

    .input-icon-wrapper .input-icon {
        position: absolute;
        left: 14px;
        width: 18px;
        height: 18px;
        color: var(--muted);
        pointer-events: none;
    }

    .input-icon-wrapper input {
        padding-left: 42px !important;
    }

.login-remember {
    margin-bottom: 22px;
}

    .login-remember label {
        display: flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        color: var(--text);
        font-size: 0.9rem;
    }

    .login-remember input[type="checkbox"] {
        width: 16px;
        height: 16px;
        margin: 0;
        accent-color: var(--accent);
    }

.login-card .btn-primary {
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 10px 24px -8px rgba(20, 50, 45, 0.45);
}

    .login-card .btn-primary:hover {
        transform: translateY(-2px);
    }

    .login-card .btn-primary svg {
        transition: transform 0.3s ease;
    }

    .login-card .btn-primary:hover svg {
        transform: translateX(4px);
    }

.login-hint {
    margin-top: 18px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--muted);
    background: var(--panel);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 100px;
}

.login-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: var(--muted);
}

.login-agent-status {
    display: flex;
    align-items: center;
    gap: 6px;
}

.password-wrapper input {
    padding-right: 44px !important;
}

.toggle-password {
    position: absolute;
    right: 14px;
    cursor: pointer;
    display: flex;
    color: var(--muted);
    opacity: 0.7;
    transition: opacity 0.2s ease, color 0.2s ease;
}

    .toggle-password:hover {
        opacity: 1;
        color: var(--text);
    }

    .toggle-password svg {
        width: 18px;
        height: 18px;
    }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .login-brand {
        display: none;
    }

    .login-form-panel {
        flex: 1 1 100%;
    }
}

/* ==========================================
   🪟 ÖZEL MODAL (native alert/confirm/prompt yerine)
   ========================================== */
.custom-modal {
    max-width: 400px;
}

.custom-modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 50, 45, 0.08);
    color: var(--accent);
}

    .custom-modal-icon.tehlikeli {
        background: rgba(225, 29, 72, 0.1);
        color: var(--accent2);
    }

.custom-modal h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    color: var(--text);
}

.custom-modal p {
    margin: 0 0 20px 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.custom-modal-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background: var(--input-bg);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    margin-bottom: 20px;
}

    .custom-modal-input:focus {
        outline: none;
        border-color: var(--accent);
    }

.custom-modal-actions {
    display: flex;
    gap: 10px;
}

    .custom-modal-actions button {
        flex: 1;
    }

/* ==========================================
   ⏳ BUTON YÜKLEME (SPINNER) DURUMU
   ========================================== */
button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: -2px;
    animation: btnSpin 0.7s linear infinite;
}

.btn-secondary .btn-spinner,
.btn-export .btn-spinner {
    border: 2px solid rgba(15, 23, 42, 0.2);
    border-top-color: var(--text);
}

@keyframes btnSpin {
    to {
        transform: rotate(360deg);
    }
}
