/* 
 * İthalat Maliyet Hesaplayıcı Stil Dosyası
 * Ferah, Modern, Premium Glassmorphism Koyu Tema (Dark Mode)
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* Değişkenler ve Tasarım Sistemi */
:root {
    --bg-main: #0B0F19;
    --bg-card: rgba(17, 24, 39, 0.75);
    --bg-card-sub: rgba(30, 41, 59, 0.5);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    --accent-blue: #3B82F6;
    --accent-blue-hover: #60A5FA;
    --accent-cyan: #06B6D4;
    --accent-green: #10B981;
    --accent-amber: #F59E0B;
    --accent-red: #EF4444;
    --text-white: #FFFFFF;
    --text-muted: #94A3B8;
    --text-dark: #64748B;
    --glow-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Genel Sınıflar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    background-image:
        radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-white);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
    font-variant-numeric: tabular-nums;
}

input,
button,
select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

/* Ferah Arayüz Konteyneri */
.app-container,
.dashboard-wrapper {
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
    padding: 32px 60px 32px 60px;
    box-sizing: border-box;
}

/* --- LOGIN EKRANI --- */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 85vh;
}

.auth-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 44px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--glow-shadow);
    animation: fadeIn 0.4s ease-out;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    font-family: var(--font-heading);
    font-size: 30px;
    font-weight: 800;
    background: linear-gradient(135deg, #3B82F6 0%, #06B6D4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

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

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 12px;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.auth-tab.active {
    color: var(--text-white);
    border-bottom-color: var(--accent-blue);
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-weight: 500;
}

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    height: 44px;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.form-group-checkbox {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.checkbox-label:hover {
    color: var(--text-white);
}

.checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
}

.checkbox-label input[type="checkbox"]:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 11px;
    color: #FFF;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-blue) 0%, #1D4ED8 100%);
    color: var(--text-white);
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* --- ÜST UYGULAMA BARI --- */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 24px;
}

.app-title-section h1 {
    font-family: var(--font-heading);
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-title-section p {
    color: var(--text-muted);
    margin-top: 6px;
    font-size: 14px;
}

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

.user-info {
    color: var(--text-muted);
    font-weight: 500;
    margin-right: 12px;
    font-size: 14px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 18px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

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

.btn-success {
    background: linear-gradient(135deg, var(--accent-green) 0%, #047857 100%);
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.3);
}

.btn-danger-outline {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    color: var(--accent-red);
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.12);
}

/* --- VIEW SECTION & DASHBOARD STİLLERİ --- */
.view-section {
    width: 100%;
    padding-bottom: 100px;
    animation: fadeIn 0.35s ease-out;
}

/* Navigasyon Tab Butonları */
.nav-tab.active {
    box-shadow: 0 0 14px rgba(6, 182, 212, 0.4);
    border-color: var(--accent-cyan) !important;
}

/* Dashboard Üst İstatistik Kartları Grid */
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.25s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    color: var(--text-white);
}

.net-profit-stat-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(6, 182, 212, 0.12) 100%);
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.net-profit-stat-card .stat-label {
    color: #A7F3D0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.net-profit-stat-card .stat-value {
    color: #34D399;
    font-size: 22px;
}

/* Dashboard Alt Grid Bölümü */
.dashboard-grid-section {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 28px 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

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

.dashboard-section-header h2 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-containers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* Yeni Hesaplama Aksiyon Kartı */
.dash-new-card {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    border: 2px dashed rgba(6, 182, 212, 0.4);
    border-radius: 16px;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 220px;
}

.dash-new-card:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2) 0%, rgba(6, 182, 212, 0.2) 100%);
    border-color: var(--accent-cyan);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(6, 182, 212, 0.25);
}

.dash-new-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #10B981, #06B6D4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #FFF;
    margin-bottom: 16px;
    box-shadow: 0 6px 16px rgba(6, 182, 212, 0.3);
}

.dash-new-card h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 6px;
}

