/* ==========================================================================
   Pick to Light — Industrial SCADA Dark Theme
   ========================================================================== */

:root {
    /* Base surfaces */
    --bg-base: #0a0e1a;
    --bg-panel: #131a2b;
    --bg-elevated: #1a2338;
    --bg-hover: #1f2942;
    --bg-input: #0f1524;

    /* Borders */
    --border: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.12);
    --border-stronger: rgba(255, 255, 255, 0.2);

    /* Text */
    --text-primary: #e6ecf5;
    --text-secondary: #8b95a8;
    --text-muted: #5c6478;

    /* Accents - LED-like glow colors */
    --accent: #00d4ff;
    --accent-dim: #0891b2;
    --accent-glow: rgba(0, 212, 255, 0.35);
    --accent-bg: rgba(0, 212, 255, 0.08);

    --success: #00ff88;
    --success-dim: #10b981;
    --success-glow: rgba(0, 255, 136, 0.35);
    --success-bg: rgba(0, 255, 136, 0.08);

    --warning: #ffb020;
    --warning-dim: #d97706;
    --warning-glow: rgba(255, 176, 32, 0.35);
    --warning-bg: rgba(255, 176, 32, 0.08);

    --danger: #ff4757;
    --danger-dim: #dc2626;
    --danger-glow: rgba(255, 71, 87, 0.35);
    --danger-bg: rgba(255, 71, 87, 0.08);

    --purple: #a855f7;
    --purple-glow: rgba(168, 85, 247, 0.35);

    /* Operator LED colors */
    --op-red: #ff4757;
    --op-blue: #00d4ff;
    --op-green: #00ff88;
    --op-amber: #ffb020;

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;

    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", "Cascadia Code", ui-monospace, "SF Mono", Consolas, monospace;

    --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Reset
   ========================================================================== */
* { box-sizing: border-box; }
html, body {
    margin: 0; padding: 0;
    height: 100%;
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-base);
    background-image:
        radial-gradient(at 15% 10%, rgba(0, 212, 255, 0.04) 0px, transparent 50%),
        radial-gradient(at 85% 90%, rgba(168, 85, 247, 0.04) 0px, transparent 50%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1 { font-size: 26px; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.02em; }
h2 { font-size: 22px; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.02em; }
h3 { font-size: 17px; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.01em; }
h4 { font-size: 14px; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.01em; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-muted); }
.secondary { color: var(--text-secondary); }
.center { text-align: center; }
.mini { font-size: 12px; color: var(--text-muted); }
.upper { text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; font-weight: 600; }

/* ==========================================================================
   Scrollbar
   ========================================================================== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-stronger); }

/* ==========================================================================
   Layout - sidebar + topbar + main
   ========================================================================== */
.page {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    background: linear-gradient(180deg, #0d1220 0%, #0a0e1a 100%);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 20;
}

.brand {
    padding: 22px 22px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}
.brand-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--purple) 100%);
    display: flex; align-items: center; justify-content: center;
    color: #0a0e1a;
    font-size: 16px;
    box-shadow: 0 0 20px var(--accent-glow);
}
.brand-text {
    display: flex; flex-direction: column;
}
.brand-title {
    font-size: 15px; font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.brand-sub {
    font-size: 10px; color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 2px;
}

.nav-links { flex: 1; padding: 12px 12px; overflow-y: auto; }
.nav-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px; font-weight: 500;
    border-radius: 8px;
    transition: var(--transition);
    margin-bottom: 2px;
    position: relative;
}
.nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.nav-link.active {
    background: var(--accent-bg);
    color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow), inset 0 0 20px rgba(0, 212, 255, 0.03);
}
.nav-link.active::before {
    content: '';
    position: absolute;
    left: -12px; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 20px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 12px var(--accent-glow);
}
.nav-link .bi { font-size: 16px; width: 18px; text-align: center; }

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}

