/* Momentum - Yatırım Takipçisi Stili */
:root {
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --light-text: #64748b;
    --border: #e2e8f0;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --success: #22c55e;
    --success-hover: #16a34a;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --warning: #f59e0b;
    --warning-hover: #d97706;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --radius-sm: 8px;
}

.theme-dark {
    --bg: #0f172a;
    --card-bg: #1e293b;
    --text: #f1f5f9;
    --light-text: #94a3b8;
    --border: #334155;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Global link reset - mor visited rengi engelle */
a,
a:link,
a:visited,
a:hover,
a:active {
    color: inherit;
    text-decoration: none;
}

/* Header */
.app-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-actions .secondary-btn {
    white-space: nowrap;
    flex-shrink: 0;
}

.brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

/* User Info - Header */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin-right: 8px;
}

.user-info .user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-info .user-name::before {
    content: '👤';
    font-size: 1rem;
}

#logout-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

#logout-btn:hover {
    background: var(--danger-hover);
    transform: translateY(-1px);
}

#logout-btn::before {
    content: '🚪';
    font-size: 0.875rem;
}

/* Buttons */
.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--bg);
    border-color: var(--primary);
    color: var(--primary);
}

.primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.secondary-btn,
a.secondary-btn,
a.secondary-btn:link,
a.secondary-btn:visited,
a.secondary-btn:active {
    background: var(--card-bg) !important;
    color: var(--text) !important;
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    font-size: 0.95rem;
    text-decoration: none !important;
}

.secondary-btn:hover,
a.secondary-btn:hover {
    background: var(--bg) !important;
    border-color: var(--primary);
    color: var(--text) !important;
    text-decoration: none !important;
}

.success-btn {
    background: var(--success);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.success-btn:hover {
    background: var(--success-hover);
}

.danger-btn {
    background: var(--danger);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

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

/* Card */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.card h2 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
}

.card h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* App Container */
#app {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    display: grid;
    gap: 24px;
}

/* Form Styles */
.form-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.form-row > label {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: var(--radius-sm);
    color: var(--light-text);
    flex-shrink: 0;
}

.form-row input,
.form-row select {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row input[readonly] {
    background: var(--bg);
    cursor: not-allowed;
}

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

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

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

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

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .app-header {
        padding: 12px 16px;
        flex-wrap: nowrap;
        gap: 12px;
    }
    
    .header-actions {
        flex-wrap: nowrap;
    }
    
    /* User info mobil */
    .user-info {
        padding: 4px 8px;
        margin-right: 4px;
    }
    
    .user-info .user-name {
        font-size: 0.75rem;
    }
    
    .user-info .user-name::before {
        display: none;
    }
    
    #logout-btn {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    #logout-btn::before {
        display: none;
    }
    
    #app {
        padding: 16px;
    }
}

