/* ============================================================
   Finans App – Ana CSS
   Dark-first modern fintech tasarımı
   ============================================================ */

/* ── Google Fonts yedek ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Değişkenleri ── */
:root {
    --bg-base:       #0a0e1a;
    --bg-surface:    #111827;
    --bg-elevated:   #1a2236;
    --bg-card:       #141c2e;

    --border-subtle: rgba(99, 102, 241, 0.15);
    --border-light:  rgba(255,255,255,0.08);

    --text-primary:  #f1f5f9;
    --text-secondary:#94a3b8;
    --text-muted:    #64748b;

    --accent:        #6366f1;
    --accent-hover:  #4f52d4;
    --accent-glow:   rgba(99,102,241,0.25);

    --positive:      #10b981;
    --positive-bg:   rgba(16,185,129,0.12);
    --negative:      #ef4444;
    --negative-bg:   rgba(239,68,68,0.12);
    --warning:       #f59e0b;
    --warning-bg:    rgba(245,158,11,0.12);
    --info:          #3b82f6;
    --info-bg:       rgba(59,130,246,0.12);

    --sidebar-w:     240px;
    --topbar-h:      60px;
    --radius:        12px;
    --radius-sm:     8px;
    --shadow:        0 4px 24px rgba(0,0,0,0.35);
    --shadow-card:   0 2px 12px rgba(0,0,0,0.3);

    --font:          'Inter', 'Segoe UI', sans-serif;
    --transition:    0.2s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-base);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; }

/* ── Sidebar ── */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width var(--transition), transform var(--transition);
    overflow: hidden;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 18px;
    border-bottom: 1px solid var(--border-light);
}
.brand-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700;
}
.brand-text { font-size: 18px; font-weight: 700; letter-spacing: -0.5px; }

