/* GelirPro - Premium Finans Yönetim Paneli */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
    --gp-navy: #0f1d3d;
    --gp-navy-light: #1a2f5c;
    --gp-blue: #2563eb;
    --gp-blue-soft: #3b82f6;
    --gp-indigo: #4f46e5;
    --gp-green: #059669;
    --gp-green-soft: #10b981;
    --gp-red: #dc2626;
    --gp-orange: #ea580c;
    --gp-purple: #7c3aed;
    --gp-slate-50: #f8fafc;
    --gp-slate-100: #f1f5f9;
    --gp-slate-200: #e2e8f0;
    --gp-slate-300: #cbd5e1;
    --gp-slate-400: #94a3b8;
    --gp-slate-500: #64748b;
    --gp-slate-600: #475569;
    --gp-slate-700: #334155;
    --gp-slate-800: #1e293b;
    --gp-slate-900: #0f172a;
    --gp-sidebar-w: 260px;
    --gp-radius: 12px;
    --gp-radius-sm: 8px;
    --gp-shadow: 0 1px 3px rgba(15, 29, 61, 0.06), 0 1px 2px rgba(15, 29, 61, 0.04);
    --gp-shadow-md: 0 4px 12px rgba(15, 29, 61, 0.08);
    --gp-shadow-lg: 0 8px 24px rgba(15, 29, 61, 0.12);
    --gp-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --gp-slate-50: #0f172a;
    --gp-slate-100: #1e293b;
    --gp-slate-200: #334155;
    --gp-slate-300: #475569;
    --gp-slate-700: #cbd5e1;
    --gp-slate-800: #e2e8f0;
    --gp-slate-900: #f8fafc;
    --gp-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    --gp-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gp-slate-50);
    color: var(--gp-slate-800);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Layout */
.gp-app { display: flex; min-height: 100vh; }

.gp-sidebar {
    width: var(--gp-sidebar-w);
    background: var(--gp-navy);
    color: #fff;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    transition: transform var(--gp-transition);
}

.gp-sidebar-brand {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.gp-sidebar-brand svg { width: 32px; height: 32px; }
.gp-sidebar-brand span { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.gp-sidebar-brand small { display: block; font-size: 11px; opacity: 0.5; font-weight: 400; }

.gp-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.gp-nav-section { margin-bottom: 20px; }
.gp-nav-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.35);
    padding: 0 12px;
    margin-bottom: 8px;
    font-weight: 600;
}

.gp-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--gp-radius-sm);
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all var(--gp-transition);
    margin-bottom: 2px;
}

.gp-nav-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.gp-nav-link.active { background: rgba(37, 99, 235, 0.2); color: #fff; }
.gp-nav-link svg { width: 18px; height: 18px; opacity: 0.7; flex-shrink: 0; }
.gp-nav-link.active svg { opacity: 1; }

.gp-main { flex: 1; margin-left: var(--gp-sidebar-w); display: flex; flex-direction: column; }

.gp-topbar {
    height: 64px;
    background: #fff;
    border-bottom: 1px solid var(--gp-slate-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 30;
}

[data-theme="dark"] .gp-topbar { background: var(--gp-slate-100); }

.gp-topbar-left h1 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; color: var(--gp-slate-900); }
.gp-topbar-right { display: flex; align-items: center; gap: 12px; }

.gp-content { padding: 28px; flex: 1; }

/* Cards */
.gp-card {
    background: #fff;
    border-radius: var(--gp-radius);
    border: 1px solid var(--gp-slate-200);
    box-shadow: var(--gp-shadow);
}

[data-theme="dark"] .gp-card { background: var(--gp-slate-100); }

.gp-card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--gp-slate-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gp-card-header h3 { font-size: 15px; font-weight: 600; color: var(--gp-slate-900); }
.gp-card-body { padding: 22px; }

/* Stat Cards */
.gp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }

