/* =========================================================
 *  TEKLİFİM - LARAVEL NOVA / TAILWIND CSS TASARIM SİSTEMİ
 *  (Merkezi Master CSS Mimarisi ve Bileşen Kitabı)
 * ========================================================= */

:root {
    /* --- 1. Tipografi & Yazı Tipi --- */
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    /* Font Boyutu Ölçeği (Tailwind Scale) */
    --text-xs: 0.75rem;      /* 12px */
    --text-sm-sub: 0.8125rem;/* 13px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 1rem;       /* 16px */
    --text-lg: 1.125rem;     /* 18px */
    --text-xl: 1.25rem;      /* 20px */
    --text-2xl: 1.5rem;      /* 24px */
    --text-3xl: 1.875rem;    /* 30px */
    --text-5xl: 3rem;        /* 48px */

    /* --- 2. Boşluklar (Spacing Scale) --- */
    --space-1: 0.25rem;  /* 4px */
    --space-2: 0.5rem;   /* 8px */
    --space-3: 0.75rem;  /* 12px */
    --space-4: 1rem;     /* 16px */
    --space-5: 1.25rem;  /* 20px */
    --space-6: 1.5rem;   /* 24px */
    --space-8: 2rem;     /* 32px */
    --space-10: 2.5rem;  /* 40px */
    --space-12: 3rem;    /* 48px */

    /* --- 3. Kenarlık Yuvarlatma (Border Radius Scale) --- */
    --radius-sm: 0.375rem; /* 6px - Input, Buton, Badge */
    --radius-md: 0.5rem;   /* 8px - Kartlar, Sekmeler */
    --radius-lg: 0.75rem;  /* 12px - Büyük Modal, Özel Kartlar */
    --radius-xl: 1rem;     /* 16px - Banner */
    --radius-full: 9999px; /* Dairesel Rozetler */

    /* --- 4. Gölgeler & Odaklanma (Shadows & Focus Rings) --- */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-focus: 0 0 0 3px var(--primary-light);

    /* --- 5. Global Tema Renkleri (Varsayılan: Slate / Nova Neutral) --- */
    --bg-app: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #1e293b;

    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-inverse: #f8fafc;

    --border-color: #e2e8f0;
    --border-sidebar: #334155;

    --primary: #475569;
    --primary-hover: #334155;
    --primary-light: #f1f5f9;
    --primary-text: #0f172a;

    --success: #10b981;
    --success-light: #d1fae5;
    --success-text: #065f46;

    --danger: #ef4444;
    --danger-light: #fee2e2;
    --danger-text: #991b1b;
}

/* =========================================================
 *  MERKEZİ TEMALAR (Nova Theme Variants & Dark Mode)
 * ========================================================= */
html.theme-slate, body.theme-slate, .theme-slate {
    --primary: #475569;
    --primary-hover: #334155;
    --primary-light: #f1f5f9;
    --primary-text: #0f172a;
}
html.theme-indigo, body.theme-indigo, .theme-indigo {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --primary-text: #3730a3;
}
html.theme-emerald, body.theme-emerald, .theme-emerald {
    --primary: #059669;
    --primary-hover: #047857;
    --primary-light: #d1fae5;
    --primary-text: #065f46;
}
html.theme-rose, body.theme-rose, .theme-rose {
    --primary: #e11d48;
    --primary-hover: #be123c;
    --primary-light: #ffe4e6;
    --primary-text: #9f1239;
}

/* Koyu Mod (Dark Mode Support) */
html.dark, body.dark, .dark {
    --bg-app: #0f172a;
    --bg-card: #1e293b;
    --bg-sidebar: #0f172a;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-inverse: #0f172a;

    --border-color: #334155;
    --border-sidebar: #1e293b;
}

/* =========================================================
 *  RESET & TEMEL TAILWIND CORE
 * ========================================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-app);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* Tailwind Utility Helpers */
.hidden { display: none !important; }
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-gray { color: var(--text-muted); }
.text-success { color: var(--success); }
.font-mono { font-family: var(--font-mono); }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-4 { margin-bottom: var(--space-4); }
.mr-1 { margin-right: var(--space-1); }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.col-span-2 { grid-column: span 2 / span 2; }

/* =========================================================
 *  ANA DÜZEN (NOVA LAYOUT MİMARİSİ)
 * ========================================================= */
