/* ==========================================================================
   FINANSPRO - CSS DESIGN SYSTEM & STYLING
   ========================================================================== */

:root {
    --primary-orange: #ff5e00;
    --primary-orange-hover: #e65500;
    --primary-orange-light: #fff0e6;
    
    --bg-main: #faf8f6;
    --bg-card: #ffffff;
    --bg-dark-card: #1c140e;
    
    --text-dark: #1e1b18;
    --text-muted: #78716c;
    --text-light: #ffffff;
    
    --border-color: #f5f2f0;
    --border-color-dark: #e7e5e4;
    
    --color-green: #10b981;
    --color-green-light: #ecfdf5;
    --color-red: #ef4444;
    --color-red-light: #fef2f2;
    --color-blue: #f97316;
    --color-blue-light: #fff7ed;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --shadow-premium: 0 30px 60px -15px rgba(255, 94, 0, 0.08), 0 15px 30px -10px rgba(0, 0, 0, 0.04);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-dark);
    line-height: 1.5;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

ul {
    list-style: none;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-green { color: var(--color-green); }
.text-red { color: var(--color-red); }
.text-muted { color: var(--text-muted); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 16px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.btn-primary {
    background-color: var(--primary-orange);
    color: var(--text-light);
    box-shadow: 0 8px 20px -6px rgba(255, 94, 0, 0.5);
}

.btn-primary:hover {
    background-color: var(--primary-orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -6px rgba(255, 94, 0, 0.6);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: var(--primary-orange-light);
    color: var(--primary-orange);
}

.btn-secondary:hover {
    background-color: #e0ebff;
    transform: translateY(-1px);
}

.btn-close-modal, .btn-close-modal-debt, .btn-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close-modal:hover, .btn-close-modal-debt:hover {
    color: var(--color-red);
}

.btn-block {
    width: 100%;
}

.btn-link {
    color: var(--primary-orange);
    font-size: 0.875rem;
    font-weight: 600;
}

.btn-link:hover {
    color: var(--primary-orange-hover);
    text-decoration: underline;
}

/* Main Layout */
.app-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.mobile-navbar {
    display: none;
}

/* Sidebar Navigation */
.sidebar {
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-color);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
    padding-left: 8px;
}

.app-logo {
    max-height: 44px;
    max-width: 100%;
    object-fit: contain;
}

.sidebar-nav ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-nav li {
    border-radius: 16px;
    transition: all 0.2s ease;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    border-radius: 16px;
}

.sidebar-nav li a i {
    width: 20px;
    height: 20px;
}

.sidebar-nav li:hover a {
    color: var(--primary-orange);
    background-color: var(--primary-orange-light);
}

.sidebar-nav li.active {
    background-color: var(--primary-orange);
}

.sidebar-nav li.active a {
    color: var(--text-light);
}

.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.brand-badge {
    background-color: var(--bg-dark-card);
    color: var(--text-light);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: var(--shadow-md);
}

.brand-badge .sub {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.brand-badge .main {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 16px;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.btn-logout:hover {
    color: var(--color-red);
    background-color: var(--color-red-light);
}

/* Main Content Area */
.main-content {
    padding: 40px 48px;
    overflow-y: auto;
    overflow-x: hidden;
    max-width: 1400px;
    width: 100%;
    min-width: 0;
    margin: 0 auto;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 36px;
}

.header-title h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.current-date-display {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* General Card Design */
.card {
    background-color: var(--bg-card);
    border-radius: 24px;
    padding: 28px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* Summary Cards Area */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.card-summary {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 160px;
}

.card-header-icon {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.icon-circle {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-circle i {
    width: 18px;
    height: 18px;
}

.card-label {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.card-value {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 2.1rem;
    line-height: 1.1;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.card-sub-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.card-fx {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-orange);
    margin-bottom: 6px;
    min-height: 1em;
}

.card-fx:empty {
    margin-bottom: 0;
}

.net-dark .card-fx {
    color: #fbbf24;
}

/* Custom Summary Card Color Palette (Matched to reference) */
.nakit .icon-circle {
    background-color: var(--color-green-light);
    color: var(--color-green);
}
.nakit .card-value {
    color: var(--text-dark);
}

.borc .icon-circle {
    background-color: var(--color-red-light);
    color: var(--color-red);
}
.borc .card-value {
    color: var(--color-red);
}

.gelir .icon-circle {
    background-color: var(--primary-orange-light);
    color: var(--primary-orange);
}
.gelir .card-value {
    color: var(--color-green);
}

/* Premium Koyu Net Card */
.net-dark {
    background-color: var(--bg-dark-card);
    border: none;
    color: var(--text-light);
    box-shadow: 0 15px 30px -8px rgba(12, 18, 34, 0.4);
}

.net-dark .icon-circle {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.net-dark .card-label {
    color: #94a3b8;
}

.net-dark .card-value {
    color: var(--text-light);
}

.net-dark .card-sub-info {
    color: #64748b;
}

/* Dashboard Grid Layout (Left/Right) */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1.2fr;
    gap: 32px;
    margin-bottom: 32px;
}

.grid-card {
    display: flex;
    flex-direction: column;
    min-height: 380px;
    min-width: 0;
}

.grid-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.grid-card-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
}

.info-badge {
    background-color: var(--primary-orange-light);
    color: var(--primary-orange);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 12px;
}

/* Tables styling */
.recent-list-container {
    overflow-x: auto;
    flex: 1;
}

.table-container {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.recent-table, .main-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.recent-table th, .main-table th {
    padding: 12px 16px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
}

.recent-table td, .main-table td {
    padding: 16px;
    font-size: 0.9rem;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
}

.recent-table tr:last-child td, .main-table tr:last-child td {
    border-bottom: none;
}

.recent-table tr:hover td, .main-table tr:hover td {
    background-color: #fafbfc;
}

/* Transaction List Icons & Labels */
.tx-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.tx-badge-income {
    background-color: var(--color-green-light);
    color: var(--color-green);
}

.tx-badge-expense {
    background-color: var(--color-red-light);
    color: var(--color-red);
}

.tx-amount-col {
    font-family: var(--font-heading);
    font-weight: 700;
}

.btn-delete-tx {
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-delete-tx:hover {
    color: var(--color-red);
}

.btn-edit-tx {
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
    margin-right: 4px;
}

.btn-edit-tx:hover {
    color: var(--primary-orange);
}

.tx-actions {
    white-space: nowrap;
}

.no-data {
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Upcoming Payments Widget */
.upcoming-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.upcoming-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-radius: 20px;
    background-color: #fafbfc;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.upcoming-item:hover {
    transform: translateX(4px);
    border-color: #cbd5e1;
}

.upcoming-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.upcoming-info {
    min-width: 0;
}

.upcoming-info h4 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upcoming-date-badge {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 14px;
    background-color: var(--bg-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    border: 1px solid var(--border-color);
}

.upcoming-date-badge .day {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-dark);
    line-height: 1;
}

.upcoming-date-badge .month {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.upcoming-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.upcoming-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.upcoming-right {
    text-align: right;
    flex-shrink: 0;
}

.upcoming-amount {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--color-green);
    margin-bottom: 2px;
}

.days-left-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
}

.days-left-soon {
    background-color: var(--color-red-light);
    color: var(--color-red);
}

.days-left-normal {
    background-color: var(--primary-orange-light);
    color: var(--primary-orange);
}

/* Graph Card & Progress bar styling */
.graph-card {
    margin-bottom: 32px;
}

.graph-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.graph-card-header h2 {
    font-size: 1.35rem;
    margin-bottom: 4px;
}

.graph-card-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.agent-global-stats {
    display: flex;
    gap: 12px;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 14px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stat-badge strong {
    color: var(--text-dark);
}

.channels-bar-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.channel-bar-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bar-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.bar-meta-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bar-color-indicator {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.bar-meta-left span {
    font-weight: 600;
    color: var(--text-dark);
}

.bar-meta-right {
    font-weight: 700;
    font-family: var(--font-heading);
}

.bar-track {
    width: 100%;
    height: 10px;
    background-color: var(--bg-main);
    border-radius: 5px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dynamic channel themes */
.ch-theme-1 { background-color: var(--primary-orange); }
.ch-theme-2 { background-color: #06b6d4; }
.ch-theme-3 { background-color: #8b5cf6; }
.ch-theme-4 { background-color: #ec4899; }
.ch-theme-5 { background-color: #f59e0b; }

/* VIEW: COMMON CARD HEADERS AND INNER SECTIONS */
.view-main-card {
    min-height: calc(100vh - 200px);
}

.view-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 28px;
}

.view-card-header h2 {
    font-size: 1.6rem;
    margin-bottom: 4px;
}

.view-card-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Agent Setup Form */
.agent-global-settings {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--primary-orange-light);
    padding: 10px 18px;
    border-radius: 16px;
}

.agent-global-settings label {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary-orange);
}

.agent-global-settings input {
    width: 80px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 94, 0, 0.2);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-orange);
    text-align: center;
    background-color: #ffffff;
}

.agent-systems-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
}

.agent-system-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-radius: 20px;
    background-color: #fafbfc;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.agent-system-item:hover {
    border-color: #cbd5e1;
    background-color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.system-main-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.system-date {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 14px;
    background-color: var(--primary-orange-light);
    color: var(--primary-orange);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    text-align: center;
    min-width: 120px;
}

.system-title h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.system-title .description {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.system-math {
    display: flex;
    align-items: center;
    gap: 16px;
}

.math-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.math-box label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.math-box input {
    width: 100px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
}

.math-box input:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 94, 0, 0.1);
}

.math-sign {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-muted);
    padding-top: 18px;
}

.math-box .unit-price-display {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
    padding-top: 6px;
}

.total-channel-earning {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--color-green);
    min-width: 100px;
    text-align: right;
    padding-top: 14px;
}

.save-footer {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

/* Filters & Searches */
.filter-controls {
    display: flex;
    gap: 12px;
}

.filter-controls select, .filter-controls input {
    padding: 10px 16px;
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.filter-controls select {
    background-color: #ffffff;
    cursor: pointer;
}

.filter-controls input {
    width: 200px;
}

.filter-controls select:focus, .filter-controls input:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 94, 0, 0.1);
}

/* Debts View custom designs */
.debt-widgets {
    margin-bottom: 28px;
}

.debt-summary-mini {
    display: flex;
    gap: 24px;
}

.mini-stat {
    display: flex;
    flex-direction: column;
    background-color: #fafbfc;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px 24px;
    min-width: 180px;
}

.mini-stat .label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.mini-stat .value {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
}

.val-red { color: var(--color-red); }
.val-green { color: var(--color-green); }

.badge-paid {
    background-color: var(--color-green-light);
    color: var(--color-green);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-unpaid {
    background-color: var(--color-red-light);
    color: var(--color-red);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.btn-pay-debt {
    background-color: var(--color-green-light);
    color: var(--color-green);
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 8px;
}

.btn-pay-debt:hover {
    background-color: var(--color-green);
    color: #ffffff;
}

/* ==================== LOGIN SCREEN STYLES ==================== */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: radial-gradient(circle at 10% 20%, rgba(255, 94, 0, 0.05) 0%, rgba(255, 255, 255, 0) 90%), var(--bg-main);
    padding: 24px;
}

.login-card {
    background-color: var(--bg-card);
    border-radius: 28px;
    padding: 48px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-premium);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-header .logo {
    margin-bottom: 8px;
    padding-left: 0;
    font-size: 2.2rem;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.input-group label {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-dark);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 16px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.input-with-icon input, .input-group select {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border-radius: 16px;
    border: 1px solid #cbd5e1;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: all 0.2s;
    background-color: #fafbfc;
}

.input-group select {
    padding-left: 16px;
    cursor: pointer;
}

.input-with-icon input:focus, .input-group select:focus {
    border-color: var(--primary-orange);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(255, 94, 0, 0.08);
}

.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.login-error-msg {
    color: var(--color-red);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 16px;
}

.login-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.login-footer strong {
    color: var(--text-dark);
}

/* ==================== MODAL OVERLAY STYLES ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.25s ease;
    padding: 16px;
}

.modal-box {
    background-color: var(--bg-card);
    border-radius: 28px;
    padding: 36px;
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    animation: modalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 1.35rem;
    font-weight: 700;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--bg-dark-card);
    color: var(--text-light);
    padding: 16px 28px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    z-index: 1100;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Keyframe Animations */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 1200px) {
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .grid-card {
        min-height: auto;
    }
}

@media (max-width: 992px) {
    .app-layout {
        grid-template-columns: 1fr;
    }
    
    .mobile-navbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background-color: var(--bg-card);
        padding: 16px 24px;
        border-bottom: 1px solid var(--border-color);
        position: sticky;
        top: 0;
        z-index: 99;
    }
    
    .mobile-navbar .logo {
        margin-bottom: 0;
        padding-left: 0;
    }
    
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        width: 280px;
        transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        height: 100vh;
        box-shadow: var(--shadow-lg);
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .main-content {
        padding: 24px;
    }
    
    .agent-system-item {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    
    .system-main-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .system-math {
        flex-wrap: wrap;
        gap: 10px 12px;
    }
    
    .math-sign {
        padding-top: 0;
        align-self: center;
    }
    
    .total-channel-earning {
        padding-top: 0;
        width: 100%;
        text-align: left;
        font-size: 1.5rem;
        margin-top: 10px;
        border-top: 1px dashed var(--border-color);
        padding-top: 10px;
    }
}

@media (max-width: 600px) {
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .header-actions {
        width: 100%;
    }
    
    .header-actions .btn {
        width: 100%;
    }
    
    .input-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .filter-controls select, .filter-controls input {
        width: 100%;
    }

    .view-card-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .view-card-header > .btn {
        width: 100%;
    }

    .report-filters,
    .report-filters select,
    .report-filters .btn {
        width: 100%;
    }

    .report-custom {
        width: 100%;
    }

    .report-custom input[type="date"] {
        flex: 1;
        min-width: 0;
    }

    .modal-box {
        padding: 24px;
        border-radius: 20px;
    }
}

/* ==================== DİNAMİK FİRMA VE ABONELİK STİLLERİ ==================== */
.companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 16px;
}

.company-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.company-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.company-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.company-card-title h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
    font-family: var(--font-heading);
}

.company-card-title p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.company-badge-day {
    background-color: var(--primary-orange-light);
    color: var(--primary-orange);
    padding: 6px 12px;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.75rem;
    text-align: center;
}

.company-details-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    padding: 16px 0;
    border-top: 1px dashed var(--border-color);
    border-bottom: 1px dashed var(--border-color);
}

.company-detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.company-detail-row .label {
    color: var(--text-muted);
}

.company-detail-row .value {
    font-weight: 600;
    color: var(--text-dark);
}

.company-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.company-total-row .label {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.company-total-row .value {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.45rem;
    color: var(--color-green);
}

.company-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: auto;
}

.company-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-edit-company {
    background-color: var(--primary-orange-light);
    color: var(--primary-orange);
}

.btn-edit-company:hover {
    background-color: #e0ebff;
    transform: translateY(-1px);
}

.btn-delete-company {
    background-color: var(--color-red-light);
    color: var(--color-red);
}

.btn-delete-company:hover {
    background-color: var(--color-red);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-close-modal-company {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close-modal-company:hover {
    color: var(--color-red);
}

#btn-pwa-install {
    background-color: #fafbfc;
    color: var(--text-dark);
    border: 1px solid #cbd5e1;
    margin-right: 10px;
}

#btn-pwa-install:hover {
    background-color: #e2e8f0;
}

/* ==========================================================================
   DÖVİZ KURU ŞERİDİ (TCMB)
   ========================================================================== */
.currency-ticker {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    padding: 12px 16px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color-dark);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
}

.currency-ticker .ticker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background-color: var(--primary-orange-light);
    border-radius: 10px;
}

.currency-ticker .ticker-flag {
    font-size: 0.95rem;
    letter-spacing: -1px;
}

.currency-ticker .ticker-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.currency-ticker .ticker-value {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-orange);
}

.currency-ticker .ticker-source {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (max-width: 640px) {
    .currency-ticker .ticker-source {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }
}

/* TL -> USD dönüşüm ipucu (işlem modalı) */
.conversion-hint {
    margin: -8px 0 14px;
    padding: 8px 12px;
    background-color: var(--primary-orange-light);
    color: var(--primary-orange-hover);
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
}

/* İşlem modalı tekrar checkbox satırı */
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 18px;
    padding: 10px 12px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color-dark);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--text-dark);
}

.checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-orange);
    cursor: pointer;
}

