/* Font import moved to header.php — IBM Plex Sans is the active font */

/* --- TEMA DEĞİŞKENLERİ --- */
:root {
    /* Corporate dark color system */
    --color-background: #0F141A;
    --color-surface: #161D27;
    --color-card: #1C2531;
    --color-border: #2D3A4C;
    --color-primary-action: #2F6FED;
    --color-secondary-action: #3E4B60;
    --color-success: #3DBA84;
    --color-danger: #E66978;
    --color-warning: #B8862F;
    --color-info: #66A8FF;

    /* Legacy aliases used across app styles */
    --primary: var(--color-primary-action);
    --secondary: var(--color-secondary-action);
    --primary-glow: rgba(47, 111, 237, 0.28);
    --bg-body: var(--color-background);
    --glass: var(--color-surface);
    --border: var(--color-border);
    --border-hover: #3A4A5F;
    --text-main: #EAF0F7;
    --text-muted: #A9B7C8;
    --input-bg: var(--color-surface);
    --modal-bg: var(--color-card);
    --success: var(--color-success);
    --danger: var(--color-danger);
    --warning: var(--color-warning);
    --info: var(--color-info);

    --radius-s: 8px;
    --radius-m: 12px;
    --radius-l: 16px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28);
    --shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.24);
    --shadow-glow: none;
    --font: 'IBM Plex Sans', 'Plus Jakarta Sans', sans-serif;
    --nav-height: 85px;
    --card-shadow: var(--shadow-sm);
    --card-solid: var(--color-card);
    --card-bg: var(--color-card);
    --dark-bg: var(--color-background);
}

/* Light theme token'ları corporate-redesign.css'de tanımlıdır.
   Bu blok kaldırıldı çünkü dark renkleri light'a zorluyordu. */

/* --- 2. RESET & BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font);
    background-color: var(--bg-body);
    color: var(--text-main);
    padding-bottom: 120px;
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-thumb {
    background: #2a3e5d;
    border-radius: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

/* Tipografi */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: var(--text-main) !important;
    letter-spacing: -0.02em;
}

p {
    color: var(--text-muted);
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

/* Form Elements */
input,
select,
textarea {
    font-family: var(--font);
    width: 100%;
    padding: 16px;
    background: var(--input-bg) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-s);
    color: var(--text-main) !important;
    font-size: 15px;
    transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary) !important;
    background: var(--input-bg);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* --- 3. UTILITIES & ANIMATIONS --- */
.hidden {
    display: none !important;
}

.flex {
    display: flex;
    align-items: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.w-full {
    width: 100%;
}

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

.font-bold {
    font-weight: 700;
}

.text-sm {
    font-size: 13px;
}

.text-xs {
    font-size: 11px;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

/* Effects */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulsePremiumBadge {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* --- 4. LAYOUT COMPONENTS --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

/* Header */
.header {
    background: rgba(11, 20, 32, 0.96);
    border-bottom: 1px solid var(--border);
    padding: 20px 0 30px 0;
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: none;
}

.top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--card-solid);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: white;
    box-shadow: var(--shadow-sm);
}

.user-info {
    min-width: 0;
}

.user-info div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.action-btns {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.welcome-text h1 {
    font-size: 16px;
    font-weight: 700;
}

.welcome-text p {
    font-size: 12px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    animation: slideUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (min-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 2fr 1fr;
    }
}

/* Cards */
.card,
.form-card,
.mini-market-box {
    background: var(--glass) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-m);
    padding: 24px;
    box-shadow: var(--card-shadow);
    color: var(--text-main);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    position: relative;
}

.card:hover {
    border-color: var(--border-hover);
    transform: none;
    box-shadow: var(--shadow-sm);
}

/* Special Cards */
.invest-card {
    background: var(--card-solid);
    position: relative;
    border: 1px solid var(--border);
}

.invest-card::before {
    content: none;
}

/* Typography in Cards */
.big-value {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1.5px;
    color: var(--text-main);
    margin-top: 40px;
}

/* Light Theme Override for Big Value */
.light-theme .big-value {
    color: var(--text-main);
}

.opacity-60 {
    opacity: 0.6;
}

.opacity-70 {
    opacity: 0.7;
}

/* Color Utilities */
.text-success {
    color: var(--success) !important;
}

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

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

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

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

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

/* --- 4. AUTH PAGES --- */
.auth-container {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-image: none;
}

.auth-card {
    background: var(--glass);
    backdrop-filter: none;
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
    padding: 40px;
    border-radius: 30px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    animation: scaleIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.auth-btn {
    width: 100%;
    padding: 16px;
    margin-top: 20px;
    border-radius: 16px;
    border: none;
    background: var(--primary);
    color: white;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.2s ease;
}

.auth-btn:hover {
    transform: none;
    box-shadow: none;
    filter: brightness(0.96);
}

.auth-input:focus {
    transform: scale(1.01);
}

/* --- 6. NAVIGATION (Floating Dock) --- */
.bottom-nav {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass);
    backdrop-filter: none;
    padding: 12px 24px;
    border-radius: 50px;
    display: flex;
    gap: 32px;
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
    z-index: 100;
}

.nav-item {
    color: var(--text-muted);
    font-size: 24px;
    padding: 10px;
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
}

.nav-item:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
    transform: none;
}