.dash-new-card p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Kayıtlı Konteyner Kartı */
.dash-container-card {
    background: var(--bg-card-sub);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
    position: relative;
}

.dash-container-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

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

.dash-card-title {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-white);
}

.dash-card-date {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.dash-card-badge {
    background: rgba(6, 182, 212, 0.15);
    color: #22D3EE;
    border: 1px solid rgba(6, 182, 212, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.dash-card-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.metric-item {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.metric-value {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 15px;
    color: var(--text-white);
}

.metric-value.profit-val {
    color: #34D399;
}

.dash-card-actions {
    display: flex;
    gap: 10px;
}

.btn-dash-open {
    flex: 1;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60A5FA;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-dash-open:hover {
    background: #2563EB;
    color: #FFF;
}

.btn-dash-delete {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--accent-red);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-dash-delete:hover {
    background: var(--accent-red);
    color: #FFF;
}

/* Drag and Drop Sıralama Stilleri */
.history-item,
.dash-container-card {
    cursor: grab;
    user-select: none;
}

.history-item:active,
.dash-container-card:active {
    cursor: grabbing;
}

.history-item.dragging,
.dash-container-card.dragging {
    opacity: 0.4;
    border: 2px dashed var(--accent-cyan) !important;
    transform: scale(0.98);
}

.history-item.drag-over,
.dash-container-card.drag-over {
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 0 16px rgba(6, 182, 212, 0.4);
}

.drag-handle {
    color: var(--text-muted);
    font-size: 13px;
    margin-right: 6px;
    cursor: grab;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.history-item:hover .drag-handle,
.dash-container-card:hover .drag-handle {
    opacity: 1;
    color: var(--accent-cyan);
}

/* Ana Düzen (Grid) */
.main-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
}

/* Kenar Çubuğu (Geçmiş Hesaplamalar) */
.sidebar {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 170px);
    position: sticky;
    top: 28px;
}

.sidebar-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 17px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 4px;
}

.sidebar-list::-webkit-scrollbar {
    width: 5px;
}

.sidebar-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.history-item {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-hover);
    transform: translateX(3px);
}

.history-item.active {
    background: rgba(37, 99, 235, 0.12);
    border-color: var(--accent-blue);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.history-item-title {
    font-family: var(--font-heading);
    color: var(--text-white);
    font-size: 14px;
}

.history-item-date {
    font-size: 11px;
    color: var(--text-muted);
}

.history-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.history-item-sum {
    font-size: 12px;
    color: var(--accent-cyan);
    font-weight: 700;
}

.btn-item-delete {
    background: none;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.btn-item-delete:hover {
    color: var(--accent-red);
    background: rgba(239, 68, 68, 0.1);
}

.no-history {
    color: var(--text-dark);
    text-align: center;
    padding: 24px 0;
    font-style: italic;
}

/* Hesaplama Alanı (Merkez - İki Sütunlu) */
.calculator-content {
    display: grid;
    grid-template-columns: 1fr 440px;
    gap: 28px;
}

/* Kart Tasarımları */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px 28px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 24px;
}

.card:last-child {
    margin-bottom: 0;
}

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

.card-title {
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Konteyner No Girişi */
.contract-section {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 24px;
}

.contract-section label {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 15px;
    color: var(--text-muted);
}

.contract-input {
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--border-color);
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 700;
    padding: 6px 10px;
    width: 280px;
    color: var(--text-white);
    transition: all 0.2s ease;
}

.contract-input:focus {
    outline: none;
    border-bottom-color: var(--accent-cyan);
}

/* Ürün Grupları İç Kart Kutuları (Visual Chunking) */
.product-group-container {
    background: var(--bg-card-sub);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 24px;
}

.product-group-container.import-container {
    border-left: 4px solid var(--accent-blue);
}

.product-group-container.antrepo-container {
    border-left: 4px solid var(--accent-amber);
    margin-bottom: 0;
}

.product-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.product-group-header span {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 15px;
}

/* Dinamik Tablolar ve Listeler */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.app-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.app-table th {
    font-family: var(--font-heading);
    font-weight: 700;
    color: #94A3B8;
    padding: 12px 16px;
    border-bottom: 2px solid var(--border-color);
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.app-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.app-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Tablo İçi Form Girişleri */
.table-input {
    width: 100%;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    height: 40px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.table-input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: rgba(30, 41, 59, 0.95);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

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

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

/* Kategori Rozetleri */
.badge-import {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(59, 130, 246, 0.15);
    color: #60A5FA;
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.badge-antrepo {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(245, 158, 11, 0.15);
    color: #FBBF24;
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.sub-header-row td {
    background: rgba(255, 255, 255, 0.03);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    padding: 10px 16px;
}

/* Faturalandırılacak Birim Tutarı Özel Çerçeve ve Vurgu Stilleri */
.highlight-billing-header {
    color: #34D399 !important;
    font-weight: 700 !important;
    letter-spacing: -0.2px;
}

.billing-unit-cell {
    text-align: right;
    vertical-align: middle;
}

.billing-unit-box {
    display: inline-block;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(6, 182, 212, 0.2) 100%);
    border: 1px solid #10B981;
    color: #34D399;
    padding: 6px 14px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 15px;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
    transition: all 0.2s ease;
}

.billing-unit-box:hover {
    transform: scale(1.03);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
    border-color: #34D399;
}

/* Maliyet Giriş Grupları (Sağ Panel) */
.costs-categories-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cost-category-block {
    background: var(--bg-card-sub);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px 18px;
}

.cost-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.costs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cost-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cost-label {
    flex: 1;
    font-weight: 500;
    color: var(--text-muted);
    font-size: 13px;
}

.cost-input-wrapper {
    position: relative;
    width: 140px;
}

.cost-input-wrapper input {
    width: 100%;
    text-align: right;
    padding-right: 22px;
    height: 38px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 600;
}

.cost-input-wrapper input:focus {
    outline: none;
    border-color: var(--accent-cyan);
}

.cost-input-wrapper::after {
    content: '$';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dark);
    font-weight: 600;
}

.btn-row-action {
    background: none;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-row-action:hover {
    color: var(--accent-red);
    background: rgba(239, 68, 68, 0.1);
}

/* Kar Marjı Girişi */
.profit-slider-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.profit-slider {
    flex: 1;
    accent-color: var(--accent-cyan);
    cursor: pointer;
    height: 6px;
}

.profit-value-box {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 16px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 17px;
    color: var(--accent-cyan);
    min-width: 90px;
    text-align: center;
}

/* Özet Paneli (Yönetici Gösterge Kartları) */
.summary-table {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.summary-block {
    background: var(--bg-card-sub);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px 18px;
}

.summary-block-title {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.summary-lbl {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 13px;
}

.summary-val {
    font-weight: 700;
    font-size: 15px;
}

/* Net Kâr Vurgu Kartı */
.net-profit-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    margin-top: 6px;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.15);
}

.net-profit-card .profit-title {
    font-size: 12px;
    font-weight: 700;
    color: #A7F3D0;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.net-profit-card .profit-val {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    color: #34D399;
    letter-spacing: -0.5px;
}

/* --- HESAPLAMA TABLOSU VURGULARI --- */
.highlight-cost {
    color: var(--accent-cyan);
    font-weight: 600;
}

.highlight-sale {
    color: var(--accent-green);
    font-weight: 600;
}

/* PDF YÜKLEME / HATA POPUPLARI */
.notification {
    position: fixed;
    bottom: 24px;
    left: 24px;
    padding: 16px 24px;
    border-radius: 10px;
    background: rgba(17, 24, 39, 0.95);
    border-left: 4px solid var(--accent-cyan);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification.success {
    border-left-color: var(--accent-green);
}

.notification.error {
    border-left-color: var(--accent-red);
}

/* Animasyonlar */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Responsive Düzenler */
@media (max-width: 1280px) {
    .calculator-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .main-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        height: auto;
        position: static;
        margin-bottom: 24px;
    }
}

/* --- YAŞLI DOSTU FATURA & MALİYET DANIŞMANI (CHATBOT STİLLERİ) --- */
.chatbot-toggle-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #059669 0%, #0284C7 100%);
    color: #FFFFFF;
    border: none;
    padding: 14px 22px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.35);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chatbot-toggle-button:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 30px rgba(6, 182, 212, 0.5);
}

.chatbot-modal-window {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 400px;
    max-width: calc(100vw - 32px);
    height: 540px;
    max-height: calc(100vh - 120px);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
    overflow: hidden;
}

.chatbot-modal-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: rgba(30, 41, 59, 0.9);
    border-bottom: 1px solid var(--border-color);
}

.chatbot-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.assistant-avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #10B981, #06B6D4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFF;
    font-size: 18px;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.chatbot-title h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-white);
}

.btn-chatbot-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s;
}