/* ==========================================================================
   SABİT AYLIK (TEKRARLAYAN) İŞLEMLER
   ========================================================================== */
.recurring-section {
    margin-bottom: 24px;
    padding: 16px;
    background-color: var(--primary-orange-light);
    border-radius: 14px;
}

.recurring-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--primary-orange-hover);
    margin-bottom: 14px;
}

.recurring-title svg { width: 18px; height: 18px; }

.recurring-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recurring-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background-color: var(--bg-card);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.recurring-item-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.recurring-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.recurring-item-info strong {
    font-size: 0.92rem;
    color: var(--text-dark);
}

.recurring-item-info .text-muted { font-size: 0.78rem; }

.recurring-item-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.recurring-item-amount {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
}

.btn-stop-recurring {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border: 1px solid var(--color-red);
    background-color: var(--color-red-light);
    color: var(--color-red);
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s;
}

.btn-stop-recurring:hover { background-color: #fee2e2; }

@media (max-width: 640px) {
    .recurring-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .recurring-item-right { width: 100%; justify-content: space-between; }
}

/* ==========================================================================
   RAPORLAMA SAYFASI
   ========================================================================== */
.report-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.report-filters select,
.report-custom input[type="date"] {
    padding: 9px 12px;
    border: 1px solid var(--border-color-dark);
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-dark);
    background-color: var(--bg-card);
}

