﻿:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99,102,241,0.12);
    --bg-gradient-1: #0a0d14;
    --bg-gradient-2: #111827;
    --text-dark: #e2e8f0;
    --text-muted: #94a3b8;
    --text-primary: #e2e8f0;
    --glass-bg: rgba(17,24,39,0.92);
    --glass-border: rgba(255,255,255,0.07);
    --glass-shadow: 0 8px 32px 0 rgba(0,0,0,0.4);
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --sidebar-width: 260px;
    --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(79,70,229,0.3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(79,70,229,0.6); }

body {
    background: var(--dark-bg, #0a0d14);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
}

.brand-product-wordmark {
    background: linear-gradient(135deg, #f8fafc 15%, var(--primary-color) 88%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
}

.app-container {
    display: none;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(248,250,252,0.88) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255,255,255,0.7);
    padding: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: 4px 0 24px rgba(0,0,0,0.06);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.language-switcher {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 12px 20px 6px;
}

.lang-flag {
    display: inline-grid;
    width: 42px;
    height: 32px;
    padding: 5px;
    place-items: center;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.08);
    box-shadow: none;
    opacity: 0.56;
    cursor: pointer;
    transition: transform 0.18s ease, opacity 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.lang-flag img {
    display: block;
    width: 30px;
    height: 20px;
    border-radius: 3px;
    object-fit: cover;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
}

.lang-flag:hover {
    border-color: rgba(129, 140, 248, 0.48);
    background: rgba(99, 102, 241, 0.1);
    opacity: 0.9;
    transform: translateY(-1px);
}

.lang-flag.is-active {
    border-color: rgba(129, 140, 248, 0.72);
    background: rgba(99, 102, 241, 0.16);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.14), 0 5px 12px rgba(15, 23, 42, 0.18);
    opacity: 1;
    transform: translateY(-1px);
}

.lang-flag:focus-visible {
    outline: 3px solid rgba(129, 140, 248, 0.4);
    outline-offset: 2px;
}

.logo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.6rem 1.4rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    margin-bottom: 1rem;
    position: sticky;
    top: 0;
    background: inherit;
    z-index: 2;
}

.close-sidebar {
    display: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,0.06);
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-muted);
    transition: var(--transition);
    border: none;
}
.close-sidebar:hover { background: rgba(239,68,68,0.1); color: #ef4444; }

@media (max-width: 768px) {
    .close-sidebar { display: flex; }
}

.logo h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary-color);
}

.logo p {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 2px;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 0.8rem;
    flex: 1;
}

.nav-item {
    padding: 0.85rem 1rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.nav-item i { width: 20px; text-align: center; font-size: 1rem; }

.nav-item:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    transform: translateX(4px);
}

.nav-item.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(79,70,229,0.35);
    font-weight: 800;
}
.nav-item.active i { color: white; }

.sidebar-divider {
    height: 1px;
    background: rgba(0,0,0,0.06);
    margin: 0.6rem 0.8rem;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 1.5rem 2.5rem;
    transition: var(--transition);
    min-width: 0;
}

.main-content.expanded {
    margin-left: 0;
}

.hamburger-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    font-size: 1.1rem;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.hamburger-btn:hover { background: white; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

/* Mobile overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
    backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

.sidebar-reopen-button {
    display: none;
    position: fixed;
    top: 50%;
    left: 0;
    z-index: 1001;
    min-height: 46px;
    padding: 0 13px 0 11px;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(129, 140, 248, 0.48);
    border-left: 0;
    border-radius: 0 13px 13px 0;
    color: #ffffff;
    background: linear-gradient(135deg, #4338ca, #6366f1);
    box-shadow: 0 12px 30px rgba(49, 46, 129, 0.38);
    transform: translateY(-50%);
    cursor: pointer;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    transition: padding 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.sidebar-reopen-button.is-visible {
    display: inline-flex;
    animation: sidebarReopenIn 0.2s ease-out;
}

.sidebar-reopen-button:hover {
    padding-right: 17px;
    background: linear-gradient(135deg, #3730a3, #4f46e5);
    box-shadow: 0 15px 34px rgba(49, 46, 129, 0.48);
}

.sidebar-reopen-button:focus-visible {
    outline: 3px solid rgba(129, 140, 248, 0.42);
    outline-offset: 3px;
}

@keyframes sidebarReopenIn {
    from { opacity: 0; transform: translate(-10px, -50%); }
    to { opacity: 1; transform: translate(0, -50%); }
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding: 1rem 1.2rem;
    }
    .sidebar-reopen-button {
        top: auto;
        bottom: 16px;
        left: 12px;
        border-left: 1px solid rgba(129, 140, 248, 0.48);
        border-radius: 13px;
        transform: none;
    }
    .sidebar-reopen-button.is-visible {
        animation-name: sidebarReopenMobileIn;
    }
}

@keyframes sidebarReopenMobileIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 480px) {
    .main-content { padding: 0.8rem; }
}

/* Platform subscription administration */
.platform-admin-workspace {
    max-width: 1600px;
    margin: 0 auto;
}

.platform-admin-header {
    margin-bottom: 1rem;
}

.platform-admin-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.platform-admin-kpis article {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 0.8rem;
    align-items: center;
    min-height: 92px;
    padding: 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    background: var(--glass-bg);
    box-shadow: var(--shadow-sm);
}

.platform-admin-kpis article > span {
    grid-row: 1 / span 2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    color: #fff;
}

.platform-admin-kpis .tone-indigo { background: #4f46e5; }
.platform-admin-kpis .tone-green { background: #059669; }
.platform-admin-kpis .tone-blue { background: #0284c7; }
.platform-admin-kpis .tone-amber { background: #d97706; }
.platform-admin-kpis .tone-red { background: #dc2626; }
.platform-admin-kpis small { color: var(--text-muted); font-weight: 650; }
.platform-admin-kpis strong { color: var(--text-dark); font-size: 1.55rem; line-height: 1; }

.platform-admin-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(170px, 220px) auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.85rem;
    margin-bottom: 1rem;
}

.platform-search {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 42px;
    padding: 0 0.85rem;
    border: 1px solid var(--glass-border);
    border-radius: 11px;
    background: var(--input-bg, rgba(255, 255, 255, 0.08));
    color: var(--text-muted);
}

.platform-search input,
.platform-admin-toolbar select {
    width: 100%;
    min-height: 40px;
    border: 0;
    background: transparent;
    color: var(--text-dark);
    outline: none;
}

.platform-admin-toolbar select {
    padding: 0 0.65rem;
    border: 1px solid var(--glass-border);
    border-radius: 11px;
    background: var(--input-bg, rgba(255, 255, 255, 0.08));
}

.platform-result-text { color: var(--text-muted); font-size: 0.88rem; text-align: right; }
.platform-table-shell { overflow: hidden; padding: 0; }
.platform-tenant-table { width: 100%; border-collapse: collapse; min-width: 880px; table-layout: fixed; }
.platform-tenant-table th:nth-child(1) { width: 23%; }
.platform-tenant-table th:nth-child(2) { width: 12%; }
.platform-tenant-table th:nth-child(3) { width: 11%; }
.platform-tenant-table th:nth-child(4) { width: 14%; }
.platform-tenant-table th:nth-child(5) { width: 9%; }
.platform-tenant-table th:nth-child(6) { width: 11%; }
.platform-tenant-table th:nth-child(7) { width: 20%; }
.platform-tenant-table th {
    padding: 0.75rem 0.65rem;
    background: rgba(79, 70, 229, 0.1);
    color: var(--text-muted);
    font-size: 0.72rem;
    letter-spacing: 0.055em;
    text-transform: uppercase;
    text-align: left;
}
.platform-tenant-table td {
    padding: 0.8rem 0.65rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-dark);
    vertical-align: middle;
}
.platform-company-cell { display: grid; gap: 0.18rem; }
.platform-company-cell strong { font-size: 0.94rem; }
.platform-company-cell span,
.platform-cell-note { color: var(--text-muted); font-size: 0.78rem; }
.platform-company-cell span { overflow-wrap: anywhere; }
.platform-status-badge,
.platform-expiry-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 750;
    white-space: nowrap;
}
.platform-status-badge.active, .platform-expiry-badge.healthy, .platform-expiry-badge.unlimited { color: #10b981; background: rgba(16, 185, 129, 0.12); }
.platform-status-badge.trial { color: #38bdf8; background: rgba(56, 189, 248, 0.12); }
.platform-status-badge.expired, .platform-expiry-badge.expired { color: #f87171; background: rgba(248, 113, 113, 0.12); }
.platform-status-badge.suspended, .platform-expiry-badge.warning { color: #f59e0b; background: rgba(245, 158, 11, 0.13); }
.platform-status-badge.closed { color: #94a3b8; background: rgba(148, 163, 184, 0.13); }
.platform-expiry-cell { display: grid; gap: 0.3rem; justify-items: start; }
.platform-row-actions { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.platform-row-actions .btn { padding: 0.42rem 0.55rem; font-size: 0.75rem; }
.platform-empty-cell { padding: 2.5rem !important; text-align: center; color: var(--text-muted) !important; }
.platform-pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    border-top: 1px solid var(--glass-border);
}
.platform-pagination span { color: var(--text-muted); font-size: 0.82rem; }
.platform-membership-form { display: grid; gap: 0.75rem; text-align: left; }
.platform-membership-form > p { margin: 0 0 0.25rem; text-align: center; }
.platform-membership-form label { display: grid; gap: 0.3rem; color: var(--text-dark); font-size: 0.82rem; font-weight: 700; }
.platform-membership-form .swal2-input,
.platform-membership-form .swal2-select,
.platform-membership-form .swal2-textarea { width: 100%; margin: 0; box-sizing: border-box; }

.plugin-manager-header { display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; margin-bottom:1.25rem; }
.plugin-manager-header p { margin:0 0 .35rem; color:var(--text-muted); }
.plugin-manager-header small { color:var(--primary); font-weight:700; }
.plugin-manager-section + .plugin-manager-section { margin-top:1.5rem; padding-top:1.25rem; border-top:1px solid var(--border-color); }
.plugin-manager-section > h4 { margin:0 0 .85rem; }
.plugin-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:.85rem; }
.plugin-card { padding:1rem; border:1px solid var(--border-color); border-radius:14px; background:var(--surface-raised,rgba(255,255,255,.04)); display:grid; gap:.75rem; min-width:0; }
.plugin-card-heading { display:flex; align-items:center; gap:.7rem; min-width:0; }
.plugin-card-heading > div { min-width:0; flex:1; }
.plugin-card h4 { margin:0; overflow-wrap:anywhere; }
.plugin-card small,.plugin-card p { color:var(--text-muted); margin:0; overflow-wrap:anywhere; }
.plugin-icon { width:38px; height:38px; border-radius:11px; display:grid; place-items:center; color:#fff; background:linear-gradient(135deg,#6366f1,#8b5cf6); flex:0 0 auto; }
.plugin-meta,.plugin-actions,.plugin-chips { display:flex; flex-wrap:wrap; gap:.45rem; align-items:center; }
.plugin-meta { justify-content:space-between; font-size:.78rem; color:var(--text-muted); }
.plugin-chips span,.plugin-status { padding:.22rem .5rem; border-radius:999px; background:rgba(99,102,241,.12); color:#818cf8; font-size:.72rem; font-weight:800; }
.plugin-status.is-active { background:rgba(16,185,129,.14); color:#10b981; }
.plugin-status.is-paused { background:rgba(245,158,11,.14); color:#f59e0b; }
.plugin-status.is-disabled { background:rgba(239,68,68,.14); color:#ef4444; }
.plugin-empty { padding:1rem; text-align:center; color:var(--text-muted); grid-column:1/-1; }
.plugin-delivery-table td { vertical-align:middle; max-width:280px; overflow-wrap:anywhere; }
.plugin-settings-form { display:grid; gap:.85rem; text-align:left; }
.plugin-settings-form label { display:grid; gap:.35rem; font-weight:700; }
.plugin-settings-form .swal2-input { width:100%; margin:0; }
.plugin-settings-form small { color:#64748b; font-weight:400; }
@media (max-width:640px) { .plugin-manager-header { flex-direction:column; } .plugin-manager-header .btn { width:100%; } .plugin-grid { grid-template-columns:1fr; } }
.platform-membership-date-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

@media (max-width: 1100px) {
    .platform-admin-kpis { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
    .platform-admin-kpis article:first-child { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
    .platform-admin-toolbar { grid-template-columns: 1fr; }
    .platform-result-text { text-align: left; }
    .platform-admin-kpis { grid-template-columns: 1fr; }
    .platform-admin-kpis article:first-child { grid-column: auto; }
    .platform-pagination { justify-content: space-between; }
    .platform-membership-date-row { grid-template-columns: 1fr; }
}

.content-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

/* Glass Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    box-shadow: var(--glass-shadow);
}

@media (max-width: 480px) {
    .glass-panel { padding: 1rem; border-radius: var(--radius-md); }
}

.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
@media (max-width: 1100px) { .grid-layout { grid-template-columns: 1fr; } }


/* Typography in Forms */
h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid rgba(0,0,0,0.05);
    padding-bottom: 0.5rem;
}

h3:first-child {
    margin-top: 0;
}

h3 i {
    color: var(--primary-color);
}

/* Forms */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

label {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-primary);
}

input, select {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    outline: none;
}

input:focus, select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.2);
    background: #fff;
}

.ebat-container {
    background: rgba(0,0,0,0.02);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px dashed rgba(0,0,0,0.1);
}

/* Buttons */
.btn {
    padding: 0.65rem 1.2rem;
    border-radius: var(--radius-sm);
    border: none;
    font-weight: 800;
    font-size: 0.88rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #5a50f5, #3730a3);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(79,70,229,0.4);
}

.btn-secondary {
    background: rgba(255,255,255,0.8);
    color: var(--text-dark);
    border: 1px solid rgba(0,0,0,0.1);
}
.btn-secondary:hover {
    background: white;
    border-color: rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 12px rgba(239,68,68,0.25);
}
.btn-danger:hover {
    background: linear-gradient(135deg, #f87171, #b91c1c);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 12px rgba(16,185,129,0.25);
}
.btn-success:hover {
    background: linear-gradient(135deg, #34d399, #047857);
    transform: translateY(-2px);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 4px 12px rgba(245,158,11,0.25);
}
.btn-warning:hover {
    background: linear-gradient(135deg, #fbbf24, #b45309);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.38rem 0.75rem;
    font-size: 0.8rem;
}

.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Mobile: stack buttons */
@media (max-width: 480px) {
    .header-actions .btn { padding: 0.5rem 0.7rem; font-size: 0.8rem; }
}


/* Quote Preview (PDF Area) */
.preview-card {
    background: #fff; /* Solid white for PDF printing */
}

/* Teklif çalışma alanı: form solda, canlı PDF önizlemesi sağda. */
.quote-workspace {
    grid-template-columns: minmax(0, 1.12fr) minmax(420px, 0.88fr);
    align-items: start;
}

.quote-workspace > * {
    min-width: 0;
}

.quote-form-card {
    padding: clamp(1rem, 1.4vw, 1.5rem);
    container-name: quote-editor;
    container-type: inline-size;
}

/* Teklif kalemleri, canlı önizleme açıkken de yatay taşmadan çalışır. */
.part-body,
.part-body .form-row,
.part-body .form-group,
.quote-money-control {
    min-width: 0;
}

.part-body .form-group > input,
.part-body .form-group > select,
.part-body .form-group > textarea,
.quote-money-control > input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.quote-cost-row,
.quote-machine-row {
    display: grid !important;
    align-items: end;
    gap: 0.65rem;
}

.quote-cost-row {
    grid-template-columns: minmax(145px, 1.5fr) minmax(110px, 0.82fr) minmax(145px, 1fr) 42px;
    margin-bottom: 0.65rem;
    padding: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 11px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(99, 102, 241, 0.035));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.quote-machine-row {
    grid-template-columns: minmax(180px, 1.7fr) minmax(105px, 0.65fr) 42px;
}

.quote-money-control {
    position: relative;
    display: block;
}

.quote-money-control > input {
    padding-right: 4.15rem;
}

.quote-currency-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    bottom: 5px;
    display: inline-flex;
    min-width: 45px;
    padding: 0 0.5rem;
    align-items: center;
    justify-content: center;
    border: 0;
    border-left: 1px solid rgba(129, 140, 248, 0.25);
    border-radius: 6px;
    color: #c7d2fe;
    background: rgba(79, 70, 229, 0.16);
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    white-space: nowrap;
    pointer-events: none;
}

.quote-cost-feedback {
    display: block;
    margin-top: 0.1rem;
    color: #fca5a5;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.quote-cost-feedback[hidden] {
    display: none;
}

.quote-cost-row .form-group {
    gap: 0.35rem;
}

.quote-cost-row .form-group > label {
    color: #a8b5ca;
    font-size: 0.73rem;
    letter-spacing: 0.01em;
}

.quote-cost-remove {
    align-self: end;
    justify-content: flex-end;
}

.quote-cost-remove .btn.btn-danger {
    width: 42px;
    height: 44px;
    padding: 0;
    justify-content: center;
    border: 1px solid rgba(248, 113, 113, 0.2);
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.1);
    box-shadow: none;
}

.quote-cost-remove .btn.btn-danger:hover {
    border-color: rgba(248, 113, 113, 0.42);
    color: #fff;
    background: rgba(239, 68, 68, 0.72);
    box-shadow: 0 6px 14px rgba(127, 29, 29, 0.2);
    transform: none;
}

.quote-row-just-added {
    animation: quoteRowAdded 0.9s ease-out;
}

@keyframes quoteRowAdded {
    0% { background: rgba(99, 102, 241, 0.22); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18); }
    100% { background: transparent; box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .quote-row-just-added { animation: none; }
}

.quote-items-toolbar,
.quote-items-toolbar-actions,
.quote-subsection-heading,
.quote-cost-summary-row {
    min-width: 0;
}

.quote-items-toolbar-actions,
.quote-subsection-heading {
    flex-wrap: wrap;
}

.quote-cost-section-heading {
    gap: 0.75rem;
    margin-bottom: 0.55rem !important;
    padding: 0.25rem 0 0.55rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.quote-cost-section-heading > span {
    min-width: 0;
    color: var(--text-primary);
    font-size: 0.94rem;
}

.quote-cost-section-heading .btn {
    min-height: 34px;
    padding: 0.4rem 0.7rem;
    border-color: rgba(129, 140, 248, 0.2);
    color: #c7d2fe;
    background: rgba(99, 102, 241, 0.08);
    box-shadow: none;
}

.quote-cost-section-heading .btn:hover {
    border-color: rgba(129, 140, 248, 0.4);
    background: rgba(99, 102, 241, 0.16);
    transform: none;
}

.quote-cost-summary-row {
    display: grid !important;
    grid-template-columns: minmax(92px, 0.45fr) minmax(0, 1fr);
    gap: 0.75rem;
}

.quote-cost-summary-row > :last-child {
    min-width: 0;
    text-align: right;
    overflow-wrap: anywhere;
}

.part-header {
    gap: 0.75rem;
}

.part-title-wrapper {
    min-width: 0;
}

.part-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@container quote-editor (max-width: 620px) {
    .part-body {
        padding: 1rem;
    }

    .quote-cost-row {
        grid-template-columns: minmax(0, 1fr) minmax(108px, 0.62fr) 42px;
    }

    .quote-cost-kind {
        grid-column: 1;
        grid-row: 1;
    }

    .quote-cost-method {
        grid-column: 2;
        grid-row: 1;
    }

    .quote-cost-amount {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .quote-cost-row .quote-cost-remove {
        grid-column: 3;
        grid-row: 1;
        align-self: end;
    }

    .quote-machine-row {
        grid-template-columns: minmax(0, 1fr) minmax(92px, 0.45fr) 42px;
    }

    .quote-items-toolbar {
        align-items: flex-start !important;
        flex-direction: column;
        gap: 0.8rem;
    }

    .quote-items-toolbar-actions {
        width: 100%;
    }
}

@container quote-editor (max-width: 430px) {
    .part-body > .form-row:not(.quote-cost-row):not(.quote-machine-row),
    .part-body .ebat-group {
        flex-direction: column !important;
    }

    .quote-cost-row,
    .quote-machine-row {
        grid-template-columns: minmax(0, 1fr) 42px;
    }

    .quote-cost-kind,
    .quote-machine-kind {
        grid-column: 1;
        grid-row: 1;
    }

    .quote-cost-method,
    .quote-machine-duration {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .quote-cost-amount {
        grid-column: 1 / -1;
        grid-row: 3;
    }

    .quote-cost-row .quote-cost-remove,
    .quote-machine-row .quote-cost-remove {
        grid-column: 2;
        grid-row: 1;
    }

    .quote-cost-summary-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.2rem;
    }

    .quote-cost-summary-row > :last-child {
        text-align: left;
    }
}

.quote-notes-panel {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.quote-notes-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.quote-notes-heading h3 {
    margin: 3px 0 4px;
}

.quote-notes-heading p,
.quote-note-subheading small {
    color: var(--text-muted);
    font-size: 0.74rem;
    line-height: 1.5;
}

.quote-notes-kicker {
    color: #818cf8;
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.12em;
}

.quote-note-count {
    flex: 0 0 auto;
    padding: 5px 9px;
    border: 1px solid rgba(129, 140, 248, 0.24);
    border-radius: 999px;
    color: #c7d2fe;
    background: rgba(99, 102, 241, 0.1);
    font-size: 0.66rem;
    font-weight: 800;
}

.quote-note-library,
.quote-note-selection {
    padding: 13px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 13px;
    background: rgba(2, 6, 23, 0.16);
}

.quote-note-selection {
    margin-top: 10px;
}

.quote-note-subheading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
}

.quote-note-subheading strong {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-primary);
    font-size: 0.78rem;
}

.quote-note-subheading strong i {
    color: #818cf8;
}

.quote-note-template-list,
.quote-selected-note-list {
    display: grid;
    gap: 7px;
}

.quote-note-template {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 7px 10px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 10px;
    color: var(--text-secondary);
    background: rgba(15, 23, 42, 0.26);
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.quote-note-template:hover {
    border-color: rgba(129, 140, 248, 0.42);
    background: rgba(99, 102, 241, 0.08);
}

.quote-note-template.is-selected {
    border-color: rgba(52, 211, 153, 0.4);
    color: var(--text-primary);
    background: rgba(16, 185, 129, 0.08);
}

.quote-note-template input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.quote-note-template-control {
    display: grid;
    width: 23px;
    height: 23px;
    place-items: center;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 7px;
    color: transparent;
    background: rgba(15, 23, 42, 0.35);
    font-size: 0.65rem;
}

.quote-note-template input:focus-visible + .quote-note-template-control {
    outline: 3px solid rgba(129, 140, 248, 0.3);
    outline-offset: 2px;
}

.quote-note-template.is-selected .quote-note-template-control {
    border-color: #10b981;
    color: #ffffff;
    background: #10b981;
}

.quote-note-template-copy {
    min-width: 0;
    font-size: 0.76rem;
    line-height: 1.35;
}

.quote-note-template > small {
    color: #64748b;
    font-size: 0.6rem;
    font-weight: 800;
}

.quote-note-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.quote-note-type {
    min-width: 48px;
    padding: 4px 6px;
    border-radius: 7px;
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.11);
    font-size: 0.58rem;
    font-weight: 850;
    text-align: center;
    text-transform: uppercase;
}

.quote-note-input-wrap,
.quote-note-input-wrap input {
    min-width: 0;
    width: 100%;
}

.quote-note-input-wrap input {
    min-height: 40px;
    padding: 0.55rem 0.68rem;
}

.quote-note-remove {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(248, 113, 113, 0.24);
    border-radius: 9px;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.08);
    cursor: pointer;
}

.quote-note-remove:hover {
    color: #ffffff;
    background: #dc2626;
}

.quote-note-empty {
    margin: 8px 0 0;
    padding: 10px;
    border: 1px dashed rgba(148, 163, 184, 0.18);
    border-radius: 9px;
    color: #64748b;
    font-size: 0.71rem;
    text-align: center;
}

.quote-note-empty[hidden] {
    display: none;
}

.quote-manual-note-button {
    margin-top: 10px;
    margin-bottom: 1rem;
}

.quote-general-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    align-items: end;
}

.quote-page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.quote-preview-column {
    position: sticky;
    top: 1rem;
    align-self: start;
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-height: calc(100vh - 2rem);
}

.quote-preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: var(--glass-bg);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.quote-preview-title {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 800;
}

.quote-preview-hint {
    color: var(--text-muted);
    font-size: 0.72rem;
    white-space: nowrap;
}

.quote-preview-scroll {
    min-height: 0;
    max-height: calc(100vh - 5rem);
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    border-radius: var(--radius-lg);
}

#teklif-pdf-area {
    width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
}

#teklif-pdf-area table {
    max-width: 100%;
}

/* Dar canlı önizlemede şirket ve iletişim metinlerini harf harf bölme. */
.quote-preview-column #teklif-pdf-area .csp-s-6a3234531692 {
    min-width: 0;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    hyphens: none;
}

@media (min-width: 901px) and (max-width: 1500px) {
    .quote-preview-column #teklif-pdf-area .csp-s-74d68675d948 {
        width: 62px !important;
        flex: 0 0 62px;
        font-size: 0.62rem;
        white-space: nowrap;
    }

    .quote-preview-column #teklif-pdf-area .csp-s-36ead415fd73 {
        width: 8px !important;
        flex: 0 0 8px;
    }
}

@media (max-width: 1500px) {
    #teklif-section .header-actions {
        margin-bottom: 1rem;
    }

    .quote-workspace {
        grid-template-columns: minmax(0, 1.3fr) minmax(360px, 0.7fr);
        gap: 1rem;
    }

    #teklif-pdf-area {
        padding: 0.8rem !important;
    }

    #teklif-pdf-area .pdf-table,
    #teklif-pdf-area .pdf-footer-layout,
    #teklif-pdf-area > div:nth-child(2) {
        font-size: 0.72rem !important;
    }

    #teklif-pdf-area .pdf-table th,
    #teklif-pdf-area .pdf-table td {
        padding: 4px !important;
    }
}

@media (max-width: 900px) {
    .quote-workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    .quote-preview-column {
        position: relative;
        top: auto;
        max-height: none;
    }

    .quote-preview-scroll {
        max-height: none;
        overflow-x: auto;
    }
}

@media (max-width: 600px) {
    .quote-page-actions {
        justify-content: flex-start;
    }

    .quote-page-actions #displayQuoteNo {
        flex-basis: 100%;
        margin-right: 0 !important;
    }

    .quote-general-fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .quote-preview-hint {
        display: none;
    }

    .quote-notes-heading,
    .quote-note-subheading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .quote-note-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .quote-note-type {
        grid-column: 1 / -1;
        justify-self: start;
    }

    #teklif-pdf-area {
        min-width: 560px;
    }
}