.btn-chatbot-close:hover {
    color: var(--text-white);
}

/* Mesaj İçi Çoklu Buton Izgarası (Yatay Scroll Olmayan, Çok Satırlı Butonlar) */
.chat-inline-buttons-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.chat-inline-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #93C5FD;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.chat-inline-btn:hover {
    background: rgba(37, 99, 235, 0.4);
    color: #FFFFFF;
    border-color: #60A5FA;
    transform: translateY(-1px);
}

.chat-inline-btn.summary-btn {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    color: #6EE7B7;
}

.chat-inline-btn.summary-btn:hover {
    background: rgba(16, 185, 129, 0.4);
    color: #FFFFFF;
    border-color: #34D399;
}

.chatbot-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.chatbot-msg {
    display: flex;
    gap: 10px;
    max-width: 90%;
}

.chatbot-msg.user-msg {
    align-self: flex-end;
}

.chatbot-msg.user-msg .msg-bubble {
    background: #2563EB;
    color: #FFFFFF;
    border-radius: 16px 16px 2px 16px;
    font-size: 14px;
    padding: 10px 16px;
}

.chatbot-msg.assistant-msg {
    align-self: flex-start;
}

.chatbot-msg.assistant-msg .msg-avatar {
    width: 30px;
    height: 30px;
    background: #059669;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFF;
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

.chatbot-msg.assistant-msg .msg-bubble {
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #E2E8F0;
    border-radius: 16px 16px 16px 2px;
    font-size: 14px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.chatbot-footer {
    display: flex;
    gap: 8px;
    padding: 14px;
    background: rgba(30, 41, 59, 0.9);
    border-top: 1px solid var(--border-color);
}

.chatbot-input-field {
    flex: 1;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    color: #FFF;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
}

.chatbot-input-field:focus {
    border-color: #10B981;
}

.btn-chatbot-send {
    background: #10B981;
    color: #FFF;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-chatbot-send:hover {
    background: #059669;
}

/* --- MODAL OVERLAY & TOPLU ÜRÜN EKLEME PENCERESİ --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.25s ease-out;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 760px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close-btn:hover {
    color: #FFF;
}

.bulk-mode-toggle {
    display: flex;
    background: rgba(15, 23, 42, 0.6);
    padding: 6px;
    gap: 6px;
    border-bottom: 1px solid var(--border-color);
}

.bulk-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.bulk-tab.active {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.bulk-view-content {
    padding: 24px;
}

.bulk-help-text {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid var(--accent-blue);
    padding: 10px 14px;
    border-radius: 6px;
}

.bulk-columns-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
}

.bulk-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bulk-field-group label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-white);
}

.bulk-field-group label small {
    font-weight: 400;
    color: var(--text-muted);
}

.bulk-textarea {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-white);
    font-family: monospace;
    font-size: 13px;
    padding: 12px;
    height: 220px;
    resize: vertical;
    outline: none;
    line-height: 1.6;
    transition: border-color 0.2s ease;
}

.bulk-textarea:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.single-csv-textarea {
    width: 100%;
    height: 240px;
}

.bulk-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: rgba(15, 23, 42, 0.5);
    border-top: 1px solid var(--border-color);
}

/* --- KONTEYNER STOK & FATURA CARİ BAKİYE STİLLERİ (PIXEL PERFECT DESIGN) --- */
#stock-view {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding-top: 0;
}

.stock-page-header {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.85) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 5px solid var(--accent-cyan);
    border-radius: 18px;
    padding: 20px 26px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
}