.nav-item.active {
    color: var(--primary) !important;
    background: rgba(47, 111, 235, 0.15);
    /* Tint instead of solid */
    box-shadow: none;
    transform: none;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
}

/* --- 7. TRANSACTIONS LIST --- */
.tx-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dashboard-tx-card {
    min-height: 0;
}

.tx-list-scroll {
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.tx-mobile-list-wrap {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.tx-mobile-list {
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.tx-item {
    background: var(--glass);
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tx-item:hover {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.tx-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.05);
    margin-right: 15px;
}

.light-theme .tx-icon {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary);
}

/* --- 8. CHAT & MODALS --- */
.chat-fab {
    position: fixed;
    bottom: 110px;
    right: 25px;
    width: 56px;
    height: 56px;
    display: none;
    /* Default hidden, JS adds inline display:flex on login */
    background: var(--primary);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: var(--shadow-sm);
    z-index: 90;
    transition: transform 0.2s;
    animation: none;
}

.chat-fab:hover {
    transform: none;
    filter: brightness(0.96);
}

.chat-window {
    position: fixed;
    bottom: 110px;
    right: 25px;
    width: 380px;
    height: 600px;
    background: var(--modal-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    z-index: 95;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-window.active {
    display: flex !important;
}

/* Modals */
.custom-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    /* Always dark overlay */
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.custom-modal.active {
    display: flex;
    animation: fadeIn 0.2s;
}

/* Modal Content Fix */
.modal-content {
    background: var(--glass) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--card-shadow);
    color: var(--text-main);
    width: 100%;
    max-width: 480px;
    border-radius: 24px;
    padding: 24px;
    overflow: visible;
    animation: slideUp 0.3s;
}

/* --- 9. MOBILE OPTIMIZATIONS --- */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header {
        padding-bottom: 20px;
        text-align: center;
    }

    .auth-card {
        padding: 30px 20px;
    }

    .bottom-nav {
        width: 90%;
        gap: 20px;
        justify-content: space-around;
    }

    .chat-window {
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 85vh !important;
        border-radius: 24px 24px 0 0;
    }
}

/* --- 10. NOTIFICATION / TOAST --- */
#toast {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translate(-50%, -200%);
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 40px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    z-index: 11000;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.show-toast {
    transform: translate(-50%, 0) !important;
}

/* Extra Utilities needed for JS compatibility */
.chip-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
    margin-bottom: 5px;
    /* Prevent overlap on wrap */
    flex-shrink: 0;
}

.light-theme .chip-btn {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.light-theme .chip-btn:hover {
    background: var(--bg-body);
}

.chip-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.glass-btn {
    background: var(--glass);
    backdrop-filter: blur(4px);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
}

/* --- 11. BUDGET & PROGRESS BARS --- */
/* --- 11. BUDGET & PROGRESS BARS --- */
.budget-bar-container {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-m);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    position: relative;
    backdrop-filter: blur(10px);
    margin-top: 5px;
    /* Added spacing */
}

.budget-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.budget-progress-track {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.budget-progress-fill {
    height: 100%;
    border-radius: 20px;
    width: 0%;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--primary);
    box-shadow: none;
}

/* --- 12. PLAN SELECTION (Auth) --- */
.plan-selection-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.plan-card {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid transparent;
    border-radius: 20px;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.plan-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: none;
}

.plan-card.active {
    background: rgba(47, 111, 235, 0.14);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.plan-card .icon-wrapper {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
    transition: 0.3s;
}

.plan-card.active .icon-wrapper {
    background: var(--primary);
    color: white;
    transform: none;
}

/* Special Corporate Card */
.plan-card#cardCorporate.active {
    background: rgba(197, 138, 43, 0.12);
    border-color: var(--warning);
    box-shadow: var(--shadow-sm);
}

.plan-card#cardCorporate.active .icon-wrapper {
    background: var(--warning);
    color: white;
}

.plan-title {
    font-weight: 800;
    font-size: 15px;
    margin-bottom: 5px;
    color: var(--text-main);
}

.plan-desc {
    font-size: 12px;
    opacity: 0.7;
    color: var(--text-muted);
}