.quote-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.quote-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
}

.quote-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
    letter-spacing: 2px;
}

.quote-info {
    margin-bottom: 2rem;
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
}

.quote-info p {
    margin-bottom: 0.5rem;
}

.quote-info p:last-child {
    margin-bottom: 0;
}

.quote-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.quote-table th, .quote-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.quote-table th {
    background: #f8fafc;
    font-weight: 800;
    color: var(--text-primary);
}

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

.total-row td {
    font-weight: 700;
    border-top: 2px solid #cbd5e1;
}

.quote-table tfoot th {
    font-size: 1.1rem;
    background: #fff;
    border-top: 2px solid #000000;
}

.highlight {
    color: var(--primary-color);
    font-size: 1.3rem !important;
}

.quote-footer {
    margin-top: 3rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .data-table td {
    padding: 0.9rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.data-table th {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive table wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
}
@media (max-width: 640px) {
    .data-table th, .data-table td,
    .premium-table th, .premium-table td { padding: 0.6rem 0.5rem; font-size: 0.8rem; }
    .btn-sm { padding: 0.3rem 0.5rem; font-size: 0.75rem; }
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15,23,42,0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 1rem;
}

.modal-content {
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(20px);
    width: 95%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 80px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.8);
    animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-30px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.4rem 1.8rem;
    background: linear-gradient(135deg, rgba(79,70,229,0.08), rgba(79,70,229,0.02));
    border-bottom: 1px solid rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 2;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;

}

.modal-header h3 {
    margin: 0;
    border: none;
    padding: 0;
    font-size: 1.4rem;
}

.close-modal {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-muted);
}

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

.modal-body {
    padding: 2rem;
}

.modal-body .form-group label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 800;
}

.modal-body input {
    padding: 0.9rem 1.2rem;
    border-radius: 10px;
    background: rgba(255,255,255,0.9);
    font-size: 1rem;
}

.modal-footer {
    padding: 1.5rem 2rem;
    background: rgba(255,255,255,0.3);
    border-top: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 2rem;
}

/* Premium Dashboard Styles */
.dashboard-header {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.exchange-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.kpi-card-premium {
    position: relative;
    display: flex;
    align-items: center;
    padding: 1.8rem;
    gap: 1.2rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    z-index: 1;
}

.kpi-card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 100%);
    z-index: -1;
}

.kpi-card-premium:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: rgba(255, 255, 255, 0.9);
}

.kpi-icon-glow {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.5), 0 8px 16px rgba(0,0,0,0.1);
}

