/* ═══════════════════════════════════════════════════
   İnovatif Sigorta — Şube Talep Yönetim Sistemi
   Ana Tema CSS — Mobile-First
   ═══════════════════════════════════════════════════ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Urbanist:wght@400;500;600;700;800&family=DM+Sans:wght@400;500;600&display=swap');

/* ── CSS Değişkenleri ────────────────────────────── */
:root {
    --bg-deep: #0a0a14;
    --bg-card: #12122a;
    --bg-panel: #1a1a3e;
    --accent: #e94560;
    --accent-soft: rgba(233,69,96,0.15);
    --accent-hover: #ff5a75;
    --success: #00d4aa;
    --success-soft: rgba(0,212,170,0.15);
    --warning: #f5a623;
    --warning-soft: rgba(245,166,35,0.15);
    --info: #3498db;
    --info-soft: rgba(52,152,219,0.15);
    --danger: #e74c3c;
    --text: #e8e8f0;
    --text-muted: #8888aa;
    --border: rgba(255,255,255,0.08);
    --glass-bg: rgba(255,255,255,0.03);
    --glass-border: rgba(255,255,255,0.08);
    --glass-blur: blur(12px);
    --font-display: 'Urbanist', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --sidebar-width: 260px;
    --topbar-height: 70px;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ───────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }

a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-hover); }

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }

/* ── Public Body (Müşteri Yüzü) ──────────────────── */
.public-body {
    background: var(--bg-deep);
    min-height: 100vh;
}

/* ── Panel Body ──────────────────────────────────── */
.panel-body {
    background: var(--bg-deep);
    min-height: 100vh;
    display: flex;
}

/* ══════════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════════ */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.logo {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
}
.logo span { color: var(--accent); }
.logo-sub { color: var(--text-muted); font-size: 12px; display: block; margin-top: 4px; }

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 4px;
}
.nav-item:hover {
    background: var(--accent-soft);
    color: var(--text);
}
.nav-item.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(233,69,96,0.3);
}
.nav-icon { font-size: 18px; width: 24px; text-align: center; }
.nav-label { white-space: nowrap; }

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
}
.logout-btn:hover { background: rgba(231,76,60,0.15); color: var(--danger); }

/* ══════════════════════════════════════════════════
   TOPBAR
   ══════════════════════════════════════════════════ */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
}

.topbar {
    position: sticky;
    top: 0;
    height: var(--topbar-height);
    background: rgba(10,10,20,0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    z-index: 900;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 24px;
    cursor: pointer;
}

.page-title {
    flex: 1;
    font-size: 20px;
    font-weight: 700;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Bildirimler */
.notification-wrapper { position: relative; }
.notification-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 18px;
    padding: 8px 12px;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}
.notification-btn:hover { background: var(--accent-soft); }
.notification-count {
    position: absolute;
    top: -4px; right: -4px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    width: 18px; height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 340px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 1001;
    overflow: hidden;
}
.notification-dropdown.show { display: block; }

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.mark-read-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 12px;
    cursor: pointer;
}
.notification-list { max-height: 320px; overflow-y: auto; }
.notification-item {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}
.notification-item:hover { background: var(--accent-soft); }
.notification-item.unread { border-left: 3px solid var(--accent); }
.notification-msg { font-size: 13px; color: var(--text); margin-bottom: 4px; }
.notification-time { font-size: 11px; color: var(--text-muted); }
.notification-empty { padding: 24px; text-align: center; color: var(--text-muted); font-size: 13px; }

.user-info { text-align: right; }
.user-name { display: block; font-size: 14px; font-weight: 600; color: var(--text); }
.user-role { display: block; font-size: 11px; color: var(--text-muted); }

/* ══════════════════════════════════════════════════
   PAGE CONTENT
   ══════════════════════════════════════════════════ */
.page-content { padding: 24px; }