.plan-badge {
    position: absolute;
    top: -1px;
    right: -1px;
    background: var(--warning);
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 0 18px 0 8px;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
}

/* --- 13. NOTIFICATION SHEET --- */
.app-notification-sheet {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.app-notification-sheet.active {
    display: flex;
}

.sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s;
}

.app-notification-sheet.active .sheet-backdrop {
    opacity: 1;
}

.sheet-content {
    background: var(--card-solid);
    width: 100%;
    max-width: 550px;
    border-radius: 32px 32px 0 0;
    padding: 10px 25px 40px 25px;
    z-index: 2;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-top: 1px solid var(--border);
    box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.5);
}

.app-notification-sheet.active .sheet-content {
    transform: translateY(0);
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin: 12px auto 25px auto;
}

.sheet-icon-box {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-right: 15px;
    color: var(--text-main);
    flex-shrink: 0;
}

.sheet-header-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.sheet-text h4 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 6px;
}

.sheet-text p {
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-muted);
}

.sheet-actions {
    display: flex;
    gap: 12px;
}

.sheet-btn {
    flex: 1;
    padding: 14px;
    border-radius: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    font-size: 15px;
    transition: 0.2s;
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Premium Sheet Extras */
.premium-theme .sheet-content {
    background: var(--card-solid);
    border-top: 1px solid rgba(251, 191, 36, 0.3);
}

.premium-icon-large {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--warning);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    margin: 0 auto 20px auto;
    box-shadow: none;
    animation: none;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* --- 14. MISC COMPONENTS --- */
.currency-list-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.curr-check-item {
    display: flex;
    align-items: center;
    background: var(--glass);
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: 0.2s;
}

.curr-check-item:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.curr-check-item span {
    font-weight: 600;
    font-size: 14px;
    margin-left: 8px;
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    background: transparent;
}

.debt-type-btn {
    flex: 1;
    background: var(--glass);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 12px;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.2s;
}

.debt-type-btn.active#btnVerecek,
.debt-type-btn.active#btnOpAdd {
    background: rgba(204, 75, 75, 0.12);
    border-color: var(--danger);
    color: var(--danger);
    box-shadow: none;
}

.debt-type-btn.active#btnAlacak,
.debt-type-btn.active#btnOpSub {
    background: rgba(46, 155, 98, 0.12);
    border-color: var(--success);
    color: var(--success);
    box-shadow: none;
}

/* --- 15. HOME FILTER BAR --- */
.list-header {
    flex-shrink: 0;
}

.home-filter-bar {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 10px;
    margin-bottom: 15px;
    scrollbar-width: none;
    /* Firefox */
    flex-shrink: 0;
}

.home-filter-bar::-webkit-scrollbar {
    display: none;
}

.h-filter-chip {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    /* Flex centering */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
}

.light-theme .h-filter-chip {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.h-filter-chip.active {
    background: var(--primary) !important;
    color: white !important;
    box-shadow: none;
    border-color: var(--primary);
}

.light-theme .h-filter-chip.active {
    background: var(--primary) !important;
    color: white !important;
}

/* FIX: Input Icon Overlap */
.custom-select-wrapper i,
.modern-input-wrapper i,
.auth-card .fas {
    z-index: 5;
}

.modern-input,
.auth-input {
    padding-left: 45px !important;
}

.light-theme .h-filter-chip:hover {
    background: var(--bg-body);
    border-color: var(--primary);
}

.h-filter-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
    transform: none;
}

.h-filter-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: none;
}

/* --- 16. MODALS & ACTIONS --- */
.custom-modal {
    display: none;
    position: fixed;
    z-index: 13000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* --- 17. FORM CARD STYLES --- */
.form-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

/* Custom Type Selector */
.type-selector-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.type-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.light-theme .type-btn {
    background: white;
    box-shadow: var(--shadow-sm);
}

.type-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.type-btn .type-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

.type-btn span {
    font-size: 13px;
    font-weight: 600;
}

/* Active States */
.type-btn.active#btnTypeExpense {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--danger);
    color: var(--danger);
}

.type-btn.active#btnTypeIncome {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--success);
    color: var(--success);
}

.type-btn.active#btnTypeDebt {
    background: rgba(245, 158, 11, 0.2);
    border-color: var(--warning);
    color: var(--warning);
}

/* Custom Icon Dropdown */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-s);
    cursor: pointer;
    font-size: 15px;
    transition: 0.2s;
}

.custom-select-trigger:hover {
    border-color: var(--primary);
}

.custom-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-top: 8px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: var(--shadow-lg);
}

.custom-options.open {
    display: block;
}

.custom-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.custom-option:last-child {
    border-bottom: none;
}

.custom-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary);
}

.custom-option.selected {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    font-weight: 600;
}