.stock-dashboard-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.stock-summary-item {
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
}

.stock-summary-item:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5);
}

.stock-summary-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stock-summary-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.stock-summary-item .lbl {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.stock-summary-item .val {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    color: var(--text-white);
}

.stock-section-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-stock-full {
    background: rgba(16, 185, 129, 0.12);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-stock-out {
    background: rgba(239, 68, 68, 0.12);
    color: #F87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-stock-partial {
    background: rgba(245, 158, 11, 0.12);
    color: #FBBF24;
    border: 1px solid rgba(245, 158, 11, 0.35);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.balance-positive {
    color: #34D399 !important;
}

.balance-negative {
    color: #F87171 !important;
}

.invoice-card {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.invoice-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

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

.invoice-card-title {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 800;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-item-edit {
    background: rgba(59, 130, 246, 0.15);
    color: #60A5FA;
    border: 1px solid rgba(59, 130, 246, 0.35);
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-item-edit:hover {
    background: rgba(59, 130, 246, 0.3);
    color: #FFF;
    border-color: rgba(59, 130, 246, 0.6);
}

/* PDF YAZDIRMA GİZLİ ALANLARI */
.pdf-report-header,
.pdf-summary-layout {
    display: none;
}

.profit-value-box input::-webkit-outer-spin-button,
.profit-value-box input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.profit-value-box input[type=number] {
    -moz-appearance: textfield;
}

/* === Stok & Fatura Takibi Dropdown Menü === */
.stock-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.stock-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 340px;
    max-height: 420px;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    z-index: 9999;
    overflow: hidden;
    animation: stockDropdownIn 0.2s ease-out;
}

.stock-dropdown-menu.open {
    display: block;
}

@keyframes stockDropdownIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.stock-dropdown-header {
    padding: 14px 18px 10px;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 8px;
}

.stock-dropdown-header i {
    color: var(--accent-cyan);
    font-size: 15px;
}

.stock-dropdown-list {
    max-height: 340px;
    overflow-y: auto;
    padding: 8px;
}

.stock-dropdown-list::-webkit-scrollbar {
    width: 5px;
}

.stock-dropdown-list::-webkit-scrollbar-track {
    background: transparent;
}

.stock-dropdown-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 99px;
}

.stock-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.18s ease;
    border: 1px solid transparent;
}

.stock-dropdown-item:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.25);
}

.stock-dropdown-item:active {
    transform: scale(0.98);
}

.stock-dropdown-item .sdi-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    background: rgba(6, 182, 212, 0.12);
    color: #22D3EE;
}

.stock-dropdown-item .sdi-info {
    flex: 1;
    min-width: 0;
}

.stock-dropdown-item .sdi-name {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stock-dropdown-item .sdi-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.stock-dropdown-item .sdi-arrow {
    color: rgba(255, 255, 255, 0.25);
    font-size: 13px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.stock-dropdown-item:hover .sdi-arrow {
    color: var(--accent-cyan);
    transform: translateX(3px);
}

.stock-dropdown-loading {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 13px;
}

.stock-dropdown-empty {
    text-align: center;
    padding: 28px 16px;
    color: var(--text-muted);
    font-size: 13px;
}

.stock-dropdown-empty i {
    display: block;
    font-size: 28px;
    color: rgba(255, 255, 255, 0.15);
    margin-bottom: 8px;
}