.sidebar-nav { flex: 1; padding: 12px 8px; overflow-y: auto; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    transition: all var(--transition);
    margin-bottom: 2px;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover  { background: var(--bg-elevated); color: var(--text-primary); }
.nav-item.active { background: var(--accent-glow); color: var(--accent); }
.nav-item.nav-logout { margin-top: auto; color: var(--negative); }
.nav-item.nav-logout:hover { background: var(--negative-bg); color: var(--negative); }
.nav-divider { height: 1px; background: var(--border-light); margin: 8px 0; }

.sidebar-footer {
    padding: 14px 18px;
    border-top: 1px solid var(--border-light);
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Main wrapper ── */
.main-wrapper {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition);
}
.main-wrapper.expanded { margin-left: 60px; }

/* ── Masaüstü sidebar daraltma ── */
.sidebar.collapsed {
    width: 60px;
    overflow: hidden;
}
.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .sidebar-footer { display: none; }
.sidebar.collapsed .brand-icon { margin: 0 auto; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 10px; }
.sidebar.collapsed .nav-divider { margin: 6px 4px; }

/* ── Topbar ── */
.topbar {
    position: sticky; top: 0;
    height: var(--topbar-h);
    background: rgba(17,24,39,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
    z-index: 50;
}
.sidebar-toggle {
    background: none; border: none; cursor: pointer; color: var(--text-secondary);
    padding: 4px; border-radius: 6px; display: flex; align-items: center;
    transition: color var(--transition);
}
.sidebar-toggle:hover { color: var(--text-primary); }
.sidebar-toggle svg { width: 20px; height: 20px; }
.page-title { font-size: 16px; font-weight: 600; flex: 1; }
.topbar-right { margin-left: auto; }
.user-badge {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px;
}

/* ── Content ── */
.content {
    flex: 1;
    padding: 24px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* ── Cards ── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}
.card-title { font-size: 15px; font-weight: 600; }
.card-link   { font-size: 12px; color: var(--accent); }
.card-body   { padding: 20px; }

/* ── Stats Grid ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: border-color var(--transition), transform var(--transition);
}
.stat-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--accent), #8b5cf6);
}
.stat-card:hover { border-color: var(--accent-glow); transform: translateY(-1px); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 4px; }
.stat-sub   { font-size: 12px; color: var(--text-secondary); }

/* ── Dashboard Grid ── */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 500;
    font-family: var(--font);
    transition: all var(--transition);
    white-space: nowrap;
    text-decoration: none;
}
.btn-primary  { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-ghost    { background: var(--bg-elevated); color: var(--text-secondary); border: 1px solid var(--border-light); }
.btn-ghost:hover { color: var(--text-primary); border-color: var(--border-subtle); }
.btn-danger   { background: var(--negative); color: #fff; }
.btn-danger:hover { opacity: 0.85; }
.btn-sm       { padding: 5px 10px; font-size: 12px; }
.btn-lg       { padding: 12px 28px; font-size: 15px; }
.btn-full     { width: 100%; justify-content: center; }
.btn-icon { background: none; border: none; cursor: pointer; font-size: 16px; padding: 4px; border-radius: 4px; color: var(--text-secondary); transition: color var(--transition); }
.btn-icon:hover { color: var(--text-primary); }

/* ── Forms ── */
.form-card { max-width: 760px; margin: 0 auto; }
.form-group { margin-bottom: 18px; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-control {
    width: 100%;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 14px;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}
.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-control:disabled { opacity: 0.5; cursor: not-allowed; }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control option { background: var(--bg-surface); }
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 8px;
}
.input-with-toggle { position: relative; }
.input-with-toggle .form-control { padding-right: 44px; }
.toggle-password {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    color: var(--text-muted);
    display: flex;
}
.toggle-password svg { width: 18px; height: 18px; }

/* ── Alerts ── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 13.5px;
}
.alert-danger  { background: var(--negative-bg); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.alert-success { background: var(--positive-bg); border: 1px solid rgba(16,185,129,0.3); color: #6ee7b7; }
.alert-warning { background: var(--warning-bg);  border: 1px solid rgba(245,158,11,0.3);  color: #fcd34d; }
.alert-info    { background: var(--info-bg);     border: 1px solid rgba(59,130,246,0.3);   color: #93c5fd; }

/* ── Tables ── */
.table-responsive { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.data-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
}
.data-table td {
    padding: 11px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: var(--text-primary);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }

.mini-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mini-table th {
    text-align: left; padding: 6px 8px; font-size: 11px;
    color: var(--text-muted); border-bottom: 1px solid var(--border-light);
    text-transform: uppercase;
}
.mini-table td { padding: 8px 8px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.mini-table tr:last-child td { border-bottom: none; }

/* ── Utility ── */
.positive     { color: var(--positive); }
.negative     { color: var(--negative); }
.text-muted   { color: var(--text-muted); }
.text-secondary{ color: var(--text-secondary); }
.small        { font-size: 12px; }
.empty-text   { color: var(--text-muted); font-size: 13px; text-align: center; padding: 16px 0; }

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}
.badge-green  { background: var(--positive-bg); color: var(--positive); }
.badge-red    { background: var(--negative-bg); color: var(--negative); }
.badge-yellow { background: var(--warning-bg);  color: var(--warning); }
.badge-blue   { background: var(--info-bg);     color: var(--info); }
.badge-gray   { background: rgba(100,116,139,0.15); color: var(--text-muted); }
.badge-type   { background: var(--bg-elevated); color: var(--text-secondary); }

/* ── Toolbar ── */
.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.filter-tabs  { display: flex; gap: 4px; }
.tab {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}
.tab:hover      { color: var(--text-primary); }
.tab.active     { background: var(--accent-glow); color: var(--accent); border-color: var(--accent); }

/* ── Quick Actions ── */
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition);
}
.quick-btn:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* ── Accounts Grid ── */
.accounts-grid  { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.account-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 20px;
    transition: border-color var(--transition);
}
.account-card:hover { border-color: var(--border-subtle); }
.account-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.account-bank   { font-weight: 600; font-size: 14px; }
.account-name   { font-size: 12px; color: var(--text-muted); }
.account-balance { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.account-iban   { font-size: 12px; color: var(--text-muted); font-family: monospace; margin-bottom: 12px; }
.account-actions { display: flex; gap: 8px; }

/* ── Donut Legend ── */
.donut-legend { display: flex; flex-direction: column; gap: 8px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.legend-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}
.empty-icon  { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.empty-state p  { color: var(--text-muted); margin-bottom: 20px; }

/* ── Modal ── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 200;
    padding: 20px;
}
.modal-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 28px;
    width: 100%;
    max-width: 460px;
    box-shadow: var(--shadow);
}
.modal-box h3 { margin-bottom: 20px; font-size: 16px; }

/* ── Auth Pages ── */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-container { width: 100%; max-width: 420px; padding: 20px; }
.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 36px 32px;
    box-shadow: var(--shadow);
}
.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin-bottom: 28px;
}
.auth-title    { font-size: 22px; font-weight: 700; text-align: center; margin-bottom: 6px; }
.auth-subtitle { font-size: 13px; color: var(--text-muted); text-align: center; margin-bottom: 24px; }
.auth-form     { display: flex; flex-direction: column; gap: 0; }
.auth-footer   { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-muted); }
.forgot-link   { font-size: 12px; color: var(--accent); }