/* Currency Selector */
.currency-select-wrapper {
    position: relative;
}

.currency-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-s);
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
}

.currency-trigger:hover {
    border-color: var(--primary);
}

.currency-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-top: 5px;
    z-index: 100;
    display: none;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.currency-options.open {
    display: block;
}

.curr-option {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.curr-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary);
}

/* Quick Amount Buttons */
.amt-tag {
    flex: 1;
    padding: 10px;
    text-align: center;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
}

.amt-tag:hover {
    transform: none;
    border-color: var(--primary);
    color: white;
    background: rgba(47, 111, 235, 0.18);
    box-shadow: none;
}

/* Main Action Buttons */
.btn-income {
    background: var(--success) !important;
    box-shadow: none !important;
    border: none !important;
    color: white !important;
}

.btn-expense {
    background: var(--danger) !important;
    box-shadow: none !important;
    border: none !important;
    color: white !important;
}

.btn-debt {
    background: var(--secondary) !important;
    box-shadow: none !important;
    border: none !important;
    color: white !important;
}

.btn-income:hover,
.btn-expense:hover,
.btn-debt:hover {
    transform: none;
    opacity: 0.95;
}

/* Main Action Button Base Style */
#addBtn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 16px;
    cursor: pointer;
    transition: 0.3s;
    text-align: center;
    display: block;
    margin-top: 10px;
    /* Gradients are applied via classes .btn-income, etc. */
}

/* Recurring Toggle */
.checkbox-wrapper-2 .tgl-light+.tgl-btn {
    background: var(--card-bg);
    border: 1px solid var(--border);
}

.checkbox-wrapper-2 .tgl-light:checked+.tgl-btn {
    background: var(--primary) !important;
    border: none;
}




.custom-modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-solid);
    padding: 25px;
    border-radius: 24px;
    width: 100%;
    max-width: 400px;
    /* Fixed width to prevent squeeze */
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

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

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
    transition: 0.2s;
}

.modal-close:hover {
    opacity: 1;
    color: var(--danger);
}

.modal-body .form-group {
    margin-bottom: 15px;
}

.modal-body label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    opacity: 0.8;
}

/* Transaction Actions */
.tx-actions {
    display: flex;
    gap: 15px;
    /* Increased gap */
    margin-top: 5px;
}

.tx-action-btn {
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.2s;
    padding: 5px;
}

.tx-action-btn:hover {
    transform: scale(1.2);
}

.action-edit {
    color: var(--success);
}

/* Green */
.action-delete {
    color: var(--danger);
}

/* Red */

/* Modal Buttons */
.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.modal-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    color: white;
    transition: 0.2s;
}

.modal-btn:hover {
    transform: none;
    box-shadow: none;
}

.btn-cancel {
    background: var(--danger);
}

.btn-save {
    background: var(--primary);
}

/* Privacy Mode Blurs */
body.privacy-mode .money-value,
body.privacy-mode .tx-amount,
body.privacy-mode #cardValue,
body.privacy-mode #totalInc,
body.privacy-mode #totalExp,
body.privacy-mode #totalNet,
body.privacy-mode #cfValue1,
body.privacy-mode .list-card-item b,
/* Subscriptions amount */
body.privacy-mode .list-card-item .text-xs

/* Subscriptions details */
    {
    filter: blur(6px);
    user-select: none;
    transition: filter 0.3s ease;
}

/* --- 18. STATS PAGE LAYOUT --- */
.excel-export-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: none;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.excel-export-btn:hover {
    transform: none;
    box-shadow: none;
    filter: brightness(0.96);
}

.excel-export-btn:disabled {
    background: #4b5563;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.8;
}

.excel-export-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Excel Dropdown Menu */
.excel-dropdown {
    position: relative;
    display: inline-block;
}

.excel-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-m);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    overflow: hidden;
    animation: fadeInDown 0.2s ease;
}

.excel-menu.show {
    display: block;
}

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

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

.excel-menu-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
    transition: all 0.15s ease;
}

.excel-menu-item:hover {
    background: rgba(46, 155, 98, 0.12);
    color: var(--success);
}

.excel-menu-item.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    color: var(--text-muted, #9aa0a6) !important;
}

.excel-menu-item.is-disabled:hover {
    background: transparent !important;
    color: var(--text-muted, #9aa0a6) !important;
}

.excel-menu-item i {
    width: 16px;
    text-align: center;
    opacity: 0.7;
}

.excel-menu-item:hover i {
    opacity: 1;
}

.excel-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}


.stats-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Sidebar Styles (Filters) */
.stats-sidebar {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-m);
    padding: 20px;
    backdrop-filter: blur(10px);
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Content Styles (Charts) */
.stats-content {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-m);
    padding: 20px;
    backdrop-filter: blur(10px);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 400px;
    position: relative;
}

