/* ===================================================================
   GLOBAL ENHANCEMENTS - Applied to All Pages
   Professional styling for dashboard, profile, setup, etc.
   =================================================================== */

/* Dashboard Page Enhancements */
.dashboard-card {
    border-radius: var(--radius-lg);
    border: none;
    background: linear-gradient(135deg, white 0%, var(--gray-50) 100%);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.dashboard-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.dashboard-stat {
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
    border-left: 4px solid;
    transition: all var(--transition-base);
}

.dashboard-stat:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.dashboard-stat.stat-success {
    border-left-color: var(--success-color);
}

.dashboard-stat.stat-warning {
    border-left-color: var(--warning-color);
}

.dashboard-stat.stat-danger {
    border-left-color: var(--danger-color);
}

.dashboard-stat.stat-info {
    border-left-color: var(--info-color);
}

.dashboard-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, currentColor 0%, currentColor 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Chart Containers */
.chart-container {
    padding: var(--space-lg);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* Setup/Onboarding Page Enhancements */
.setup-step {
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, white 0%, var(--gray-50) 100%);
    border: 2px solid var(--gray-200);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.setup-step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    transform: scaleY(0);
    transition: transform var(--transition-base);
}

.setup-step.active::before {
    transform: scaleY(1);
}

.setup-step.completed {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: var(--success-color);
}

.setup-step-number {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: var(--shadow-md);
}

.setup-step.completed .setup-step-number {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
}

/* Profile Page Enhancements */
.profile-section {
    margin-bottom: var(--space-xl);
}

.profile-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: var(--space-2xl);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-lg);
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-lg);
}

.profile-card {
    border-radius: var(--radius-lg);
    border: none;
    background: white;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.profile-card-header {
    background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
    padding: var(--space-lg);
    border-bottom: 2px solid var(--gray-200);
    font-weight: 600;
    color: var(--gray-800);
}

.setting-row {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--gray-100);
    transition: background var(--transition-base);
}

.setting-row:last-child {
    border-bottom: none;
}

.setting-row:hover {
    background: var(--gray-50);
}

.setting-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: var(--space-xs);
}

.setting-description {
    font-size: 0.813rem;
    color: var(--gray-500);
}

/* Categories Page Enhancements */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.category-card {
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 2px solid var(--gray-200);
    background: white;
    transition: all var(--transition-base);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, currentColor 0%, currentColor 100%);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.category-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-sm);
}

.category-name {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-xs);
}

.category-description {
    font-size: 0.813rem;
    color: var(--gray-500);
    line-height: 1.5;
}

/* Analytics Page Enhancements */
.analytics-filter-bar {
    background: linear-gradient(135deg, white 0%, var(--gray-50) 100%);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-xl);
}

.metric-card {
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    background: white;
    border: 2px solid var(--gray-100);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
}

.metric-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}

.metric-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
    margin-top: var(--space-sm);
}

.metric-change {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.813rem;
    font-weight: 500;
    margin-top: var(--space-sm);
}

.metric-change.positive {
    background: #d1fae5;
    color: #065f46;
}

.metric-change.negative {
    background: #fee2e2;
    color: #991b1b;
}

/* File Upload Zone */
.upload-zone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    text-align: center;
    transition: all var(--transition-base);
    background: linear-gradient(135deg, white 0%, var(--gray-50) 100%);
    cursor: pointer;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    box-shadow: var(--shadow-md);
    transform: scale(1.02);
}

.upload-zone-icon {
    font-size: 3rem;
    color: var(--gray-400);
    margin-bottom: var(--space-lg);
    transition: all var(--transition-base);
}

.upload-zone:hover .upload-zone-icon {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Progress Bars */
.progress {
    height: 0.75rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.5);
}

.progress-bar.bg-success {
    background: linear-gradient(90deg, var(--success-color) 0%, #059669 100%);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.progress-bar.bg-warning {
    background: linear-gradient(90deg, var(--warning-color) 0%, #d97706 100%);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.progress-bar.bg-danger {
    background: linear-gradient(90deg, var(--danger-color) 0%, #dc2626 100%);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

/* List Groups */
.list-group-item {
    border-color: var(--gray-200);
    transition: all var(--transition-base);
}

.list-group-item:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    transform: translateX(4px);
}

.list-group-item.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

/* Dropdown Menus */
.dropdown-menu {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: var(--space-sm);
}

.dropdown-item {
    border-radius: var(--radius-sm);
    padding: var(--space-sm) var(--space-md);
    transition: all var(--transition-fast);
    font-weight: 500;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, var(--primary-subtle) 0%, #dbeafe 100%);
    color: var(--primary-color);
    transform: translateX(4px);
}

.dropdown-divider {
    border-color: var(--gray-200);
}

/* Breadcrumbs */
.breadcrumb {
    background: transparent;
    padding: var(--space-md) 0;
}

.breadcrumb-item a {
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--gray-900);
    font-weight: 600;
}

/* Tooltips */
.tooltip {
    font-family: var(--font-sans);
    font-size: 0.813rem;
    font-weight: 500;
}

.tooltip-inner {
    background: var(--gray-900);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    box-shadow: var(--shadow-lg);
}

/* Popovers */
.popover {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.popover-header {
    background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Tabs */
.nav-tabs {
    border-bottom: 2px solid var(--gray-200);
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--gray-600);
    font-weight: 500;
    padding: var(--space-md) var(--space-lg);
    transition: all var(--transition-base);
}

.nav-tabs .nav-link:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-light);
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: transparent;
}

/* Pills */
.nav-pills .nav-link {
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-lg);
    transition: all var(--transition-base);
    font-weight: 500;
}