/* ── Glass Card ──────────────────────────────────── */
.card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 24px;
    transition: var(--transition);
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}
.card:hover {
    border-color: rgba(233,69,96,0.2);
    box-shadow: 0 0 30px rgba(233,69,96,0.05);
}

/* Stagger animasyon */
.card:nth-child(1) { animation-delay: 0s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4) { animation-delay: 0.3s; }
.card:nth-child(5) { animation-delay: 0.4s; }
.card:nth-child(6) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Metrik Kartları ─────────────────────────────── */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}
.metric-card {
    text-align: center;
    padding: 28px 20px;
}
.metric-value {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 4px;
}
.metric-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.metrics-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* ── Grid Layouts ────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.grid-equal { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* ── Tablolar ────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
tr:hover td { background: var(--accent-soft); }

/* ── Badge ───────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* ── Butonlar ────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(233,69,96,0.3);
}
.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
    box-shadow: 0 6px 20px rgba(233,69,96,0.4);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text);
    border: 1px solid var(--glass-border);
}
.btn-secondary:hover { background: var(--accent-soft); }

.btn-success { background: var(--success); color: #fff; }
.btn-warning { background: var(--warning); color: #000; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }
.btn-whatsapp { background: #25D366; color: #fff; }
.btn-whatsapp:hover { background: #20bd5a; color: #fff; }

.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Form Elemanları ─────────────────────────────── */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    transition: var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-control::placeholder { color: var(--text-muted); }

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238888aa' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

textarea.form-control { min-height: 100px; resize: vertical; }

.form-error {
    color: var(--accent);
    font-size: 12px;
    margin-top: 4px;
    display: none;
}
.form-group.has-error .form-control { border-color: var(--accent); }
.form-group.has-error .form-error { display: block; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Checkbox / Toggle */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-muted);
}
.checkbox-group input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--accent);
    margin-top: 2px;
    cursor: pointer;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px; height: 26px;
}
.toggle-switch input { display: none; }
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 13px;
    transition: var(--transition);
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px; width: 20px;
    left: 2px; bottom: 2px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: var(--transition);
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent-soft); border-color: var(--accent); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(24px); background: var(--accent); }

/* ── Filtreler ───────────────────────────────────── */
.filters-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    align-items: end;
}
.filters-bar .form-group { margin-bottom: 0; flex: 1; min-width: 150px; }
.filters-bar .form-control { padding: 10px 14px; }

.search-box {
    position: relative;
    flex: 2;
}
.search-box input {
    padding-left: 40px;
}
.search-box::before {
    content: "🔍";
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
}

/* ══════════════════════════════════════════════════
   STEPPER FORM (Müşteri Yüzü)
   ══════════════════════════════════════════════════ */
.form-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 20px;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}
.form-header .logo {
    font-size: 28px;
    margin-bottom: 8px;
}
.form-header p {
    color: var(--text-muted);
    font-size: 15px;
}

/* Stepper */
.stepper {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 40px;
    position: relative;
}
.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}
.step-number {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    color: var(--text-muted);
    position: relative;
    z-index: 2;
    transition: var(--transition);
}
.step-indicator.active .step-number,
.step-indicator.completed .step-number {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 20px rgba(233,69,96,0.3);
}
.step-indicator.completed .step-number { background: var(--success); border-color: var(--success); }
.step-label {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}
.step-indicator.active .step-label { color: var(--accent); }

.step-indicator:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 22px;
    left: calc(50% + 22px);
    width: calc(100% - 44px);
    height: 2px;
    background: var(--border);
    z-index: 1;
}
.step-indicator.completed:not(:last-child)::after {
    background: var(--success);
}

/* Form Steps */
.form-step { display: none; }
.form-step.active { display: block; animation: slideIn 0.4s ease; }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.step-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 32px;
}

.step-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text);
}

.step-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    gap: 12px;
}