/* Responsive Layout */
@media (min-width: 768px) {
    .stats-container {
        flex-direction: row;
        align-items: flex-start;
    }

    .stats-sidebar {
        width: 260px;
        flex-shrink: 0;
        position: sticky;
        top: 110px;
        /* Adjust based on header height */
    }

    /* Make filters vertical on desktop */
    .advanced-filter-bar {
        flex-direction: column !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }

    .filter-row {
        flex-direction: column;
        width: 100%;
        align-items: stretch !important;
        gap: 10px;
    }

    .filter-group {
        flex-direction: column;
        width: 100%;
        overflow-x: hidden;
    }

    .filter-chip {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .date-picker-group {
        flex-direction: column;
        gap: 5px;
        width: 100%;
    }

    .date-picker-group input {
        width: 100% !important;
    }
}

/* Filter Chip */
.filter-chip {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
}

.filter-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: none;
    color: white;
}

.filter-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: none;
}

/* Debt Button Active State */
.debt-type-btn.active {
    border: 2px solid var(--warning) !important;
    background: rgba(197, 138, 43, 0.12);
    color: var(--warning);
    box-shadow: none;
}

/* --- LIGHT THEME OVERRIDES --- */
.light-theme p,
.light-theme span,
.light-theme label,
.light-theme small,
.light-theme .text-muted {
    color: var(--text-muted);
}

.light-theme h1,
.light-theme h2,
.light-theme h3,
.light-theme h4,
.light-theme h5,
.light-theme h6,
.light-theme b,
.light-theme strong {
    color: var(--text-main);
}

/* Light Theme Inputs */
.light-theme input,
.light-theme select,
.light-theme textarea {
    background: var(--input-bg);
    color: var(--text-main);
    border-color: var(--border);
}

.light-theme input::placeholder {
    color: var(--text-muted);
}

/* Light Theme Chips/Badges fix */
.light-theme .chip-btn,
.light-theme .h-filter-chip {
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--border);
}

.light-theme .h-filter-chip.active {
    color: white;
}

/* Auth Card Light Mode */
.light-theme .auth-card {
    background: var(--card-solid);
    border: 1px solid var(--border);
}

/* --- OKUNABİLİRLİK DÜZELTMELERİ (SONA EKLE) --- */

/* 1. Temel Yazı Rengi Zorlaması */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
div,
label,
li,
small,
strong,
b,
i {
    color: var(--text-main);
}

/* 1.1 Buton İçi Elementlerin Rengini Koruma */
button *,
.btn-income *,
.btn-expense *,
.btn-debt *,
.btn-primary *,
.fab-action *,
.h-filter-chip *,
.modal-btn *,
.sheet-btn *,
.auth-btn *,
.excel-export-btn * {
    color: inherit;
}

/* Specific Market Fix */
.mini-market-box small,
.mini-market-box strong {
    color: var(--text-main) !important;
}

/* 2. Input ve Form Elemanları (En sık kaybolan yerler) */
.modern-input,
.modal-input,
select,
textarea,
input {
    background-color: var(--input-bg) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-main) !important;
    /* Yaz� rengini de�i�kene ba�la */
}

.modern-input::placeholder,
.modal-input::placeholder {
    color: var(--text-muted) !important;
}

/* 3. Kartlar ve Modallar */
.card,
.form-card,
.modal-content,
.sheet-content {
    background: var(--glass) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-main) !important;
}

/* 4. �konlar ve Butonlar */
.fas,
.far,
.fab {
    color: inherit;
    /* �konlar metin rengini als�n */
}

/* Not: Renkli butonlar (Kaydet, Sil) hari� tutulmal�, onlar kendi rengini korusun */
.btn-save,
.btn-primary,
.sheet-btn.btn-primary {
    color: #fff !important;
    /* Dolgu butonlarda yaz� hep beyaz kals�n */
}

.glass-btn,
.chip-btn {
    color: var(--text-main) !important;
    /* �effaf butonlarda yaz� tema renginde olsun */
    background: var(--glass);
    border: 1px solid var(--border);
}

/* 5. Alt Men� (Navbar) */
.bottom-nav {
    background: var(--glass) !important;
    border-top: 1px solid var(--border) !important;
}

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

.nav-item.active {
    color: var(--primary) !important;
}

/* --- FINAL BATCH FIXES --- */
#chatFab {
    display: none;
    /* Hidden by default, JS toggles it */
}

/* --- EKLENTİ ÇAKIŞMA DÜZELTMESİ --- */
/* E-posta kutularının sağına boşluk bırakır, böylece TempMail ikonu yazıyı kapatmaz */
input[type="email"],
#lEmail,
#rEmail,
#fEmail {
    padding-right: 50px !important;
    /* Sağdan 50px boşluk */
    background-origin: content-box;
    /* Arka planı koru */
}