/* --- Topbar --- */
.topbar {
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    padding: 12px 28px;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 15;
    backdrop-filter: blur(8px);
    background: rgba(19, 26, 43, 0.85);
}
.topbar-left {
    display: flex; align-items: center; gap: 16px;
    font-size: 13px; color: var(--text-secondary);
}
.topbar-right {
    display: flex; align-items: center; gap: 20px;
}
.topbar-item {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}
.topbar-time {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-primary);
    padding: 4px 10px;
    background: var(--bg-elevated);
    border-radius: 6px;
    border: 1px solid var(--border);
}

/* --- LED indicator --- */
.led {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}
.led.on-green {
    background: var(--success);
    box-shadow: 0 0 8px var(--success-glow), 0 0 2px var(--success);
    animation: ledPulse 2s infinite;
}
.led.on-red {
    background: var(--danger);
    box-shadow: 0 0 8px var(--danger-glow), 0 0 2px var(--danger);
    animation: ledPulse 1.5s infinite;
}
.led.on-amber {
    background: var(--warning);
    box-shadow: 0 0 8px var(--warning-glow), 0 0 2px var(--warning);
}
.led.on-blue {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow), 0 0 2px var(--accent);
    animation: ledPulse 2s infinite;
}
.led.off { background: rgba(255,255,255,0.1); }

@keyframes ledPulse {
    0%, 100% { box-shadow: 0 0 8px currentColor, 0 0 2px currentColor; opacity: 1; }
    50% { box-shadow: 0 0 14px currentColor, 0 0 4px currentColor; opacity: 0.85; }
}

/* --- Main --- */
main {
    padding: 24px 28px 40px;
    max-width: 100%;
    overflow-x: hidden;
}

/* ==========================================================================
   Common
   ========================================================================== */
.ekran-baslik {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
}
.ekran-baslik h2 { display: flex; align-items: center; gap: 12px; }
.ekran-baslik-sag { display: flex; align-items: center; gap: 12px; }

.section { margin: 24px 0; }
.section-baslik {
    font-size: 11px; font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    text-transform: uppercase;
    display: flex; align-items: center; gap: 8px;
}
.section-baslik::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border) 0%, transparent 100%);
}

/* ==========================================================================
   Panel (kart)
   ========================================================================== */
.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    position: relative;
    transition: var(--transition);
}
.panel:hover { border-color: var(--border-strong); }
.panel.glass {
    background: rgba(19, 26, 43, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-strong);
}
.panel-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px;
}
.panel-title {
    font-size: 13px; font-weight: 600;
    color: var(--text-primary);
    display: flex; align-items: center; gap: 10px;
}

/* ==========================================================================
   Badge
   ========================================================================== */
.badge {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 12px;
    display: inline-flex; align-items: center; gap: 6px;
    font-weight: 500;
    letter-spacing: 0.02em;
}
.badge-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(0, 255, 136, 0.2);
}
.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(255, 176, 32, 0.2);
}
.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(255, 71, 87, 0.2);
}
.badge-accent {
    background: var(--accent-bg);
    color: var(--accent);
    border: 1px solid rgba(0, 212, 255, 0.2);
}
.badge-muted {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

/* ==========================================================================
   Devbar (development-only)
   ========================================================================== */
.devbar {
    background: linear-gradient(90deg, rgba(255, 176, 32, 0.05) 0%, rgba(255, 176, 32, 0.02) 100%);
    border: 1px dashed rgba(255, 176, 32, 0.3);
    border-radius: var(--radius);
    padding: 10px 16px;
    display: flex; align-items: center; gap: 12px;
    font-size: 12px;
    margin-bottom: 20px;
    color: var(--warning);
}
.devbar label { color: var(--text-secondary); font-weight: 500; }
.devbar select {
    padding: 5px 10px; font-size: 12px;
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    font-family: inherit;
}
.devbar-not { margin-left: auto; font-style: italic; opacity: 0.7; font-size: 11px; }

/* ==========================================================================
   Renk swatch (operatör rengi)
   ========================================================================== */
.renk-swatch {
    display: inline-block;
    width: 12px; height: 12px;
    border-radius: 3px;
    vertical-align: -1px;
    margin-right: 6px;
    box-shadow: 0 0 8px currentColor;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
button {
    cursor: pointer;
    border: 1px solid var(--border-strong);
    background: var(--bg-elevated);
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 500;
    font-family: inherit;
    color: var(--text-primary);
    transition: var(--transition);
    display: inline-flex; align-items: center; gap: 6px;
}
button:hover {
    background: var(--bg-hover);
    border-color: var(--border-stronger);
}
button:active { transform: scale(0.98); }

.btn-primary {
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dim) 100%);
    color: #0a0e1a;
    border-color: var(--accent);
    font-weight: 600;
    box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
    box-shadow: 0 6px 24px var(--accent-glow);
    filter: brightness(1.1);
}
.btn-accent {
    background: var(--accent-bg);
    color: var(--accent);
    border-color: rgba(0, 212, 255, 0.3);
}
.btn-accent:hover {
    background: rgba(0, 212, 255, 0.15);
    box-shadow: 0 0 20px var(--accent-glow);
}
.btn-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: rgba(255, 71, 87, 0.3);
}
.btn-danger:hover { background: rgba(255, 71, 87, 0.15); }