.app-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* --- Sidebar --- */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    color: var(--text-inverse);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    z-index: 40;
}

.sidebar-header {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-6);
    border-bottom: 1px solid var(--border-sidebar);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.logo-text {
    font-size: var(--text-xl);
    font-weight: 700;
    letter-spacing: -0.025em;
}

.sidebar-close {
    display: none !important;
    color: var(--text-inverse);
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-6) var(--space-4);
    overflow-y: auto;
}

.nav-section {
    font-size: var(--text-xs);
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: var(--space-3);
    padding-left: var(--space-3);
    letter-spacing: 0.05em;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 0.625rem var(--space-3);
    border-radius: var(--radius-sm);
    color: #cbd5e1;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: var(--space-1);
}

.nav-icon {
    flex-shrink: 0;
    color: #94a3b8;
    stroke: currentColor;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.nav-item:hover .nav-icon {
    color: #ffffff;
    stroke: #ffffff;
}

.nav-item.active {
    background-color: var(--primary);
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.nav-item.active .nav-icon {
    color: #ffffff !important;
    stroke: #ffffff !important;
}

.sidebar-footer {
    padding: var(--space-4);
    border-top: 1px solid var(--border-sidebar);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 30;
}

/* --- Main Wrapper --- */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

/* --- Topbar --- */
.topbar {
    height: 64px;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-8);
    flex-shrink: 0;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.sidebar-toggle {
    display: none;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.breadcrumbs .current {
    color: var(--text-main);
    font-weight: 600;
}

.topbar-search {
    flex: 1;
    max-width: 400px;
    margin: 0 var(--space-8);
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: var(--space-3);
    color: var(--text-muted);
}

.search-input {
    width: 100%;
    padding: var(--space-2) var(--space-3) var(--space-2) 2.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-app);
    font-size: var(--text-sm);
    outline: none;
    transition: all 0.2s;
}

.search-input:focus {
    background-color: var(--bg-card);
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
}

.topbar-user {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    cursor: pointer;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}

.topbar-user:hover {
    background-color: var(--bg-app);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background-color: var(--primary-light);
    color: var(--primary-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--text-sm);
}

.user-name {
    font-size: var(--text-sm);
    font-weight: 500;
}

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: var(--space-2);
    width: 160px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: var(--space-1) 0;
    z-index: 50;
}

.dropdown-item {
    display: block;
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    color: var(--text-main);
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--primary-light);
    color: var(--primary-text);
}

/* --- Content Area --- */
.content {
    flex: 1;
    padding: var(--space-8);
    overflow-y: auto;
}

.page-header {
    margin-bottom: var(--space-8);
}

.page-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-main);
}

.page-desc {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-top: var(--space-1);
}

/* =========================================================
 *  NOVA BİLEŞENLERİ (COMPONENTS) & FORM ELEMANLARI
 * ========================================================= */

/* --- Card (Nova Card Standardı) --- */
.card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.card-header {
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-main);
}

.card-body {
    padding: var(--space-6);
}

.card-footer {
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-app);
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-3);
}

/* --- Grid & Form Elemanları --- */
.grid {
    display: grid;
    gap: var(--space-6);
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

label, .form-label {
    font-size: var(--text-sm-sub);
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: var(--space-1);
    display: inline-block;
}

/* Nova Form Girdileri (Input, Select, Textarea) */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="url"],
input[type="password"],
select,
textarea,
.form-control {
    width: 100%;
    height: 38px;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    background-color: var(--bg-card);
    color: var(--text-main);
    outline: none;
    transition: all 0.15s ease-in-out;
    box-sizing: border-box;
}