/* Stat Cards */
.stat-card {
    background: var(--bg);
    padding: 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

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

.stat-card.highlight {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-color: var(--warning);
}

.theme-dark .stat-card.highlight {
    background: linear-gradient(135deg, #78350f, #92400e);
}

.stat-card label {
    display: block;
    font-size: 0.85rem;
    color: var(--light-text);
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.stat-card.positive .stat-value {
    color: var(--success);
}

.stat-card.negative .stat-value {
    color: var(--danger);
}

.stat-card.achieved {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid var(--success);
}

.stat-card.achieved .stat-value {
    color: var(--success);
}

.stat-card.achieved .stat-sub {
    color: var(--success);
}

.stat-card .stat-hint {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.stat-card .stat-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Breakeven Indicator */
.breakeven-indicator {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-top: 8px;
}

.breakeven-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

.breakeven-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.breakeven-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.breakeven-status.achieved {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.breakeven-status.not-achieved {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.breakeven-status.partial {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning);
    color: var(--warning);
}

.breakeven-status .status-icon {
    font-size: 1.2rem;
}

.breakeven-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.breakeven-detail-item {
    background: var(--card-bg);
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.breakeven-detail-item label {
    display: block;
    font-size: 0.75rem;
    color: var(--light-text);
    margin-bottom: 4px;
}

.breakeven-detail-item .value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.breakeven-detail-item .value.positive {
    color: var(--success);
}

.breakeven-detail-item .value.negative {
    color: var(--danger);
}

.stat-card .stat-details {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-size: 0.85em;
    color: var(--light-text);
    flex-wrap: wrap;
}

.stat-card .stat-details span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-card .stat-details i {
    font-size: 0.9em;
    opacity: 0.7;
}

/* Transaction Forms Section */
.transaction-forms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.form-card {
    background: var(--bg);
    padding: 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.form-card.buy {
    border-left: 4px solid var(--success);
}

.form-card.sell {
    border-left: 4px solid var(--danger);
}

.form-card.dividend {
    border-left: 4px solid var(--warning);
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    margin-top: 16px;
}

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

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

th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

tbody tr {
    transition: background 0.2s;
}

tbody tr:hover {
    background: var(--bg);
}

/* Chips/Tags */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--bg);
    border: 1px solid var(--border);
}

.chip.buy {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    border-color: var(--success);
}

.chip.sell {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: var(--danger);
}

.chip.dividend {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border-color: var(--warning);
}

/* Calculator Sections */
.calculator-section {
    background: var(--bg);
    padding: 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

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

.calc-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.calc-input-group label {
    font-size: 0.85rem;
    color: var(--light-text);
    font-weight: 500;
}

.calc-input-group input {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text);
    font-size: 1rem;
}

.calc-input-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.calc-input-group input[readonly] {
    background: var(--bg);
}

/* Currency Converter */
.currency-converter {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.calc-input-group select {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text);
    font-size: 1rem;
    cursor: pointer;
}

.calc-input-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.copy-input-wrapper {
    display: flex;
    gap: 8px;
}

.copy-input-wrapper input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
}

.copy-btn {
    padding: 12px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s;
}

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

.copy-btn.copied {
    background: var(--success);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.refresh-rate-btn {
    margin-left: auto;
    padding: 6px 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.refresh-rate-btn:hover {
    background: var(--primary-hover);
}

.refresh-rate-btn.loading i {
    animation: spin 1s linear infinite;
}

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

.rate-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-bottom: 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--light-text);
}

.rate-status.success {
    background: rgba(34, 197, 94, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.rate-status.error {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

/* Portfolio Selector */
.portfolio-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.portfolio-selector select,
.portfolio-selector input {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text);
    font-size: 1rem;
    min-width: 200px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

body.modal-open {
    overflow: hidden;
}

/* Settings Tabs */
.settings-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    flex-wrap: wrap;
}

.settings-tab {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

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

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

/* Light Background Box */
.light {
    background: var(--bg);
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

/* Portfolio Groups List */
.portfolio-groups-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.portfolio-group-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.portfolio-group-item:hover {
    border-color: var(--primary);
}

.portfolio-group-item.editing {
    border-color: var(--warning);
    background: rgba(245, 158, 11, 0.05);
}

.portfolio-group-item .group-icon {
    color: var(--primary);
    font-size: 1rem;
}

.portfolio-group-item .group-info {
    flex: 1;
    min-width: 0;
}

.portfolio-group-item .group-name {
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portfolio-group-item .group-id {
    font-size: 0.75rem;
    color: var(--light-text);
}

.portfolio-group-item .group-stats {
    font-size: 0.8rem;
    color: var(--light-text);
    text-align: right;
    padding-right: 8px;
}

.portfolio-group-item .group-actions {
    display: flex;
    gap: 4px;
}

.portfolio-group-item .group-actions button {
    padding: 6px 8px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.portfolio-group-item .btn-edit {
    background: var(--warning);
    color: white;
}

.portfolio-group-item .btn-edit:hover {
    background: #d97706;
}

.portfolio-group-item .btn-delete {
    background: var(--danger);
    color: white;
}

.portfolio-group-item .btn-delete:hover {
    background: #dc2626;
}

.portfolio-group-item .btn-save {
    background: var(--success);
    color: white;
}

.portfolio-group-item .btn-save:hover {
    background: #059669;
}

.portfolio-group-item .btn-cancel {
    background: var(--light-text);
    color: white;
}

.portfolio-group-item .btn-cancel:hover {
    background: #6b7280;
}

.portfolio-group-item input.edit-group-name {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid var(--warning);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text);
    font-size: 0.9rem;
}

.portfolio-groups-empty {
    text-align: center;
    padding: 20px;
    color: var(--light-text);
    font-size: 0.9rem;
}

/* History Controls */
.history-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* Delete Button */
.delete-btn {
    background: var(--danger);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

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

/* Empty State */
.empty-message {
    text-align: center;
    color: var(--light-text);
    font-style: italic;
    padding: 40px 20px;
}

/* Notification */
#notification {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    animation: slideIn 0.3s ease;
}

#notification.success {
    background: var(--success);
    color: white;
}

#notification.error {
    background: var(--danger);
    color: white;
}

#notification.info {
    background: var(--primary);
    color: white;
}

/* Undo Notification */
#notification.undo-notification {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
    min-width: 320px;
    padding: 12px 16px;
}

.undo-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.undo-content i {
    color: var(--danger);
    font-size: 1.1rem;
}

.undo-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.undo-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.02);
}

.undo-btn i {
    font-size: 0.9rem;
}

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

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Section Spacing */
.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

/* Input with Icon */
.input-with-icon {
    position: relative;
}

.input-with-icon input {
    padding-left: 40px;
}

.input-with-icon i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-text);
}

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

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--light-text);
}

/* Summary Row */
.summary-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

/* Current Price Input */
.current-price-input {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.current-price-input label {
    font-weight: 500;
    color: var(--light-text);
    white-space: nowrap;
}

.current-price-input input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text);
    font-size: 1rem;
}

/* Group Summary Section */
.summary-section {
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.summary-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 1rem;
    color: var(--text);
}

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

#groupSummary .stat-card {
    padding: 14px;
}

#groupSummary .stat-card label {
    font-size: 0.8rem;
    margin-bottom: 6px;
}

#groupSummary .stat-card .stat-value {
    font-size: 1.15rem;
}

@media (max-width: 900px) {
    #groupSummary .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Asset Selection Section */
#assetSelect,
#groupSelect {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text);
    font-size: 1rem;
    cursor: pointer;
}

#assetSelect:focus,
#groupSelect:focus {
    outline: none;
    border-color: var(--primary);
}

/* Highlight Cards */
.stat-card.highlight.positive {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    border-color: var(--success);
}

