/* ============================================
   Hisse Senedi Takip Sistemi - Ana Stil Dosyası
   Modern, Responsive, Dark Mode Destekli
   ============================================ */

/* CSS Variables - Light Theme */
:root {
    /* Primary Colors */
    --primary-50: #EEF2FF;
    --primary-100: #E0E7FF;
    --primary-200: #C7D2FE;
    --primary-300: #A5B4FC;
    --primary-400: #818CF8;
    --primary-500: #6366F1;
    --primary-600: #4F46E5;
    --primary-700: #4338CA;
    --primary-800: #3730A3;
    --primary-900: #312E81;

    /* Success Colors */
    --success-50: #ECFDF5;
    --success-100: #D1FAE5;
    --success-500: #10B981;
    --success-600: #059669;
    --success-700: #047857;

    /* Danger Colors */
    --danger-50: #FEF2F2;
    --danger-100: #FEE2E2;
    --danger-500: #EF4444;
    --danger-600: #DC2626;
    --danger-700: #B91C1C;

    /* Warning Colors */
    --warning-50: #FFFBEB;
    --warning-100: #FEF3C7;
    --warning-500: #F59E0B;
    --warning-600: #D97706;

    /* Neutral Colors */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Theme Variables */
    --bg-primary: #F8FAFC;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F1F5F9;
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --border-color: #B8C0CC;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Sidebar */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --sidebar-bg: linear-gradient(180deg, #1E1B4B 0%, #312E81 50%, #3730A3 100%);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-tertiary: #334155;
    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #64748B;
    --border-color: #334155;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4);
    --sidebar-bg: linear-gradient(180deg, #0F0D1A 0%, #1A1744 50%, #231F54 100%);
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   SIDEBAR STYLES
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: width var(--transition-base), transform var(--transition-base);
    overflow: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo i {
    font-size: 1.75rem;
    background: linear-gradient(135deg, #818CF8, #C084FC);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar.collapsed .logo span {
    display: none;
}

.sidebar-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-item i {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
    color: white;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.8), rgba(139, 92, 246, 0.8));
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: white;
    border-radius: 0 4px 4px 0;
}

.sidebar.collapsed .nav-item span {
    display: none;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #818CF8, #C084FC);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-role {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

.sidebar.collapsed .user-details {
    display: none;
}

/* ============================================
   MAIN CONTENT STYLES
   ============================================ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left var(--transition-base);
}

.sidebar.collapsed+.main-content {
    margin-left: var(--sidebar-collapsed-width);
}

.top-header {
    background: var(--bg-secondary);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 8px;
}

.header-search {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.header-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.header-search input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.header-search input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-100);
}

[data-theme="dark"] .header-search input:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-btn {
    width: 42px;
    height: 42px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    position: relative;
}

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

.header-btn .badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--danger-500);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.content-wrapper {
    padding: 24px;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 4px;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition-fast);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

/* Stat Cards */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: var(--transition-fast);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-400));
}

.stat-card.success::before {
    background: linear-gradient(90deg, var(--success-500), var(--success-600));
}

.stat-card.danger::before {
    background: linear-gradient(90deg, var(--danger-500), var(--danger-600));
}

.stat-card.warning::before {
    background: linear-gradient(90deg, var(--warning-500), var(--warning-600));
}

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

.stat-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: var(--primary-100);
    color: var(--primary-600);
}

.stat-card.success .stat-card-icon {
    background: var(--success-100);
    color: var(--success-600);
}

.stat-card.danger .stat-card-icon {
    background: var(--danger-100);
    color: var(--danger-600);
}

.stat-card.warning .stat-card-icon {
    background: var(--warning-100);
    color: var(--warning-600);
}

[data-theme="dark"] .stat-card-icon {
    background: rgba(99, 102, 241, 0.2);
}

[data-theme="dark"] .stat-card.success .stat-card-icon {
    background: rgba(16, 185, 129, 0.2);
}

[data-theme="dark"] .stat-card.danger .stat-card-icon {
    background: rgba(239, 68, 68, 0.2);
}

.stat-card-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.stat-card-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.stat-card-change.positive {
    background: var(--success-100);
    color: var(--success-700);
}

.stat-card-change.negative {
    background: var(--danger-100);
    color: var(--danger-700);
}

[data-theme="dark"] .stat-card-change.positive {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-500);
}

[data-theme="dark"] .stat-card-change.negative {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-500);
}

/* ============================================
   TABLES
   ============================================ */
.table-container {
    overflow-x: auto;
}

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

.data-table th,
.data-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.data-table td {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.data-table tbody tr {
    transition: var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--bg-tertiary);
}

.data-table .text-right {
    text-align: right;
}

