/* ScadaTest — sade, yoğunluk-dostu arayüz (endüstriyel tablo odaklı) */
:root {
    --st-bg: #f4f6fa;
    --st-panel: #ffffff;
    --st-border: #e2e8f0;
    --st-ink: #0f172a;
    --st-muted: #64748b;
    --st-accent: #0e7490;
    --st-accent-2: #155e75;
    --st-yesil-bg: #dcfce7;
    --st-yesil-ink: #14532d;
    --st-kirmizi-bg: #fee2e2;
    --st-kirmizi-ink: #7f1d1d;
    --st-sari-bg: #fef9c3;
    --st-sari-ink: #713f12;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--st-bg); color: var(--st-ink); font-family: 'Inter', system-ui, sans-serif; font-size: 14px; }

.st-nav { display: flex; align-items: center; gap: 14px; padding: 10px 22px; background: linear-gradient(90deg, #0c4a6e, #155e75); color: #fff; }
.st-brand { color: #fff; text-decoration: none; font-size: 19px; font-weight: 400; letter-spacing: .3px; }
.st-brand b { font-weight: 800; }
.st-brand i { margin-right: 6px; }
.st-nav-alt { font-size: 12px; opacity: .75; }
.st-user { font-size: 13px; }
.st-main { padding: 22px; max-width: 1600px; margin: 0 auto; }

/* Kaynak kartları */
.st-kartlar { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.st-kart { background: var(--st-panel); border: 1px solid var(--st-border); border-radius: 12px; padding: 15px 17px; display: flex; flex-direction: column; gap: 8px; }
.st-kart h5 { margin: 0; font-size: 15px; font-weight: 700; }
.st-kart .uc { font-family: ui-monospace, monospace; font-size: 12.5px; color: var(--st-muted); }
.st-durum { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.st-durum .nokta { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.st-durum.bagli .nokta { background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.st-durum.kopuk .nokta { background: #ef4444; }
.st-durum.diger .nokta { background: #94a3b8; }
.st-hata { font-size: 11.5px; color: #b91c1c; word-break: break-word; }

/* Veri tablosu */
.st-tablo-kap { background: var(--st-panel); border: 1px solid var(--st-border); border-radius: 12px; overflow: auto; }
table.st-tablo { width: 100%; border-collapse: collapse; font-size: 13px; }
.st-tablo th { position: sticky; top: 0; background: #f8fafc; border-bottom: 2px solid var(--st-border); padding: 8px 10px; text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--st-muted); white-space: nowrap; z-index: 1; }
.st-tablo td { padding: 6px 10px; border-bottom: 1px solid #eef2f7; vertical-align: middle; }
.st-tablo tr:hover td { filter: brightness(.985); }
.st-tablo td.deger { font-family: ui-monospace, monospace; font-weight: 600; white-space: nowrap; }

/* Durum renkleri — doğru yeşil, hatalı/yanlış kırmızı, eksik sarı */
tr.d-dogru td { background: var(--st-yesil-bg); color: var(--st-yesil-ink); }
tr.d-hatali td, tr.d-yanlis td { background: var(--st-kirmizi-bg); color: var(--st-kirmizi-ink); }
tr.d-eksik td { background: var(--st-sari-bg); color: var(--st-sari-ink); }

/* Durum seçici çipler */
.st-cipler { display: flex; gap: 3px; flex-wrap: nowrap; }
.st-cip { border: 1px solid var(--st-border); background: #fff; border-radius: 14px; font-size: 11px; padding: 2px 8px; cursor: pointer; white-space: nowrap; color: var(--st-muted); }
.st-cip:hover { border-color: var(--st-accent); color: var(--st-accent); }
.st-cip.secili-dogru { background: #16a34a; border-color: #16a34a; color: #fff; }
.st-cip.secili-yanlis, .st-cip.secili-hatali { background: #dc2626; border-color: #dc2626; color: #fff; }
.st-cip.secili-eksik { background: #ca8a04; border-color: #ca8a04; color: #fff; }

.st-aciklama { border: 1px solid transparent; background: transparent; width: 100%; min-width: 140px; font-size: 12px; padding: 2px 6px; border-radius: 6px; }
.st-aciklama:focus { border-color: var(--st-accent); background: #fff; outline: none; }

.st-eskidi { color: #b45309; font-weight: 700; }   /* uzun süredir yenilenmeyen satır zamanı */

.st-arac { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.st-arac .form-control, .st-arac .form-select { font-size: 13px; }
.btn-st { background: var(--st-accent); border-color: var(--st-accent); color: #fff; }
.btn-st:hover { background: var(--st-accent-2); border-color: var(--st-accent-2); color: #fff; }

/* Giriş */
.st-giris { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0c4a6e, #164e63 55%, #0f172a); }
.st-giris-kart { background: #fff; border-radius: 16px; padding: 34px 36px; width: min(400px, 92vw); box-shadow: 0 24px 60px rgba(0,0,0,.35); }

@media (max-width: 640px) {
    .st-main { padding: 12px; }
    .st-nav { padding: 10px 12px; }
    .st-nav-alt { display: none; }
}

/* Santral grupları */
.st-santral { margin-bottom: 22px; }
.st-santral-bas { display: flex; align-items: center; padding: 8px 4px; margin-bottom: 10px;
    border-bottom: 2px solid var(--st-border); font-size: 15px; }

/* Sihirbaz protokol kartları */
.st-proto-kartlar { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.st-proto { border: 2px solid var(--st-border); border-radius: 12px; padding: 13px 14px; cursor: pointer;
    display: flex; flex-direction: column; gap: 4px; transition: border-color .15s; }
.st-proto:hover { border-color: #7dd3fc; }
.st-proto.secili { border-color: var(--st-accent); background: #ecfeff; }
.st-proto i { font-size: 22px; color: var(--st-accent); }
.st-proto b { font-size: 13.5px; }
.st-proto span { font-size: 11.5px; color: var(--st-muted); line-height: 1.45; }