.nav-pills .nav-link:hover {
    background: var(--gray-100);
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: var(--shadow-sm);
}

/* Spinners */
.spinner-border,
.spinner-grow {
    border-width: 0.2em;
}

/* Loading State */
.loading-shimmer {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Empty States */
.empty-state {
    padding: var(--space-2xl);
    text-align: center;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
    border: 2px dashed var(--gray-300);
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--gray-300);
    margin-bottom: var(--space-lg);
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-sm);
}

.empty-state-description {
    color: var(--gray-500);
    margin-bottom: var(--space-lg);
}

/* Skeleton Loaders */
.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 0%, var(--gray-200) 50%, var(--gray-100) 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: var(--space-sm);
}

.skeleton-title {
    height: 1.5rem;
    margin-bottom: var(--space-md);
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .dashboard-stat-number {
        font-size: 2rem;
    }
    
    .metric-value {
        font-size: 1.5rem;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-header {
        padding: var(--space-lg);
        text-align: center;
    }
    
    .profile-avatar {
        width: 80px;
        height: 80px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .dropdown {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
    
    body {
        background: white;
    }
}

/* ===================================================================
   EXPENSE GRID ENHANCEMENTS
   =================================================================== */

/* Enhanced frame borders for better visibility */
.card, .expense-card-frame {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s ease;
}

.card:hover, .expense-card-frame:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

/* Specific styling for HIZLI ISLEMLER frame (Quick Actions) */
.quick-actions-frame, [data-frame="quick-actions"] {
    border: 2px solid #0d6efd;
    border-left: 4px solid #0d6efd;
    background: linear-gradient(to right, rgba(13,110,253,0.02), transparent);
}

.quick-actions-frame .card-header, [data-frame="quick-actions"] .card-header {
    background-color: rgba(13,110,253,0.1);
    border-bottom: 2px solid #0d6efd;
    font-weight: 600;
}

/* Enhanced headers for all frames */
.card-header {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

/* Horizontal scroll wrapper for tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive .table {
    min-width: 1200px; /* Ensure table doesn't collapse */
    white-space: nowrap; /* Prevent text wrapping in cells */
}

/* Sticky first column (optional - for better UX) */
.expense-table thead th:first-child,
.expense-table tbody td:first-child {
    position: sticky;
    left: 0;
    background-color: white;
    z-index: 10;
}

.expense-table thead th:first-child {
    z-index: 11; /* Higher than body cells */
}

/* Sticky checkbox column for bulk actions */
.expense-table thead th:nth-child(1),
.expense-table tbody td:nth-child(1) {
    position: sticky;
    left: 0;
    background-color: white;
    z-index: 10;
}

.expense-table thead th:nth-child(1) {
    z-index: 11;
}

/* Shadow on sticky column */
.expense-table thead th:first-child::after,
.expense-table tbody td:first-child::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to right, rgba(0,0,0,0.05), transparent);
    pointer-events: none;
}

/* ===================================================================
   Microsoft Login Button Styling
   =================================================================== */

.btn-microsoft {
    background: linear-gradient(135deg, #00a4ef 0%, #0078d4 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.2);
}

.btn-microsoft:hover {
    background: linear-gradient(135deg, #0078d4 0%, #005a9e 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
    transform: translateY(-2px);
}

.btn-microsoft:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 120, 212, 0.2);
}

.btn-microsoft:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.3);
}

/* Google button styling for consistency */
.btn-google {
    background: linear-gradient(135deg, #ea4335 0%, #c5221f 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(234, 67, 53, 0.2);
}

.btn-google:hover {
    background: linear-gradient(135deg, #c5221f 0%, #a50e0e 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(234, 67, 53, 0.3);
    transform: translateY(-2px);
}

.btn-google:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(234, 67, 53, 0.2);
}

.btn-google:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(234, 67, 53, 0.3);
}

/* Modal Z-Index Fixes - Ensure modals appear above navbar */
#addExpenseModal {
    z-index: 1060 !important;
}

#addExpenseModal .modal-backdrop {
    z-index: 1059 !important;
}

/* Ensure all modal backdrops are below modals */
.modal {
    z-index: 1060 !important;
}

.modal-backdrop {
    z-index: 1059 !important;
}