/* Gradient variations for KPI cards */
.kpi-success .kpi-icon-glow {
    background: linear-gradient(135deg, #34d399 0%, #059669 100%);
    color: white;
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.kpi-primary .kpi-icon-glow {
    background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.kpi-warning .kpi-icon-glow {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    color: white;
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
}

.kpi-purple .kpi-icon-glow {
    background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
}

.kpi-danger .kpi-icon-glow {
    background: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

.kpi-dark .kpi-icon-glow {
    background: linear-gradient(135deg, #000000 0%, #000000 100%);
    color: white;
    box-shadow: 0 10px 20px rgba(30, 41, 59, 0.3);
}

.kpi-info-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kpi-info-content p {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
}

.kpi-info-content h3 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    border: none;
    padding: 0;
    line-height: 1.2;
    background: linear-gradient(90deg, #000000, #000000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Currency specific styles */
.currency-value-container {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    margin-top: 0.2rem;
}

.currency-value {
    font-size: 2.2rem !important;
    font-weight: 900;
    letter-spacing: -1px;
    background: linear-gradient(90deg, #000000, #000000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.trend-icon {
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.trend-up {
    color: #059669;
    background: #d1fae5;
}

.trend-down {
    color: #dc2626;
    background: #fee2e2;
}

/* Modern Status Badges */
.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.status-badge i {
    font-size: 0.75rem;
}

.status-pending { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #b45309; border: 1px solid #fcd34d; }
.status-approved { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #047857; border: 1px solid #6ee7b7; }
.status-rejected { background: linear-gradient(135deg, #fee2e2, #fecaca); color: #b91c1c; border: 1px solid #fca5a5; }

/* Dashboard Delivery Cards */
.delivery-card-premium {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    box-shadow: 0 8px 20px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.03);
    overflow: hidden;
}

.delivery-card-premium::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 6px;
}

.delivery-card-premium.urgent::before { background: linear-gradient(to bottom, #f87171, #dc2626); }
.delivery-card-premium.warning::before { background: linear-gradient(to bottom, #fbbf24, #d97706); }
.delivery-card-premium.normal::before { background: linear-gradient(to bottom, #34d399, #059669); }

.delivery-card-premium:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 25px rgba(0,0,0,0.08);
}

/* Custom Table for Dashboard */
.premium-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
    margin-top: -0.5rem;
}

.premium-table th {
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    padding: 1rem;
    border: none;
    border-bottom: 2px solid rgba(0,0,0,0.05);
}

.premium-table td {
    padding: 1rem;
    background: rgba(255,255,255,0.7);
    border: none;
    transition: background 0.3s ease;
}

.premium-table tr td:first-child { border-top-left-radius: 12px; border-bottom-left-radius: 12px; }
.premium-table tr td:last-child { border-top-right-radius: 12px; border-bottom-right-radius: 12px; }

.premium-table tbody tr {
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
}

.premium-table tbody tr:hover td {
    background: rgba(255,255,255,0.95);
}

/* --- WOW DASHBOARD STYLES --- */
.hero-card {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    border-radius: 16px;
    padding: 2rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="90" cy="10" r="40" fill="rgba(255,255,255,0.1)"/><circle cx="10" cy="90" r="30" fill="rgba(255,255,255,0.05)"/></svg>') no-repeat right top;
    background-size: cover;
    pointer-events: none;
}

.hero-content h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

.hero-widgets {
    display: flex;
    gap: 1rem;
    z-index: 1;
}

.currency-pill {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 0.5rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 800;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.currency-pill:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.3);
}

.currency-pill i {
    background: white;
    color: #3b82f6;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* Enhanced KPI Cards */
.kpi-card-premium {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.kpi-card-premium:hover {
    transform: translateY(-8px);
}

.kpi-card-premium.kpi-success:hover { box-shadow: 0 12px 25px rgba(16, 185, 129, 0.25); }
.kpi-card-premium.kpi-primary:hover { box-shadow: 0 12px 25px rgba(13, 110, 253, 0.25); }
.kpi-card-premium.kpi-warning:hover { box-shadow: 0 12px 25px rgba(245, 158, 11, 0.25); }
.kpi-card-premium.kpi-danger:hover { box-shadow: 0 12px 25px rgba(239, 68, 68, 0.25); }
.kpi-card-premium.kpi-purple:hover { box-shadow: 0 12px 25px rgba(139, 92, 246, 0.25); }

/* Timeline UI */
.timeline {
    position: relative;
    padding-left: 2rem;
    margin-top: 1rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 5px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #3b82f6;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #3b82f6;
}

.timeline-item.warning::before {
    background: #f59e0b;
    box-shadow: 0 0 0 2px #f59e0b;
}

.timeline-item.danger::before {
    background: #ef4444;
    box-shadow: 0 0 0 2px #ef4444;
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.timeline-content {
    background: var(--bg-light);
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.premium-table tbody tr:hover {
    transform: scale(1.005);
    box-shadow: 0 8px 15px rgba(0,0,0,0.05);
}

/* Settings Accordion Styles */
.settings-accordion details {
    transition: all 0.3s ease;
}
.settings-accordion details > summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    outline: none;
}
.settings-accordion details > summary::-webkit-details-marker {
    display: none;
}
.settings-accordion details > summary h3,
.settings-accordion details > summary .header-actions h3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.settings-accordion details > summary::after {
    display: none;
}
.settings-accordion details > summary h3::after,
.settings-accordion details > summary .header-actions h3::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    transition: transform 0.3s ease;
    font-size: 1.2rem;
    color: var(--primary-color);
}
.settings-accordion details[open] > summary h3::after,
.settings-accordion details[open] > summary .header-actions h3::after {
    transform: rotate(180deg);
}
.settings-accordion .details-content {
    animation: fadeIn 0.4s ease;
}

/* Part Accordion Styles */
.part-accordion {
    background: rgba(255,255,255,0.6);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}
.part-accordion.inactive {
    opacity: 0.6;
    border-color: rgba(0, 0, 0, 0.04);
}
.part-header {
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}
.part-header:hover {
    background: rgba(0, 0, 0, 0.04);
}
.part-title-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.part-title {
    font-size: 1.1rem;
    font-weight: 800;
}
.part-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}
.part-body {
    padding: 1.5rem;
    display: none;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.part-body.open {
    display: block;
}
.part-toggle-icon {
    transition: transform 0.3s ease;
}
.part-toggle-icon.open {
    transform: rotate(180deg);
}
.inactive-text {
    font-size: 0.8rem;
    color: var(--danger-color);
    margin-left: 0.5rem;
}

/* Fix for SweetAlert appearing behind modals */
.swal2-container {
    z-index: 99999 !important;
}

/* Finans Sekmeleri */
.finans-tabs {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}
.finans-tabs .tab-btn {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 800;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.finans-tabs .tab-btn:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.finans-tabs .tab-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.finans-tab-content {
    animation: fadeIn 0.4s ease-out;
}

.finance-quick-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding: 0.8rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    box-shadow: var(--glass-shadow);
}

.finance-quick-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-right: 0.35rem;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 800;
}

/* Compact finance workspace */
#finans-section .finance-compact-panel { padding: 1rem; }
#finans-section .finance-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
}
#finans-section .finance-panel-heading h3 {
    margin: 0;
    border: 0;
    font-size: 1.05rem;
}
#finans-section .finance-panel-heading p {
    margin: 0.2rem 0 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}
.finance-heading-actions { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.finance-toolbar {
    display: grid;
    gap: 0.55rem;
    align-items: center;
    padding: 0.65rem;
    margin-bottom: 0.55rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: rgba(248, 250, 252, 0.62);
}
.finance-toolbar-grid { grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(150px, auto)); }
.finance-document-toolbar { grid-template-columns: minmax(260px, 1fr) 190px 170px; }
.finance-transaction-toolbar { grid-template-columns: minmax(220px, 1fr) 140px 190px 145px 145px; }
.finance-toolbar input,
.finance-toolbar select {
    width: 100%;
    min-height: 38px;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg, #fff);
    color: var(--text-primary);
}
.finance-search { position: relative; display: block; }
.finance-search i { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.finance-search input { padding-left: 2.15rem; }
.finance-mini-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 28px;
    color: var(--text-muted);
    font-size: 0.78rem;
}
.finance-mini-summary strong { color: var(--text-primary); font-size: 0.9rem; }
.finance-mini-summary .finance-risk-text strong { color: #dc2626; }
.finance-table-wrap { width: 100%; overflow-x: auto; }
.finance-compact-table {
    width: 100%;
    min-width: 780px;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.finance-compact-table th {
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.7rem;
    letter-spacing: 0.035em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}
.finance-compact-table td {
    padding: 0.52rem 0.65rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    vertical-align: middle;
}
.finance-compact-table tbody tr:hover { background: rgba(79, 70, 229, 0.045); }
.finance-compact-table .party-primary { display: block; max-width: 260px; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finance-compact-table .party-meta { display: block; margin-top: 2px; color: var(--text-muted); font-size: 0.72rem; }
.finance-party-badge,
.finance-risk-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.48rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 750;
    white-space: nowrap;
}
.finance-party-badge.customer { color: #1d4ed8; background: #dbeafe; }
.finance-party-badge.supplier { color: #7c3aed; background: #ede9fe; }
.finance-risk-badge.safe { color: #047857; background: #d1fae5; }
.finance-risk-badge.warning { color: #b45309; background: #fef3c7; }
.finance-risk-badge.danger { color: #b91c1c; background: #fee2e2; }
.finance-row-actions { display: flex; justify-content: flex-end; gap: 0.3rem; white-space: nowrap; }
.finance-row-actions .btn { width: 31px; height: 31px; padding: 0; justify-content: center; }
.finance-collapsible { padding: 0 !important; overflow: hidden; }
.finance-collapsible > summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-weight: 750;
    list-style: none;
}
.finance-collapsible > summary::-webkit-details-marker { display: none; }
.finance-collapsible > summary small { color: var(--text-muted); font-weight: 500; }
.finance-collapsible-body { padding: 0 1rem 1rem; border-top: 1px solid var(--border-color); }
.finance-collapsible-body .finance-panel-heading { margin-top: 0.75rem; }
.finance-insight-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 1rem; }
.finance-forecast-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.55rem; }
.finance-forecast-metrics > div { padding: 0.75rem; border: 1px solid var(--border-color); border-radius: 10px; background: rgba(248,250,252,0.6); }
.finance-forecast-metrics span { display: block; color: var(--text-muted); font-size: 0.7rem; }
.finance-forecast-metrics strong { display: block; margin-top: 0.28rem; font-size: 0.98rem; overflow-wrap: anywhere; }
.finance-alert-count { min-width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; background: #dc2626; font-weight: 800; }
.finance-action-list { display: grid; gap: 0.4rem; max-height: 175px; overflow-y: auto; }
.finance-action-item { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; gap: 0.55rem; align-items: center; padding: 0.5rem 0.6rem; border-radius: 9px; background: rgba(248,250,252,0.65); }
.finance-action-item > i { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: #fee2e2; color: #dc2626; }
.finance-action-item strong { display: block; font-size: 0.78rem; }
.finance-action-item small { display: block; margin-top: 1px; color: var(--text-muted); font-size: 0.68rem; }
.finance-empty-state { padding: 1.25rem; color: var(--text-muted); text-align: center; }
.e-document-readiness { padding: 1rem; }
.e-document-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.8rem;
}
.e-document-metrics > div {
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: rgba(248, 250, 252, 0.62);
}
.e-document-metrics span { display: block; color: var(--text-muted); font-size: 0.7rem; }
.e-document-metrics strong { display: block; margin-top: 0.18rem; color: var(--text-primary); font-size: 1rem; }
.e-document-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.e-document-check-grid h4 { margin: 0 0 0.4rem; font-size: 0.82rem; }
.e-document-check-list { display: grid; gap: 0.3rem; max-height: 155px; overflow-y: auto; }
.e-document-check-item {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45rem;
    min-height: 34px;
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.6);
    font-size: 0.75rem;
}
.e-document-check-item > i { color: #059669; }
.e-document-check-item.is-missing > i { color: #dc2626; }
.e-document-check-item small { color: var(--text-muted); }
.e-document-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.7rem;
    padding: 0.55rem 0.65rem;
    border-radius: 9px;
    color: #92400e;
    background: #fffbeb;
    font-size: 0.72rem;
}

@media (max-width: 1200px) {
    .finance-toolbar-grid { grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(150px, auto)); }
    .finance-toolbar-grid select:last-child { grid-column: auto; }
    .finance-transaction-toolbar { grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(145px, auto)); }
}

@media (max-width: 850px) {
    .finance-toolbar-grid,
    .finance-document-toolbar,
    .finance-transaction-toolbar,
    .finance-insight-grid,
    .e-document-metrics,
    .e-document-check-grid { grid-template-columns: 1fr; }
    #finans-section .finance-panel-heading { align-items: flex-start; flex-direction: column; }
    .finance-forecast-metrics { grid-template-columns: 1fr; }
    .finance-mini-summary { gap: 0.55rem; flex-wrap: wrap; }
}

#finansOzetKartlari .kpi-info-content h3 {
    font-size: clamp(1rem, 1.45vw, 1.45rem);
    line-height: 1.25;
    overflow-wrap: anywhere;
}

@media (max-width: 600px) {
    .finance-quick-actions .btn {
        flex: 1 1 calc(50% - 0.65rem);
        justify-content: center;
    }

    .finance-quick-label {
        flex-basis: 100%;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* FullCalendar Customizations - Modern & Aesthetic */
.fc {
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
}
.fc-theme-standard .fc-scrollgrid {
    border-color: #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}
.fc-theme-standard td, .fc-theme-standard th {
    border-color: #e2e8f0;
}
.fc-col-header-cell-cushion {
    font-weight: 800;
    color: var(--text-primary);
    padding: 12px 0 !important;
}
.fc-daygrid-day-number {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    padding: 8px !important;
}
.fc-day-today {
    background: rgba(59, 130, 246, 0.03) !important;
}
.fc .fc-toolbar-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}
/* Beautiful Buttons */
.fc .fc-button-group {
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
}
.fc .fc-button-primary {
    background: white !important;
    border: 1px solid #cbd5e1 !important;
    color: var(--text-primary) !important;
    font-weight: 800 !important;
    text-transform: capitalize !important;
    padding: 0.5rem 1.2rem !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}
.fc .fc-button-primary:hover {
    background: #f1f5f9 !important;
    color: var(--text-primary) !important;
}
.fc .fc-button-primary:not(:disabled):active,
.fc .fc-button-primary:not(:disabled).fc-button-active {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: white !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1) !important;
}
.fc .fc-button-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
/* Events Styling */
.fc-event {
    cursor: pointer;
    border-radius: 6px !important;
    padding: 4px 8px !important;
    font-size: 0.75rem;
    font-weight: 800;
    border: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}
.fc-event:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    z-index: 5 !important;
}

/* Delivery Items Modal */
.delivery-item-row {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.delivery-item-info strong { color: var(--text-primary); display: block; margin-bottom: 0.2rem; }
.delivery-item-info span { color: var(--text-primary); font-size: 0.85rem; }
.delivery-item-qty {
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.9rem;
}

/* Dashboard 3-Column Layout */
.dashboard-3col {
    display: grid;
    grid-template-columns: 1fr 2fr 1.5fr; /* Grafik | Takvim | Liste */
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 1200px) {
    .dashboard-3col { grid-template-columns: 1fr 1.5fr; } /* Grafik | Takvim (Liste aşağı düşer) */
}
@media (max-width: 992px) {
    .dashboard-3col { grid-template-columns: 1fr; } /* Hepsi alt alta */
}

/* Delivery Timeline Tabs */
.delivery-tabs {
    display: flex;
    background: rgba(0,0,0,0.04);
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 1rem;
}
.delivery-tabs .del-tab-btn {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}
.delivery-tabs .del-tab-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.timeline-list-container {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}
.timeline-list-container::-webkit-scrollbar { width: 6px; }
.timeline-list-container::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* ==========================================================================
   AKILLI FASON ATÖLYE ERP & KURUMSAL HAFIZA MODÜLÜ STİLLERİ
   ========================================================================== */

/* Kurumsal Hafıza Uyarı Afişi */
.memory-badge {
    background: linear-gradient(135deg, #fef3c7 0%, #fef08a 100%);
    border: 1px solid #f59e0b;
    border-left: 5px solid #d97706;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
    animation: memoryPulse 2s infinite alternate;
}
.memory-badge-icon {
    background: #d97706;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}
.memory-badge-content {
    font-size: 0.85rem;
    color: #78350f;
    line-height: 1.3;
}
.memory-badge-content strong {
    color: #b45309;
    font-size: 0.9rem;
}

@keyframes memoryPulse {
    from { box-shadow: 0 2px 8px rgba(245, 158, 11, 0.1); }
    to { box-shadow: 0 6px 16px rgba(245, 158, 11, 0.25); }
}

/* Premium Atölyem Sayfası */
.atolyem-container {
    padding: 1rem 0;
    animation: fadeIn 0.4s ease-out;
}
.atolyem-header-card {
    background: linear-gradient(135deg, #000000 0%, #000000 100%);
    color: white;
    padding: 1.8rem 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.atolyem-title h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 0.4rem 0;
    background: linear-gradient(to right, #ffffff, #000000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.atolyem-title p {
    color: var(--text-primary);
    margin: 0;
    font-size: 0.95rem;
}

/* Makine Kapasite Kartları */
.atolyem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.atolyem-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 14px;
    padding: 1.4rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.atolyem-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}
.atolyem-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}
.atolyem-card-icon {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
.atolyem-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}
.atolyem-card-subtitle {
    font-size: 0.8rem;
    color: var(--text-primary);
}
.atolyem-stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}
.atolyem-stat-row strong {
    color: var(--text-primary);
}

/* Canlı Doluluk Çubuğu */
.atolyem-progress-bg {
    background: #e2e8f0;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.8rem;
    margin-bottom: 0.4rem;
}
.atolyem-progress-fill {
    background: linear-gradient(to right, #3b82f6, #10b981);
    height: 100%;
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.atolyem-progress-fill.danger {
    background: linear-gradient(to right, #f59e0b, #ef4444);
}
.atolyem-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-primary);
    font-weight: 700;
}

/* ==========================================================
   ATÖLYE ERP STYLES
   ========================================================== */

/* Sekme Butonları */
.atolyem-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    background: rgba(255,255,255,0.4);
    padding: 8px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.5);
    backdrop-filter: blur(8px);
}
.atolyem-tab-btn {
    padding: 8px 18px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}
.atolyem-tab-btn:hover { background: rgba(255,255,255,0.6); color: var(--text-primary); }
.atolyem-tab-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(13,110,253,0.3);
}

/* İş Emri Kartları */
.work-order-card {
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}
.work-order-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.wo-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.wo-title { font-weight: 700; font-size: 0.95rem; color: var(--text-primary); }
.wo-subtitle { font-size: 0.82rem; color: var(--text-primary); margin-top: 2px; }
.wo-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}
.wo-stats > div { display: flex; flex-direction: column; gap: 2px; }
.wo-stats span { font-size: 0.75rem; color: var(--text-primary); font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }
.wo-stats strong { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }
.wo-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* İş Emri Durum Rozetleri */
.wo-status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}
.wo-status-bekliyor { background: #fef3c7; color: #b45309; border: 1px solid #fcd34d; }
.wo-status-uretimde { background: #dbeafe; color: #1d4ed8; border: 1px solid #93c5fd; }
.wo-status-tamamlandi { background: #d1fae5; color: #047857; border: 1px solid #6ee7b7; }
.wo-status-iptal { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }

/* Kâr/Zarar Rozetleri */
.profit-badge {
    display: inline-block;
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #047857;
    border: 1px solid #6ee7b7;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
}
.loss-badge {
    display: inline-block;
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #b91c1c;
    border: 1px solid #fca5a5;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
}

/* Takım Sarfiyat Satırı */
.job-tool-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(239,68,68,0.05);
    border: 1px solid rgba(239,68,68,0.15);
    border-radius: 8px;
    padding: 8px 12px;
}

/* ==========================================================
   GLOBAL MOBILE RESPONSIVE ENHANCEMENTS
   ========================================================== */

/* Hero Card Mobile */
@media (max-width: 768px) {
    .dashboard-mobile-header .hamburger-btn { display: flex !important; }
    .hero-card { flex-direction: column; gap: 1rem; padding: 1.5rem; }
    .hero-widgets { flex-wrap: wrap; }
    .currency-pill { font-size: 0.8rem; padding: 0.4rem 0.8rem; }
    .hero-content h1 { font-size: 1.5rem; }
    .kpi-grid { grid-template-columns: 1fr; gap: 0.8rem; }
    .form-row { flex-direction: column; gap: 0.6rem; }
    .grid-layout { grid-template-columns: 1fr; }
    .kpi-card-premium { padding: 1rem; }
    .kpi-icon-glow { width: 48px; height: 48px; font-size: 1.3rem; }
    .kpi-info-content h3 { font-size: 1.4rem; }
    .atolyem-grid { grid-template-columns: 1fr !important; }
    .wo-stats { grid-template-columns: 1fr 1fr; }
    .finans-tabs { gap: 0.5rem; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
    .finans-tabs .tab-btn { padding: 0.6rem 1rem; font-size: 0.82rem; white-space: nowrap; }
    .atolyem-tabs, .delivery-tabs { gap: 4px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
    .atolyem-tab-btn, .del-tab-btn { padding: 6px 10px; font-size: 0.8rem; white-space: nowrap; }
    .atolyem-tab-btn { padding: 6px 10px; font-size: 0.8rem; }
}

@media (max-width: 480px) {
    /* tabs scroll rules moved to 768px breakpoint */
    .header-actions { flex-direction: column; align-items: flex-start; }
    .header-actions h3, .header-actions h2 { font-size: 1rem; }
    .fc-toolbar { flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
    /* tabs scroll rules moved to 768px breakpoint */
    .wo-stats { grid-template-columns: 1fr; }
    .modal-content { border-radius: var(--radius-md); }
    .wo-actions { gap: 4px; }
    .work-order-card { padding: 12px; }
}

/* Archive / Quote table mobile */
.archive-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
    margin: -0.5rem;
    padding: 0.5rem;
}

/* Premium stat number */
.stat-num {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
}

/* Loading skeleton */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}

/* Pulse animation for live data */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}
.live-dot {
    width: 8px; height: 8px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
    animation: pulse-dot 2s infinite;
}

/* Slide-up animation for cards */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.slide-up { animation: slideUp 0.5s ease forwards; }

/* Atolyem card mobile improvements */
.atolyem-card {
    transition: var(--transition);
}
.atolyem-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(79,70,229,0.15);
}

/* Premium input focus glow */
input:focus, select:focus, textarea:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.15) !important;
    outline: none;
}

/* Better select styling */
select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236366f1'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px 20px;
    padding-right: 36px !important;
    appearance: none;
    -webkit-appearance: none;
}

/* Toast enhancements */
.swal2-toast { border-radius: var(--radius-md) !important; }

/* Premium table row hover */
.premium-table tbody tr:hover td {
    background: rgba(79,70,229,0.04) !important;
}

/* Atolyem header card gradient */
.atolyem-header-card {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%) !important;
}

/* KPI card success specific */
.kpi-success {
    background: linear-gradient(135deg, rgba(16,185,129,0.12) 0%, rgba(5,150,105,0.05) 100%) !important;
    border: 1px solid rgba(16,185,129,0.25) !important;
}

/* Better glass panel in dark mode */
@media (prefers-color-scheme: dark) {
    :root {
        --glass-bg: rgba(15,23,42,0.7);
        --glass-border: rgba(255,255,255,0.1);
        --text-dark: #f1f5f9;
        --text-muted: #000000;
    }
}

/* Archive table row highlight */
.archive-row-approved { background: rgba(16,185,129,0.04); }
.archive-row-delivered { background: rgba(79,70,229,0.04); }

/* Better form group spacing */
.form-group label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

/* Improved KPI card for Atölyem */
.kpi-card-premium.kpi-warning {
    background: linear-gradient(135deg, rgba(245,158,11,0.12) 0%, rgba(217,119,6,0.05) 100%);
    border: 1px solid rgba(245,158,11,0.25);
}

/* Work order mobile stack */
@media (max-width: 600px) {
    .work-order-card .wo-stats { grid-template-columns: 1fr 1fr; gap: 6px; }
    .work-order-card .wo-actions select { width: 100%; }
}

/* Premium close button */
.close-modal {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(0,0,0,0.06);
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
    font-size: 1rem;
}
.close-modal:hover { background: rgba(239,68,68,0.1); color: #ef4444; }

/* Atölyem tab content smooth transition */
.atolyem-tab-content { animation: fadeIn 0.3s ease; }

/* Finans tab content smooth */
.finans-tab-content { animation: fadeIn 0.35s ease; }

/* Premium nav bottom section */
.sidebar-footer {
    margin-top: auto;
    padding: 0.8rem;
    border-top: 1px solid rgba(0,0,0,0.06);
}
.sidebar-footer a, .sidebar-footer button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
}
.sidebar-footer .btn-logout { color: #ef4444; }
.sidebar-footer .btn-logout:hover { background: rgba(239,68,68,0.1); }
.sidebar-footer .btn-admin { color: var(--primary-color); }
.sidebar-footer .btn-admin:hover { background: var(--primary-light); }

/* Improved Finans tab buttons */
.tab-btn {
    flex-shrink: 0;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Better mb classes */
.mb-2 { margin-bottom: 0.75rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.75rem; }
.mt-3 { margin-top: 1rem; }

/* Highlight important numbers */
.text-success { color: #10b981 !important; }
.text-danger { color: #ef4444 !important; }
.text-warning { color: #f59e0b !important; }
.text-primary { color: var(--primary-color) !important; }
.text-muted { color: var(--text-primary) !important; }
.fw-bold { font-weight: 700 !important; }

/* Input number arrow hide */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { opacity: 0.4; }




/* Yerel Firebase geliştirme modu göstergesi */
.local-dev-banner {
    position: fixed;
    z-index: 10050;
    right: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100vw - 28px);
    padding: 9px 13px;
    border: 1px solid rgba(96, 165, 250, 0.35);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(15, 29, 52, 0.94);
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.28);
    backdrop-filter: blur(12px);
    font-size: 0.72rem;
    font-weight: 750;
}

.local-dev-banner i { color: #60a5fa; }

@media (max-width: 620px) {
    .local-dev-banner {
        right: 10px;
        bottom: 10px;
        left: 10px;
        justify-content: center;
    }
}

/* ==========================================================================
   TEK EKRAN YÖNETİM KOKPİTİ
   ========================================================================== */
#dashboard-section {
    padding-bottom: 1.25rem;
}

.dashboard-control-center {
    display: grid;
    gap: 12px;
    width: 100%;
    max-width: 1840px;
    margin: 0 auto;
}

.dashboard-command-bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 88px;
    padding: 16px 18px;
    overflow: hidden;
    border: 1px solid rgba(129, 140, 248, 0.2);
    border-radius: 18px;
    background:
        radial-gradient(circle at 84% 0%, rgba(99, 102, 241, 0.2), transparent 32%),
        linear-gradient(135deg, #111827 0%, #151d31 58%, #17213a 100%);
    box-shadow: 0 16px 36px rgba(2, 6, 23, 0.28);
}

.dashboard-command-bar::after {
    position: absolute;
    right: -60px;
    bottom: -95px;
    width: 260px;
    height: 180px;
    border: 1px solid rgba(129, 140, 248, 0.15);
    border-radius: 50%;
    content: '';
    pointer-events: none;
}

.dashboard-command-copy,
.dashboard-command-actions,
.dashboard-quick-actions,
.dashboard-rate-strip {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
}

.dashboard-command-copy { min-width: 0; gap: 12px; }
.dashboard-command-actions { justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.dashboard-quick-actions { gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.dashboard-command-actions .btn { min-height: 36px; padding: 0.5rem 0.72rem; font-size: 0.76rem; }
.dashboard-menu-button { display: flex; flex: 0 0 auto; }

.dashboard-eyebrow,
.dashboard-section-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #818cf8;
    font-size: 0.63rem;
    font-weight: 850;
    letter-spacing: 0.13em;
}

.dashboard-command-copy h1 {
    margin: 3px 0 2px;
    color: #f8fafc !important;
    font-size: clamp(1.18rem, 1.75vw, 1.7rem);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.dashboard-command-copy p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.75rem;
}

.dashboard-rate-strip {
    gap: 6px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 11px;
    background: rgba(2, 6, 23, 0.28);
}

.dashboard-rate-strip > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 4px 8px;
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 0.69rem;
}

.dashboard-rate-strip i { color: #818cf8; }
.dashboard-rate-strip strong { color: #f8fafc; font-size: 0.73rem; }
.dashboard-rate-strip em { display: inline-flex; font-style: normal; }
.dashboard-rate-strip .trend-icon { width: 20px; height: 20px; font-size: 0.72rem; box-shadow: none; }

.dashboard-alert-banner {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 46px;
    padding: 7px 11px;
    border: 1px solid rgba(52, 211, 153, 0.2);
    border-radius: 13px;
    color: #d1fae5;
    background: rgba(16, 185, 129, 0.08);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: 160ms ease;
}

.dashboard-alert-banner:hover { transform: translateY(-1px); border-color: rgba(52, 211, 153, 0.38); }
.dashboard-alert-banner.is-warning { color: #fef3c7; border-color: rgba(251, 191, 36, 0.25); background: rgba(245, 158, 11, 0.09); }
.dashboard-alert-banner.is-critical { color: #fee2e2; border-color: rgba(248, 113, 113, 0.28); background: rgba(239, 68, 68, 0.1); }

.dashboard-alert-icon {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 9px;
    color: inherit;
    background: rgba(255, 255, 255, 0.08);
}

.dashboard-alert-copy { display: block; min-width: 0; }
.dashboard-alert-copy strong { display: block; color: inherit; font-size: 0.76rem; }
.dashboard-alert-copy small { display: block; margin-top: 1px; color: inherit; opacity: 0.74; font-size: 0.67rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-alert-action { display: inline-flex; align-items: center; gap: 7px; color: inherit; font-size: 0.7rem; font-weight: 800; }

.dashboard-kpi-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 9px;
}

.dashboard-kpi {
    --kpi-accent: #60a5fa;
    --kpi-soft: rgba(59, 130, 246, 0.13);
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 12px;
    align-items: center;
    gap: 9px;
    min-width: 0;
    min-height: 102px;
    padding: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 15px;
    color: #e2e8f0;
    background: linear-gradient(145deg, rgba(30, 39, 65, 0.94), rgba(17, 24, 39, 0.96));
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.18);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: 180ms ease;
}

.dashboard-kpi::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--kpi-accent);
    content: '';
}

.dashboard-kpi:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--kpi-accent) 45%, transparent); }
.dashboard-kpi.tone-green { --kpi-accent: #34d399; --kpi-soft: rgba(16, 185, 129, 0.13); }
.dashboard-kpi.tone-violet { --kpi-accent: #a78bfa; --kpi-soft: rgba(139, 92, 246, 0.13); }
.dashboard-kpi.tone-amber { --kpi-accent: #fbbf24; --kpi-soft: rgba(245, 158, 11, 0.13); }
.dashboard-kpi.tone-cyan { --kpi-accent: #22d3ee; --kpi-soft: rgba(6, 182, 212, 0.13); }
.dashboard-kpi.tone-red { --kpi-accent: #fb7185; --kpi-soft: rgba(244, 63, 94, 0.13); }

.dashboard-kpi-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 11px;
    color: var(--kpi-accent);
    background: var(--kpi-soft);
    font-size: 0.98rem;
}

.dashboard-kpi-copy { display: block; min-width: 0; }
.dashboard-kpi-copy small { display: block; color: #94a3b8; font-size: 0.62rem; font-weight: 800; line-height: 1.25; text-transform: uppercase; letter-spacing: 0.035em; }
.dashboard-kpi-copy small em { display: inline; color: #64748b; font-size: 0.54rem; font-style: normal; text-transform: none; }
.dashboard-kpi-copy strong { display: block; margin: 4px 0 3px; color: #f8fafc; font-size: clamp(0.98rem, 1.3vw, 1.26rem); line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-kpi-copy > span { display: block; color: #8291a7; font-size: 0.62rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-kpi-copy > span b { color: #cbd5e1; font-weight: 750; }
.dashboard-kpi-arrow { color: #475569; font-size: 0.65rem; }

.dashboard-intelligence-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.72fr) minmax(300px, 0.8fr);
    grid-template-areas:
        "pulse focus"
        "agenda activity";
    gap: 12px;
}

.dashboard-panel {
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(22, 29, 46, 0.98), rgba(17, 24, 39, 0.98));
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.2);
}

.dashboard-pulse-panel { grid-area: pulse; min-height: 280px; }
.dashboard-focus-panel { grid-area: focus; min-height: 280px; display: flex; flex-direction: column; }
.dashboard-agenda-panel { grid-area: agenda; min-height: 210px; }
.dashboard-activity-panel { grid-area: activity; min-height: 210px; }

.dashboard-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.dashboard-panel-heading.compact { align-items: center; }
.dashboard-panel-heading h2 { margin: 2px 0 0; color: #f8fafc !important; font-size: 0.98rem; letter-spacing: -0.02em; }
.dashboard-panel-heading p { margin: 2px 0 0; color: #64748b; font-size: 0.65rem; }
.dashboard-panel-heading-actions { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.dashboard-collapse-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 11px;
    color: #cbd5e1;
    background: rgba(255,255,255,0.045);
    cursor: pointer;
}
.dashboard-collapse-toggle i { transition: transform 180ms ease; }
.dashboard-panel-body { min-height: 0; display: flex; flex: 1; flex-direction: column; }

.dashboard-live-badge,
.dashboard-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.11);
    font-size: 0.62rem;
    font-weight: 800;
}

.dashboard-live-badge i { width: 6px; height: 6px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.1); }
.dashboard-count-badge { min-width: 25px; color: #fca5a5; background: rgba(239, 68, 68, 0.12); }

.dashboard-pulse-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 12px;
    align-items: stretch;
}

.dashboard-chart-wrap { position: relative; min-width: 0; height: 205px; }
.dashboard-funnel { padding: 10px; border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; background: rgba(2, 6, 23, 0.18); }
.dashboard-funnel-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 11px; }
.dashboard-funnel-head strong { color: #e2e8f0; font-size: 0.73rem; }
.dashboard-funnel-head span { color: #64748b; font-size: 0.62rem; }

.dashboard-funnel-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 24px;
    gap: 5px;
    align-items: center;
    margin-bottom: 9px;
}

.dashboard-funnel-row > span { display: flex; align-items: center; gap: 6px; color: #94a3b8; font-size: 0.65rem; }
.dashboard-funnel-row > b { color: #e2e8f0; font-size: 0.67rem; text-align: right; }
.dashboard-funnel-row > em { grid-column: 1 / -1; display: block; height: 4px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,0.06); }
.dashboard-funnel-row > em i { display: block; width: 0; height: 100%; border-radius: inherit; background: #fbbf24; transition: width 350ms ease; }
.dashboard-funnel-row:nth-of-type(3) > em i { background: #34d399; }
.dashboard-funnel-row:nth-of-type(4) > em i { background: #fb7185; }
.dashboard-funnel .dot { width: 7px; height: 7px; border-radius: 50%; background: #fbbf24; }
.dashboard-funnel .dot.won { background: #34d399; }
.dashboard-funnel .dot.lost { background: #fb7185; }

.dashboard-funnel-note {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 7px;
    align-items: flex-start;
    margin-top: 10px;
    padding: 8px;
    border-radius: 9px;
    color: #c7d2fe;
    background: rgba(99, 102, 241, 0.1);
    font-size: 0.6rem;
    line-height: 1.35;
}

.dashboard-action-list,
.dashboard-agenda-list,
.dashboard-activity-list {
    display: grid;
    gap: 6px;
    min-height: 0;
}

.dashboard-action-list { flex: 1; max-height: 204px; overflow-y: auto; padding-right: 3px; }
.dashboard-action-item {
    display: grid;
    grid-template-columns: 29px minmax(0, 1fr) 24px;
    gap: 8px;
    align-items: center;
    padding: 7px 8px;
    border: 1px solid rgba(255,255,255,0.055);
    border-radius: 10px;
    background: rgba(255,255,255,0.025);
}

.dashboard-action-item > i { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; color: #fbbf24; background: rgba(245, 158, 11, 0.12); font-size: 0.72rem; }
.dashboard-action-item.is-critical > i { color: #fda4af; background: rgba(244, 63, 94, 0.13); }
.dashboard-action-item strong { display: block; color: #e2e8f0; font-size: 0.67rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-action-item small { display: block; margin-top: 2px; color: #718096; font-size: 0.58rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-action-item button { display: grid; width: 24px; height: 24px; place-items: center; padding: 0; border: 0; border-radius: 7px; color: #94a3b8; background: rgba(255,255,255,0.055); cursor: pointer; }
.dashboard-action-item button:hover { color: #fff; background: rgba(99,102,241,0.2); }

.dashboard-panel-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 8px;
    padding: 8px 2px 0;
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    color: #818cf8;
    background: transparent;
    font-size: 0.64rem;
    font-weight: 800;
    cursor: pointer;
}

.dashboard-icon-button { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid rgba(255,255,255,0.07); border-radius: 8px; color: #94a3b8; background: rgba(255,255,255,0.03); cursor: pointer; }
.dashboard-icon-button:hover { color: #fff; border-color: rgba(129,140,248,0.35); background: rgba(99,102,241,0.12); }

.dashboard-agenda-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dashboard-agenda-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 9px;
    min-width: 0;
    padding: 9px;
    border: 1px solid rgba(255,255,255,0.055);
    border-radius: 11px;
    background: rgba(255,255,255,0.025);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: 150ms ease;
}

.dashboard-agenda-item:hover { transform: translateY(-1px); border-color: rgba(129,140,248,0.25); }
.dashboard-agenda-date { display: grid; width: 40px; height: 42px; place-items: center; align-content: center; border-radius: 9px; color: #bfdbfe; background: rgba(59, 130, 246, 0.12); }
.dashboard-agenda-date strong { color: inherit; font-size: 0.9rem; line-height: 1; }
.dashboard-agenda-date span { margin-top: 2px; color: inherit; opacity: 0.75; font-size: 0.52rem; text-transform: uppercase; }
.dashboard-agenda-item.is-late .dashboard-agenda-date { color: #fecdd3; background: rgba(244,63,94,0.13); }
.dashboard-agenda-item.is-soon .dashboard-agenda-date { color: #fde68a; background: rgba(245,158,11,0.13); }
.dashboard-agenda-copy { min-width: 0; }
.dashboard-agenda-copy strong { display: block; color: #e2e8f0; font-size: 0.67rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-agenda-copy span { display: block; margin-top: 2px; color: #7f8da3; font-size: 0.58rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-agenda-copy em { display: inline-flex; margin-top: 5px; padding: 2px 5px; border-radius: 999px; color: #93c5fd; background: rgba(59,130,246,0.1); font-size: 0.52rem; font-style: normal; font-weight: 750; }
.dashboard-agenda-item.is-late em { color: #fda4af; background: rgba(244,63,94,0.1); }
.dashboard-agenda-item.is-soon em { color: #fde68a; background: rgba(245,158,11,0.1); }

.dashboard-activity-list { grid-template-columns: 1fr; }
.dashboard-activity-item {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 6px 0;
    width: 100%;
    border: 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: inherit;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.dashboard-activity-item:last-child { border-bottom: 0; }
.dashboard-activity-icon { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 8px; color: #93c5fd; background: rgba(59,130,246,0.11); font-size: 0.66rem; }
.dashboard-activity-item.is-finance .dashboard-activity-icon { color: #6ee7b7; background: rgba(16,185,129,0.11); }
.dashboard-activity-copy { min-width: 0; }
.dashboard-activity-copy strong { display: block; color: #dbe4f0; font-size: 0.65rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-activity-copy span { display: block; margin-top: 1px; color: #718096; font-size: 0.56rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-activity-meta { text-align: right; }
.dashboard-activity-meta strong { display: block; color: #e2e8f0; font-size: 0.61rem; }
.dashboard-activity-meta span { display: block; margin-top: 2px; color: #64748b; font-size: 0.52rem; }

.dashboard-empty-state {
    display: grid;
    min-height: 118px;
    place-items: center;
    align-content: center;
    gap: 4px;
    color: #64748b;
    text-align: center;
}

.dashboard-empty-state i { color: #34d399; font-size: 1.1rem; }
.dashboard-empty-state strong { color: #94a3b8; font-size: 0.72rem; }
.dashboard-empty-state span { font-size: 0.61rem; }
.dashboard-hidden-metric { display: none !important; }

@media (max-width: 1550px) {
    .dashboard-kpi-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dashboard-command-bar { align-items: flex-start; }
    .dashboard-command-actions { max-width: 58%; }
}

@media (max-width: 1180px) {
    .dashboard-command-bar { flex-direction: column; }
    .dashboard-command-actions { width: 100%; max-width: none; justify-content: space-between; }
    .dashboard-intelligence-grid { grid-template-columns: 1fr; grid-template-areas: "pulse" "focus" "agenda" "activity"; }
    .dashboard-agenda-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .dashboard-command-bar { padding: 13px; border-radius: 14px; }
    .dashboard-command-actions { align-items: stretch; flex-direction: column; }
    .dashboard-quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); }
    .dashboard-rate-strip { align-self: stretch; justify-content: space-between; }
    .dashboard-alert-banner { grid-template-columns: 32px minmax(0, 1fr); }
    .dashboard-alert-action { display: none; }
    .dashboard-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-kpi { grid-template-columns: 34px minmax(0, 1fr); min-height: 94px; padding: 10px; }
    .dashboard-kpi-icon { width: 34px; height: 34px; }
    .dashboard-kpi-arrow { display: none; }
    .dashboard-pulse-content { grid-template-columns: 1fr; }
    .dashboard-chart-wrap { height: 190px; }
    .dashboard-agenda-list { grid-template-columns: 1fr; }
}

@media (max-width: 470px) {
    .dashboard-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .dashboard-kpi { grid-template-columns: minmax(0, 1fr); min-height: 82px; padding: 10px; }
    .dashboard-kpi-icon { display: none; }
    .dashboard-kpi-copy small { font-size: 0.57rem; }
    .dashboard-kpi-copy small em { font-size: 0.5rem; }
    .dashboard-kpi-copy strong { font-size: 0.92rem; }
    .dashboard-kpi-copy > span { font-size: 0.56rem; }
    .dashboard-quick-actions { grid-template-columns: 1fr 1fr; }
    .dashboard-rate-strip > span { padding-inline: 4px; }

    .dashboard-collapse-toggle { display: grid; }
    .dashboard-panel { min-height: 0; padding: 12px; }
    .dashboard-panel-heading { align-items: center; margin-bottom: 8px; }
    .dashboard-panel-heading > div:first-child { min-width: 0; }
    .dashboard-panel-heading h2 { font-size: 0.92rem; }
    .dashboard-panel-heading p { max-width: 31ch; }
    .dashboard-panel.is-mobile-collapsed { min-height: 0; padding-block: 9px; }
    .dashboard-panel.is-mobile-collapsed .dashboard-panel-heading { margin-bottom: 0; }
    .dashboard-panel.is-mobile-collapsed .dashboard-collapsible-content { display: none; }
    .dashboard-panel.is-mobile-collapsed .dashboard-collapse-toggle i { transform: rotate(180deg); }
    .dashboard-panel.is-mobile-collapsed .dashboard-live-badge { display: none; }
    .dashboard-empty-state { min-height: 92px; }
}

/* ==========================================================================
   TEKLİF, ARŞİV, MALZEME VE AYARLAR ÇALIŞMA ALANLARI
   ========================================================================== */
.workspace-section {
    width: 100%;
    max-width: 1840px;
    margin: 0 auto;
    padding-bottom: 1.5rem;
}

.workspace-page-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 94px;
    margin-bottom: 14px;
    padding: 16px 18px;
    overflow: hidden;
    border: 1px solid rgba(129, 140, 248, 0.18);
    border-radius: 18px;
    background:
        radial-gradient(circle at 88% 0%, rgba(99, 102, 241, 0.2), transparent 34%),
        linear-gradient(135deg, #111827, #151d31 62%, #17213a);
    box-shadow: 0 16px 34px rgba(2, 6, 23, 0.24);
}

.workspace-page-header::after {
    position: absolute;
    right: -44px;
    bottom: -100px;
    width: 250px;
    height: 170px;
    border: 1px solid rgba(129, 140, 248, 0.13);
    border-radius: 50%;
    content: '';
    pointer-events: none;
}

.workspace-page-heading,
.workspace-page-header > .btn,
.workspace-page-header > .quote-page-actions,
.settings-save-cluster {
    position: relative;
    z-index: 1;
}

.workspace-page-heading {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 12px;
}

.workspace-page-heading .page-title {
    margin: 3px 0 2px;
    color: #f8fafc !important;
    font-size: clamp(1.2rem, 1.8vw, 1.72rem);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.workspace-page-heading p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.76rem;
    line-height: 1.45;
}

.workspace-eyebrow,
.modal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #818cf8;
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.13em;
}

.workspace-record-chip,
.settings-save-state {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid rgba(129, 140, 248, 0.22);
    border-radius: 9px;
    color: #c7d2fe;
    background: rgba(99, 102, 241, 0.1);
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.btn-quiet {
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.045);
}
.btn-quiet:hover { color: #f8fafc; border-color: rgba(255,255,255,0.18); background: rgba(255,255,255,0.08); }
.btn:disabled { opacity: 0.58; cursor: wait; transform: none !important; }

.workspace-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.materials-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.workspace-kpi-card {
    --workspace-kpi: #60a5fa;
    position: relative;
    min-height: 92px;
    padding: 14px 15px 13px 17px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.075);
    border-radius: 15px;
    background: linear-gradient(145deg, rgba(30,39,65,0.94), rgba(17,24,39,0.96));
    box-shadow: 0 9px 22px rgba(2,6,23,0.16);
}

.workspace-kpi-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--workspace-kpi);
    content: '';
}

.workspace-kpi-card.tone-amber { --workspace-kpi: #fbbf24; }
.workspace-kpi-card.tone-green { --workspace-kpi: #34d399; }
.workspace-kpi-card.tone-violet { --workspace-kpi: #a78bfa; }
.workspace-kpi-card > span { display: flex; align-items: center; gap: 7px; color: #94a3b8; font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.035em; }
.workspace-kpi-card > span i { color: var(--workspace-kpi); }
.workspace-kpi-card > strong { display: block; margin-top: 9px; color: #f8fafc; font-size: clamp(1.05rem, 1.5vw, 1.34rem); line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workspace-kpi-card > small { display: block; margin-top: 4px; color: #64748b; font-size: 0.6rem; }

.workspace-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(180px, 230px) auto;
    align-items: end;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
}

.workspace-search-field { position: relative; min-width: 0; }
.workspace-search-field > i { position: absolute; top: 50%; left: 13px; z-index: 1; color: #64748b; transform: translateY(-50%); pointer-events: none; }
.workspace-search-field input { width: 100%; min-height: 42px; padding: 0.68rem 42px 0.68rem 38px; }
.search-clear-button { position: absolute; top: 50%; right: 7px; display: grid; width: 29px; height: 29px; place-items: center; border: 0; border-radius: 8px; color: #64748b; background: transparent; cursor: pointer; transform: translateY(-50%); }
.search-clear-button:hover { color: #e2e8f0; background: rgba(255,255,255,0.06); }

.workspace-filter-field { display: grid; grid-template-columns: auto minmax(130px, 1fr); align-items: center; gap: 8px; }
.workspace-filter-field label { color: #94a3b8; font-size: 0.68rem; }
.workspace-filter-field select { width: 100%; min-height: 42px; padding-block: 0.58rem; }
.workspace-result-count { align-self: center; justify-self: end; color: #94a3b8; font-size: 0.7rem; font-weight: 750; white-space: nowrap; }

.workspace-table-panel { padding: 0; overflow: hidden; }
.workspace-table-panel .workspace-toolbar { margin: 0; border-bottom: 1px solid rgba(255,255,255,0.07); border-radius: 0; box-shadow: none; }
.workspace-table-panel .table-responsive,
.archive-table-wrapper { margin: 0; padding: 0; border-radius: 0; }
.workspace-table-panel .data-table th { padding-block: 0.75rem; background: rgba(2,6,23,0.2); }
.workspace-table-panel .data-table td { vertical-align: middle; }
.workspace-table-panel .data-table tbody tr { transition: background 150ms ease; }
.workspace-table-panel .data-table tbody tr:hover { background: rgba(99,102,241,0.045); }
.workspace-empty-cell { padding: 3rem 1rem !important; text-align: center !important; }
.workspace-empty-state { display: grid; place-items: center; gap: 6px; color: #64748b; }
.workspace-empty-state i { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: #818cf8; background: rgba(99,102,241,0.1); font-size: 1rem; }
.workspace-empty-state strong { color: #cbd5e1; font-size: 0.82rem; }
.workspace-empty-state span { font-size: 0.68rem; }
.table-primary-text { color: #f1f5f9; font-size: 0.82rem; font-weight: 780; }
.table-secondary-text { display: block; margin-top: 3px; color: #64748b; font-size: 0.64rem; }
.table-money { color: #e2e8f0; font-weight: 800; white-space: nowrap; }
.table-action-group { display: flex; justify-content: flex-end; gap: 5px; }
.table-action-group .btn { width: 31px; height: 31px; justify-content: center; padding: 0; box-shadow: none; }
.archive-status-stack { display: grid; gap: 5px; min-width: 128px; }
.archive-status-stack .status-badge { justify-content: center; padding: 0.3rem 0.55rem; font-size: 0.7rem; }
.archive-status-stack select { min-height: 30px; padding: 0.3rem 0.45rem; font-size: 0.7rem; }
.archive-extended-actions { display: grid; gap: 5px; margin-top: 5px; padding-top: 5px; border-top: 1px solid rgba(255,255,255,0.07); }
.archive-extended-actions .btn { width: auto; height: auto; min-height: 29px; padding: 0.3rem 0.5rem; font-size: 0.66rem; }

.quote-readiness-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    padding: 7px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 13px;
    background: rgba(17,24,39,0.78);
    box-shadow: 0 7px 18px rgba(2,6,23,0.12);
}
.quote-readiness-label,
.readiness-step { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 5px 9px; border-radius: 8px; font-size: 0.66rem; }
.quote-readiness-label { margin-right: auto; color: #cbd5e1; }
.readiness-step { color: #718096; background: rgba(255,255,255,0.025); }
.readiness-step.is-complete { color: #a7f3d0; background: rgba(16,185,129,0.08); }
.readiness-dot { width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 0 4px rgba(245,158,11,0.1); }
.quote-readiness-bar.is-ready .readiness-dot { background: #34d399; box-shadow: 0 0 0 4px rgba(52,211,153,0.1); }

.settings-save-cluster { display: flex; align-items: center; gap: 9px; }
.settings-save-state { gap: 6px; color: #a7f3d0; border-color: rgba(52,211,153,0.17); background: rgba(16,185,129,0.08); }
.settings-save-state.is-dirty { color: #fde68a; border-color: rgba(251,191,36,0.2); background: rgba(245,158,11,0.08); }
.settings-save-state.is-saving { color: #bfdbfe; border-color: rgba(96,165,250,0.2); background: rgba(59,130,246,0.08); }
.settings-overview { margin-bottom: 12px; padding: 12px 14px; border-radius: 14px; }
.settings-completion-copy { display: flex; justify-content: space-between; gap: 12px; color: #94a3b8; font-size: 0.7rem; }
.settings-completion-copy strong { color: #c7d2fe; }
.settings-completion-track { height: 5px; margin: 8px 0 11px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,0.06); }
.settings-completion-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6366f1, #34d399); transition: width 250ms ease; }
.settings-quick-nav { display: flex; gap: 6px; overflow-x: auto; }
.settings-quick-nav button { display: inline-flex; align-items: center; gap: 6px; min-height: 31px; padding: 5px 9px; border: 1px solid rgba(255,255,255,0.07); border-radius: 8px; color: #94a3b8; background: rgba(255,255,255,0.025); font: inherit; font-size: 0.66rem; font-weight: 750; white-space: nowrap; cursor: pointer; }
.settings-quick-nav button:hover { color: #e2e8f0; border-color: rgba(129,140,248,0.24); background: rgba(99,102,241,0.08); }
.settings-accordion { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 10px; }
.settings-accordion details { margin: 0 !important; padding: 0; overflow: hidden; border-radius: 14px; }
.settings-accordion details > summary { padding: 13px 15px; }
.settings-accordion details > summary h3,
.settings-accordion details > summary .header-actions h3 { margin: 0; padding: 0; border: 0; color: #e2e8f0; font-size: 0.84rem; }
.settings-accordion .details-content { margin: 0 !important; padding: 2px 15px 15px; border-top: 1px solid rgba(255,255,255,0.055); }
.official-rate-card { margin: 4px 0 14px; padding: 14px; border: 1px solid rgba(129,140,248,.2); border-radius: 13px; background: linear-gradient(145deg, rgba(99,102,241,.09), rgba(15,23,42,.36)); }
.official-rate-card__header, .official-rate-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.official-rate-card__eyebrow { display: block; margin-bottom: 4px; color: #818cf8; font-size: .61rem; font-weight: 850; letter-spacing: .12em; }
.official-rate-card h4 { display: flex; align-items: center; gap: 8px; margin: 0; color: #e2e8f0; font-size: .82rem; }
.official-rate-card h4 i { color: #a5b4fc; }
.official-rate-badge { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 4px 9px; border-radius: 999px; color: #cbd5e1; background: rgba(148,163,184,.12); font-size: .64rem; font-weight: 800; white-space: nowrap; }
.official-rate-badge[data-state="live"] { color: #86efac; background: rgba(34,197,94,.13); }
.official-rate-badge[data-state="stale"], .official-rate-badge[data-state="error"] { color: #fcd34d; background: rgba(245,158,11,.13); }
.official-rate-values { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin: 12px 0; }
.official-rate-values > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; padding: 10px 12px; border: 1px solid rgba(255,255,255,.06); border-radius: 10px; background: rgba(2,6,23,.28); }
.official-rate-values span { color: #94a3b8; font-size: .66rem; font-weight: 750; }
.official-rate-values strong { color: #f8fafc; font-size: .92rem; font-variant-numeric: tabular-nums; }
.official-rate-card__footer p { margin: 0; color: #94a3b8; font-size: .67rem; line-height: 1.45; }
.official-rate-refresh { min-height: 44px; flex: 0 0 auto; }
.official-rate-refresh[disabled] { cursor: wait; opacity: .7; }
.official-rate-card > .field-help { display: block; margin-top: 9px; }
.official-rate-card > .field-help a { color: #a5b4fc; text-underline-offset: 2px; }
.dashboard-rate-meta { display: block; margin: -11px 0 8px; color: var(--dash-muted); font-size: .58rem; text-align: right; }
.settings-accordion details[data-settings-panel="company"],
.settings-accordion details[data-settings-panel="templates"],
.settings-accordion details[data-settings-panel="plugins"] { grid-column: span 2; }
.field-help { color: #64748b; font-size: 0.65rem; line-height: 1.4; }
.modal-eyebrow { margin-bottom: 4px; }
.modal-header > div > h3 { margin: 0; padding: 0; border: 0; }

@media (max-width: 1180px) {
    .workspace-page-header { align-items: flex-start; flex-direction: column; }
    .quote-page-actions { justify-content: flex-start; }
    .workspace-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .materials-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    .workspace-toolbar { grid-template-columns: minmax(0, 1fr) minmax(170px, 0.55fr); }
    .workspace-result-count { grid-column: 1 / -1; justify-self: start; }
    .quote-readiness-bar { align-items: stretch; flex-wrap: wrap; }
    .quote-readiness-label { flex-basis: 100%; }
    .settings-accordion { grid-template-columns: minmax(0, 1fr); }
    .settings-accordion details[data-settings-panel] { grid-column: auto; }
}

@media (max-width: 600px) {
    .official-rate-card__header, .official-rate-card__footer { align-items: stretch; flex-direction: column; }
    .official-rate-badge { align-self: flex-start; }
    .official-rate-values { grid-template-columns: 1fr; }
    .official-rate-refresh { width: 100%; justify-content: center; }
    .workspace-page-header { min-height: 0; padding: 13px; border-radius: 14px; }
    .workspace-page-heading { align-items: flex-start; }
    .workspace-page-heading p { max-width: 34ch; }
    .quote-page-actions { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .quote-page-actions .btn { justify-content: center; }
    .quote-page-actions .workspace-record-chip { grid-column: 1 / -1; }
    .workspace-kpi-grid,
    .materials-kpi-grid { grid-template-columns: 1fr; }
    .workspace-toolbar { grid-template-columns: 1fr; }
    .workspace-filter-field { grid-template-columns: 64px minmax(0, 1fr); }
    .workspace-result-count { grid-column: auto; }
    .readiness-step { flex: 1 1 145px; }
    .settings-save-cluster { width: 100%; justify-content: space-between; }
    .settings-overview { padding: 10px; }
}

.ai-analysis-preview {
    color: var(--text-primary, #172033);
    text-align: left;
}

.app-credit-widget {
    align-items: stretch;
    display: flex;
    filter: drop-shadow(0 12px 22px rgba(15, 23, 42, 0.28));
    position: absolute;
    right: -1rem;
    top: -0.5rem;
    z-index: 920;
}
#teklif-section { padding-top: 3.5rem; position: relative; }
.ai-credit-badge {
    align-items: center;
    background: linear-gradient(145deg, #20283b, #121827);
    border: 1px solid rgba(245, 194, 66, 0.46);
    border-radius: 14px 0 0 14px;
    color: #f8fafc;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    gap: 0.6rem;
    min-height: 46px;
    padding: 0.38rem 0.8rem 0.38rem 0.48rem;
}
.credit-coin-icon {
    align-items: center;
    background: radial-gradient(circle at 32% 25%, #fff2a8 0 8%, #ffd45e 20%, #e5a31c 68%, #9b6207 100%);
    border: 2px solid #ffe28a;
    border-radius: 50%;
    box-shadow: inset 0 -3px 5px rgba(112, 63, 0, 0.28), 0 0 0 3px rgba(245, 194, 66, 0.1);
    color: #6f4300;
    display: inline-flex;
    font-size: 0.84rem;
    height: 31px;
    justify-content: center;
    width: 31px;
}
.credit-widget-copy { align-items: baseline; display: flex; gap: 0.5rem; }
.credit-widget-copy small { color: #f5d26b; font-size: 0.72rem; font-weight: 850; letter-spacing: 0.04em; text-transform: uppercase; }
.credit-widget-copy strong { color: #fff; font-size: 1rem; min-width: 1.35rem; text-align: center; }
.ai-credit-badge:hover { background: linear-gradient(145deg, #2a344c, #182036); }
.ai-credit-badge.is-empty { border-color: rgba(248, 113, 113, 0.7); }
.ai-credit-badge.is-empty .credit-widget-copy strong { color: #fca5a5; }
.credit-add-button {
    align-items: center;
    background: linear-gradient(145deg, #f7cd59, #d79311);
    border: 1px solid #f9dc7b;
    border-left: 0;
    border-radius: 0 14px 14px 0;
    color: #442900;
    cursor: pointer;
    display: inline-flex;
    font-size: 1rem;
    font-weight: 900;
    justify-content: center;
    min-width: 43px;
    transition: transform 0.16s ease, filter 0.16s ease;
}
.credit-add-button:hover { filter: brightness(1.08); transform: translateX(1px); }
.credit-add-button:focus-visible,
.ai-credit-badge:focus-visible { outline: 3px solid rgba(250, 204, 21, 0.35); outline-offset: 2px; }
.ai-credit-wallet { color: var(--text-primary, #172033); display: grid; gap: 1rem; text-align: left; }
.ai-credit-wallet-balance { background: linear-gradient(135deg, #7b4b02, #d79716); border-radius: 14px; color: #fff; display: grid; gap: 0.2rem; padding: 1rem 1.1rem; }
.ai-credit-wallet-balance span { font-size: 0.78rem; font-weight: 800; opacity: 0.82; text-transform: uppercase; }
.ai-credit-wallet-balance strong { font-size: 2.25rem; line-height: 1; }
.ai-credit-wallet-balance small { color: #f3f4f6 !important; opacity: 1; }
.ai-credit-ledger h4 { font-size: 0.85rem; margin: 0 0 0.5rem; }
.ai-credit-ledger-row { align-items: center; border-bottom: 1px solid rgba(148, 163, 184, 0.24); display: flex; justify-content: space-between; padding: 0.55rem 0; }
.ai-credit-ledger-row span { display: grid; gap: 0.12rem; }
.ai-credit-ledger-row small { color: var(--text-muted, #64748b); font-size: 0.7rem; }
.ai-credit-ledger-row b { border-radius: 999px; padding: 0.22rem 0.48rem; }
.ai-credit-ledger-row b.is-credit { background: rgba(16, 185, 129, 0.12); color: #059669; }
.ai-credit-ledger-row b.is-debit { background: rgba(239, 68, 68, 0.1); color: #dc2626; }
.ai-credit-empty { color: var(--text-muted, #64748b); font-size: 0.8rem; }
.platform-credit-editor { color: var(--text-primary, #172033); display: grid; gap: 0.85rem; text-align: left; }
.platform-credit-editor > p, .platform-credit-editor > small { margin: 0; }
.platform-credit-editor > small { color: var(--text-muted, #64748b); }
.platform-credit-members { display: grid; gap: 0.35rem; max-height: 150px; overflow: auto; }
.platform-credit-member { align-items: center; background: rgba(99, 102, 241, 0.08); border-radius: 9px; display: flex; justify-content: space-between; padding: 0.55rem 0.65rem; }
.platform-credit-member span { display: grid; }
.platform-credit-member small { color: var(--text-muted, #64748b); font-size: 0.7rem; }
.platform-credit-member b { background: #6366f1; border-radius: 999px; color: #fff; min-width: 2rem; padding: 0.22rem 0.5rem; text-align: center; }
.platform-credit-editor label { display: grid; font-size: 0.76rem; font-weight: 800; gap: 0.25rem; }
.platform-credit-editor .swal2-input,
.platform-credit-editor .swal2-select,
.platform-credit-editor .swal2-textarea { margin: 0; width: 100%; }
.platform-credit-grid { display: grid; gap: 0.65rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.credit-package-store { color: var(--text-primary, #172033); display: grid; gap: 1rem; text-align: left; }
.credit-store-intro {
    align-items: center;
    background: linear-gradient(135deg, rgba(245, 194, 66, 0.18), rgba(217, 119, 6, 0.06));
    border: 1px solid rgba(217, 154, 22, 0.34);
    border-radius: 14px;
    display: flex;
    gap: 0.8rem;
    padding: 0.8rem 0.95rem;
}
.credit-store-intro > span,
.credit-package-coin {
    align-items: center;
    background: radial-gradient(circle at 30% 25%, #fff1a8, #f2bd38 46%, #b87008 100%);
    border-radius: 50%;
    color: #704200;
    display: inline-flex;
    flex: 0 0 auto;
    height: 42px;
    justify-content: center;
    width: 42px;
}
.credit-store-intro > div { display: grid; gap: 0.12rem; }
.credit-store-intro strong { font-size: 0.92rem; }
.credit-store-intro small { color: var(--text-muted, #64748b); line-height: 1.35; }
.credit-package-grid { display: grid; gap: 0.8rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.credit-package-card {
    background: linear-gradient(155deg, #263148 0%, #182135 62%, #121a2a 100%);
    border: 1px solid rgba(226, 181, 55, 0.28);
    border-radius: 16px;
    display: grid;
    gap: 0.55rem;
    min-width: 0;
    padding: 1rem;
    position: relative;
}
.credit-package-card.is-featured { border-color: #e5a91c; box-shadow: 0 10px 28px rgba(190, 126, 7, 0.16); transform: translateY(-3px); }
.credit-package-badge {
    background: linear-gradient(135deg, #f2c444, #d5890d);
    border-radius: 999px;
    color: #422800;
    font-size: 0.62rem;
    font-weight: 900;
    padding: 0.24rem 0.5rem;
    position: absolute;
    right: 0.65rem;
    top: 0.65rem;
}
.credit-package-coin { height: 38px; width: 38px; }
.credit-package-card h3 { color: #f8fafc; font-size: 1rem; margin: 0.15rem 0 0; }
.credit-package-card > strong { color: #d18b0c; font-size: 1.55rem; line-height: 1; }
.credit-package-card > strong small { color: #cbd5e1; font-size: 0.72rem; text-transform: uppercase; }
.credit-package-card p { color: #cbd5e1; font-size: 0.76rem; line-height: 1.4; margin: 0; min-height: 2.2rem; }
.credit-package-price { color: #fff3be; font-size: 1.05rem; font-weight: 900; }
.credit-package-buy {
    align-items: center;
    background: linear-gradient(135deg, #f1c344, #d88e10);
    border: 0;
    border-radius: 10px;
    color: #3f2700;
    cursor: pointer;
    display: flex;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 900;
    justify-content: space-between;
    margin-top: 0.15rem;
    padding: 0.65rem 0.75rem;
}
.credit-package-buy:hover { filter: brightness(1.06); }
.credit-store-trust { align-items: center; color: var(--text-muted, #64748b); display: flex; font-size: 0.74rem; gap: 0.45rem; justify-content: center; }
.credit-store-trust i { color: #16a34a; }
.credit-pending-orders { border-top: 1px solid rgba(148, 163, 184, 0.28); padding-top: 0.75rem; }
.credit-pending-orders h4 { font-size: 0.8rem; margin: 0 0 0.4rem; }
.credit-purchase-row { align-items: center; display: flex; font-size: 0.74rem; justify-content: space-between; padding: 0.42rem 0; }
.credit-purchase-row > span { display: grid; gap: 0.08rem; }
.credit-purchase-row > span:last-child { justify-items: end; }
.credit-purchase-row small,
.credit-purchase-row em { color: var(--text-muted, #64748b); font-size: 0.66rem; font-style: normal; }

.ai-analysis-confidence {
    align-items: center;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.9rem;
    padding: 0.65rem 0.8rem;
}

.ai-analysis-confidence strong { color: #2563eb; font-size: 1.1rem; }
.ai-analysis-preview dl { display: grid; gap: 0.35rem; margin: 0; }
.ai-analysis-preview dl > div { display: grid; grid-template-columns: minmax(120px, 0.35fr) 1fr; gap: 0.75rem; }
.ai-analysis-preview dt { color: var(--text-muted, #64748b); font-weight: 600; }
.ai-analysis-preview dd { margin: 0; overflow-wrap: anywhere; }
.ai-analysis-preview dd small { color: var(--text-muted, #64748b); display: block; }
.ai-analysis-preview h4 { font-size: 0.9rem; margin: 1rem 0 0.4rem; }
.ai-analysis-steps { display: grid; gap: 0.4rem; list-style: none; margin: 0; padding: 0; }
.ai-analysis-steps li { align-items: center; background: rgba(15, 23, 42, 0.04); border-radius: 8px; display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.55rem 0.65rem; }
.ai-analysis-steps li span { color: var(--text-muted, #64748b); font-size: 0.8rem; text-align: right; }
.ai-analysis-steps li.is-warning { background: rgba(245, 158, 11, 0.12); }
.ai-analysis-step-main { display: grid; flex: 1 1 220px; gap: 0.2rem; min-width: 0; }
.ai-analysis-step-main small { color: var(--text-muted, #64748b); font-size: 0.74rem; line-height: 1.35; }
.ai-analysis-step-main .ai-analysis-timing-note { color: #d97706; font-weight: 700; }
.ai-analysis-time-editor { display: grid; flex: 0 1 320px; gap: 0.55rem; grid-template-columns: repeat(2, minmax(120px, 1fr)); }
.ai-analysis-time-editor label { color: var(--text-muted, #64748b); display: grid; font-size: 0.72rem; font-weight: 700; gap: 0.25rem; }
.ai-analysis-time-editor input {
    background: var(--input-bg, #fff);
    border: 1px solid var(--border-color, #cbd5e1);
    border-radius: 8px;
    color: var(--text-primary, #172033);
    font: inherit;
    min-width: 0;
    padding: 0.52rem 0.6rem;
    width: 100%;
}
.ai-analysis-time-editor input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); outline: none; }
.ai-analysis-quantity-editor { align-items: center; display: flex; flex-wrap: wrap; gap: 0.55rem; }
.ai-analysis-quantity-editor input {
    background: var(--input-bg, #fff);
    border: 1px solid var(--border-color, #cbd5e1);
    border-radius: 8px;
    color: var(--text-primary, #172033);
    font: inherit;
    max-width: 150px;
    padding: 0.52rem 0.6rem;
}
.ai-analysis-quantity-editor small { color: var(--text-muted, #64748b); flex: 1 1 220px; }
.ai-stock-review {
    background: rgba(37, 99, 235, 0.07);
    border: 1px solid rgba(37, 99, 235, 0.24);
    border-radius: 12px;
    display: grid;
    gap: 0.65rem;
    padding: 0.75rem;
}
.ai-stock-review.is-warning { background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.34); }
.ai-stock-review.is-warning p { margin: 0; }
.ai-stock-review-heading { align-items: center; display: flex; gap: 0.75rem; justify-content: space-between; }
.ai-stock-review-heading > div { display: grid; gap: 0.16rem; }
.ai-stock-review-heading span { color: var(--text-muted, #64748b); font-size: 0.72rem; font-weight: 700; }
.ai-stock-review-heading strong { color: var(--text-primary, #172033); font-size: 1.05rem; }
.ai-stock-review-heading i { color: #2563eb; font-size: 1.1rem; }
.ai-stock-review > p { color: var(--text-primary, #334155); font-size: 0.8rem; margin: 0; }
.ai-stock-review > small { color: var(--text-muted, #64748b); font-size: 0.7rem; }
.ai-stock-allowance-grid { display: grid; gap: 0.55rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ai-stock-allowance-grid label { color: var(--text-muted, #64748b); display: grid; font-size: 0.71rem; font-weight: 700; gap: 0.25rem; min-width: 0; }
.ai-stock-allowance-grid input {
    background: var(--input-bg, #fff);
    border: 1px solid var(--border-color, #cbd5e1);
    border-radius: 8px;
    color: var(--text-primary, #172033);
    font: inherit;
    min-width: 0;
    padding: 0.52rem 0.6rem;
    width: 100%;
}
.ai-stock-allowance-grid input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14); outline: none; }
.ai-stock-allowance-grid input.is-invalid { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12); }
.ai-stock-result { align-items: center; background: rgba(16, 185, 129, 0.1); border-radius: 8px; display: flex; gap: 0.75rem; justify-content: space-between; padding: 0.55rem 0.65rem; }
.ai-stock-result span { color: var(--text-muted, #64748b); font-size: 0.72rem; font-weight: 700; }
.ai-stock-result strong { color: #047857; font-size: 0.9rem; }
.ai-analysis-operation-editor { display: grid; gap: 0.6rem; }
.ai-analysis-operation-editor > p { color: var(--text-muted, #64748b); font-size: 0.78rem; margin: 0; }
.ai-analysis-operation-grid { display: grid; gap: 0.45rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ai-analysis-operation-option {
    align-items: center;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 9px;
    cursor: pointer;
    display: flex;
    gap: 0.55rem;
    min-width: 0;
    padding: 0.55rem 0.65rem;
}
.ai-analysis-operation-option:has(input:checked) { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.35); }
.ai-analysis-operation-option input { accent-color: #10b981; flex: 0 0 auto; height: 18px; width: 18px; }
.ai-analysis-operation-option span { display: grid; gap: 0.1rem; min-width: 0; }
.ai-analysis-operation-option strong { overflow-wrap: anywhere; }
.ai-analysis-operation-option small { color: var(--text-muted, #64748b); font-size: 0.7rem; }
.ai-analysis-unmatched-operations { background: rgba(245, 158, 11, 0.12); border-radius: 9px; display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0.55rem 0.65rem; }
.ai-analysis-unmatched-operations strong { flex-basis: 100%; font-size: 0.76rem; }
.ai-analysis-unmatched-operations span { background: rgba(245, 158, 11, 0.16); border-radius: 999px; font-size: 0.72rem; padding: 0.2rem 0.45rem; }
.ai-analysis-batch-item { border: 1px solid rgba(148, 163, 184, 0.3); border-radius: 12px; margin-bottom: 0.75rem; padding: 0.75rem; }
.ai-analysis-batch-heading { align-items: center; display: flex; gap: 0.75rem; justify-content: space-between; margin-bottom: 0.55rem; }
.ai-analysis-batch-heading span { color: #2563eb; font-size: 0.78rem; font-weight: 800; }
.ai-analysis-batch-facts { display: grid; gap: 0.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 0.65rem; }
.ai-analysis-batch-facts > span { background: rgba(15, 23, 42, 0.04); border-radius: 8px; display: grid; gap: 0.1rem; padding: 0.5rem 0.6rem; }
.ai-analysis-batch-facts small { color: var(--text-muted, #64748b); font-size: 0.67rem; }
.ai-analysis-batch-facts strong { overflow-wrap: anywhere; }
.ai-analysis-batch-item h5 { font-size: 0.78rem; margin: 0.75rem 0 0.4rem; }
.ai-analysis-batch-control { align-items: center; display: grid; gap: 0.6rem; grid-template-columns: 80px minmax(0, 1fr); }
.ai-analysis-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ai-analysis-tag { background: rgba(16, 185, 129, 0.12); border-radius: 999px; padding: 0.3rem 0.6rem; }
.ai-analysis-tag.is-warning { background: rgba(245, 158, 11, 0.15); }
.ai-analysis-empty { color: var(--text-muted, #64748b); }
.ai-analysis-warnings { background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.28); border-radius: 10px; margin-top: 1rem; padding: 0.7rem 0.8rem; }
.ai-analysis-warnings ul { margin: 0.4rem 0 0; padding-left: 1.2rem; }
.ai-analysis-disclaimer { border-top: 1px solid rgba(148, 163, 184, 0.3); color: var(--text-muted, #64748b); font-size: 0.78rem; margin: 1rem 0 0; padding-top: 0.7rem; }

.machine-rate-input-grid {
    align-items: end;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}
.machine-rate-input-grid .form-group { margin: 0; min-width: 0; }
.machine-rate-equals { color: var(--text-muted, #64748b); padding-bottom: 0.8rem; }
.machine-rate-input-wrap { position: relative; }
.machine-rate-input-wrap input { padding-right: 4.7rem; width: 100%; }
.machine-rate-input-wrap span {
    color: var(--text-muted, #64748b);
    font-size: 0.75rem;
    font-weight: 800;
    pointer-events: none;
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
}
.machine-rate-help { display: block; margin: -0.15rem 0 0; }
.machine-rate-display { display: grid; gap: 0.12rem; }
.machine-rate-display strong { color: var(--text-primary, #e2e8f0); font-size: 0.88rem; }
.machine-rate-display small { color: var(--text-muted, #94a3b8); font-size: 0.74rem; }

@media (max-width: 600px) {
    .ai-analysis-preview dl > div { grid-template-columns: 1fr; gap: 0.1rem; }
    .ai-analysis-steps li { align-items: flex-start; flex-direction: column; }
    .ai-analysis-steps li span { text-align: left; }
    .ai-analysis-time-editor { grid-template-columns: 1fr; width: 100%; }
    .ai-stock-allowance-grid { grid-template-columns: 1fr; }
    .ai-stock-result { align-items: flex-start; flex-direction: column; gap: 0.2rem; }
    .ai-analysis-operation-grid { grid-template-columns: 1fr; }
    .ai-analysis-batch-control { align-items: start; grid-template-columns: 1fr; }
    .ai-analysis-batch-facts { grid-template-columns: 1fr; }
    .machine-rate-input-grid { align-items: stretch; grid-template-columns: 1fr; }
    .machine-rate-equals { display: none; }
    .app-credit-widget { right: 0; top: 0; }
    #teklif-section { padding-top: 3.25rem; }
    .credit-widget-copy small { display: none; }
    .ai-credit-badge { min-height: 43px; padding-right: 0.6rem; }
    .credit-coin-icon { height: 28px; width: 28px; }
    .credit-add-button { min-width: 41px; }
    .credit-package-grid { grid-template-columns: 1fr; }
    .credit-package-card.is-featured { transform: none; }
    .platform-credit-grid { grid-template-columns: 1fr; }
}

/* ========================================================================== 
   DASHBOARD V2 — premium endüstriyel kontrol merkezi
   Yalnız ana sayfaya uygulanır; diğer çalışma alanları bağımsız kalır.
   ========================================================================== */
#dashboard-section {
    --dash-bg: #05080c;
    --dash-surface: #0b1218;
    --dash-surface-raised: #101a22;
    --dash-surface-soft: #081016;
    --dash-line: rgba(177, 221, 215, .11);
    --dash-line-strong: rgba(125, 240, 209, .28);
    --dash-text: #f2f7f6;
    --dash-muted: #8799a5;
    --dash-accent: #7df0d1;
    --dash-accent-2: #7aa7ff;
    --dash-accent-soft: rgba(125, 240, 209, .11);
    position: relative;
    isolation: isolate;
    margin: 0;
    padding: 18px 18px 1.5rem;
    overflow: hidden;
    border: 1px solid rgba(177, 221, 215, .08);
    border-radius: 28px;
    color: var(--dash-text);
    background:
        radial-gradient(circle at 8% -8%, rgba(67, 220, 184, .13), transparent 25%),
        radial-gradient(circle at 92% 20%, rgba(73, 115, 210, .09), transparent 24%),
        linear-gradient(rgba(172, 212, 207, .022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(172, 212, 207, .022) 1px, transparent 1px),
        var(--dash-bg);
    background-size: auto, auto, 34px 34px, 34px 34px, auto;
    box-shadow: inset 0 1px rgba(255, 255, 255, .025), 0 28px 80px rgba(0, 0, 0, .28);
    color-scheme: dark;
}

#dashboard-section::before {
    position: absolute;
    z-index: -1;
    top: 8%;
    right: -190px;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(125, 240, 209, .055);
    border-radius: 50%;
    box-shadow: 0 0 0 54px rgba(125, 240, 209, .018), 0 0 0 108px rgba(125, 240, 209, .012);
    content: '';
    pointer-events: none;
}

#dashboard-section .dashboard-control-center { gap: 11px; }
#dashboard-section .dashboard-command-bar {
    min-height: 104px;
    padding: 18px 20px;
    border-color: rgba(125, 240, 209, .15);
    border-radius: 22px;
    background:
        radial-gradient(circle at 16% 0%, rgba(125, 240, 209, .13), transparent 34%),
        radial-gradient(circle at 92% 100%, rgba(122, 167, 255, .13), transparent 32%),
        linear-gradient(125deg, rgba(16, 29, 35, .98), rgba(8, 15, 21, .98));
    box-shadow: inset 0 1px rgba(255, 255, 255, .045), 0 22px 55px rgba(0, 0, 0, .28);
}
#dashboard-section .dashboard-command-bar::before {
    position: absolute;
    top: 22px;
    bottom: 22px;
    left: 0;
    width: 2px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(var(--dash-accent), rgba(125, 240, 209, 0));
    box-shadow: 0 0 18px rgba(125, 240, 209, .5);
    content: '';
}
#dashboard-section .dashboard-command-bar::after {
    right: -72px;
    bottom: -138px;
    display: block;
    width: 310px;
    height: 250px;
    border-color: rgba(125, 240, 209, .09);
    box-shadow: inset 0 0 70px rgba(122, 167, 255, .04);
}
#dashboard-section .dashboard-menu-button {
    width: 46px;
    height: 46px;
    border-color: rgba(125, 240, 209, .16);
    border-radius: 14px;
    color: var(--dash-accent);
    background: rgba(125, 240, 209, .06);
}
#dashboard-section .dashboard-eyebrow,
#dashboard-section .dashboard-section-label { color: var(--dash-accent); letter-spacing: .15em; }
#dashboard-section .dashboard-eyebrow i { filter: drop-shadow(0 0 8px rgba(125, 240, 209, .55)); }
#dashboard-section .dashboard-command-copy h1 {
    margin-top: 5px;
    color: var(--dash-text) !important;
    font-size: clamp(1.4rem, 2.1vw, 2rem);
    font-weight: 780;
    letter-spacing: -.045em;
}
#dashboard-section .dashboard-command-copy p,
#dashboard-section .dashboard-panel-heading p { color: var(--dash-muted); }
#dashboard-section .dashboard-rate-strip {
    padding: 6px;
    border-color: var(--dash-line);
    border-radius: 13px;
    background: rgba(4, 10, 14, .7);
    box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}
#dashboard-section .dashboard-rate-strip > span + span { border-left: 1px solid var(--dash-line); }
#dashboard-section .dashboard-rate-strip i { color: var(--dash-accent-2); }
#dashboard-section .dashboard-rate-strip strong { color: #eaf3f1; }

#dashboard-section .dashboard-quick-actions .btn {
    min-height: 40px;
    padding-inline: .84rem;
    border: 1px solid var(--dash-line) !important;
    border-radius: 11px;
    box-shadow: none !important;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}
#dashboard-section .dashboard-quick-actions .btn:hover { transform: translateY(-1px); border-color: var(--dash-line-strong) !important; }
#dashboard-section .dashboard-quick-actions .btn-primary {
    border-color: rgba(125, 240, 209, .6) !important;
    color: #04110d !important;
    background: linear-gradient(135deg, #91f7dc, #63d8bb) !important;
    box-shadow: 0 10px 28px rgba(76, 214, 178, .18) !important;
}
#dashboard-section .dashboard-quick-actions .btn-success {
    border-color: rgba(125, 240, 209, .24) !important;
    color: #aef7e4 !important;
    background: rgba(125, 240, 209, .075) !important;
}
#dashboard-section .dashboard-quick-actions .btn-secondary { color: #bbc8ce !important; background: rgba(255, 255, 255, .035) !important; }

#dashboard-section .dashboard-alert-banner {
    min-height: 46px;
    border-color: rgba(125, 240, 209, .18);
    border-radius: 14px;
    color: #c2f5e7;
    background: linear-gradient(90deg, rgba(125, 240, 209, .075), rgba(125, 240, 209, .025));
    box-shadow: inset 2px 0 var(--dash-accent);
}
#dashboard-section .dashboard-alert-banner:hover { transform: translateY(-1px); border-color: rgba(125, 240, 209, .32); }
#dashboard-section .dashboard-alert-banner.is-warning { color: #ffe5b0; border-color: rgba(255, 203, 124, .24); background: linear-gradient(90deg, rgba(255, 203, 124, .08), transparent); box-shadow: inset 2px 0 #ffcb7c; }
#dashboard-section .dashboard-alert-banner.is-critical { color: #ffc4c1; border-color: rgba(255, 139, 136, .25); background: linear-gradient(90deg, rgba(255, 139, 136, .08), transparent); box-shadow: inset 2px 0 #ff8b88; }
#dashboard-section .dashboard-alert-icon { color: var(--dash-accent); background: rgba(125, 240, 209, .08); }

#dashboard-section .dashboard-kpi-strip { gap: 9px; }
#dashboard-section .dashboard-kpi {
    --kpi-accent: #7aa7ff;
    --kpi-soft: rgba(122, 167, 255, .105);
    min-height: 108px;
    padding: 13px 11px;
    border-color: var(--dash-line);
    border-radius: 17px;
    color: #dfe9e7;
    background:
        radial-gradient(circle at 100% 0%, var(--kpi-soft), transparent 43%),
        linear-gradient(145deg, rgba(18, 29, 37, .97), rgba(9, 16, 22, .98));
    box-shadow: inset 0 1px rgba(255, 255, 255, .025), 0 12px 30px rgba(0, 0, 0, .16);
}
#dashboard-section .dashboard-kpi::before {
    inset: 0 18px auto;
    width: auto;
    height: 1px;
    opacity: .9;
    background: linear-gradient(90deg, transparent, var(--kpi-accent), transparent);
}
#dashboard-section .dashboard-kpi::after {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--kpi-accent);
    box-shadow: 0 0 12px var(--kpi-accent);
    content: '';
    opacity: .72;
}
#dashboard-section .dashboard-kpi:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--kpi-accent) 38%, transparent); background-color: #111d25; }
#dashboard-section .dashboard-kpi.tone-green { --kpi-accent: #7df0d1; --kpi-soft: rgba(125, 240, 209, .105); }
#dashboard-section .dashboard-kpi.tone-violet { --kpi-accent: #b6a2ff; --kpi-soft: rgba(182, 162, 255, .105); }
#dashboard-section .dashboard-kpi.tone-amber { --kpi-accent: #ffcb7c; --kpi-soft: rgba(255, 203, 124, .105); }
#dashboard-section .dashboard-kpi.tone-cyan { --kpi-accent: #6edbea; --kpi-soft: rgba(110, 219, 234, .105); }
#dashboard-section .dashboard-kpi.tone-red { --kpi-accent: #ff8b88; --kpi-soft: rgba(255, 139, 136, .105); }
#dashboard-section .dashboard-kpi-icon { border: 1px solid color-mix(in srgb, var(--kpi-accent) 16%, transparent); border-radius: 12px; }
#dashboard-section .dashboard-kpi-copy small { color: #91a2ac; letter-spacing: .06em; }
#dashboard-section .dashboard-kpi-copy small em { color: #5f747e; }
#dashboard-section .dashboard-kpi-copy strong { color: var(--dash-text); font-size: clamp(1rem, 1.22vw, 1.22rem); }
#dashboard-section .dashboard-kpi-copy > span { color: #748791; }
#dashboard-section .dashboard-kpi-copy > span b { color: #c5d2d2; }
#dashboard-section .dashboard-kpi-arrow { display: none; }

#dashboard-section .dashboard-intelligence-grid { gap: 11px; }
#dashboard-section .dashboard-panel {
    position: relative;
    overflow: hidden;
    border-color: var(--dash-line);
    border-radius: 19px;
    background:
        linear-gradient(145deg, rgba(14, 23, 30, .96), rgba(7, 13, 18, .98));
    box-shadow: inset 0 1px rgba(255, 255, 255, .025), 0 18px 42px rgba(0, 0, 0, .18);
}
#dashboard-section .dashboard-panel::before {
    position: absolute;
    top: 0;
    left: 18px;
    width: 72px;
    height: 1px;
    background: linear-gradient(90deg, var(--dash-accent), transparent);
    content: '';
    opacity: .65;
}
#dashboard-section .dashboard-panel-heading h2 { color: var(--dash-text) !important; font-size: 1.02rem; }
#dashboard-section .dashboard-funnel,
#dashboard-section .dashboard-action-item,
#dashboard-section .dashboard-agenda-item { border-color: var(--dash-line); background: rgba(3, 9, 13, .42); }
#dashboard-section .dashboard-funnel-head strong,
#dashboard-section .dashboard-funnel-row > b,
#dashboard-section .dashboard-action-item strong,
#dashboard-section .dashboard-agenda-copy strong,
#dashboard-section .dashboard-activity-copy strong,
#dashboard-section .dashboard-activity-meta strong { color: #e1ecea; }
#dashboard-section .dashboard-funnel-head span,
#dashboard-section .dashboard-funnel-row > span,
#dashboard-section .dashboard-action-item small,
#dashboard-section .dashboard-agenda-copy span,
#dashboard-section .dashboard-activity-copy span,
#dashboard-section .dashboard-activity-meta span { color: var(--dash-muted); }
#dashboard-section .dashboard-funnel-row > em { background: rgba(255, 255, 255, .055); }
#dashboard-section .dashboard-funnel-row > em i,
#dashboard-section .dashboard-funnel .dot { background: #ffcb7c; }
#dashboard-section .dashboard-funnel-row:nth-of-type(3) > em i,
#dashboard-section .dashboard-funnel .dot.won { background: var(--dash-accent); }
#dashboard-section .dashboard-funnel-row:nth-of-type(4) > em i,
#dashboard-section .dashboard-funnel .dot.lost { background: #ff8b88; }
#dashboard-section .dashboard-funnel-note { color: #c8d9ff; background: rgba(122, 167, 255, .085); }
#dashboard-section .dashboard-live-badge { color: #a7f7e2; border: 1px solid rgba(125, 240, 209, .11); background: var(--dash-accent-soft); }
#dashboard-section .dashboard-live-badge i { background: var(--dash-accent); box-shadow: 0 0 12px rgba(125, 240, 209, .8); }
#dashboard-section .dashboard-count-badge { color: #ffc0be; background: rgba(255, 139, 136, .1); }
#dashboard-section .dashboard-icon-button,
#dashboard-section .dashboard-collapse-toggle { border-color: var(--dash-line); color: #98abb3; background: rgba(255, 255, 255, .025); }
#dashboard-section .dashboard-panel-link { color: var(--dash-accent); border-color: var(--dash-line); }
#dashboard-section .dashboard-empty-state { color: var(--dash-muted); background: rgba(3, 9, 13, .36); border-radius: 12px; }
#dashboard-section .dashboard-empty-state i { color: var(--dash-accent); filter: drop-shadow(0 0 10px rgba(125, 240, 209, .35)); }
#dashboard-section :is(button, a):focus-visible { outline: 2px solid var(--dash-accent); outline-offset: 3px; }

/* Dashboard açıkken uygulama kabuğu da aynı tasarım diline geçer. */
body:has(#dashboard-section.active) { --dashboard-shell-accent: #7df0d1; }
body:has(#dashboard-section.active) .main-content { background: #05080c !important; }
body:has(#dashboard-section.active) .sidebar {
    border-right: 1px solid rgba(125, 240, 209, .09) !important;
    background:
        radial-gradient(circle at 0 0, rgba(125, 240, 209, .08), transparent 27%),
        linear-gradient(180deg, #091119, #070d13 70%) !important;
    box-shadow: 18px 0 60px rgba(0, 0, 0, .24) !important;
}
body:has(#dashboard-section.active) .sidebar .logo { color: #f3f8f7 !important; letter-spacing: -.035em; }
body:has(#dashboard-section.active) .sidebar .nav-item { border: 1px solid transparent; color: #8799a5 !important; }
body:has(#dashboard-section.active) .sidebar .nav-item:hover { color: #dce8e6 !important; background: rgba(255, 255, 255, .035) !important; }
body:has(#dashboard-section.active) .sidebar .nav-item.active {
    border-color: rgba(125, 240, 209, .16) !important;
    color: #baf9e8 !important;
    background: linear-gradient(90deg, rgba(125, 240, 209, .14), rgba(125, 240, 209, .035)) !important;
    box-shadow: inset 2px 0 var(--dashboard-shell-accent), 0 12px 30px rgba(0, 0, 0, .12) !important;
}
body:has(#dashboard-section.active) .sidebar .nav-item.active i { color: var(--dashboard-shell-accent) !important; filter: drop-shadow(0 0 8px rgba(125, 240, 209, .34)); }

@media (min-width: 1181px) {
    #dashboard-section .dashboard-kpi-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    #dashboard-section .dashboard-kpi { grid-template-columns: 34px minmax(0, 1fr); gap: 8px; }
    #dashboard-section .dashboard-kpi-icon { width: 34px; height: 34px; }
}

@media (max-width: 1180px) {
    #dashboard-section .dashboard-command-bar { min-height: 0; }
}

@media (max-width: 700px) {
    #dashboard-section {
        padding: 10px 10px 1rem;
        border-radius: 18px;
        background-size: auto, auto, 28px 28px, 28px 28px, auto;
    }
    #dashboard-section .dashboard-command-bar { padding: 16px; border-radius: 18px; }
    #dashboard-section .dashboard-command-copy h1 { font-size: 1.38rem; }
    #dashboard-section .dashboard-quick-actions .btn { min-height: 44px; }
    #dashboard-section .dashboard-kpi { min-height: 94px; border-radius: 15px; }
    #dashboard-section .dashboard-panel { border-radius: 17px; }
}

@media (prefers-reduced-motion: reduce) {
    #dashboard-section .dashboard-kpi,
    #dashboard-section .dashboard-quick-actions .btn,
    #dashboard-section .dashboard-alert-banner { transition: none; }
}
