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

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --primary-dark: #312e81;
    --dark-nav: #0f172a;
    --sidebar-width: 250px;
    --accent-color: #10b981;
    --accent-light: #d1fae5;
    --danger-color: #f43f5e;
    --danger-light: #ffe4e6;
    --warning-color: #f59e0b;
    --warning-light: #fef3c7;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --border-subtle: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==========================================================================
   GİRİŞ EKRANI (LOGIN SCREEN STYLES - LIGHT & MODERN)
   ========================================================================== */
.login-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 20%, #eef2ff 0%, #f8fafc 60%, #e0e7ff 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    z-index: 9999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.login-card {
    background: #ffffff;
    width: 100%;
    max-width: 440px;
    border-radius: 24px;
    padding: 36px 32px;
    box-shadow: 0 20px 40px -15px rgba(79, 70, 229, 0.15), 0 0 0 1px rgba(226, 232, 240, 0.9);
    border: 1px solid #e2e8f0;
    animation: loginScaleIn 0.3s ease-out;
}

@keyframes loginScaleIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.login-header {
    text-align: center;
    margin-bottom: 24px;
}

.login-icon {
    width: 60px;
    height: 60px;
    background: #eef2ff;
    color: #4f46e5;
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 12px;
    border: 1px solid #c7d2fe;
}

.login-header h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.login-header p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.form-options label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.form-options a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.form-options a:hover {
    text-decoration: underline;
}

.btn-block {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 14px;
}