.theme-dark .stat-card.highlight.positive {
    background: linear-gradient(135deg, #14532d, #166534);
}

.stat-card.highlight.negative {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-color: var(--danger);
}

.theme-dark .stat-card.highlight.negative {
    background: linear-gradient(135deg, #7f1d1d, #991b1b);
}

/* Compact Selector - Yeni Kompakt Tasarım */
.compact-selector {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.compact-selector-main {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.compact-selector-main .selector-group {
    flex: 1;
    min-width: 150px;
}

.compact-selector-main .selector-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--light-text);
}

.compact-selector-main .selector-group label i {
    margin-right: 6px;
    color: var(--primary);
}

.compact-selector-main .selector-group select {
    width: 100%;
}

.toggle-panel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--light-text);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    pointer-events: auto;
    z-index: 10;
    position: relative;
}

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

.toggle-panel-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Asset Management Panel */
.asset-management-panel {
    overflow: visible;
    transition: all 0.3s ease, max-height 0.3s ease;
    max-height: 600px;
    opacity: 1;
    margin-top: 16px;
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.asset-management-panel.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    padding: 0 16px;
    border-color: transparent;
    overflow: hidden;
}

.panel-section {
    margin-bottom: 12px;
}

.panel-section:last-child {
    margin-bottom: 0;
}

.panel-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--light-text);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-section-title i {
    color: var(--primary);
}

.panel-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.panel-row input {
    flex: 1;
    min-width: 120px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text);
    font-size: 0.9rem;
}

.panel-row input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.panel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.panel-btn.primary {
    background: linear-gradient(135deg, var(--success), var(--success-hover));
    color: white;
}

.panel-btn.secondary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
}

.panel-btn.accent {
    background: linear-gradient(135deg, var(--warning), var(--warning-hover));
    color: white;
}

.panel-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

.panel-divider {
    height: 1px;
    background: var(--border);
    margin: 12px 0;
}

/* Go Back Button */
.go-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--success), var(--success-hover));
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.go-back-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.go-back-btn i:first-child {
    animation: bounceUp 2s infinite;
}

@keyframes bounceUp {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* Modern Asset Action Cards - Eski stiller (şimdilik tutalım) */
.asset-action-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

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

.asset-action-card.add-new {
    border-left: 4px solid var(--success);
}

.asset-action-card.edit-existing {
    border-left: 4px solid var(--primary);
}

.asset-action-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.asset-action-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.asset-action-icon.add {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: var(--success);
}

.theme-dark .asset-action-icon.add {
    background: linear-gradient(135deg, #14532d, #166534);
}

.asset-action-icon.edit {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: var(--primary);
}

.theme-dark .asset-action-icon.edit {
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
}

.asset-action-title h4 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.asset-action-title span {
    font-size: 0.85rem;
    color: var(--light-text);
}

.asset-action-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Modern Input Group */
.modern-input-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.modern-input-group.three-col {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
    .modern-input-group,
    .modern-input-group.three-col {
        grid-template-columns: 1fr;
    }
}

.modern-input {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: all 0.2s ease;
}

.modern-input:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modern-input i {
    padding: 0 14px;
    color: var(--light-text);
    font-size: 0.95rem;
}

.modern-input input {
    flex: 1;
    padding: 14px 14px 14px 0;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 0.95rem;
    outline: none;
}

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

.modern-input.price {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(59, 130, 246, 0.1));
}

/* Action Buttons */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn i {
    font-size: 1rem;
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--success), var(--success-hover));
    color: white;
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.action-btn.secondary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
}

.action-btn.secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.action-btn.accent {
    background: linear-gradient(135deg, var(--warning), var(--warning-hover));
    color: white;
}

.action-btn.accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.action-btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.action-btn-group .action-btn {
    flex: 1;
    min-width: 150px;
}

/* Hesaplayıcılara Git Butonu */
.go-to-calculators-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.go-to-calculators-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-hover), #1d4ed8);
}

.go-to-calculators-btn i:first-child {
    font-size: 1.25rem;
}

.go-to-calculators-btn i:last-child {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(5px);
    }
    60% {
        transform: translateY(3px);
    }
}

/* Transaction Target Selector */
.transaction-target-selector {
    background: linear-gradient(135deg, var(--bg), var(--card-bg));
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}

.target-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-weight: 600;
    color: var(--text);
}

.target-info i {
    color: var(--primary);
    font-size: 1.1rem;
}

.target-selectors {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 600px) {
    .target-selectors {
        grid-template-columns: 1fr;
    }
}

.target-select-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.target-select-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--light-text);
    display: flex;
    align-items: center;
    gap: 6px;
}

.target-select-group select {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.target-select-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.selected-target-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--light-text);
    border: 1px solid var(--border);
}

.selected-target-display i {
    color: var(--primary);
}

.selected-target-display.ready {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.05));
    border-color: var(--success);
    color: var(--success);
}

.selected-target-display.ready i {
    color: var(--success);
}

/* Multi Portfolio Selection */
.portfolio-multi-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.multi-select-label {
    font-weight: 500;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.multi-select-label i {
    color: var(--primary);
}

.clear-all-btn {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--light-text);
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.clear-all-btn:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

.selected-groups-display {
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.selected-groups-display .no-selection {
    color: var(--light-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.selected-groups-display .selection-info {
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 8px;
}

.selected-groups-display .selection-info strong {
    color: var(--primary);
}

.group-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.group-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

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

.group-chip.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.05));
}

.group-chip i:first-child {
    color: var(--primary);
    font-size: 1rem;
}

.group-chip .chip-name {
    font-weight: 500;
    color: var(--text);
}

.group-chip .chip-count {
    background: var(--bg);
    color: var(--light-text);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
}

.group-chip.selected .chip-count {
    background: var(--primary);
    color: white;
}

.group-chip .chip-check {
    color: var(--success);
    font-size: 0.9rem;
    margin-left: 4px;
}

/* Combined Analysis Header */
.combined-analysis-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.02));
    border-left: 4px solid var(--primary);
}