/* Radio Kartları (sermaye seçimi) */
.radio-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.radio-card {
    position: relative;
    cursor: pointer;
}
.radio-card input { position: absolute; opacity: 0; }
.radio-card-inner {
    padding: 20px;
    background: var(--bg-deep);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
}
.radio-card-inner .amount {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
    margin-bottom: 4px;
}
.radio-card-inner .desc {
    font-size: 12px;
    color: var(--text-muted);
}
.radio-card input:checked + .radio-card-inner {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 0 20px rgba(233,69,96,0.1);
}

/* Ofis durumu radio */
.radio-group {
    display: flex;
    gap: 12px;
}
.radio-option {
    flex: 1;
    cursor: pointer;
    position: relative;
}
.radio-option input { position: absolute; opacity: 0; }
.radio-option-inner {
    padding: 12px;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    transition: var(--transition);
}
.radio-option input:checked + .radio-option-inner {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

/* ══════════════════════════════════════════════════
   TEŞEKKÜR SAYFASI
   ══════════════════════════════════════════════════ */
.success-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 80px 20px;
    text-align: center;
}

.success-icon {
    width: 100px; height: 100px;
    margin: 0 auto 24px;
    background: var(--success-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    animation: successBounce 0.6s ease;
}

@keyframes successBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.success-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
}

.success-desc {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 32px;
}

.tracking-code-box {
    background: var(--bg-card);
    border: 2px dashed var(--accent);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 32px;
}
.tracking-code-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.tracking-code {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 2px;
}
.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px 16px;
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    color: var(--accent);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}
.copy-btn:hover { background: var(--accent); color: #fff; }

/* ══════════════════════════════════════════════════
   TAKİP SAYFASI
   ══════════════════════════════════════════════════ */
.tracking-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 60px 20px;
}

.tracking-form {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}
.tracking-form input { flex: 1; }

/* Timeline */
.timeline {
    position: relative;
    padding-left: 32px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 11px; top: 0; bottom: 0;
    width: 2px;
    background: var(--border);
}
.timeline-item {
    position: relative;
    margin-bottom: 24px;
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}
.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }

.timeline-dot {
    position: absolute;
    left: -32px; top: 0;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 3px solid var(--border);
    z-index: 1;
}
.timeline-item.completed .timeline-dot { border-color: var(--success); background: var(--success); }
.timeline-item.active .timeline-dot { border-color: var(--accent); background: var(--accent); animation: pulse 2s ease infinite; }

.timeline-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 16px;
}
.timeline-title { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.timeline-date { font-size: 12px; color: var(--text-muted); }
.timeline-note { font-size: 13px; color: var(--text-muted); margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }

/* ══════════════════════════════════════════════════
   LOGIN SAYFASI
   ══════════════════════════════════════════════════ */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-card {
    width: 100%;
    max-width: 420px;
    padding: 48px 36px;
    text-align: center;
}
.login-card .logo { font-size: 28px; margin-bottom: 8px; }
.login-card .login-subtitle { color: var(--text-muted); font-size: 14px; margin-bottom: 32px; }

.login-error {
    background: rgba(231,76,60,0.1);
    border: 1px solid rgba(231,76,60,0.3);
    color: var(--danger);
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 20px;
}

/* ══════════════════════════════════════════════════
   TALEP DETAY
   ══════════════════════════════════════════════════ */
.detail-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
}

.info-table {
    width: 100%;
}
.info-table td {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.info-table td:first-child {
    color: var(--text-muted);
    width: 140px;
    font-weight: 500;
}

/* ── Personel İş Yükü ─────────────────────────── */
.workload-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-deep);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}
.workload-info { flex: 1; }
.workload-name { font-weight: 600; font-size: 14px; }
.workload-count { font-size: 12px; color: var(--text-muted); }
.workload-bar {
    width: 100px; height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}