.gp-stat {
    background: #fff;
    border-radius: var(--gp-radius);
    padding: 20px 22px;
    border: 1px solid var(--gp-slate-200);
    box-shadow: var(--gp-shadow);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .gp-stat { background: var(--gp-slate-100); }

.gp-stat::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px;
    height: 100%;
    border-radius: 4px 0 0 4px;
}

.gp-stat.income::before { background: var(--gp-green); }
.gp-stat.expense::before { background: var(--gp-red); }
.gp-stat.profit::before { background: var(--gp-blue); }
.gp-stat.cash::before { background: var(--gp-purple); }
.gp-stat.bank::before { background: var(--gp-indigo); }
.gp-stat.warning::before { background: var(--gp-orange); }

.gp-stat-label { font-size: 12px; color: var(--gp-slate-500); font-weight: 500; margin-bottom: 6px; }
.gp-stat-value { font-size: 24px; font-weight: 700; color: var(--gp-slate-900); letter-spacing: -0.02em; }
.gp-stat-change { font-size: 12px; margin-top: 4px; font-weight: 500; }
.gp-stat-change.up { color: var(--gp-green); }
.gp-stat-change.down { color: var(--gp-red); }

/* Grid */
.gp-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.gp-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.gp-grid-main-side { display: grid; grid-template-columns: 1fr 380px; gap: 20px; }

/* Table */
.gp-table-wrap { overflow-x: auto; }
.gp-table { width: 100%; border-collapse: collapse; }
.gp-table th {
    text-align: left;
    padding: 10px 16px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gp-slate-500);
    font-weight: 600;
    border-bottom: 1px solid var(--gp-slate-200);
    background: var(--gp-slate-50);
}

[data-theme="dark"] .gp-table th { background: var(--gp-slate-100); }

.gp-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gp-slate-100);
    font-size: 13.5px;
    color: var(--gp-slate-700);
}

.gp-table tr:hover td { background: var(--gp-slate-50); }
.gp-table tr:last-child td { border-bottom: none; }