.combined-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.combined-title i {
    font-size: 1.5rem;
    color: var(--primary);
}

.combined-title h2 {
    margin: 0;
    color: var(--text);
}

.combined-title .group-badge {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.selected-groups-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.group-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text);
}

.group-tag i {
    color: var(--primary);
    font-size: 0.8rem;
}

.group-tag-small {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--light-text);
    font-weight: 500;
}

/* Table Rows for Combined Analysis */
.group-row {
    background: var(--bg);
}

.group-row td:first-child {
    color: var(--primary);
}

.total-row {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.02));
    border-top: 2px solid var(--primary);
}

.total-row td {
    font-weight: 600;
}

/* =====================
   ETİKET SİSTEMİ
   ===================== */

/* Yeni Etiket Formu */
.new-tag-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.new-tag-form input,
.new-tag-form select {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text);
    font-size: 0.9rem;
}

.new-tag-form select {
    min-width: 120px;
}

/* Etiket Listesi */
.tags-list-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
}

.tags-empty {
    text-align: center;
    padding: 20px;
    color: var(--light-text);
    font-size: 0.9rem;
}

.tag-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.tag-list-item:hover {
    border-color: var(--primary);
}

.tag-list-item.editing {
    border-color: var(--warning);
    background: rgba(245, 158, 11, 0.05);
}

.tag-color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tag-list-item .tag-name {
    flex: 1;
    font-weight: 500;
}

.tag-list-item .tag-actions {
    display: flex;
    gap: 4px;
}

.tag-list-item .tag-actions button {
    padding: 6px 8px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.btn-edit-tag {
    background: var(--warning);
    color: white;
}

.btn-edit-tag:hover {
    background: #d97706;
}

.btn-delete-tag {
    background: var(--danger);
    color: white;
}

.btn-delete-tag:hover {
    background: #dc2626;
}

.btn-save-tag {
    background: var(--success);
    color: white;
}

.btn-save-tag:hover {
    background: #059669;
}

.btn-cancel-tag {
    background: var(--light-text);
    color: white;
}

.btn-cancel-tag:hover {
    background: #6b7280;
}

.tag-list-item .edit-tag-name {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid var(--warning);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text);
    font-size: 0.9rem;
}

.tag-list-item .edit-tag-color {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text);
    font-size: 0.85rem;
}

/* Fiyat Eşleştirme */
.price-matching-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.price-match-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.price-match-item:hover {
    border-color: var(--primary);
}

.price-match-item.has-symbol {
    border-left: 3px solid var(--success);
}

.price-match-item.no-symbol {
    border-left: 3px solid var(--warning);
}

.price-match-asset {
    flex: 1;
    min-width: 0;
    max-width: 40%;
}

.price-match-asset-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.price-match-asset-group {
    font-size: 0.8rem;
    color: var(--light-text);
}

.price-match-symbol {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    max-width: 280px;
}