/* ── Landing Page ── */
.landing-page { min-height: 100vh; }
.landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 40px;
    border-bottom: 1px solid var(--border-light);
    background: rgba(10,14,26,0.95);
    position: sticky; top: 0; z-index: 100;
    backdrop-filter: blur(12px);
}
.nav-actions { display: flex; gap: 10px; }

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 80px 40px;
    max-width: 1200px;
    margin: 0 auto;
}
.hero-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 999px;
    font-size: 13px;
    color: var(--accent);
    margin-bottom: 20px;
}
.hero-title {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -2px;
    margin-bottom: 20px;
}
.gradient-text {
    background: linear-gradient(135deg, var(--accent), #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle { font-size: 16px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 32px; max-width: 480px; }
.hero-actions  { display: flex; gap: 12px; }

.mock-dashboard {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}
.mock-card   { margin-bottom: 16px; }
.mock-label  { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.mock-value  { font-size: 28px; font-weight: 700; margin-bottom: 4px; }
.mock-change { font-size: 13px; }
.mock-stats  { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mock-stat   {
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    padding: 10px;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}
.mock-stat span { color: var(--text-muted); }
.mock-stat b    { font-weight: 600; }

.features {
    background: var(--bg-surface);
    padding: 60px 40px;
    border-top: 1px solid var(--border-light);
}
.features-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 24px;
    transition: border-color var(--transition), transform var(--transition);
}
.feature-card:hover { border-color: var(--border-subtle); transform: translateY(-2px); }
.feature-icon { font-size: 32px; margin-bottom: 14px; }
.feature-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.feature-card p  { color: var(--text-muted); font-size: 13.5px; }

.landing-footer { text-align: center; padding: 24px; color: var(--text-muted); font-size: 13px; border-top: 1px solid var(--border-light); }

/* ── Responsive ── */
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); width: var(--sidebar-w); }
    .sidebar.open { transform: translateX(0); }
    .main-wrapper { margin-left: 0; }
    .hero { grid-template-columns: 1fr; gap: 40px; padding: 40px 20px; }
    .hero-visual { display: none; }
    .hero-title  { font-size: 36px; }
    .form-row    { grid-template-columns: 1fr; }
    .content     { padding: 16px; }
    .stats-grid  { grid-template-columns: 1fr 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .stats-grid  { grid-template-columns: 1fr; }
    .quick-actions { grid-template-columns: 1fr; }
    .page-toolbar { flex-direction: column; align-items: flex-start; }
}

/* ── Party / Cari Link ── */
.party-link {
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px dashed var(--border-subtle);
    transition: color var(--transition), border-color var(--transition);
    font-weight: 500;
}
.party-link:hover {
    color: var(--accent);
    border-color: var(--accent);
}
