:root {
    --accent: #ff6a00;
    --accent-dark: #e85d00;
    --accent-soft: #fff1e8;
    --sidebar-bg: #1a1f2e;
    --sidebar-hover: #262d40;
    --text-muted: #6c757d;
    --green: #2e7d32;
    --red: #c62828;
    --blue: #1565c0;
    --bg: #f4f6fa;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: #2b2f38;
}

.app-wrapper { display: flex; min-height: 100vh; }

/* ---------- Kenar çubuğu ---------- */
.sidebar {
    width: 240px;
    background: var(--sidebar-bg);
    color: #cfd4e0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1000;
    transition: transform .25s ease;
}
.sidebar-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 20px 22px;
    font-size: 1.25rem; color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand i { color: var(--accent); font-size: 1.5rem; }
.sidebar-brand strong { color: var(--accent); }
.sidebar-nav { padding: 14px 12px; flex: 1; }
.sidebar-nav .nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px; margin-bottom: 4px;
    border-radius: 10px;
    color: #cfd4e0; text-decoration: none;
    font-size: .94rem; font-weight: 500;
    transition: all .15s ease;
}
.sidebar-nav .nav-item i { font-size: 1.1rem; width: 20px; text-align: center; }
.sidebar-nav .nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-nav .nav-item.active {
    background: var(--accent); color: #fff;
    box-shadow: 0 4px 12px rgba(255,106,0,.35);
}
.sidebar-footer {
    padding: 14px 22px; color: #6b7280;
    border-top: 1px solid rgba(255,255,255,.08);
}

/* ---------- Ana içerik ---------- */
.main { flex: 1; margin-left: 240px; min-width: 0; }

.topbar {
    display: flex; align-items: center; gap: 16px;
    background: #fff; padding: 14px 26px;
    border-bottom: 1px solid #e7eaf0;
    position: sticky; top: 0; z-index: 900;
}
.topbar-title { font-size: 1.25rem; font-weight: 600; margin: 0; flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }

.btn-scan {
    background: var(--accent); color: #fff; border: none;
    padding: 8px 18px; border-radius: 9px; font-weight: 600;
    display: inline-flex; align-items: center; gap: 8px;
    transition: all .15s ease;
}
.btn-scan:hover { background: var(--accent-dark); color: #fff; transform: translateY(-1px); }
.btn-scan:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.scan-badge {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 12px; border-radius: 20px; font-size: .82rem; font-weight: 600;
}
.scan-badge i { font-size: .6rem; }
.scan-badge.idle { background: #eef1f6; color: #6c757d; }
.scan-badge.running { background: #fff4e6; color: var(--accent-dark); }
.scan-badge.running i { animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.scan-progress-wrap {
    background: #fff; padding: 14px 26px; border-bottom: 1px solid #e7eaf0;
}
.scan-live-log {
    margin-top: 10px; max-height: 120px; overflow-y: auto;
    font-family: "Consolas", monospace; font-size: .78rem;
    color: #555; background: #f8f9fb; border-radius: 8px; padding: 8px 12px;
}

.content { padding: 26px; }

/* ---------- Kartlar ---------- */
.card { border: none; border-radius: 14px; box-shadow: 0 1px 3px rgba(16,24,40,.06); }
.card-header { background: #fff; border-bottom: 1px solid #eef0f4; font-weight: 600; border-radius: 14px 14px 0 0 !important; }

.stat-card { padding: 20px 22px; display: flex; align-items: center; gap: 16px; }
.stat-icon {
    width: 52px; height: 52px; border-radius: 13px;
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.stat-icon.orange { background: var(--accent-soft); color: var(--accent); }
.stat-icon.blue { background: #e7f0fd; color: var(--blue); }
.stat-icon.green { background: #e7f6e9; color: var(--green); }
.stat-icon.purple { background: #f0e9fd; color: #6f42c1; }
.stat-value { font-size: 1.7rem; font-weight: 700; line-height: 1; }
.stat-label { color: var(--text-muted); font-size: .85rem; margin-top: 4px; }

/* ---------- Tablolar ---------- */
.table { margin: 0; }
.table thead th {
    font-size: .76rem; text-transform: uppercase; letter-spacing: .4px;
    color: var(--text-muted); border-bottom: 2px solid #eef0f4; font-weight: 600;
}
.table td { vertical-align: middle; }
.product-name { font-weight: 600; color: #2b2f38; }
.product-url { font-size: .78rem; color: var(--text-muted); text-decoration: none; }
.product-url:hover { color: var(--accent); }

.price-tag { font-weight: 700; font-size: 1.02rem; }
.status-pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 20px; font-size: .76rem; font-weight: 600;
}
.status-pill.azaldi { background: #e7f6e9; color: var(--green); }
.status-pill.artti { background: #fdeaea; color: var(--red); }
.status-pill.ayni { background: #eef1f6; color: #6c757d; }
.status-pill.yeni { background: #e7f0fd; color: var(--blue); }
.status-pill.hata { background: #fff3e0; color: #e65100; }

.target-badge {
    background: var(--accent-soft); color: var(--accent-dark);
    padding: 2px 8px; border-radius: 6px; font-size: .76rem; font-weight: 600;
}

/* Switch */
.form-switch .form-check-input { width: 2.6em; height: 1.35em; cursor: pointer; }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }

/* Buttons */
.btn-icon { padding: 5px 9px; border-radius: 8px; line-height: 1; }
.btn-primary { background: var(--accent); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-outline-primary { color: var(--accent); border-color: var(--accent); }
.btn-outline-primary:hover { background: var(--accent); border-color: var(--accent); }
a { color: var(--accent-dark); }

.empty-state { text-align: center; padding: 50px 20px; color: var(--text-muted); }
.empty-state i { font-size: 3rem; opacity: .4; display: block; margin-bottom: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; }
}