.price-match-symbol input {
    width: 90px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.price-match-symbol input:focus {
    border-color: var(--primary);
    outline: none;
}

.price-match-symbol input::placeholder {
    text-transform: none;
}

.price-match-actions {
    display: flex;
    gap: 6px;
}

.price-match-actions button,
.price-match-symbol button,
.price-match-manual button {
    padding: 6px 10px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 32px;
    height: 32px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.price-match-actions button:active,
.price-match-symbol button:active,
.price-match-manual button:active {
    transform: scale(0.95);
}

.btn-save-symbol,
.btn-save-manual {
    background: linear-gradient(135deg, var(--primary), #4f8fff);
    color: white;
}

.btn-save-symbol:hover,
.btn-save-manual:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary));
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.btn-fetch-price {
    background: linear-gradient(135deg, var(--success), #4ade80);
    color: white;
}

.btn-fetch-price:hover {
    background: linear-gradient(135deg, #16a34a, var(--success));
    box-shadow: 0 4px 8px rgba(34, 197, 94, 0.3);
}

.btn-fetch-price:disabled {
    background: var(--border);
    color: var(--light-text);
    cursor: not-allowed;
    box-shadow: none;
}

.btn-fetch-price:disabled:hover {
    box-shadow: none;
}

.price-match-current {
    text-align: right;
    min-width: 100px;
}

.price-match-current-value {
    font-weight: 600;
    font-size: 0.95rem;
}

.price-match-current-label {
    font-size: 0.75rem;
    color: var(--light-text);
}

.price-match-status {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.price-match-status.success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.price-match-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.price-match-status.loading {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

/* Kaynak Seçimi */
.price-match-source {
    min-width: 90px;
    max-width: 90px;
}

.price-match-source select {
    width: 100%;
    padding: 6px 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.price-match-source select:hover {
    border-color: var(--primary);
}

.price-match-source select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Manuel Fiyat Girişi */
.price-match-manual {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    max-width: 230px;
}

.price-match-manual input[type="number"] {
    width: 75px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
    text-align: right;
    transition: all 0.2s ease;
}

.price-match-manual input[type="number"]:hover {
    border-color: var(--primary);
}

.price-match-manual input[type="number"]:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.price-match-manual select {
    padding: 6px 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 50px;
}

.price-match-manual select:hover {
    border-color: var(--primary);
}

.price-match-manual select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Responsive - Fiyat Eşleştirme */
@media (max-width: 768px) {
    .price-match-item {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .price-match-asset {
        flex: 1 1 100%;
    }
    
    .price-match-source {
        flex: 0 0 auto;
    }
    
    .price-match-symbol,
    .price-match-manual {
        flex: 1;
    }
    
    .price-match-current {
        flex: 0 0 auto;
        text-align: left;
    }
}

.price-matching-empty {
    text-align: center;
    padding: 30px;
    color: var(--light-text);
}

/* Varlık Etiketleri (Panel) */
.asset-tags-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.no-asset-selected,
.no-tags-hint {
    color: var(--light-text);
    font-size: 0.85rem;
    font-style: italic;
}

.asset-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.asset-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid;
}

.asset-tag button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    font-size: 0.7rem;
}

.asset-tag button:hover {
    opacity: 1;
}

/* Etiket Ekleme Dropdown */
.add-tag-dropdown {
    position: relative;
}

.add-tag-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px dashed var(--border);
    border-radius: 20px;
    background: transparent;
    color: var(--light-text);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.add-tag-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.tag-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    min-width: 180px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
}

.tag-dropdown-menu.show {
    display: block;
}

.tag-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 0.85rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s;
}

.tag-dropdown-item:hover {
    background: var(--bg);
}

.no-more-tags {
    display: block;
    padding: 10px 12px;
    color: var(--light-text);
    font-size: 0.85rem;
    text-align: center;
}

/* =====================
   ETİKET ANALİZİ
   ===================== */

.tag-filter-selector {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid var(--border);
}

.tag-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tag-filter-label {
    font-weight: 500;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tag-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-chip-item {
    position: relative;
}

.tag-chip-item .tag-color-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tag-chip-item.selected {
    border-color: var(--tag-color, var(--primary));
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.02));
}

.tag-names-display {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.no-tags-message {
    color: var(--light-text);
    font-size: 0.9rem;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profit-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--border);
}

.profit-item.positive {
    border-left-color: var(--success);
}

.profit-item.negative {
    border-left-color: var(--danger);
}

.profit-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.profit-value {
    font-size: 1.1rem;
    font-weight: 600;
}

.profit-item.positive .profit-value {
    color: var(--success);
}

.profit-item.negative .profit-value {
    color: var(--danger);
}

/* =====================
   İŞLEM GEÇMİŞİ - SIRALAMA & DÜZENLEME
   ===================== */

/* Sıralanabilir tablo başlıkları */
.sortable {
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
    white-space: nowrap;
}

.sortable:hover {
    background: var(--bg);
}

.sort-icon {
    margin-left: 6px;
    font-size: 0.75rem;
    opacity: 0.4;
    transition: opacity 0.2s, color 0.2s;
}

.sort-icon.active {
    opacity: 1;
    color: var(--primary);
}

/* Tablo işlem butonları */
.action-buttons {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.edit-btn {
    padding: 6px 10px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: var(--warning);
    color: white;
    transition: all 0.2s;
}

.edit-btn:hover {
    background: #d97706;
    transform: scale(1.05);
}

/* Düzenleme Modal */
.edit-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.edit-modal {
    background: var(--card-bg);
    border-radius: var(--radius);
    width: 90%;
    max-width: 450px;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.2s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.edit-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.edit-modal-header .close-btn {
    padding: 8px;
    border: none;
    background: transparent;
    color: var(--light-text);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.edit-modal-header .close-btn:hover {
    background: var(--bg);
    color: var(--danger);
}

.edit-modal-body {
    padding: 20px;
}

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

.edit-modal-body .form-group:last-child {
    margin-bottom: 0;
}

.edit-modal-body label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
}

.edit-modal-body input,
.edit-modal-body select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.edit-modal-body input:focus,
.edit-modal-body select:focus {
    outline: none;
    border-color: var(--primary);
}

.edit-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg);
    border-radius: 0 0 var(--radius) var(--radius);
}

/* Para Birimi Seçici ve Dual Total Stilleri */
.currency-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.currency-input-row input {
    flex: 1;
}

.currency-select {
    width: 90px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card-bg);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.currency-select:focus {
    outline: none;
    border-color: var(--primary);
}

.dual-total {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.total-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    border-radius: var(--radius);
    background: var(--bg);
    border: 1px solid var(--border);
}

.total-box.try {
    border-left: 3px solid var(--primary);
}

.total-box.usd {
    border-left: 3px solid var(--success);
}

.total-box .total-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--light-text);
    text-transform: uppercase;
}

.total-box input {
    border: none;
    background: transparent;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    padding: 0;
}

.exchange-rate-info {
    margin-top: -4px;
    padding: 6px 8px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius);
}

.exchange-rate-info small {
    color: var(--primary);
    font-size: 0.75rem;
}

/* Header Para Birimi Toggle */
#currency-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: var(--radius);
    font-weight: 600;
}

#currency-toggle .currency-label {
    font-size: 0.75rem;
}

#currency-toggle.usd-mode {
    background: var(--success);
    color: white;
}

#currency-toggle.usd-mode i::before {
    content: "\24"; /* $ simgesi */
}

/* Currency Badge - USD ile girilen işlemler için */
.currency-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    background: var(--success);
    color: white;
    border-radius: 50%;
    vertical-align: middle;
}