/* --- AUTH ACTIONS --- */
.auth-btn {
    background: var(--primary) !important;
    border: 1px solid var(--primary);
}

.auth-link span,
label[for='lRemember'] {
    color: var(--primary);
    font-weight: 700;
}


/* --- AUTH LINK BUTTONS --- */
.auth-link {
    width: 100%;
    text-align: center;
    margin-top: 15px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.auth-link:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: none;
    border-color: var(--primary);
}


/* --- MARKET DELETE BUTTON FIX --- */
.mini-market-box {
    position: relative !important;
    overflow: visible !important;
}

.del-currency-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.4);
    z-index: 100 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.del-currency-btn:hover {
    transform: scale(1.2);
}

/* --- CHAT BOT STYLES --- */
#chatWindow {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(15px);
}

#chatWindow.active {
    display: flex;
}

.chat-header {
    padding: 15px;
    background: rgba(99, 102, 241, 0.1);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    color: var(--text-main);
}

#chatBody {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: thin;
}

.chat-msg {
    max-width: 85%;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.msg-user {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-radius: 16px 16px 0 16px;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.msg-bot {
    align-self: flex-start;
    background: var(--card-solid);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: 16px 16px 16px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.light-theme .msg-bot {
    background: white;
    color: #1e1b4b;
    border-color: #e2e8f0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

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

/* Chat Footer Styles */
.chat-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
    background: var(--card-solid);
    /* Solid background to hide blur noise */
    display: flex;
    gap: 10px;
    align-items: center;
    position: relative;
    z-index: 10;
}

#chatInput {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 10px 15px;
    border-radius: 24px;
    /* Softer pill shape */
    outline: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

#chatInput:focus {
    box-shadow: 0 0 0 2px var(--primary-glow);
    border-color: var(--primary);
    background: var(--card-solid);
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    font-size: 16px;
    box-shadow: none;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    transform: none;
    filter: brightness(0.96);
}

.chat-send-btn:active {
    transform: none;
}

.close-chat {
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.close-chat:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* --- MODAL BUTTON FIXES --- */
.modal-btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.modal-btn.btn-cancel {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.modal-btn.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.modal-btn.btn-danger {
    background: var(--danger);
    color: white;
    box-shadow: none;
}

.modal-btn.btn-danger:hover {
    filter: brightness(0.96);
    transform: none;
    box-shadow: none;
}

/* Remove Number Input Spinners */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =============================================
   LIGHT THEME — BUTON VE BİLEŞEN DÜZELTMELERİ
   corporate-redesign.css token'larını tamamlar
   ============================================= */

/* Glass btn: light modda arka planı beyaza çevir */
body.light-theme .glass-btn,
body.light-theme .chip-btn {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: #d8e0ea !important;
}

body.light-theme .glass-btn:hover,
body.light-theme .chip-btn:hover {
    background: #f1f5f9 !important;
    border-color: #c4ceda !important;
}

/* Modal butonları — İptal butonu */
body.light-theme .modal-btn.btn-cancel {
    background: #eaf0f7 !important;
    color: #334155 !important;
}

body.light-theme .modal-btn.btn-cancel:hover {
    background: #dde7f2 !important;
    color: #0f172a !important;
}

/* Sheet butonları — Secondary */
body.light-theme .sheet-btn.btn-secondary {
    background: #eaf0f7 !important;
    color: #0f172a !important;
    border-color: #cfd8e4 !important;
}

/* Auth card ve linkler */
body.light-theme .auth-card {
    background: #ffffff !important;
    border-color: #d8e0ea !important;
}

body.light-theme .auth-link {
    background: #f4f7fb !important;
    border-color: #d8e0ea !important;
    color: #334155 !important;
}

body.light-theme .auth-link:hover {
    background: #eaf0f7 !important;
    border-color: var(--primary) !important;
}

body.light-theme .auth-link span {
    color: var(--primary) !important;
}

/* Nav bar */
body.light-theme .bottom-nav {
    background: #ffffff !important;
    border-color: #d8e0ea !important;
}

body.light-theme .nav-item {
    color: #64748b !important;
}

body.light-theme .nav-item:hover {
    background: rgba(15, 23, 42, 0.04) !important;
    color: #0f172a !important;
}

body.light-theme .nav-item.active {
    color: var(--primary) !important;
    background: rgba(29, 78, 216, 0.12) !important;
}

/* Header */
body.light-theme .header {
    background: rgba(255, 255, 255, 0.96) !important;
    border-bottom-color: #d8e0ea !important;
}

body.light-theme .icon-btn {
    color: #334155 !important;
}

body.light-theme .icon-btn:hover {
    background: rgba(15, 23, 42, 0.06) !important;
}

/* Card ve formlarda metin rengi */
body.light-theme .card,
body.light-theme .form-card,
body.light-theme .modal-content,
body.light-theme .sheet-content {
    background: #ffffff !important;
    border-color: #d8e0ea !important;
    color: #0f172a !important;
}

/* Toast */
body.light-theme #toast {
    background: rgba(255, 255, 255, 0.96) !important;
    color: #0f172a !important;
    border-color: #d8e0ea !important;
}

/* Input'lar */
body.light-theme input,
body.light-theme select,
body.light-theme textarea,
body.light-theme .modern-input,
body.light-theme .modal-input {
    background: #f8fafc !important;
    color: #0f172a !important;
    border-color: #d8e0ea !important;
}

body.light-theme input::placeholder,
body.light-theme .modern-input::placeholder,
body.light-theme .modal-input::placeholder {
    color: #64748b !important;
}

body.light-theme input:focus,
body.light-theme select:focus,
body.light-theme textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.15) !important;
}

/* Quick type / debt butonları */
body.light-theme .quick-type-btn {
    background: #ffffff !important;
    color: #334155 !important;
    border-color: #d8e0ea !important;
}

body.light-theme .quick-type-btn.active {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    background: rgba(29, 78, 216, 0.08) !important;
}

body.light-theme .debt-type-btn {
    background: #ffffff !important;
    color: #334155 !important;
    border-color: #d8e0ea !important;
}

body.light-theme .debt-type-btn.active {
    border-color: var(--warning) !important;
    color: var(--warning) !important;
    background: rgba(183, 121, 31, 0.08) !important;
}

/* Amount tags */
body.light-theme .amt-tag {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: #d8e0ea !important;
}

body.light-theme .amt-tag:hover {
    background: #f1f5f9 !important;
    border-color: var(--primary) !important;
}

/* Filter chips */
body.light-theme .filter-chip {
    background: #ffffff !important;
    color: #334155 !important;
    border-color: #d8e0ea !important;
}

body.light-theme .filter-chip.active {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
}

/* TX item hover */
body.light-theme .tx-item {
    background: #ffffff !important;
    border-color: #d8e0ea !important;
}

body.light-theme .tx-item:hover {
    background: #f8fafc !important;
    border-color: #c4ceda !important;
}

/* TX icon */
body.light-theme .tx-icon {
    background: rgba(29, 78, 216, 0.08) !important;
    color: var(--primary) !important;
}

/* Scrollbar */
body.light-theme ::-webkit-scrollbar-thumb {
    background: #c4ceda;
}

/* Data filter disclosure */
body.light-theme .data-filter-disclosure,
body.light-theme .stats-filter-disclosure {
    background: #f8fafc !important;
    border-color: #d8e0ea !important;
}

/* Disclosure / Accordion panels */
body.light-theme .disclosure-toggle {
    color: #0f172a !important;
}

body.light-theme .disclosure-subtitle {
    color: #64748b !important;
}

body.light-theme .disclosure-body {
    border-top-color: #d8e0ea !important;
}

/* Chat window light */
body.light-theme #chatWindow {
    background: #ffffff !important;
    border-color: #d8e0ea !important;
}