.btn-sm { padding: 4px 12px; font-size: 12px; }
.btn-touch {
    font-size: 11px;
    padding: 5px 10px;
    margin-top: 8px;
    width: 100%;
}

/* ==========================================================================
   OKUTMA
   ========================================================================== */
.okutma-hero {
    background:
        radial-gradient(at 100% 0%, rgba(0, 212, 255, 0.06) 0px, transparent 50%),
        linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-base) 100%);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.okutma-hero::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
    box-shadow: 0 0 20px var(--accent-glow);
    opacity: 0.7;
}
.okutma-input-alani label {
    display: flex; align-items: center; gap: 8px;
    font-size: 11px; font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.okutma-input-alani label .bi { font-size: 14px; }
.barkod-input {
    width: 100%;
    padding: 20px 24px;
    font-size: 28px;
    letter-spacing: 2px;
    border: 2px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: var(--font-mono);
    transition: var(--transition);
}
.barkod-input::placeholder { color: var(--text-muted); font-size: 22px; letter-spacing: 1px; }
.barkod-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-bg), 0 0 30px var(--accent-glow);
}

.son-sonuc {
    margin-top: 18px; padding: 16px 18px;
    border-radius: var(--radius);
    display: flex; align-items: center; gap: 14px;
    animation: slideDown 200ms ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.son-sonuc.ok {
    background: var(--accent-bg);
    border: 1px solid rgba(0, 212, 255, 0.25);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.08);
}
.son-sonuc.hata {
    background: var(--danger-bg);
    border: 1px solid rgba(255, 71, 87, 0.25);
    color: var(--danger);
}
.okutma-yon {
    font-size: 22px;
    color: var(--text-muted);
    line-height: 1;
}
.isik-kutu {
    color: #0a0e1a;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 18px; font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 0 20px currentColor;
    filter: brightness(1.1);
}
.hata-icon { font-size: 22px; }
.okutma-butonlar { margin-top: 16px; display: flex; gap: 10px; }

/* ==========================================================================
   Raf strip
   ========================================================================== */