.login-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.login-divider span {
    position: relative;
    background: #ffffff;
    padding: 0 12px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.quick-login-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ==========================================================================
   MAIN DASHBOARD APP LAYOUT (LEFT SIDEBAR & CONTENT WRAPPER - LIGHT & MODERN)
   ========================================================================== */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* LEFT SIDEBAR */
.sidebar {
    width: var(--sidebar-width);
    background: #ffffff;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    border-right: 1px solid #e2e8f0;
    box-shadow: 2px 0 12px rgba(15, 23, 42, 0.03);
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 18px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.brand-icon {
    font-size: 20px;
    color: #4f46e5;
    background: #eef2ff;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    border: 1px solid #c7d2fe;
    flex-shrink: 0;
}

.brand-text {
    min-width: 0;
    overflow: hidden;
}

.brand-text h2 {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sync-badge {
    font-size: 9px;
    background: #d1fae5;
    color: #059669;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* SIDEBAR NAVIGATION */
.sidebar-nav {
    padding: 12px 10px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-section-title {
    font-size: 10px;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 0.08em;
    margin: 14px 10px 4px 10px;
}

.nav-item {
    background: transparent;
    border: none;
    color: #475569;
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.nav-item i {
    font-size: 15px;
    width: 20px;
    text-align: center;
    color: #64748b;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.nav-item:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.nav-item:hover i {
    color: #4f46e5;
}

.nav-item.active {
    color: #ffffff;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
    font-weight: 700;
}

.nav-item.active i {
    color: #ffffff;
}

.nav-badge {
    margin-left: auto;
    background: #e0e7ff;
    color: #4338ca;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    font-weight: 700;
    flex-shrink: 0;
}

.nav-item.active .nav-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* SIDEBAR FOOTER & USER PROFILE */
.sidebar-footer {
    padding: 14px 12px;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    font-weight: 800;
    font-size: 12px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    width: 100%;
    display: block;
}

.plan-badge-sm {
    font-size: 10px;
    color: #4f46e5;
    font-weight: 800;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    display: inline-block;
    max-width: 100%;
}

.btn-logout {
    background: #ffe4e6;
    color: #e11d48;
    border: 1px solid #fecdd3;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 700;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: #f43f5e;
    color: #ffffff;
}

/* MAIN CONTENT WRAPPER */
.main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: calc(100% - var(--sidebar-width));
    background: var(--bg-color);
}

/* TOP BAR */
.top-bar {
    background: #ffffff;
    height: 64px;
    padding: 0 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 90;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-toggle-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 18px;
    color: var(--text-primary);
    cursor: pointer;
}

.page-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* VERSION BANNER */
.version-banner {
    background: linear-gradient(90deg, #eef2ff 0%, #e0e7ff 100%);
    color: #3730a3;
    padding: 12px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 500;
    border-bottom: 1px solid #c7d2fe;
}

.version-banner i {
    color: var(--primary-color);
    font-size: 16px;
    margin-right: 8px;
}

/* MAIN CONTAINER */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 24px auto;
    padding: 0 28px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.25s ease-in-out;
}

.tab-content.active {
    display: block;
}

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

/* MONTH SELECTOR CARD */
.month-selector-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.month-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.month-selector-card button {
    background: var(--primary-light);
    color: var(--primary-color);
    border: 1px solid #c7d2fe;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    transition: all 0.15s ease;
}

.month-selector-card button:hover {
    background: #e0e7ff;
    transform: translateY(-1px);
}

/* STATS GRID */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 22px 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
}

.stat-card.primary::before { background: linear-gradient(90deg, #6366f1, #4f46e5); }
.stat-card.danger::before { background: linear-gradient(90deg, #f43f5e, #e11d48); }
.stat-card.success::before { background: linear-gradient(90deg, #10b981, #059669); }

.stat-title {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    display: block;
    margin: 8px 0 4px 0;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.stat-desc {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* DEMO BAR */
.demo-bar {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    color: #0369a1;
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

/* CARDS & GENERAL CONTAINERS */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
}

.card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

/* CHART & FLEX */
.chart-flex {
    display: flex;
    align-items: center;
    gap: 36px;
    margin-top: 16px;
    position: relative;
}

.chart-tooltip {
    position: absolute;
    z-index: 1000;
    pointer-events: none;
    background: rgba(15, 23, 42, 0.94);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: opacity 0.12s ease, transform 0.12s ease;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(4px);
}

.chart-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.chart-tooltip-title {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #f8fafc;
}

.chart-tooltip-detail {
    font-size: 11px;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.legend-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.legend-item:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    transform: translateX(4px);
}

.legend-item.active {
    background: #eef2ff;
    border-color: #6366f1;
    box-shadow: var(--shadow-sm);
    font-weight: 700;
}

.filter-banner {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border: 1px solid #c7d2fe;
    color: #3730a3;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* BUTTONS */
.btn {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    border: none;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

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

.btn-success { background: var(--accent-color); color: white; }
.btn-success:hover { background: #059669; }

.btn-danger { background: var(--danger-color); color: white; }
.btn-danger:hover { background: #e11d48; }

.btn-secondary { background: #e2e8f0; color: #334155; }
.btn-secondary:hover { background: #cbd5e1; }

.btn-stripe { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); color: white; }
.btn-google { background: white; color: #1e293b; border: 1px solid #cbd5e1; }

.btn-outline { background: transparent; border: 1px solid currentColor; box-shadow: none; }

.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-xs { padding: 4px 10px; font-size: 11px; border-radius: var(--radius-sm); }

/* CARDS GRID & ITEM CARDS */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.item-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.item-card:hover {
    border-color: #cbd5e1;
    box-shadow: var(--shadow-md);
}

/* FILTER BAR */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.filter-bar input, .filter-bar select {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-bar input:focus, .filter-bar select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* TABLES */
.table-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 13px;
}

th {
    background: #f8fafc;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
}

tbody tr:hover {
    background: #f8fafc;
}

/* MODALS */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

.modal-card {
    background: var(--card-bg);
    padding: 28px;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.modal-card h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

.modal-card input, .modal-card select, .modal-card textarea {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    width: 100%;
    font-size: 14px;
    outline: none;
}

.modal-card input:focus, .modal-card select:focus, .modal-card textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
}

.code-block {
    background: #0f172a;
    color: #38bdf8;
    padding: 16px;
    border-radius: var(--radius-md);
    font-size: 12px;
    overflow-x: auto;
    line-height: 1.5;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* RESPONSIVE DESIGN FOR SIDEBAR & MOBILE LAYOUT */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 4px 0 24px rgba(15, 23, 42, 0.15);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-wrapper {
        margin-left: 0;
        width: 100%;
    }
    .mobile-toggle-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: var(--radius-md);
        background: #f1f5f9;
    }
    .grid-2 { grid-template-columns: 1fr; }
    .chart-flex { flex-direction: column; }
    .container { padding: 0 16px; margin: 16px auto; }
}