.report-custom {
    display: flex;
    align-items: center;
    gap: 8px;
}

.report-custom .range-sep { color: var(--text-muted); }

.report-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 24px 0;
}

.report-kpi {
    padding: 18px;
    border-radius: 14px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color-dark);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.report-kpi .kpi-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.report-kpi .kpi-value {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-dark);
}

.report-kpi.kpi-income .kpi-value { color: var(--color-green); }
.report-kpi.kpi-expense .kpi-value { color: var(--color-red); }
.report-kpi.kpi-net { background-color: var(--bg-dark-card); border-color: var(--bg-dark-card); }
.report-kpi.kpi-net .kpi-label { color: rgba(255,255,255,0.7); }
.report-kpi.kpi-net .kpi-value { color: var(--text-light); }

.report-charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.report-chart-card {
    padding: 18px;
    border-radius: 14px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color-dark);
}

.report-chart-card h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 14px;
}

.report-chart-card .chart-wrap {
    position: relative;
    height: 280px;
}

.report-table-block h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 14px;
}

/* ==========================================================================
   AYARLAR MODALI
   ========================================================================== */
.modal-box-wide {
    max-width: 560px;
}

.settings-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border-color-dark);
}

.settings-tab {
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: -1px;
}

.settings-tab.active {
    color: var(--primary-orange);
    border-bottom-color: var(--primary-orange);
}

.settings-divider {
    border: none;
    border-top: 1px dashed var(--border-color-dark);
    margin: 18px 0;
}

.settings-info {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color-dark);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.settings-info ol {
    margin: 6px 0 0 18px;
    padding: 0;
}

.settings-info code,
.tg-webhook-url {
    background-color: #1c140e;
    color: #fbbf24;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 0.78rem;
    word-break: break-all;
}

.tg-webhook-url {
    display: block;
    margin-top: 6px;
    padding: 8px 10px;
}

.settings-msg {
    font-size: 0.82rem;
    font-weight: 500;
    margin: 6px 0;
    min-height: 1em;
}

.settings-msg.ok { color: var(--color-green); }
.settings-msg.error { color: var(--color-red); }

@media (max-width: 1024px) {
    .report-charts-grid { grid-template-columns: 1fr 1fr; }
    .report-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .report-charts-grid { grid-template-columns: 1fr; }
    .report-kpi-grid { grid-template-columns: 1fr; }
    .report-filters { width: 100%; }
}