.raf-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}
.raf-kart {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    min-height: 110px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.raf-kart::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--border);
    transition: var(--transition);
}
.raf-kart:hover {
    border-color: var(--border-strong);
    background: var(--bg-elevated);
    transform: translateY(-2px);
}
.raf-kart.bekleyen {
    animation: bekleyenPulse 1.6s infinite;
}
.raf-kart.bekleyen::before {
    height: 3px;
    box-shadow: 0 0 10px currentColor;
}
@keyframes bekleyenPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0); }
    50% { box-shadow: 0 0 25px rgba(0, 212, 255, 0.15); }
}
.raf-kart.dolu {
    border-color: rgba(255, 71, 87, 0.3);
}
.raf-kart.dolu::before {
    background: var(--danger);
    height: 3px;
    box-shadow: 0 0 15px var(--danger-glow);
}
.raf-kod {
    font-size: 11px; color: var(--text-muted);
    font-weight: 600; letter-spacing: 0.08em;
    font-family: var(--font-mono);
}
.raf-sayac {
    font-size: 30px; font-weight: 700;
    margin-top: 2px;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    line-height: 1.1;
    font-family: var(--font-mono);
}
.raf-kapasite {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 4px;
}
.raf-bekleyen {
    font-size: 11px; font-weight: 600;
    color: #0a0e1a;
    padding: 4px 10px; border-radius: 4px;
    margin-top: 8px; display: inline-block;
    box-shadow: 0 0 12px currentColor;
    filter: brightness(1.1);
}
.raf-durum {
    font-size: 10px; padding: 3px 8px;
    border-radius: 4px; margin-top: 8px;
    display: inline-block;
    font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase;
}
.raf-durum.kirmizi {
    background: var(--danger);
    color: #0a0e1a;
    box-shadow: 0 0 12px var(--danger-glow);
}
.raf-ref {
    font-size: 10px; color: var(--text-muted);
    margin-top: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--font-mono);
}

/* ==========================================================================
   Aktivite akışı
   ========================================================================== */
.olay-akis {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.olay-satir {
    display: flex; align-items: center; gap: 14px;
    padding: 11px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    transition: var(--transition);
}
.olay-satir:hover { background: var(--bg-hover); }
.olay-satir:last-child { border: 0; }
.olay-tip {
    font-size: 10px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: inline-flex; align-items: center; gap: 5px;
}
.olay-tip.tip-Okutma { background: var(--accent-bg); color: var(--accent); border: 1px solid rgba(0, 212, 255, 0.2); }
.olay-tip.tip-OnaySuccess { background: var(--success-bg); color: var(--success); border: 1px solid rgba(0, 255, 136, 0.2); }
.olay-tip.tip-Iptal,
.olay-tip.tip-IptalTimeout { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(255, 176, 32, 0.2); }
.olay-tip.tip-Bosaltma { background: rgba(168, 85, 247, 0.1); color: var(--purple); border: 1px solid rgba(168, 85, 247, 0.2); }
.olay-tip.tip-DoluReddi,
.olay-tip.tip-Anomali,
.olay-tip.tip-HardwareHata { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(255, 71, 87, 0.2); }
.olay-barkod { font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); }
.olay-aciklama { flex: 1; color: var(--text-secondary); }

/* ==========================================================================
   Dialog
   ========================================================================== */
.dialog-overlay {
    position: fixed; inset: 0;
    background: rgba(5, 8, 15, 0.8);
    backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    z-index: 100;
    animation: fadeIn 150ms ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.dialog {
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 28px;
    width: 460px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border);
    animation: slideDown 200ms ease;
}
.dialog h3 { margin-bottom: 12px; }
.dialog input, .dialog select {
    width: 100%; padding: 11px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    margin: 10px 0;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
}
.dialog input:focus, .dialog select:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-bg);
}
.dialog-butonlar { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.hata-mesaji { color: var(--danger); font-size: 12px; }
.ok-mesaj { color: var(--success); font-size: 12px; }

/* ==========================================================================
   Monitoring — Metric cards
   ========================================================================== */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}