body.light-theme .chat-header {
    background: rgba(29, 78, 216, 0.06) !important;
    color: #0f172a !important;
    border-bottom-color: #d8e0ea !important;
}

body.light-theme .chat-footer {
    background: #ffffff !important;
    border-top-color: #d8e0ea !important;
}

/* Modals backdrop — darker for visibility */
body.light-theme .custom-modal {
    background: rgba(15, 23, 42, 0.25) !important;
}

/* Page kicker */
body.light-theme .page-kicker {
    color: #64748b !important;
}

/* User avatar */
body.light-theme .user-avatar {
    background: #eaf0f7 !important;
    border-color: #d8e0ea !important;
    color: #334155 !important;
}

/* Big value readability */
body.light-theme .big-value {
    color: #0f172a !important;
}

/* Invest card / asset card — income/expense colors */
body.light-theme .sum-income {
    color: #16a34a !important;
}

body.light-theme .sum-expense {
    color: #dc2626 !important;
}

/* Ensure primary colored buttons remain contrast-safe */
body.light-theme .btn-primary,
body.light-theme .sheet-btn.btn-primary,
body.light-theme .modal-btn.btn-save,
body.light-theme .auth-btn,
body.light-theme #addBtn {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
}

body.light-theme .btn-danger,
body.light-theme .modal-btn.btn-danger,
body.light-theme .sheet-btn.btn-danger {
    background: var(--danger) !important;
    color: #ffffff !important;
    border-color: var(--danger) !important;
}