/* Badges */
.gp-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.gp-badge.success { background: #ecfdf5; color: #059669; }
.gp-badge.danger { background: #fef2f2; color: #dc2626; }
.gp-badge.warning { background: #fff7ed; color: #ea580c; }
.gp-badge.info { background: #eff6ff; color: #2563eb; }
.gp-badge.neutral { background: var(--gp-slate-100); color: var(--gp-slate-600); }

/* Buttons */
.gp-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--gp-radius-sm);
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--gp-transition);
    text-decoration: none;
    font-family: inherit;
    line-height: 1.4;
}

.gp-btn-primary { background: var(--gp-blue); color: #fff; }
.gp-btn-primary:hover { background: #1d4ed8; box-shadow: var(--gp-shadow-md); }

.gp-btn-secondary { background: var(--gp-slate-100); color: var(--gp-slate-700); border: 1px solid var(--gp-slate-200); }
.gp-btn-secondary:hover { background: var(--gp-slate-200); }

.gp-btn-success { background: var(--gp-green); color: #fff; }
.gp-btn-danger { background: var(--gp-red); color: #fff; }
.gp-btn-sm { padding: 5px 10px; font-size: 12px; }
.gp-btn-ghost { background: transparent; color: var(--gp-slate-600); }
.gp-btn-ghost:hover { background: var(--gp-slate-100); }

/* Forms */
.gp-form-group { margin-bottom: 18px; }
.gp-label { display: block; font-size: 13px; font-weight: 600; color: var(--gp-slate-700); margin-bottom: 6px; }
.gp-input, .gp-select, .gp-textarea {
    width: 100%;
    padding: 9px 14px;
    border: 1px solid var(--gp-slate-200);
    border-radius: var(--gp-radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--gp-slate-800);
    background: #fff;
    transition: border-color var(--gp-transition), box-shadow var(--gp-transition);
}

[data-theme="dark"] .gp-input, [data-theme="dark"] .gp-select, [data-theme="dark"] .gp-textarea {
    background: var(--gp-slate-100);
    color: var(--gp-slate-800);
}

.gp-input:focus, .gp-select:focus, .gp-textarea:focus {
    outline: none;
    border-color: var(--gp-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.gp-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gp-form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* AI Insight Cards */
.gp-ai-insight {
    padding: 14px 18px;
    border-radius: var(--gp-radius-sm);
    border-left: 3px solid;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid var(--gp-slate-200);
}

.gp-ai-insight.success { border-left-color: var(--gp-green); }
.gp-ai-insight.warning { border-left-color: var(--gp-orange); }
.gp-ai-insight.danger { border-left-color: var(--gp-red); }
.gp-ai-insight.info { border-left-color: var(--gp-blue); }

.gp-ai-insight strong { font-size: 13px; display: block; margin-bottom: 2px; color: var(--gp-slate-900); }
.gp-ai-insight p { font-size: 12.5px; color: var(--gp-slate-600); line-height: 1.5; }

/* Alert */
.gp-alert {
    padding: 12px 16px;
    border-radius: var(--gp-radius-sm);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gp-alert.success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.gp-alert.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.gp-alert.warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* Login */
.gp-login-page {
    min-height: 100vh;
    display: flex;
    background: linear-gradient(135deg, var(--gp-navy) 0%, #1a3a6b 50%, var(--gp-indigo) 100%);
}

.gp-login-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    color: #fff;
}

.gp-login-left h2 { font-size: 36px; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 12px; }
.gp-login-left p { font-size: 16px; opacity: 0.7; max-width: 400px; line-height: 1.7; }

.gp-login-right {
    width: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 48px;
}

.gp-login-form { width: 100%; max-width: 360px; }
.gp-login-form h3 { font-size: 24px; font-weight: 700; margin-bottom: 6px; color: var(--gp-slate-900); }
.gp-login-form .subtitle { color: var(--gp-slate-500); margin-bottom: 32px; font-size: 14px; }

/* Chart placeholder */
.gp-chart-area { height: 280px; position: relative; }

/* Filter bar */
.gp-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    background: var(--gp-slate-50);
    border-bottom: 1px solid var(--gp-slate-200);
    flex-wrap: wrap;
}

.gp-filter-bar .gp-input, .gp-filter-bar .gp-select { width: auto; min-width: 140px; }

/* Page header */
.gp-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.gp-page-header h2 { font-size: 22px; font-weight: 700; color: var(--gp-slate-900); letter-spacing: -0.02em; }
.gp-page-actions { display: flex; gap: 8px; }

/* Empty state */
.gp-empty { text-align: center; padding: 48px 20px; color: var(--gp-slate-500); }
.gp-empty svg { width: 48px; height: 48px; margin-bottom: 12px; opacity: 0.3; }

/* Amount colors */
.text-income { color: var(--gp-green); font-weight: 600; }
.text-expense { color: var(--gp-red); font-weight: 600; }
.text-muted { color: var(--gp-slate-500); }

/* Mobile */
.gp-mobile-toggle { display: none; background: none; border: none; color: var(--gp-slate-700); cursor: pointer; padding: 8px; }

@media (max-width: 1024px) {
    .gp-grid-main-side, .gp-grid-2, .gp-grid-3 { grid-template-columns: 1fr; }
    .gp-form-row, .gp-form-row-3 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .gp-sidebar { transform: translateX(-100%); }
    .gp-sidebar.open { transform: translateX(0); }
    .gp-main { margin-left: 0; }
    .gp-mobile-toggle { display: block; }
    .gp-login-page { flex-direction: column; }
    .gp-login-left { padding: 40px 32px; }
    .gp-login-right { width: 100%; }
    .gp-content { padding: 16px; }
    .gp-stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .gp-stats { grid-template-columns: 1fr; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gp-slate-300); border-radius: 3px; }

/* Print */
@media print {
    .gp-sidebar, .gp-topbar { display: none; }
    .gp-main { margin-left: 0; }
}