.metric {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}
.metric:hover { border-color: var(--border-strong); }
.metric::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}
.metric.success::before { background: var(--success); box-shadow: 0 0 12px var(--success-glow); }
.metric.warning::before { background: var(--warning); box-shadow: 0 0 12px var(--warning-glow); }
.metric.danger::before { background: var(--danger); box-shadow: 0 0 12px var(--danger-glow); }
.metric-label {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
    display: flex; align-items: center; gap: 6px;
}
.metric-value {
    font-size: 32px; font-weight: 700;
    margin-top: 8px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    line-height: 1;
    font-family: var(--font-mono);
}
.metric.success .metric-value { color: var(--success); text-shadow: 0 0 20px var(--success-glow); }
.metric.warning .metric-value { color: var(--warning); text-shadow: 0 0 20px var(--warning-glow); }
.metric.danger .metric-value { color: var(--danger); text-shadow: 0 0 20px var(--danger-glow); }
.metric.accent .metric-value { color: var(--accent); text-shadow: 0 0 20px var(--accent-glow); }
.metric-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* --- Gauge (radial progress) --- */
.gauge {
    width: 90px; height: 90px;
    position: relative;
}
.gauge svg { transform: rotate(-90deg); }
.gauge-track { stroke: var(--border-strong); }
.gauge-fill {
    stroke: var(--accent);
    stroke-linecap: round;
    filter: drop-shadow(0 0 4px var(--accent-glow));
    transition: stroke-dashoffset 500ms ease;
}
.gauge-fill.success { stroke: var(--success); filter: drop-shadow(0 0 4px var(--success-glow)); }
.gauge-fill.warning { stroke: var(--warning); filter: drop-shadow(0 0 4px var(--warning-glow)); }
.gauge-fill.danger { stroke: var(--danger); filter: drop-shadow(0 0 4px var(--danger-glow)); }
.gauge-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.gauge-value {
    font-size: 20px; font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-mono);
    line-height: 1;
}
.gauge-sub { font-size: 9px; color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 3px; }

/* --- Hat panel --- */
.hat-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 12px;
    transition: var(--transition);
}
.hat-panel:hover { border-color: var(--border-strong); }
.hat-panel-baslik {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 14px;
}
.hat-panel-title {
    display: flex; align-items: center; gap: 12px;
    font-size: 14px; font-weight: 600;
}
.hat-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
}
.slot {
    height: 54px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700;
    font-variant-numeric: tabular-nums;
    transition: var(--transition);
    letter-spacing: -0.02em;
    font-family: var(--font-mono);
    position: relative;
    overflow: hidden;
}
.slot:hover { transform: translateY(-2px) scale(1.05); z-index: 2; }
.slot-bos {
    background: var(--bg-input);
    border: 1px dashed var(--border-strong);
    color: var(--text-muted);
}
.slot-kismi {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(0, 255, 136, 0.2);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.1);
}
.slot-aktif {
    background: var(--accent-bg);
    color: var(--accent);
    border: 1px solid rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 15px var(--accent-glow);
    animation: slotAktifPulse 1.8s infinite;
}
@keyframes slotAktifPulse {
    0%, 100% { box-shadow: 0 0 15px var(--accent-glow); }
    50% { box-shadow: 0 0 25px var(--accent-glow), inset 0 0 15px rgba(0, 212, 255, 0.1); }
}
.slot-dolu {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid var(--danger);
    box-shadow: 0 0 15px var(--danger-glow);
    animation: slotDoluPulse 1.5s infinite;
}
@keyframes slotDoluPulse {
    0%, 100% { border-color: var(--danger); box-shadow: 0 0 15px var(--danger-glow); }
    50% { border-color: rgba(255, 71, 87, 0.5); box-shadow: 0 0 8px var(--danger-glow); }
}
.slot-kod {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
}

/* ==========================================================================
   Tablo
   ========================================================================== */
.tablo {
    width: 100%;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}
.tablo thead { background: var(--bg-elevated); }
.tablo th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11px; font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}
.tablo td {
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}
.tablo tr:last-child td { border: 0; }
.tablo tbody tr { transition: var(--transition); }
.tablo tbody tr:hover { background: var(--bg-hover); }

/* ==========================================================================
   Form
   ========================================================================== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 720px;
}
.form-satir { display: flex; flex-direction: column; }
.form-satir label {
    font-size: 11px; font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.form-satir input,
.form-satir select {
    padding: 11px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    background: var(--bg-input);
    color: var(--text-primary);
    transition: var(--transition);
}
.form-satir input:focus,
.form-satir select:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-bg);
}
.form-butonlar {
    margin-top: 28px;
    display: flex; align-items: center; gap: 14px;
}