.workload-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* ── Modal ───────────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.show { display: flex; }

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeInUp 0.3s ease;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 18px; }
.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
}
.modal-close:hover { color: var(--accent); }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ── QR Modal ────────────────────────────────────── */
.qr-modal-content {
    text-align: center;
    padding: 20px;
}
.qr-code {
    background: #fff;
    padding: 20px;
    border-radius: var(--radius);
    display: inline-block;
    margin: 16px 0;
}
.qr-code svg, .qr-code img { display: block; }
.qr-info { color: var(--text-muted); font-size: 13px; margin: 12px 0; }

/* ── Uyarı Kartları ──────────────────────────────── */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-danger { background: rgba(231,76,60,0.1); border: 1px solid rgba(231,76,60,0.3); color: var(--danger); }
.alert-warning { background: var(--warning-soft); border: 1px solid rgba(245,166,35,0.3); color: var(--warning); }
.alert-success { background: var(--success-soft); border: 1px solid rgba(0,212,170,0.3); color: var(--success); }
.alert-info { background: var(--info-soft); border: 1px solid rgba(52,152,219,0.3); color: var(--info); }

/* ── Toplu İşlem ─────────────────────────────────── */
.bulk-actions {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--accent-soft);
    border: 1px solid rgba(233,69,96,0.2);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}
.bulk-actions.show { display: flex; }
.bulk-count { font-size: 14px; font-weight: 600; color: var(--accent); }

/* ── Loading Spinner ─────────────────────────────── */
.loading {
    display: inline-block;
    width: 20px; height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,10,20,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}
.loading-lg { width: 48px; height: 48px; border-width: 3px; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Pagination ──────────────────────────────────── */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}
.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 14px;
    transition: var(--transition);
}
.pagination a:hover, .pagination .active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ── Install Sayfası ─────────────────────────────── */
.install-container {
    max-width: 600px;
    margin: 60px auto;
    padding: 20px;
}
.install-card { padding: 40px; text-align: center; }
.install-card h1 { margin-bottom: 16px; }
.install-card .step-list { text-align: left; margin: 20px 0; }
.install-card .step-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-muted);
}
.install-card .step-list li.done { color: var(--success); }
.install-card .step-list li.fail { color: var(--danger); }

/* ══════════════════════════════════════════════════
   RAPORLAR
   ══════════════════════════════════════════════════ */
.chart-container {
    position: relative;
    height: 300px;
    margin: 16px 0;
}
.chart-container canvas { max-height: 100%; }

/* ══════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-2, .grid-equal { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
    }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .menu-toggle { display: block; }
    .page-title { font-size: 16px; }

    .metrics-grid { grid-template-columns: 1fr; }
    .metrics-grid-3 { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .radio-cards { grid-template-columns: 1fr; }
    .radio-group { flex-direction: column; }
    .filters-bar { flex-direction: column; }
    .filters-bar .form-group { min-width: 100%; }

    .stepper { gap: 0; }
    .step-label { font-size: 10px; }

    /* Tablo yerine kart görünümü — mobil */
    .mobile-cards table,
    .mobile-cards thead { display: none; }
    .mobile-cards .mobile-card {
        display: block;
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        border-radius: var(--radius-sm);
        padding: 16px;
        margin-bottom: 12px;
    }
    .mobile-cards .mobile-card-row {
        display: flex;
        justify-content: space-between;
        padding: 6px 0;
        border-bottom: 1px solid var(--border);
        font-size: 13px;
    }
    .mobile-cards .mobile-card-row:last-child { border-bottom: none; }
    .mobile-cards .mobile-card-label { color: var(--text-muted); }

    .tracking-form { flex-direction: column; }

    .notification-dropdown { width: 280px; right: -40px; }
}

@media (max-width: 480px) {
    .page-content { padding: 16px; }
    .card { padding: 16px; }
    .step-card { padding: 20px; }
    .success-container { padding: 40px 16px; }
    .tracking-code { font-size: 24px; }
}