textarea {
    height: auto;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus,
.form-control:focus {
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
}

/* Input Group (Prefix & Suffix Desteği) */
.input-group {
    display: flex;
    align-items: stretch;
    position: relative;
    width: 100%;
}

.input-group input,
.input-group select,
.input-group .form-control {
    flex: 1;
    min-width: 0;
}

.input-group .input-prefix {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2) var(--space-3);
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    border-right: none;
    border-top-left-radius: var(--radius-sm);
    border-bottom-left-radius: var(--radius-sm);
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.input-group .input-suffix {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2) var(--space-3);
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    border-left: none;
    border-top-right-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

/* Input Group Yumuşatmaları */
.input-group > .input-prefix + input,
.input-group > .input-prefix + select,
.input-group > .input-prefix + .form-control {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group > input:not(:last-child),
.input-group > select:not(:last-child),
.input-group > .form-control:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Custom Checkbox */
.custom-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    user-select: none;
}

.custom-checkbox input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background-color: var(--bg-card);
    flex-shrink: 0;
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkmark:after {
    content: "";
    display: none;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.cb-label {
    font-size: var(--text-sm);
    color: var(--text-main);
}

/* --- Nova Buton Standartları (Buttons) --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    transition: all 0.15s ease-in-out;
    height: 38px;
}

.btn:focus {
    outline: none;
    box-shadow: var(--shadow-focus);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--bg-app);
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: var(--border-color);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background-color: var(--bg-app);
}

.btn-icon {
    padding: var(--space-2);
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-muted);
}

.btn-icon:hover {
    background-color: var(--bg-app);
    color: var(--text-main);
}

.btn-sm {
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-xs);
    height: 32px;
}

/* --- Metrik & Tablo Standartları --- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.data-table th {
    background-color: var(--bg-app);
    color: var(--text-muted);
    font-weight: 600;
    text-align: left;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    text-align: left;
}

.data-table tr:hover td {
    background-color: var(--bg-app);
}

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem var(--space-2);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 500;
}

.badge-success {
    background-color: var(--success-light);
    color: var(--success-text);
}

.badge-info {
    background-color: var(--primary-light);
    color: var(--primary-text);
}

/* =========================================================
 *  FORM KART SEKSİYONLARI (Form Section Cards)
 * ========================================================= */
.form-sections-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

.form-section-card {
    background: #fafafa;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.form-section-title {
    font-size: var(--text-sm-sub);
    font-weight: 600;
    color: var(--primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-2);
    margin-bottom: var(--space-1);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-section-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.dynamic-inputs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: var(--space-3);
    width: 100%;
}

/* =========================================================
 *  SONUÇ VE BOŞ DURUM (EMPTY STATE & RESULTS)
 * ========================================================= */
.empty-state {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-12) var(--space-8);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.empty-state .empty-icon {
    width: 64px;
    height: 64px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-5);
}

.empty-state .empty-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--primary);
}

.empty-state h3 {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: var(--space-2);
}

.empty-state p {
    font-size: var(--text-sm);
    color: var(--text-muted);
    max-width: 440px;
    margin: 0 auto;
    line-height: 1.5;
}

/* --- Sonuç Paneli ve Vade Sekmeleri (Term Tabs) --- */
.results-wrapper, .results-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.results-tabs-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    overflow-x: auto;
    padding: var(--space-1);
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-muted);
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease-in-out;
}

.tab-btn:hover {
    color: var(--text-main);
    background-color: var(--bg-card);
}

.tab-btn.active {
    color: var(--primary);
    background-color: var(--bg-card);
    border-color: var(--border-color);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.tab-btn:focus {
    outline: none;
    box-shadow: var(--shadow-focus);
}

/* --- İstatistik Kartları (Stats Grid - Ferah 3 Satır Düzeni) --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    width: 100%;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: all 0.2s ease;
    min-height: 108px;
    box-sizing: border-box;
}

.stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card.highlight {
    background: var(--primary-light);
    border-color: var(--primary);
}

.stat-card .stat-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-card .stat-icon svg {
    width: 16px;
    height: 16px;
    stroke: var(--primary);
}

.stat-card .stat-info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
    padding-right: 2.2rem;
}

/* 1. SATIR: Başlık / Etiket */
.stat-card .stat-label {
    font-size: 0.725rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.2;
}

/* 2. SATIR: Vurgulu Ana Değer (Büyük ve Ferah) */
.stat-card .stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.25;
}

/* 3. SATIR: Alt Açıklama / Detay Metni */
.stat-card .stat-sub {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.2;
}

/* --- Özet Tablosu ve Grid (Summary List & Summary Grid) --- */
.summary-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    font-size: var(--text-sm);
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

.summary-list .summary-item:nth-child(2n) {
    border-right: none;
}

.summary-list .summary-item:nth-last-child(-n+2) {
    border-bottom: none;
}

.summary-item span:first-child {
    color: var(--text-muted);
}

.summary-item span:last-child {
    font-weight: 600;
    color: var(--text-main);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
}

.summary-grid .summary-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0.75rem 1rem;
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.summary-grid .sum-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.summary-grid .sum-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-main);
    font-family: var(--font-mono);
}

.summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) 1.25rem;
    font-size: var(--text-sm);
    border-bottom: 1px solid var(--border-color);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item span:first-child {
    color: var(--text-muted);
}

.summary-item span:last-child {
    font-weight: 600;
    color: var(--text-main);
}

/* =========================================================
 *  GEÇMİŞ TEKLİFLER SAYFASI BİLEŞENLERİ
 * ========================================================= */
.offer-badge {
    display: inline-block;
    padding: var(--space-1) var(--space-2);
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    font-size: var(--text-xs);
    border-radius: 4px;
    font-family: var(--font-mono);
}

.offer-details-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.offer-details-item {
    background-color: var(--bg-app);
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    border: 1px solid var(--border-color);
}

.offer-details-item .term-label {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.65rem;
    text-transform: uppercase;
}

.offer-details-item .val-kira {
    color: var(--text-main);
    font-weight: 600;
}

.offer-details-item .val-toplam {
    color: var(--text-muted);
    font-size: 0.7rem;
}

.btn-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid #fee2e2;
    background-color: #fef2f2;
    color: #ef4444;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-delete:hover {
    background-color: #ef4444;
    color: white;
    border-color: #ef4444;
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.2);
}

.btn-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--primary-light);
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: var(--space-2);
}

.btn-edit:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* =========================================================
 *  RAKİP ANALİZİ SAYFASI BİLEŞENLERİ
 * ========================================================= */
.rate-result-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    padding: var(--space-8);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: none;
    margin-bottom: var(--space-6);
}

.rate-result-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.rate-result-value {
    font-size: var(--text-5xl);
    font-weight: 800;
    line-height: 1;
    margin-bottom: var(--space-2);
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    letter-spacing: -0.02em;
}

.rate-result-label {
    font-size: var(--text-sm);
    font-weight: 500;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-3);
}

.rate-result-sub {
    font-size: var(--text-lg);
    font-weight: 600;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    backdrop-filter: blur(4px);
    display: inline-block;
}

.input-type-toggle {
    display: flex;
    background: var(--bg-app);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.input-type-toggle .toggle-option {
    flex: 1;
    cursor: pointer;
    margin: 0;
}

.input-type-toggle .toggle-option input {
    position: absolute;
    width: 0; height: 0; opacity: 0;
}

.input-type-toggle .toggle-btn {
    display: block;
    text-align: center;
    padding: 8px var(--space-3);
    font-size: var(--text-sm-sub);
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    user-select: none;
}

.input-type-toggle .toggle-option input:checked + .toggle-btn {
    background: var(--bg-card);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* =========================================================
 *  AYARLAR SAYFASI İÇ DÜZENİ
 * ========================================================= */
.settings-layout {
    display: flex;
    gap: var(--space-8);
    margin-top: var(--space-6);
}

.settings-sidebar {
    width: 200px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.settings-tab-btn {
    display: flex;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-tab-btn:hover {
    color: var(--text-main);
    background: var(--bg-card);
}

.settings-tab-btn.active {
    color: var(--primary);
    background: var(--bg-card);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.settings-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    max-width: 1200px;
}

.settings-tab-content {
    animation: fadeIn 0.2s ease;
}

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

.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-top: var(--space-6);
}

.theme-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    width: 100%;
}

.theme-btn:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.theme-btn.active {
    border-color: var(--primary);
    background: var(--bg-card);
}

.theme-preview {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border-color);
}

/* =========================================================
 *  RESPONSIVE (TÜM MASAÜSTÜ VE MOBİL CİHAZLAR)
 * ========================================================= */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-close {
        display: block !important;
    }

    .sidebar-toggle {
        display: flex;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .grid-cols-3, .form-sections-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid, .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .topbar-search {
        max-width: 250px;
    }

    .settings-layout {
        flex-direction: column;
    }

    .settings-sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
    }
}

@media (max-width: 768px) {
    .form-sections-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .content {
        padding: var(--space-4);
    }

    .topbar {
        padding: 0 var(--space-4);
    }

    .topbar-search {
        display: none;
    }

    .grid-cols-2, .grid-cols-3, .stats-grid, .summary-grid, .summary-list {
        grid-template-columns: 1fr;
    }

    .summary-list .summary-item {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .summary-list .summary-item:last-child {
        border-bottom: none;
    }
}