.data-table .text-center {
    text-align: center;
}

/* Stock Symbol */
.stock-symbol {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.stock-symbol-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
}

.stock-symbol-info {
    display: flex;
    flex-direction: column;
}

.stock-symbol-code {
    font-weight: 600;
    color: var(--text-primary);
}

.stock-symbol-name {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Price Display */
.price-display {
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.price-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 0.9rem;
}

.price-change.positive {
    color: var(--success-500);
}

.price-change.negative {
    color: var(--danger-500);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-500), var(--success-600));
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--success-600), var(--success-700));
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-500), var(--danger-600));
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
    background: linear-gradient(135deg, var(--danger-600), var(--danger-700));
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary-500);
    color: var(--primary-500);
    background: var(--primary-50);
}

[data-theme="dark"] .btn-outline:hover {
    background: rgba(99, 102, 241, 0.1);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-md);
}

.btn-icon.btn-sm {
    width: 32px;
    height: 32px;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px var(--primary-100);
}

[data-theme="dark"] .form-control:focus {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236B7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-control {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.input-group .btn {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.form-hint {
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================
   BADGES & TAGS
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-buy {
    background: var(--success-100);
    color: var(--success-700);
}

.badge-sell {
    background: var(--danger-100);
    color: var(--danger-700);
}

.badge-pending {
    background: var(--warning-100);
    color: var(--warning-600);
}

[data-theme="dark"] .badge-buy {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-500);
}

[data-theme="dark"] .badge-sell {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-500);
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: var(--transition-base);
    box-shadow: var(--shadow-xl);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--danger-500);
    color: white;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    min-width: 320px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    background: var(--success-100);
    color: var(--success-600);
}

.toast.error .toast-icon {
    background: var(--danger-100);
    color: var(--danger-600);
}

.toast.warning .toast-icon {
    background: var(--warning-100);
    color: var(--warning-600);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.toast-message {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ============================================
   CHARTS CONTAINER
   ============================================ */
.chart-container {
    position: relative;
    height: 300px;
    padding: 16px;
}

/* ============================================
   GRID LAYOUTS
   ============================================ */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* ============================================
   BANK CARDS
   ============================================ */
.bank-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.bank-card {
    background: linear-gradient(135deg, var(--card-color, var(--primary-600)) 0%, color-mix(in srgb, var(--card-color, var(--primary-600)) 80%, black) 100%);
    border-radius: var(--radius-xl);
    padding: 24px;
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: var(--transition-fast);
}

.bank-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
}

.bank-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.bank-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.bank-card-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.bank-card-name {
    font-size: 1.1rem;
    font-weight: 600;
    opacity: 0.9;
}

.bank-card-balance {
    margin-top: auto;
}

.bank-card-balance-label {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 4px;
}

.bank-card-balance-amount {
    font-size: 1.75rem;
    font-weight: 700;
}

/* ============================================
   TRANSACTION TYPE TABS
   ============================================ */
.transaction-tabs {
    display: flex;
    gap: 8px;
    padding: 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.transaction-tab {
    flex: 1;
    padding: 12px 24px;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.transaction-tab.active {
    background: var(--bg-secondary);
    color: var(--primary-600);
    box-shadow: var(--shadow-sm);
}

.transaction-tab:hover:not(.active) {
    color: var(--text-primary);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-muted);
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state-text {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-500);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
}

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

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

[data-theme="dark"] .loading-overlay {
    background: rgba(15, 23, 42, 0.8);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1200px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .sidebar-toggle {
        display: none;
    }
}

@media (max-width: 768px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .content-wrapper {
        padding: 16px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .stat-cards {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .header-search {
        display: none;
    }

    .toast-container {
        top: auto;
        bottom: 24px;
        left: 16px;
        right: 16px;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }

    .data-table {
        font-size: 0.85rem;
    }

    .data-table th,
    .data-table td {
        padding: 12px 8px;
    }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-success {
    color: var(--success-500) !important;
}

.text-danger {
    color: var(--danger-500) !important;
}

.text-warning {
    color: var(--warning-500) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-primary {
    color: var(--primary-500) !important;
}

.bg-success {
    background-color: var(--success-500) !important;
}

.bg-danger {
    background-color: var(--danger-500) !important;
}

.bg-warning {
    background-color: var(--warning-500) !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.fw-semibold {
    font-weight: 600 !important;
}

.fw-medium {
    font-weight: 500 !important;
}

.text-center {
    text-align: center !important;
}

.text-right {
    text-align: right !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: 8px !important;
}

.mb-2 {
    margin-bottom: 16px !important;
}

.mb-3 {
    margin-bottom: 24px !important;
}

.mb-4 {
    margin-bottom: 32px !important;
}

.mt-0 {
    margin-top: 0 !important;
}

.mt-1 {
    margin-top: 8px !important;
}

.mt-2 {
    margin-top: 16px !important;
}

.mt-3 {
    margin-top: 24px !important;
}

.d-flex {
    display: flex !important;
}

.align-center {
    align-items: center !important;
}

.justify-between {
    justify-content: space-between !important;
}

.justify-center {
    justify-content: center !important;
}

.gap-1 {
    gap: 8px !important;
}

.gap-2 {
    gap: 16px !important;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 992px) {

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

@media (max-width: 576px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Transaction Tabs */
.transaction-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.transaction-tab {
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.transaction-tab:hover {
    border-color: var(--primary-500);
    color: var(--primary-500);
}

.transaction-tab.active {
    background: var(--primary-500);
    color: white;
    border-color: var(--primary-500);
}

/* Active Bank Card */
.bank-card.active {
    transform: scale(1.02);
    box-shadow: 0 0 0 3px var(--primary-500), var(--shadow-lg);
}

/* Print Styles */
@media print {

    .sidebar,
    .top-header,
    .page-header>div:last-child,
    .btn,
    button,
    .no-print {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .data-table th,
    .data-table td {
        padding: 8px !important;
    }
}

/* Card Footer */
.card-footer {
    padding: 12px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

/* P3 Padding */
.p-3 {
    padding: 24px !important;
}

/* Flex Wrap */
.flex-wrap {
    flex-wrap: wrap !important;
}

/* Notification Dropdown */
.notification-wrapper {
    position: relative;
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    max-height: 450px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    display: none;
    overflow: hidden;
    margin-top: 8px;
}

.notification-dropdown.active {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.notification-header .btn-text {
    background: none;
    border: none;
    color: var(--primary-500);
    cursor: pointer;
    font-size: 0.85rem;
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    padding: 12px 16px;
    display: flex;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-fast);
}

.notification-item:hover {
    background: var(--bg-tertiary);
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-item.info .notification-icon {
    background: var(--primary-100);
    color: var(--primary-600);
}

.notification-item.success .notification-icon {
    background: var(--success-100);
    color: var(--success-600);
}

.notification-item.warning .notification-icon {
    background: var(--warning-100);
    color: var(--warning-600);
}

.notification-item.error .notification-icon {
    background: var(--danger-100);
    color: var(--danger-600);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.notification-message {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.notification-empty i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.notification-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.notification-footer a {
    color: var(--primary-500);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.notification-footer a:hover {
    text-decoration: underline;
}

/* Stock Logo */
.stock-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

.stock-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

/* Price Change */
.price-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
}

.price-change.positive {
    background: var(--success-100);
    color: var(--success-600);
}

.price-change.negative {
    background: var(--danger-100);
    color: var(--danger-600);
}

.price-change i {
    font-size: 0.75rem;
}

[data-theme="dark"] .price-change.positive {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

[data-theme="dark"] .price-change.negative {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Font Weight */
.fw-bold {
    font-weight: 700 !important;
}

.fw-semibold {
    font-weight: 600 !important;
}

/* Toggle Label */
.toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    user-select: none;
}

.toggle-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-500);
    cursor: pointer;
}

.toggle-label span {
    white-space: nowrap;
}

.toggle-label:hover {
    color: var(--text-primary);
}

/* Justify */
.justify-between {
    justify-content: space-between;
}

/* ============================================
   RESPONSIVE - TABLET (max-width: 1024px)
   ============================================ */
@media screen and (max-width: 1024px) {
    :root {
        --sidebar-width: 220px;
    }
    
    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .content-wrapper {
        padding: 16px;
    }
    
    .card-body {
        padding: 16px;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
}

/* ============================================
   RESPONSIVE - MOBILE (max-width: 768px)
   ============================================ */
@media screen and (max-width: 768px) {
    /* Sidebar - mobilde gizle */
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        z-index: 2000;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    /* Sidebar açıkken overlay */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1999;
        opacity: 0;
        transition: opacity var(--transition-base);
    }
    
    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }
    
    /* Main content - tam genişlik */
    .main-content {
        margin-left: 0 !important;
        width: 100%;
    }
    
    /* Mobile menu toggle göster */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: var(--radius-md);
        background: var(--bg-tertiary);
    }
    
    /* Sidebar toggle gizle */
    .sidebar-toggle {
        display: none;
    }
    
    /* Header düzeni */
    .top-header {
        padding: 12px 16px;
        gap: 12px;
    }
    
    .header-search {
        max-width: none;
        flex: 1;
    }
    
    .header-search input {
        padding: 10px 12px 10px 40px;
        font-size: 0.85rem;
    }
    
    .header-actions {
        gap: 4px;
    }
    
    .header-btn {
        width: 38px;
        height: 38px;
    }
    
    /* Content wrapper */
    .content-wrapper {
        padding: 12px;
    }
    
    /* Page header */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 16px;
    }
    
    .page-title {
        font-size: 1.35rem;
    }
    
    /* Stat cards - tek sütun */
    .stat-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-card-value {
        font-size: 1.5rem;
    }
    
    /* Cards */
    .card {
        border-radius: var(--radius-md);
    }
    
    .card-header {
        padding: 14px 16px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .card-body {
        padding: 14px 16px;
    }
    
    /* Tables - horizontal scroll */
    .table-container {
        margin: 0 -16px;
        padding: 0 16px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table {
        min-width: 600px;
    }
    
    .data-table th,
    .data-table td {
        padding: 12px 10px;
        font-size: 0.85rem;
    }
    
    .stock-symbol-icon {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
    
    .btn-sm {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-control {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    
    /* Modals */
    .modal {
        width: 95%;
        max-height: 85vh;
        border-radius: var(--radius-lg);
    }
    
    .modal-header {
        padding: 16px;
    }
    
    .modal-body {
        padding: 16px;
        max-height: calc(85vh - 120px);
    }
    
    .modal-footer {
        padding: 12px 16px;
        flex-wrap: wrap;
    }
    
    .modal-footer .btn {
        flex: 1;
        min-width: 120px;
    }
    
    /* Toast */
    .toast-container {
        top: auto;
        bottom: 16px;
        right: 16px;
        left: 16px;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
    
    /* Notifications dropdown */
    .notification-dropdown {
        right: -50px;
        width: calc(100vw - 32px);
        max-width: 360px;
    }
    
    /* Charts */
    .chart-container {
        height: 250px;
    }
    
    /* Grid layouts */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr !important;
    }
    
    /* Quick actions */
    .quick-actions {
        flex-wrap: wrap;
    }
    
    .quick-actions .btn {
        flex: 1 1 calc(50% - 8px);
        min-width: 140px;
    }
}

/* ============================================
   RESPONSIVE - SMALL MOBILE (max-width: 480px)
   ============================================ */
@media screen and (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .top-header {
        padding: 10px 12px;
    }
    
    .header-search {
        display: none;
    }
    
    /* Küçük ekranda arama için özel durum */
    .header-search.mobile-visible {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 12px;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
    }
    
    .content-wrapper {
        padding: 10px;
    }
    
    .page-title {
        font-size: 1.2rem;
    }
    
    .stat-card {
        padding: 14px;
    }
    
    .stat-card-value {
        font-size: 1.35rem;
    }
    
    .stat-card-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    /* Table için card view */
    .data-table {
        min-width: 500px;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 8px;
        font-size: 0.8rem;
    }
    
    /* Buttons inline */
    .btn-group-mobile {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-group-mobile .btn {
        width: 100%;
    }
    
    /* Card headers */
    .card-header {
        padding: 12px 14px;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .card-body {
        padding: 12px 14px;
    }
    
    /* User info in sidebar */
    .user-info {
        padding: 10px;
    }
    
    .user-avatar {
        width: 36px;
        height: 36px;
    }
    
    /* Notifications */
    .notification-dropdown {
        right: 0;
        left: 0;
        width: 100vw;
        max-width: none;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
    
    /* Modal full width */
    .modal {
        width: 100%;
        max-width: 100%;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        max-height: 90vh;
    }
    
    .modal-overlay.active .modal {
        transform: translateY(0);
    }
}

/* ============================================
   UTILITY CLASSES FOR MOBILE
   ============================================ */
/* Mobile'da gizle */
.hide-mobile {
    display: block;
}

@media screen and (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
    
    .show-mobile {
        display: block !important;
    }
}

/* Desktop'ta gizle */
.show-mobile {
    display: none;
}

/* Touch-friendly spacing */
@media (hover: none) and (pointer: coarse) {
    .nav-item {
        padding: 16px 18px;
    }
    
    .btn {
        min-height: 44px;
    }
    
    .btn-sm {
        min-height: 36px;
    }
    
    .form-control {
        min-height: 44px;
    }
}

/* Landscape phone */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .modal {
        max-height: 95vh;
    }
    
    .modal-body {
        max-height: calc(95vh - 100px);
    }
    
    .sidebar {
        width: 260px;
    }
}

/* Print styles */
@media print {
    .sidebar,
    .top-header,
    .mobile-menu-toggle,
    .header-actions {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .content-wrapper {
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