/* FAB buttons — always high contrast */
body.light-theme .fab-main {
    background: var(--primary) !important;
    color: #ffffff !important;
}

body.light-theme .fab-action {
    color: #ffffff !important;
}

/* Excel export button */
body.light-theme .excel-export-btn {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: #d8e0ea !important;
}

body.light-theme .excel-menu {
    background: #ffffff !important;
    border-color: #d8e0ea !important;
}

body.light-theme .excel-menu-item {
    color: #334155 !important;
}

body.light-theme .excel-menu-item:hover {
    background: #f1f5f9 !important;
}

/* =============================================
   KAYIT EKRANI — DESKTOP UYUMU
   Plan kartlarını PC'de yan yana gösterir
   ============================================= */

/* Auth container: dikey scroll desteği */
#authContainer {
    overflow-y: auto !important;
    align-items: flex-start !important;
    padding: 40px 20px !important;
}

/* Plan kartları temel stilleri (inline override) */
.plan-card-detail {
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    flex: 0 0 100% !important;
}

.plan-card-detail:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Plan badge temel stili */
.plan-badge {
    white-space: nowrap;
}

/* Carousel dots temel stili */
.carousel-dot {
    transition: all 0.2s ease;
}

/* Desktop: 768px ve üzeri */
@media (min-width: 768px) {

    /* Auth-card registerBox genişliğini artır */
    #registerBox.auth-card {
        max-width: 960px !important;
        padding: 40px 30px !important;
    }

    /* Plan carousel → 3-column grid */
    .plan-carousel {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
        overflow: visible !important;
        scroll-snap-type: none !important;
        padding-bottom: 0 !important;
    }

    /* Plan kartları: inline min-width override */
    .plan-card-detail {
        min-width: 0 !important;
        scroll-snap-align: unset !important;
    }

    /* Carousel noktalarını gizle */
    .carousel-dot {
        display: none !important;
    }

    /* Auth container ortala */
    #authContainer {
        align-items: center !important;
        padding: 40px 20px !important;
    }
}

/* Light theme: plan kartları beyaz arka plan */
body.light-theme .plan-card-detail {
    background: #ffffff !important;
    border-color: #d8e0ea !important;
    color: #0f172a !important;
}

body.light-theme .plan-card-detail ul li {
    color: #0f172a !important;
}

body.light-theme .plan-card-detail ul li i.fa-check-circle {
    color: var(--success) !important;
}

body.light-theme .plan-card-detail ul li i.fa-lock {
    color: #94a3b8 !important;
}

/* Premium card light — özel border */
body.light-theme .plan-card-detail:nth-child(2) {
    background: rgba(29, 78, 216, 0.04) !important;
    border-color: var(--primary) !important;
}

/* Kurumsal card light — özel border */
body.light-theme .plan-card-detail:nth-child(3) {
    background: rgba(183, 121, 31, 0.04) !important;
    border-color: var(--warning) !important;
}

/* --- SETTINGS PAGE --- */
#page-settings {
    padding-bottom: 120px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.settings-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.settings-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.settings-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.settings-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--card-solid);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 13px;
}

.settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.settings-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.settings-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
}

.settings-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.settings-switch input {
    display: none;
}

.settings-switch .switch-ui {
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: var(--border);
    position: relative;
    transition: background 0.2s ease;
}

.settings-switch .switch-ui::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--text);
    top: 3px;
    left: 3px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.settings-switch input:checked+.switch-ui {
    background: var(--primary);
}

.settings-switch input:checked+.switch-ui::after {
    transform: translateX(20px);
    background: #fff;
}

.settings-table-wrap {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: auto;
    max-height: 260px;
}

.settings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.settings-table th,
.settings-table td {
    padding: 8px 10px;
    border-bottom: none;
    text-align: left;
    white-space: nowrap;
}

.stats-table th,
.stats-table td {
    white-space: nowrap;
}

.settings-table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.settings-inbox {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-inbox li {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    background: var(--card-bg);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-inbox .inbox-title {
    font-size: 13px;
    font-weight: 600;
}

.settings-inbox .inbox-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.settings-flag-list {
    display: grid;
    gap: 10px;
}

.settings-flag-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    background: var(--card-bg);
}

.settings-flag-item p {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

body.feature-compact-cards .card,
body.feature-compact-cards .form-card,
body.feature-compact-cards .dashboard-tx-card,
body.feature-compact-cards .tx-mobile-card {
    padding: 10px !important;
}

body.feature-dense-lists .tx-item,
body.feature-dense-lists .tx-mobile-card,
body.feature-dense-lists .list-card-item {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

.glass-btn.btn-danger {
    background: var(--danger) !important;
    color: #fff !important;
    border: none !important;
}