/* Temettü Verimi Bilgi Kutusu */
.dividend-yield-info {
    margin-top: 8px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.1), rgba(249, 115, 22, 0.1));
    border-radius: var(--radius);
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.dividend-stats {
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.dividend-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    text-align: center;
}

.dividend-stat .stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dividend-stat .stat-label i {
    color: var(--warning);
}

.dividend-stat .stat-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--warning);
}

/* =============================================
   RESPONSIVE DESIGN - KAPSAMLI MOBİL UYUMLULUK
   ============================================= */

/* Mobil Menü Butonu - App Sayfaları */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.mobile-nav-toggle:hover {
    background: var(--bg);
    border-color: var(--primary);
    color: var(--primary);
}

/* Mobil nav linkleri overlay */
.mobile-nav-links {
    display: none;
}

/* --- TABLET (max-width: 1024px) --- */
@media (max-width: 1024px) {
    /* Transaction forms - 2 columns then 1 */
    .transaction-forms {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    /* Calculator grid - 2 columns */
    .calculator-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- MOBILE (max-width: 768px) --- */
@media (max-width: 768px) {
    /* ---- HEADER ---- */
    .app-header {
        padding: 8px 12px;
        gap: 8px;
        flex-wrap: nowrap;
    }
    
    .brand {
        font-size: 1.15rem;
        gap: 6px;
        white-space: nowrap;
    }
    
    .brand span,
    .brand [data-i18n] {
        display: none;
    }
    
    .brand i {
        font-size: 1.3rem;
    }
    
    /* Header actions - dar ekranda düzenle */
    .header-actions {
        gap: 4px;
        flex-wrap: nowrap;
        align-items: center;
    }
    
    /* Mobil menü butonu göster */
    .mobile-nav-toggle {
        display: flex;
    }
    
    /* Nav linkleri gizle (hamburger ile açılacak) */
    .header-actions > .secondary-btn {
        display: none;
    }
    
    /* Mobil nav menüsü */
    .mobile-nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
    }
    
    .mobile-nav-links.open {
        display: block;
    }
    
    .mobile-nav-backdrop {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
    }
    
    .mobile-nav-menu {
        position: absolute;
        top: 56px;
        right: 8px;
        background: var(--card-bg);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        box-shadow: var(--shadow-lg);
        min-width: 200px;
        padding: 8px;
        animation: mobileMenuSlide 0.2s ease;
    }
    
    @keyframes mobileMenuSlide {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    .mobile-nav-menu a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        color: var(--text);
        text-decoration: none;
        border-radius: var(--radius-sm);
        font-size: 0.95rem;
        font-weight: 500;
        transition: all 0.2s;
    }
    
    .mobile-nav-menu a:hover,
    .mobile-nav-menu a:active {
        background: var(--bg);
        color: var(--primary);
    }
    
    .mobile-nav-menu a i {
        width: 20px;
        text-align: center;
        color: var(--primary);
    }
    
    /* Icon buttons - mobil boyut */
    .icon-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    /* User info gizle */
    .user-info {
        display: none !important;
    }
    
    /* Currency toggle kompakt */
    #currency-toggle {
        padding: 4px 8px;
    }
    
    #currency-toggle .currency-label {
        display: none;
    }
    
    /* ---- ANA İÇERİK ---- */
    #app {
        padding: 12px;
        gap: 16px;
    }
    
    /* Cards */
    .card {
        padding: 14px;
        border-radius: 10px;
    }
    
    .card h2 {
        font-size: 1.05rem;
        gap: 8px;
        margin-bottom: 14px;
        padding-bottom: 10px;
    }
    
    .card h3 {
        font-size: 0.95rem;
    }
    
    /* ---- GRID LAYOUTS ---- */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    /* 2-column grids can stay 2 col on mobile for stat cards */
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    /* ---- STAT CARDS ---- */
    .stat-card {
        padding: 12px;
    }
    
    .stat-card .stat-value {
        font-size: 1rem;
        word-break: break-word;
    }
    
    .stat-card label {
        font-size: 0.7rem;
        margin-bottom: 4px;
    }
    
    .stat-card .stat-sub {
        font-size: 0.7rem;
        margin-top: 3px;
    }
    
    .stat-card .stat-hint {
        font-size: 0.65rem;
    }
    
    /* ---- TRANSACTION FORMS ---- */
    .transaction-forms {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    
    .form-card {
        padding: 14px;
    }
    
    .form-row {
        gap: 8px;
        margin-bottom: 10px;
    }
    
    .form-row > label {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .form-row input,
    .form-row select {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    /* Currency input row - wrap */
    .currency-input-row {
        flex-wrap: wrap;
    }
    
    .currency-select {
        flex: 0 0 100%;
        width: 100%;
    }
    
    /* Dual total - dikey */
    .dual-total {
        flex-direction: column;
        gap: 6px;
    }
    
    .total-box {
        padding: 6px 8px;
    }
    
    .total-box .total-label {
        font-size: 0.65rem;
    }
    
    .total-box input {
        font-size: 0.85rem;
    }
    
    /* Exchange rate info */
    .exchange-rate-info {
        padding: 4px 8px;
    }
    
    .exchange-rate-info small {
        font-size: 0.7rem;
    }
    
    /* ---- COMPACT SELECTOR ---- */
    .compact-selector-main {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    
    .compact-selector-main .selector-group {
        min-width: 100%;
    }
    
    .compact-selector-main .selector-group select {
        padding: 10px 14px;
    }
    
    .toggle-panel-btn {
        width: 100%;
        height: 40px;
    }
    
    /* Asset management panel */
    .asset-management-panel {
        padding: 12px;
    }
    
    .panel-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .panel-row input {
        min-width: 100%;
    }
    
    .panel-btn {
        width: 100%;
        height: 44px;
    }
    
    /* ---- HESAPLAYICILAR ---- */
    .calculator-section {
        padding: 14px;
    }
    
    .calculator-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .converter-row {
        grid-template-columns: 1fr;
    }
    
    .calc-input-group input,
    .calc-input-group select {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .copy-input-wrapper {
        flex-direction: column;
    }
    
    .copy-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* ---- TABLOLAR ---- */
    .table-container {
        margin-left: -14px;
        margin-right: -14px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    th, td {
        padding: 10px 10px;
        font-size: 0.78rem;
        white-space: nowrap;
    }
    
    th {
        font-size: 0.72rem;
        padding: 10px 10px;
    }
    
    /* ---- MODAL ---- */
    .modal-content {
        width: 96%;
        max-height: 94vh;
    }
    
    /* Settings modal */
    .settings-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        gap: 4px;
        padding-bottom: 8px;
        scrollbar-width: none;
    }
    
    .settings-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .settings-tab {
        font-size: 0.8rem;
        padding: 6px 10px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    /* New tag form */
    .new-tag-form {
        flex-direction: column;
        gap: 8px;
    }
    
    .new-tag-form input,
    .new-tag-form select {
        width: 100%;
        flex: auto;
    }
    
    /* ---- FİYAT EŞLEŞTİRME ---- */
    .price-match-item {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px;
    }
    
    .price-match-asset {
        flex: 1 1 100%;
        max-width: 100%;
    }
    
    .price-match-source {
        flex: 0 0 auto;
        min-width: auto;
        max-width: none;
    }
    
    .price-match-symbol,
    .price-match-manual {
        flex: 1 1 100%;
        max-width: 100%;
    }
    
    .price-match-current {
        flex: 0 0 auto;
        text-align: left;
    }
    
    .price-match-actions {
        flex: 1 1 100%;
        justify-content: stretch;
    }
    
    .price-match-actions button {
        flex: 1;
    }
    
    /* ---- DİĞER BİLEŞENLER ---- */
    
    /* Dividend stats */
    .dividend-stats {
        flex-direction: column;
        gap: 8px;
    }
    
    .dividend-stat {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
        padding: 8px 0;
        border-bottom: 1px solid var(--border);
    }
    
    .dividend-stat:last-child {
        border-bottom: none;
    }
    
    /* Breakeven */
    .breakeven-indicator {
        padding: 12px;
    }
    
    .breakeven-details {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .breakeven-detail-item {
        padding: 10px;
    }
    
    .breakeven-detail-item .value {
        font-size: 0.95rem;
    }
    
    /* Action buttons */
    .action-btn-group {
        flex-direction: column;
    }
    
    .action-btn-group .action-btn {
        min-width: auto;
        width: 100%;
    }
    
    /* Target selectors */
    .target-selectors {
        grid-template-columns: 1fr;
    }
    
    /* Group chips */
    .group-chips-container {
        gap: 6px;
    }
    
    .group-chip {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    /* Navigation buttons */
    .go-to-calculators-btn,
    .go-back-btn {
        font-size: 0.85rem;
        padding: 12px 16px;
        gap: 8px;
    }
    
    /* Selected target display */
    .selected-target-display {
        font-size: 0.8rem;
        padding: 10px 12px;
    }
    
    /* Summary row */
    .summary-row {
        grid-template-columns: 1fr;
    }
    
    /* Group summary */
    #groupSummary .grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    #groupSummary .stat-card {
        padding: 10px;
    }
    
    #groupSummary .stat-card label {
        font-size: 0.7rem;
    }
    
    #groupSummary .stat-card .stat-value {
        font-size: 0.95rem;
    }
    
    /* Portfolio selector */
    .portfolio-selector {
        flex-direction: column;
    }
    
    .portfolio-selector select,
    .portfolio-selector input {
        min-width: 100%;
    }
    
    /* Modern input group */
    .modern-input-group,
    .modern-input-group.three-col {
        grid-template-columns: 1fr;
    }
    
    /* Notification */
    #notification {
        right: 10px;
        left: 10px;
        top: auto;
        bottom: 20px;
        max-width: none;
    }
    
    #notification.undo-notification {
        min-width: auto;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .undo-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* History controls */
    .history-controls {
        flex-direction: column;
        gap: 8px;
    }
    
    .history-controls select,
    .history-controls input,
    .history-controls button {
        width: 100%;
    }
    
    /* Edit modal */
    .edit-modal {
        width: 95%;
        max-width: none;
    }
    
    /* Sync conflict modal */
    #sync-conflict-modal .modal-content {
        width: 95%;
    }
    
    /* Combined analysis header */
    .combined-title {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .combined-title h2 {
        font-size: 1rem;
    }
    
    /* Selected groups tags */
    .selected-groups-tags {
        gap: 6px;
    }
    
    .group-tag {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    /* Tag filter */
    .tag-chips-container {
        gap: 6px;
    }
    
    /* Asset tags */
    .asset-tags-list {
        gap: 6px;
    }
    
    .asset-tag {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    /* Tag dropdown */
    .tag-dropdown-menu {
        min-width: 160px;
    }
    
    /* Profit breakdown */
    .profit-item {
        padding: 10px 12px;
    }
    
    .profit-value {
        font-size: 0.95rem;
    }
    
    /* Portfolio groups list */
    .portfolio-group-item {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .portfolio-group-item .group-stats {
        flex: 1 1 100%;
        text-align: left;
        padding: 4px 0 0 0;
        font-size: 0.75rem;
    }
    
    /* Buttons - touch friendly */
    .primary-btn,
    .secondary-btn,
    .success-btn,
    .danger-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
        min-height: 44px;
    }
    
    /* Light box */
    .light {
        padding: 12px;
    }
}

/* --- KÜÇÜK MOBİL (max-width: 480px) --- */
@media (max-width: 480px) {
    .app-header {
        padding: 6px 8px;
    }
    
    .brand {
        font-size: 1rem;
    }
    
    .icon-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .mobile-nav-toggle {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    #app {
        padding: 8px;
        gap: 10px;
    }
    
    .card {
        padding: 10px;
        border-radius: 8px;
    }
    
    .card h2 {
        font-size: 0.95rem;
        margin-bottom: 12px;
    }
    
    /* Stat cards - tek kolon */
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .stat-card .stat-value {
        font-size: 0.9rem;
    }
    
    .stat-card label {
        font-size: 0.65rem;
    }
    
    #groupSummary .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .breakeven-details {
        grid-template-columns: 1fr;
    }
    
    .breakeven-detail-item .value {
        font-size: 0.85rem;
    }
    
    /* Form row */
    .form-row > label {
        display: none;
    }
    
    .form-row {
        gap: 6px;
    }
    
    .form-row input,
    .form-row select {
        padding: 10px;
        font-size: 0.85rem;
    }
    
    /* Table even smaller */
    th, td {
        padding: 8px 6px;
        font-size: 0.7rem;
    }
    
    /* Action buttons */
    .action-buttons {
        flex-direction: column;
        gap: 4px;
    }
    
    .delete-btn {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
    
    /* Calculator */
    .calculator-section {
        padding: 10px;
    }
    
    .calc-input-group label {
        font-size: 0.75rem;
    }
    
    .calc-input-group input,
    .calc-input-group select {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    
    /* Buttons */
    .primary-btn,
    .secondary-btn,
    .success-btn,
    .danger-btn {
        font-size: 0.8rem;
        padding: 10px 14px;
    }
    
    /* Go-to buttons */
    .go-to-calculators-btn,
    .go-back-btn {
        padding: 10px 14px;
        font-size: 0.8rem;
    }
    
    /* Price match - smaller */
    .price-match-asset-name {
        font-size: 0.85rem;
    }
    
    .price-match-current-value {
        font-size: 0.85rem;
    }
    
    /* Modal */
    .modal-content {
        width: 100%;
        max-height: 100vh;
        border-radius: 12px 12px 0 0;
        margin-top: auto;
    }
    
    /* Settings tab - only icons */
    .settings-tab span {
        display: none;
    }
    
    .settings-tab {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    /* Section titles */
    .section-title {
        font-size: 0.95rem;
    }
    
    /* Notification */
    #notification {
        left: 8px;
        right: 8px;
        bottom: 10px;
        font-size: 0.85rem;
        padding: 12px 16px;
    }
}

/* --- TOUCH OPTİMİZASYON --- */
@media (hover: none) and (pointer: coarse) {
    /* Daha büyük dokunma alanları */
    .icon-btn,
    .mobile-nav-toggle {
        min-width: 44px;
        min-height: 44px;
    }
    
    .form-row input,
    .form-row select,
    .calc-input-group input,
    .calc-input-group select {
        min-height: 44px;
    }
    
    /* Hover efektlerini kaldır */
    .stat-card:hover {
        transform: none;
        box-shadow: var(--shadow);
    }
    
    .feature-card:hover,
    .tool-card:hover,
    .asset-action-card:hover {
        transform: none;
    }
    
    /* Sort icon'u daha kolay tıklanabilir yap */
    .sortable {
        padding: 12px 10px;
    }
    
    /* Delete/edit butonları */
    .delete-btn,
    .edit-btn {
        min-height: 36px;
        min-width: 36px;
    }
    
    /* Scrollbar gizle (touch) */
    .settings-tabs::-webkit-scrollbar,
    .price-matching-container::-webkit-scrollbar,
    .portfolio-groups-list::-webkit-scrollbar,
    .tags-list-container::-webkit-scrollbar {
        display: none;
    }
    
    .settings-tabs,
    .price-matching-container,
    .portfolio-groups-list,
    .tags-list-container {
        scrollbar-width: none;
    }
}

/* --- LANDSCAPE MOBİL --- */
@media (max-height: 500px) and (orientation: landscape) {
    .app-header {
        padding: 4px 12px;
    }
    
    .brand {
        font-size: 1rem;
    }
    
    .icon-btn {
        width: 32px;
        height: 32px;
    }
    
    #app {
        padding: 8px;
        gap: 10px;
    }
    
    .card {
        padding: 10px;
    }
    
    .card h2 {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    /* Grids can be 2 columns in landscape */
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .transaction-forms {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- BÜYÜK MOBİL / KÜÇÜK TABLET (max-width: 640px) --- */
@media (max-width: 640px) {
    /* Multi-select chips - 2 per row */
    .group-chips-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Tag chips */
    .tag-chips-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tag-chip-item {
        width: 100%;
    }
}

