/* Logistix Inspired Admin Panel Styles */

:root {
    /* Logistix benzeri palet */
    --primary-color: #0ea5e9; /* sky-500 */
    --primary-dark: #0284c7;  /* sky-600 */
    --secondary-color: #475569; /* slate-600 */
    --success-color: #22c55e;  /* green-500 */
    --warning-color: #f59e0b;  /* amber-500 */
    --error-color: #ef4444;    /* red-500 */
    --background-color: #f1f5f9; /* slate-100 */
    --sidebar-bg: #0f172a;     /* slate-900 */
    --sidebar-hover: #1e293b;  /* slate-800 */
    --text-primary: #0f172a;   /* slate-900 */
    --text-secondary: #475569; /* slate-600 */
    --text-light: #94a3b8;     /* slate-400 */
    --border-color: #e2e8f0;   /* slate-200 */
    --white: #ffffff;
    --shadow: 0 1px 3px 0 rgba(2, 8, 23, 0.08), 0 1px 2px 0 rgba(2, 8, 23, 0.04);
    --shadow-lg: 0 12px 20px -5px rgba(2, 8, 23, 0.12), 0 6px 10px -3px rgba(2, 8, 23, 0.06);
    --radius: 10px;
    --radius-lg: 14px;
    --transition: all 0.25s ease;
}

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

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

/* Global scroll safety for mobile */
html, body { height: 100%; overflow-y: auto; }

/* Layout */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--sidebar-bg);
    color: var(--white);
    z-index: 1000;
    transition: var(--transition);
    overflow-y: auto;
}

.sidebar.collapsed {
    width: 80px;
}

.main-content {
    margin-left: 280px;
    min-height: 100vh;
    transition: var(--transition);
}

.sidebar.collapsed + .main-content {
    margin-left: 80px;
}

/* Sidebar Header */
.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--white);
    margin: 4px 0;
    transition: var(--transition);
}

/* Sidebar Navigation */
.sidebar-nav {
    padding: 1rem 0;
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    padding: 0 1.5rem;
    margin-bottom: 0.75rem;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    background: var(--sidebar-hover);
    color: var(--white);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--white);
}

.nav-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.badge {
    background: var(--warning-color);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    margin-left: auto;
}

/* Header */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    flex: 1;
}

.breadcrumb {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.header-center {
    flex: 1;
    max-width: 400px;
    margin: 0 2rem;
}

.search-box {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    fill: var(--text-light);
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    padding: 0.75rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

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

.notification-btn .icon {
    width: 20px;
    height: 20px;
    fill: var(--text-secondary);
}

.notification-badge {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: var(--error-color);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-align: center;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.user-menu:hover {
    background: var(--background-color);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.875rem;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Content */
.content-wrapper {
    padding: 2rem;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

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

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.section-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-actions {
    display: flex;
    gap: 1rem;
}

/* Time Filter */
.time-filter {
    display: inline-flex;
    background: var(--background-color);
    padding: 0.25rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    align-items: center;
}

.filter-btn {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem 0.875rem;
    border-radius: 999px;
    border: none;
}

.filter-btn.active {
    background: var(--white);
    color: var(--text-primary);
    box-shadow: var(--shadow);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

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

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.btn-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.btn-link:hover {
    color: var(--primary-dark);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.stat-icon svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.stat-icon img {
    width: 32px;
    height: 32px;
    display: block;
    object-fit: contain;
}

/* Icon background variants */
.icon-bg-blue { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.icon-bg-emerald { background: linear-gradient(135deg, #22c55e, #16a34a); }
.icon-bg-amber { background: linear-gradient(135deg, #f59e0b, #d97706); }
.icon-bg-indigo { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.icon-bg-sky { background: linear-gradient(135deg, #38bdf8, #0ea5e9); }
.icon-bg-slate { background: linear-gradient(135deg, #64748b, #475569); }
/* Extra variants for better contrast */
.icon-bg-violet { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.icon-bg-rose { background: linear-gradient(135deg, #f43f5e, #e11d48); }
.icon-bg-teal { background: linear-gradient(135deg, #14b8a6, #0d9488); }

.stat-content h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.sparkline-wrap {
    height: 8px;
}

/* Progress bar */
.progress {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    width: 0%;
    transition: width 0.6s ease;
}

/* Progress variants */
.progress-blue { background: linear-gradient(90deg, #38bdf8, #0ea5e9); }
.progress-emerald { background: linear-gradient(90deg, #34d399, #10b981); }
.progress-amber { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.progress-indigo { background: linear-gradient(90deg, #818cf8, #6366f1); }
.progress-slate { background: linear-gradient(90deg, #94a3b8, #64748b); }
/* Extra progress variants */
.progress-violet { background: linear-gradient(90deg, #a78bfa, #8b5cf6); }
.progress-rose { background: linear-gradient(90deg, #fb7185, #f43f5e); }
.progress-teal { background: linear-gradient(90deg, #2dd4bf, #14b8a6); }

.stat-change {
    font-size: 0.875rem;
    font-weight: 600;
}

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

.stat-change.negative {
    color: var(--error-color);
}

/* Orders Grid */
.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Filters */
.filters-bar{
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1rem;
}
.filter-group{ display:flex; flex-direction:column; gap:0.35rem; }
.filter-group.range .range-inputs{ display:flex; align-items:center; gap:0.5rem; }
.filter-actions{ margin-left:auto; display:flex; gap:0.5rem; }
.input-select, .input-text{
    border:1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

/* Bulk bar */
.bulk-bar{
    display:flex;
    gap:0.75rem;
    align-items:center;
    padding:0.75rem 1rem;
    background:#f8fafc;
    border:1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

/* Status bar - capsule segmented tabs */
.status-bar {
    position: sticky;
    top: 64px;
    z-index: 5;
    margin: 0.5rem 0 1rem;
    padding: 0.5rem;
    border: 1px solid var(--border-color, #e2e8f0);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(6px);
    border-radius: 14px;
}

.status-tabs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scroll-snap-type: x mandatory;
}

.st-tab {
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 36px;
    padding: 0 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--border-color, #e2e8f0);
    background: #fff;
    color: var(--text-secondary, #64748b);
    font-weight: 600;
    white-space: nowrap;
    transition: transform 0.12s ease, box-shadow 0.2s ease, border-color 0.2s;
    cursor: pointer;
}

.st-tab .st-ic {
    font-size: 15px;
}

.st-count {
    background: #f1f5f9;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
}

.st-tab:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
    border-color: #cbd5e1;
}

.st-tab.active {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    color: #0f172a;
    border-color: #bae6fd;
    box-shadow: 0 8px 16px -8px rgba(14, 165, 233, 0.35);
}

.st-tab.active .st-count {
    background: #0ea5e91a;
    color: #0284c7;
}

/* Carrier select dropdown */
.carrier-select {
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    background: white;
    color: #374151;
    margin-right: 6px;
    min-width: 100px;
    height: 32px;
    cursor: pointer;
}

/* Status messages */
.status-message {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    margin: 0;
}

.status-message.delivered {
    background: #e6f8ed;
    color: #1e7e34;
}

.status-message.failed {
    background: #ffe6e6;
    color: #d93025;
}

.status-message.lost {
    background: #f3e8ff;
    color: #7e22ce;
}

.status-message.returned {
    background: #fff4e6;
    color: #ea580c;
}

.status-message.all-tab {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* Context menu */
.context-menu {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 4px 0;
    min-width: 120px;
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    transition: background-color 0.2s;
}

.context-menu-item:hover {
    background: #f3f4f6;
}

.context-menu-item svg {
    color: #dc2626;
}

/* Dar ekranda dropdown'a geç */
.status-dropdown {
    display: none;
    width: 100%;
    margin-top: 0.5rem;
    padding: 8px 12px;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 720px) {
    .status-tabs {
        display: none;
    }
    .status-dropdown {
        display: block;
    }
}

/* Old cancelled badge removed - using new color system */

/* Drawer */
.drawer{
    position: fixed;
    right:0; top:0; height:100vh; width:420px;
    background:#fff; border-left:1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: var(--transition);
    z-index: 1200; padding:1rem;
}
.drawer.open{ transform: translateX(0); }
.drawer-header{ display:flex; align-items:center; justify-content:space-between; margin-bottom:1rem; }
.drawer-content{ overflow:auto; max-height: calc(100vh - 80px); }

.order-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.order-card:hover {
    box-shadow: var(--shadow-lg);
}

.order-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.order-count {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.order-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Table */
.table-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.table-content {
    overflow-x: auto;
}

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

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--background-color);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.data-table td {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Product cell */
.product-cell { display:flex; align-items:center; gap:.75rem; }
.product-thumb { width:64px; height:64px; border-radius:10px; overflow:hidden; background:#f1f5f9; box-shadow: var(--shadow); cursor:pointer; flex-shrink:0; }
.product-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.product-name { color: var(--text-primary); font-weight:600; }

/* Row action icon buttons */
.icon-actions { display:flex; align-items:center; gap:.5rem; }
.icon-btn { width:36px; height:36px; border-radius:8px; border:1px solid var(--border-color); background:#fff; display:flex; align-items:center; justify-content:center; cursor:pointer; transition: var(--transition); }
.icon-btn svg { width:18px; height:18px; fill:#334155; }
.icon-btn.approve { border-color:#10b98133; background:#10b9811a; }
.icon-btn.approve svg { fill:#10b981; }
.icon-btn.reject { border-color:#ef444433; background:#ef44441a; }
.icon-btn.reject svg { fill:#ef4444; }
.icon-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }

/* Inline form (carrier select + buttons) */
.inline-form { display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; }
.carrier-select { border:1px solid var(--border-color); border-radius:8px; padding:.4rem .6rem; }

/* Modals */
.modal-overlay { position:fixed; inset:0; background:rgba(15,23,42,.55); display:none; align-items:center; justify-content:center; z-index:1400; }
.modal-overlay.open { display:flex; }
.modal-box { background:#fff; border-radius:12px; padding:1rem 1.25rem; max-width:420px; width:90%; box-shadow: var(--shadow-lg); }
.modal-actions { display:flex; gap:.5rem; justify-content:flex-end; margin-top:1rem; }
.modal-actions .btn { padding:.5rem 1rem; }

/* Image preview */
.image-preview { background:#000; display:none; align-items:center; justify-content:center; position:fixed; inset:0; z-index:1500; }
.image-preview.open { display:flex; }
.image-preview img { max-width:90vw; max-height:90vh; border-radius:12px; box-shadow: var(--shadow-lg); }

/* Old status badge classes removed - using new color system */

/* Products Grid */
/* Product Stats Grid */
.product-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card-product {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

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

.stat-card-product.active {
    box-shadow: 0 0 0 3px var(--primary-color);
    transform: translateY(-2px);
}

.stat-card-product.active::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.stat-icon-product {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon-product svg {
    width: 28px;
    height: 28px;
    stroke: white;
}

.stat-icon-product.success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.stat-icon-product.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.stat-icon-product.danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.stat-icon-product.gold {
    background: linear-gradient(135deg, #c9a961, #a88a4f);
}

.stat-content-product {
    flex: 1;
}

.stat-number-product {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label-product {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Products List Container */
.products-list-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.products-list {
    display: flex;
    flex-direction: column;
}

.product-list-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    align-items: center;
}

.product-list-item:last-child {
    border-bottom: none;
}

.product-list-item:hover {
    background: #f8fafc;
}

.product-list-image {
    width: 100px;
    height: 100px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #efe6d6, #e2d2b4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #8b7355;
    font-size: 0.875rem;
    text-align: center;
    padding: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.product-list-image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.product-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-list-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.product-list-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.product-list-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.product-list-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-color);
    background: #e0f2fe;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.product-list-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.product-list-status.in-stock {
    background: #dcfce7;
    color: #16a34a;
}

.product-list-status.low-stock {
    background: #fef3c7;
    color: #d97706;
}

.product-list-status.out-of-stock {
    background: #fee2e2;
    color: #dc2626;
}

.product-list-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.product-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.product-info-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-info-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.product-info-value.price {
    color: #c9a961;
    font-size: 1.25rem;
}

.product-info-value.stock {
    color: var(--success-color);
}

.product-info-value.stock.low {
    color: var(--warning-color);
}

.product-info-value.stock.out {
    color: var(--error-color);
}

/* Editable Input Fields */
.product-info-input {
    width: 100%;
    max-width: 120px;
    padding: 0.5rem 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    background: #f8fafc;
    transition: var(--transition);
    text-align: center;
}

.product-info-input:hover {
    border-color: var(--primary-color);
    background: white;
}

.product-info-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.product-info-input.price-input {
    color: #c9a961;
    font-size: 1.125rem;
    max-width: 140px;
}

.product-info-input.stock-input {
    color: var(--success-color);
    max-width: 100px;
}

.product-info-input.stock-input.low {
    color: var(--warning-color);
}

.product-info-input.stock-input.out {
    color: var(--error-color);
}

.product-info-input.discount-input {
    color: var(--primary-color);
    max-width: 100px;
}

/* Input with action button (tik butonu ile) */
.input-with-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.input-with-action .product-info-input {
    flex: 1;
    margin: 0;
}

.save-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--text-secondary);
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.save-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.save-btn:not(:disabled) {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    cursor: pointer;
}

.save-btn:not(:disabled):hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: scale(1.05);
}

.save-btn.active {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(14, 165, 233, 0);
    }
}

/* Category Filters */
.category-filters-container {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.category-filters-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-filters-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.category-filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.category-filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

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

.product-list-actions {
    display: flex;
    gap: 0.75rem;
}

.product-action-btn {
    padding: 0.625rem 1rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.product-action-btn svg {
    width: 16px;
    height: 16px;
}

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

.product-action-btn.edit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

.product-action-btn.delete {
    background: var(--error-color);
    color: white;
}

.product-action-btn.delete:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Product Image Modal */
.product-image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.product-image-modal.active {
    display: flex;
}

.product-image-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.product-image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    z-index: 10000;
}

.product-image-modal-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.product-modal-info {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-top: 1rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.product-modal-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.product-modal-info p {
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.product-image-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.product-image-modal-close:hover {
    transform: rotate(90deg);
    background: var(--error-color);
}

.product-image-modal-close:hover svg {
    stroke: white;
}

.product-image-modal-close svg {
    stroke: var(--text-primary);
}

/* Empty State for Products */
.products-empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.products-empty-state svg {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    opacity: 0.3;
    stroke: var(--text-light);
}

.products-empty-state h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.products-empty-state p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .product-list-item {
        grid-template-columns: 80px 1fr;
        gap: 1rem;
    }
    
    .product-list-image {
        width: 80px;
        height: 80px;
    }
    
    .product-list-actions {
        grid-column: 1 / -1;
        justify-content: stretch;
    }
    
    .product-action-btn {
        flex: 1;
        justify-content: center;
    }
    
    .product-list-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-info-input {
        font-size: 0.875rem;
        padding: 0.4rem 0.5rem;
    }
    
    .product-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.product-stock {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Customers Grid */
.customers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.customer-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.customer-card:hover {
    box-shadow: var(--shadow-lg);
}

.customer-avatar {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: 1.25rem;
}

.customer-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.customer-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.customer-status {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

/* Shipping Stats */
.shipping-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.shipping-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
}

.shipping-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.shipping-count {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.shipping-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Kargo kartları için farklı renkler */
.shipping-card.shipping-blue h3,
.shipping-card.shipping-blue p,
.shipping-card.shipping-blue .shipping-count {
    color: #3B82F6;
}

.shipping-card.shipping-green h3,
.shipping-card.shipping-green p,
.shipping-card.shipping-green .shipping-count {
    color: #10B981;
}

.shipping-card.shipping-red h3,
.shipping-card.shipping-red p,
.shipping-card.shipping-red .shipping-count {
    color: #EF4444;
}

.shipping-card.shipping-purple h3,
.shipping-card.shipping-purple p,
.shipping-card.shipping-purple .shipping-count {
    color: #8B5CF6;
}

.shipping-card.shipping-orange h3,
.shipping-card.shipping-orange p,
.shipping-card.shipping-orange .shipping-count {
    color: #F59E0B;
}

/* Grafik için daha fazla boşluk */
.shipping-chart {
    margin-top: 3rem;
}

/* Operasyon Dashboard Stilleri */
.operations-dashboard {
    margin-top: 2rem;
}

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

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.metric-card.urgent {
    border-left: 4px solid #DC2626;
}

.metric-card.warning {
    border-left: 4px solid #D97706;
}

.metric-card.success {
    border-left: 4px solid #059669;
}

.metric-card.info {
    border-left: 4px solid #2563EB;
}

.metric-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.metric-card.urgent .metric-icon {
    background: #FEF2F2;
}

.metric-card.warning .metric-icon {
    background: #FFFBEB;
}

.metric-card.success .metric-icon {
    background: #ECFDF5;
}

.metric-card.info .metric-icon {
    background: #EFF6FF;
}

.metric-content {
    flex: 1;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

.metric-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-top: 0.25rem;
}

.metric-subtitle {
    font-size: 0.75rem;
    color: #6B7280;
    margin-top: 0.25rem;
}

.quick-actions {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.quick-actions h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.action-btn:hover {
    background: #F3F4F6;
    border-color: #D1D5DB;
    transform: translateY(-1px);
}

.action-icon {
    font-size: 1.25rem;
}

.recent-activities {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.recent-activities h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #F9FAFB;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.activity-item:hover {
    background: #F3F4F6;
}

.activity-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.activity-icon.urgent {
    background: #FEF2F2;
}

.activity-icon.success {
    background: #ECFDF5;
}

.activity-icon.warning {
    background: #FFFBEB;
}

.activity-icon.info {
    background: #EFF6FF;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.activity-desc {
    font-size: 0.8rem;
    color: #6B7280;
    margin-bottom: 0.25rem;
}

.activity-time {
    font-size: 0.75rem;
    color: #9CA3AF;
}

/* Responsive Dashboard */
@media (max-width: 768px) {
    .dashboard-row {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .metric-card {
        padding: 1rem;
    }
    
    .metric-value {
        font-size: 1.5rem;
    }
}

/* Alerts */
.inventory-alerts {
    margin-bottom: 2rem;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.alert span {
    font-weight: 600;
}

.alert p {
    margin: 0;
    font-size: 0.875rem;
}

/* Analytics */
.analytics-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.chart-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

/* Modern chart look */
.chart-card.modern {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--border-color);
}

.chart-card.modern .card-header h3 {
    font-weight: 700;
}

.chart-subtitle-top {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: #f1f5f9;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
}

.chart-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.chart-placeholder {
    height: 300px;
    background: var(--background-color);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.125rem;
}

/* Dashboard charts grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.chart-wrap {
    position: relative;
    width: 100%;
    height: 400px; /* sabit yükseklik, taşmayı önler */
}

.chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

.chart-subtitle {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Canvas sabitleme - sonsuza uzamayı durdurur */
#chart-salesTrend,
#chart-categorySales,
#chart-funnel {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Reports Grid */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.report-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.report-card:hover {
    box-shadow: var(--shadow-lg);
}

.report-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--white);
}

.report-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.report-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.report-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.stat-number.small {
    font-size: 1rem;
    color: var(--text-secondary);
}

.stat-icon-text {
    font-weight: 700;
    color: #fff;
    font-size: 1.25rem;
}

.ai-trainer-panel {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 1.5rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.ai-trainer-info h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.ai-trainer-info p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.ai-info-list {
    margin: 0 0 1rem 1rem;
    padding: 0;
    list-style: disc;
    color: var(--text-primary);
    line-height: 1.5;
}

.ai-info-list li {
    margin-bottom: 0.35rem;
}

.ai-note {
    font-size: 0.875rem;
    color: var(--warning-color);
    font-weight: 600;
}

.ai-trainer-embed iframe {
    width: 100%;
    min-height: 640px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: #0f172a;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding-bottom: 84px; /* bottom mobile nav safe space */
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .header-center {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .ai-trainer-panel {
        grid-template-columns: 1fr;
    }
    
    .ai-trainer-embed iframe {
        min-height: 520px;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .orders-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .products-grid,
    .customers-grid {
        grid-template-columns: 1fr;
    }
    
    .analytics-charts {
        grid-template-columns: 1fr;
    }
    
    .reports-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .ai-trainer-embed iframe {
        min-height: 420px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 1rem;
    }
    
    .header-right {
        gap: 0.5rem;
    }
    
    .user-info {
        display: none;
    }
    
    .orders-grid {
        grid-template-columns: 1fr;
    }
    
    .reports-grid {
        grid-template-columns: 1fr;
    }
}

/* === Metric cards - enhanced visuals (non-breaking) === */
.stats-grid .stat-card {
    padding: 12px 16px; /* subtle padding */
    box-shadow: 0 6px 14px -6px rgba(2, 8, 23, 0.10);
    border: none;
}

.stat-card.clean {
    border: none;
    box-shadow: none;
    background: transparent;
}

.stat-icon {
    width: clamp(72px, 7vw, 84px);
    height: clamp(72px, 7vw, 84px);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 85%;
    height: 85%;
}

/* Utility for <img> icons inside .stat-icon */
.stat-icon .icon-img {
    width: 85%;
    height: 85%;
    object-fit: contain;
    display: block;
}

.stat-content h3 {
    font-size: 13.5px; /* 13–14px label */
}

.stat-content .stat-number {
    font-size: clamp(20px, 1.8vw, 28px);
    word-break: break-all;
    overflow-wrap: break-word;
    line-height: 1.1;
}

/* Clickable stat cards */
.clickable-card {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Trend indicators */
.trend-up {
    color: #22c55e;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend-down {
    color: #ef4444;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend-stable {
    color: #6b7280;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend-icon {
    font-size: 14px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Tracking input styles */
.tracking-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 12px;
    background: #fff;
    transition: border-color 0.2s ease;
}

.tracking-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.1);
}

.tracking-input::placeholder {
    color: var(--text-light);
    font-size: 11px;
}

/* Tracking info in date cell */
.tracking-info {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.3;
}

.tracking-number {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 12px;
}

.carrier-name {
    color: var(--text-light);
    font-size: 10px;
}

/* Status select dropdown */
.status-select {
    padding: 6px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    color: var(--text-primary);
    margin-right: 6px;
    min-width: 130px;
    height: 32px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.status-select:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #ffffff, #f0f9ff);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
}

.status-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1), 0 4px 12px rgba(14, 165, 233, 0.2);
    transform: translateY(-1px);
}

.status-select option {
    padding: 12px 16px;
    background: #fff;
    color: var(--text-primary);
    font-weight: 500;
}

/* Success button */
.btn-success {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    height: 32px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid #1f9d55;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.1px;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.06s ease, box-shadow 0.15s ease, filter 0.15s ease;
    position: relative;
    overflow: hidden;
    min-width: 75px;
}

.btn-success .icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.btn-success::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-success:hover::before {
    left: 100%;
}

.btn-success:hover {
    filter: brightness(1.05);
    box-shadow: 0 6px 14px rgba(39, 174, 96, 0.25);
    transform: translateY(-1px);
}

.btn-success:active {
    transform: translateY(1px);
}

.btn-success:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.35);
}

.btn-success:disabled,
.btn-success[aria-disabled="true"] {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

/* Read-only tracking input */
.tracking-readonly {
    background-color: #f8fafc !important;
    color: var(--text-secondary) !important;
    cursor: not-allowed !important;
    border-color: #e2e8f0 !important;
}

.tracking-readonly::placeholder {
    color: var(--text-light) !important;
}

/* Carrier info in tracking cell */
.carrier-info {
    font-size: 10px;
    color: var(--text-light);
    margin-top: 2px;
    font-weight: 500;
}

/* Table header alignment */
.data-table th:last-child {
    text-align: center;
    padding-right: 20px;
}

/* Action buttons container */
.icon-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: nowrap;
    min-width: 280px;
}

/* Table cell alignment */
.data-table td {
    vertical-align: middle;
}

/* Status badge alignment */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    margin: 0;
    vertical-align: middle;
    white-space: nowrap;
    background: transparent;
    color: inherit;
}

/* Legacy badge classes removed - using new color system only */

@media (max-width: 768px) {
    .stat-icon {
        width: 64px;
        height: 64px;
    }
}

/* === Stat icon boyut fix (override) === */
.stat-icon {
    width: 96px;
    height: 96px;
    border-radius: 18px;
    flex-shrink: 0;
}

/* === Accent system (card-scoped color syncing) === */
.stats-grid .stat-card{
    /* default accent (sky) */
    --accent-start: #38bdf8;
    --accent-end:   #0ea5e9;
    --accent-weak:  color-mix(in srgb, var(--accent-start) 10%, #ffffff);
}

.stats-grid .stat-card .stat-icon{
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end)) !important;
}

.stats-grid .stat-card .progress-bar{
    background: linear-gradient(90deg, var(--accent-start), var(--accent-end)) !important;
}

.stats-grid .stat-card.tint{
    background: linear-gradient(180deg, #ffffff 0%, var(--accent-weak) 100%) !important;
    border: 1px solid var(--border-color);
}

.accent-emerald{ --accent-start:#34d399; --accent-end:#10b981; }
.accent-amber  { --accent-start:#fbbf24; --accent-end:#f59e0b; }
.accent-indigo { --accent-start:#818cf8; --accent-end:#6366f1; }
.accent-slate  { --accent-start:#94a3b8; --accent-end:#64748b; }
.accent-sky    { --accent-start:#38bdf8; --accent-end:#0ea5e9; }

.stat-icon img,
.stat-icon svg,
.stat-icon .icon-img {
    width: 88% !important;
    height: 88% !important;
    object-fit: contain;
    display: block;
}

/* ==== TAB BAZLI GÖRÜNÜM KURALLARI (EN ALTA EKLE) ==== */

/* Onay Bekleyenler: 7. kolon (Kargo Takip No) tamamen gizlenir.
   Sende col-tracking sınıfı yoksa nth-child yedeği çalışır. */
.tab-pending .data-table th.col-tracking,
.tab-pending .data-table td.col-tracking { 
  display: none !important; 
}

/* Hide tracking column for pending tab - Kargo Takip No column */
.tab-pending .data-table th:nth-child(8),
.tab-pending .data-table td:nth-child(8) {
  display: none !important;
}

/* Hide tracking column for cancelled tab - Kargo Takip No column */
.tab-cancelled .data-table th:nth-child(8),
.tab-cancelled .data-table td:nth-child(8) {
  display: none !important;
}

/* Kargo Aşamasında: eski kurallar kaldırıldı - yeni renk sistemi kullanılıyor */

/* Onay Bekleyenler'de kargo takip kolonunu gizle */
.tab-pending .col-tracking { 
    display: none !important; 
}

/* === Status badge modern palette (used by JS) === */
.status-badge.status--processing { 
    background: #e8f1ff !important; 
    color: #1a63d6 !important; 
}

.status-badge.status--transfer { 
    background: #fff2cc !important; 
    color: #b87400 !important; 
}

.status-badge.status--delivered { 
    background: #e6f8ed !important; 
    color: #1e7e34 !important; 
}

.status-badge.status--not-delivered { 
    background: #ffe6e6 !important; 
    color: #d93025 !important; 
}

.status-badge.status--lost {
    background: #f3e8ff !important; 
    color: #7e22ce !important; 
}

.status-badge.status--returned {
    background: #fff4e6 !important; 
    color: #ea580c !important; 
}

.status-badge.status--cancelled {
    background: #fef2f2 !important; 
    color: #991b1b !important; 
}

/* Legacy badge classes completely removed - clean system only */

/* İç içe rozet durumunda dış kapsayıcıyı sıfırla */
.status-badge .status-badge {
  background: inherit !important;
  padding: inherit !important;
  border-radius: inherit !important;
  box-shadow: none !important;
}

/* === GLOBAL ICON & TEXT NORMALIZE === */
svg, img, .icon {
  display: block;
  line-height: 1;
}

/* Metin render kalitesi */
html, body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* === CHIP / ROZET / BADGE === */
.status-badge,
.badge,
.tag,
.label-chip {
  display: inline-flex;         /* baseline yerine güvenli hizalama */
  align-items: center;
  gap: 6px;
  min-height: 28px;             /* 28–32px arası güvenli yükseklik */
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;               /* metin + ikon tam ortalansın */
  white-space: nowrap;          /* chip taşmasın */
}

/* Rozet içindeki ikonlar metni ezmesin */
.status-badge > svg,
.badge > svg,
.tag > svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

/* "Doğrulanmış Alışveriş" gibi uzun metinlere küçük alan tanımı */
.badge.badge--success,
.status-badge.status--success {
  padding-inline: 12px;
}

/* === BUTTONS (SM) === */
.btn-sm,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;             /* minimum tıklama yüksekliği */
  min-width: 36px;
  line-height: 1;
  padding: 6px 10px;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* === CHECKBOX + LABEL HIT AREA === */
input[type="checkbox"] {
  /* native checkbox çok küçükse */
  width: 16px;
  height: 16px;
  inline-size: 16px;
  block-size: 16px;
}

/* checkbox ile metni sar: <label class="check"> <input ...> <span>Metin</span> </label> */
.check,
.checkbox,
.form-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;             /* erişilebilirlik: 36px hit area */
  cursor: pointer;
}

.check input[type="checkbox"],
.checkbox input[type="checkbox"],
.form-check input[type="checkbox"] {
  flex: 0 0 auto;
}

/* küçük inputların dikey ortalanması için güvence */
.input-text,
.input-select {
  line-height: 1.2;
}

/* === FORM CHIP'LERİNDE METİN KESİLME ÖNLEMİ === */
.status-badge,
.badge,
.tag {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* (Opsiyonel) dar container'larda rozetlerin büzüşmesini engelle */
.table-content .status-badge { max-width: 100%; }

/* === BASELINE HATASINI TETİKLEYEN INLINE ELEMANLAR İÇİN YAMA === */
.inline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  vertical-align: middle;
}

/* ==== HIZALAMA & BASELINE KİLİDİ ==== */
.status-badge, .badge, .tag, .label-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 28px !important;
  padding: 6px 10px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  border-radius: 999px !important;
}

/* ikonlar her yerde blok ve sabit boy */
.status-badge svg,
.badge svg,
.tag svg,
.status-badge img,
.badge img,
.tag img {
  display: block !important;
  width: 14px !important;
  height: 14px !important;
  flex: 0 0 auto !important;
  vertical-align: middle !important;
}

/* iç içe rozet oluştuysa: içtekini sök/normalize */
.status-badge .status-badge,
.badge .badge,
.tag .tag {
  all: unset !important;
}

/* küçük buton/ikon butonları erişilebilir boyuta çek */
.btn-sm, .icon-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 32px !important;
  min-width: 36px !important;
  line-height: 1 !important;
  padding: 6px 10px !important;
}
.icon-btn svg { width: 18px !important; height: 18px !important; }

/* checkbox + label hit area */
.check, .checkbox, .form-check {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 36px !important;
}
.check input[type="checkbox"],
.checkbox input[type="checkbox"],
.form-check input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  flex: 0 0 auto !important;
}

/* metin rendering */
html, body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 1) Listelerdeki gereksiz nokta/disklerini kapat */
.form-options,
.form-options ul,
.form-options li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 2) E-posta bildirimi satırı: tamamı tıklanabilir, ölçüler erişilebilir */
.email-notification {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 36px !important;
  line-height: 1 !important;
  cursor: pointer;
}
.email-notification input[type="checkbox"] {
  /* input'u gizlemek yerine ekrandan uzaklaştır: erişilebilirlik bozulmasın */
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.email-notification .checkmark {
  box-sizing: content-box;              /* sınır (border) kalınlığı içeriği daraltmasın */
  width: 22px;                          /* biraz büyüt */
  height: 22px;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  position: relative;
  background: #fff;
  display: block;                       /* baseline boşluğu olmasın */
}
.email-notification input[type="checkbox"]:checked + .checkmark {
  background: var(--primary-color);
  border-color: var(--primary-color);
}
.email-notification input[type="checkbox"]:checked + .checkmark::after {
  content: "";
  position: absolute;
  left: 6px; top: 3px;
  width: 7px; height: 12px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* 3) Rozet/etiketlerin kesin hizası – metin taşması ve ikon baseline bitti */
.status-badge, .badge, .tag, .label-chip, .qa-verified, .qa-store-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 28px !important;
  padding: 6px 12px !important;
  border-radius: 999px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}
.status-badge svg, .badge svg, .tag svg, .qa-verified svg, .qa-store-badge svg,
.status-badge img, .badge img, .tag img, .qa-verified img, .qa-store-badge img {
  display: block !important;
  width: 14px !important;
  height: 14px !important;
  flex: 0 0 auto !important;
  vertical-align: middle !important;
}

/* Doğrulanmış alışveriş rozetindeki emoji ikonların hizalaması */
.qa-verified span:first-child {
  font-size: 14px;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
}

/* Mağaza rozetindeki SVG ikonların hizalaması */
.qa-store-badge svg {
  display: inline-block !important;
  vertical-align: middle !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ===== CUSTOMER MANAGEMENT STYLES ===== */

/* Customer Tabs */
.customer-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius) var(--radius) 0 0;
    transition: var(--transition);
    position: relative;
    border-bottom: 2px solid transparent;
}

.tab-btn:hover {
    background: var(--background-color);
    color: var(--text-primary);
}

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

.tab-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.tab-count {
    background: var(--background-color);
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
}

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

.tab-content {
    display: none;
}

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

/* Customer Stats */
.customer-stats, .review-stats, .qa-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Customer Filters */
.customer-filters, .review-filters, .qa-filters {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.filter-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: var(--transition);
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

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

/* Customer Table */
.customer-table-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

.customer-table th {
    background: #f8fafc;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

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

.customer-table tbody tr:hover {
    background: #f8fafc;
}

.customer-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.customer-avatar, .user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.customer-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.customer-name, .user-name {
    font-weight: 600;
    color: var(--text-primary);
}

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

.table-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

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

/* Review List */
.review-list, .qa-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.review-item, .qa-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.review-item:hover, .qa-item:hover {
    box-shadow: var(--shadow-lg);
}

.review-header, .qa-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.review-user, .qa-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.review-date, .qa-date {
    font-size: 0.75rem;
    color: var(--text-light);
}

.review-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stars {
    display: flex;
    gap: 0.125rem;
}

.star {
    color: #d1d5db;
    font-size: 1rem;
}

.star.filled {
    color: #fbbf24;
}

.rating-text {
    font-weight: 600;
    color: var(--text-primary);
}

.review-product, .qa-product {
    margin-bottom: 1rem;
}

.product-name {
    background: var(--background-color);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
}

.review-content {
    margin-bottom: 1rem;
}

.review-content p {
    color: var(--text-primary);
    line-height: 1.6;
}

.review-actions, .qa-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-status {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
}

.status-approved {
    background: #dcfce7;
    color: #166534;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

/* Q&A Specific Styles */
.qa-status {
    display: flex;
    align-items: center;
}

.qa-question {
    margin-bottom: 1rem;
}

.qa-question h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.qa-question p {
    color: var(--text-primary);
    line-height: 1.6;
}

.qa-answer {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary-color);
}

.qa-answer h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.qa-answer p {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.answer-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

.answer-author {
    font-weight: 600;
}

.no-answer {
    padding: 1rem;
    background: #fef3c7;
    border-radius: var(--radius);
    border-left: 4px solid var(--warning-color);
    text-align: center;
}

.no-answer p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-vip {
    background: #fef3c7;
    color: #92400e;
}

.status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.status-answered {
    background: #dcfce7;
    color: #166534;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

/* ===== REVIEW ENHANCEMENTS ===== */

.section-subtitle {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.review-product {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.product-thumb {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    object-fit: cover;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.product-thumb:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

/* ===== MODAL STYLES ===== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.image-modal-content {
    max-width: 90%;
    max-height: 90%;
    background: transparent;
    box-shadow: none;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--radius-lg);
}

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

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--background-color);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* ===== REPLY MODAL STYLES ===== */

.reply-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.reply-tab-btn {
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius) var(--radius) 0 0;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}

.reply-tab-btn:hover {
    background: var(--background-color);
    color: var(--text-primary);
}

.reply-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.reply-tab-content {
    display: none;
}

.reply-tab-content.active {
    display: block;
}

/* ===== TEMPLATE STYLES ===== */

.template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.template-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.template-item {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.template-item:hover {
    border-color: var(--primary-color);
    background: var(--background-color);
}

.template-item.selected {
    border-color: var(--primary-color);
    background: rgba(14, 165, 233, 0.1);
}

.template-text {
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.template-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: var(--transition);
}

.template-item:hover .template-actions {
    opacity: 1;
}

/* ===== CONTEXT MENU ===== */

.context-menu {
    position: absolute;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    min-width: 120px;
}

.context-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

.context-item:last-child {
    border-bottom: none;
}

.context-item:hover {
    background: var(--background-color);
    color: var(--primary-color);
}

/* ===== FORM ENHANCEMENTS ===== */

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-family: inherit;
    resize: vertical;
    transition: var(--transition);
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* ===== BUTTON ENHANCEMENTS ===== */

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-sm svg {
    width: 16px;
    height: 16px;
}

/* ===== QUICK REPLIES ===== */

.quick-replies-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.quick-replies-section h4 {
    margin: 0 0 1rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.quick-reply-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    background: var(--white);
    color: var(--text-primary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.quick-reply-btn:hover {
    border-color: var(--primary-color);
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary-color);
}

/* ===== CLICKABLE STATS ===== */

.clickable-stat {
    cursor: pointer;
    transition: var(--transition);
}

.clickable-stat:hover {
    color: var(--primary-color);
    transform: scale(1.05);
}

/* ===== CUSTOMER DETAIL MODAL ===== */

.customer-detail {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.customer-avatar-large {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.5rem;
}

.customer-info-detail h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.customer-info-detail p {
    margin: 0.25rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.customer-stats-detail {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--background-color);
    border-radius: var(--radius);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== CHAT PANEL ===== */

.chat-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--background-color);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.chat-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.chat-user-details h4 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chat-status {
    font-size: 0.75rem;
    color: #10b981;
}

.chat-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.25rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.chat-close:hover {
    background: var(--background-color);
    color: var(--text-primary);
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    display: flex;
    max-width: 80%;
}

.message.received {
    align-self: flex-start;
}

.message.sent {
    align-self: flex-end;
}

.message-content {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    position: relative;
}

.message.received .message-content {
    background: var(--background-color);
    color: var(--text-primary);
}

.message.sent .message-content {
    background: var(--primary-color);
    color: var(--white);
}

.message-content p {
    margin: 0 0 0.25rem 0;
    font-size: 0.875rem;
    line-height: 1.4;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.7;
}

.chat-input {
    display: flex;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    gap: 0.5rem;
}

.chat-input input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.875rem;
    outline: none;
}

.chat-input input:focus {
    border-color: var(--primary-color);
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.chat-send-btn:hover {
    background: var(--primary-dark);
}

.chat-send-btn svg {
    width: 18px;
    height: 18px;
}

/* ===== CONFIRMATION MODAL ===== */

.confirmation-modal {
    max-width: 400px;
}

.confirmation-content {
    text-align: center;
    padding: 2rem 1.5rem 1rem;
}

.confirmation-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.confirmation-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.confirmation-actions {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem 2rem;
    justify-content: center;
}

.confirmation-actions .btn {
    min-width: 100px;
}

/* ===== QUESTION DISPLAY ===== */

.question-display {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--background-color);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary-color);
}

.question-display h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.question-content {
    background: var(--white);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.question-content p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-primary);
}

/* 4) Küçük butonlar ve ikon butonları için net hit-area */
.btn-sm, .icon-btn, .filter-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 36px !important;
  min-width: 36px !important;
  line-height: 1 !important;
}

/* 5) Admin panel arama kutusu çakışmasını önle */
.admin-header .search { /* scoping */
  display:flex; align-items:center; gap:0;
  background:#fff; border:1px solid #e2e8f0;
  border-radius:8px; padding:2px; height:40px;
  min-width:300px; max-width:400px;
  box-shadow: var(--shadow);
  overflow:hidden;
}
.admin-header .search input { line-height:1; }

/* 6) Aynı isimli animasyon çakışmasını önle */
@keyframes shimmer-admin { 0% { transform: translateX(-100%);} 100% { transform: translateX(100%);} }
.admin-toast::before { animation: shimmer-admin 2s infinite; }

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle {
    display: block;
    position: fixed;
    left: 15px;
    top: 18px;
    z-index: 2002;
  }
  .main-content { margin-left: 0 !important; }
}

@media (max-width: 768px) {
  .content-wrapper {
    padding: 0.5rem !important;
  }
  .dashboard-row, .stats-grid, .product-stats-grid, .products-list-container {
    grid-template-columns: 1fr !important;
    gap: 0.7rem !important;
    margin-bottom:1rem !important;
  }
  .metric-card, .stat-card-product, .stat-card {
    padding: 0.8rem !important;
    font-size: 1rem;
  }
  .table-card, .products-list-container, .customer-table-container {
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.10);
  }
}

@media (max-width: 480px){
  .stat-card-product, .stat-card, .metric-card {
    padding: 0.5rem !important;
    font-size: 0.95rem;
  }
  .product-list-image {
    width:48px; height:48px;
  }
  .stat-icon-product, .stat-icon {
    width:40px !important; height:40px !important;
  }
  .product-list-header h3, .product-list-name {
    font-size: 0.9rem !important;
  }
  .products-list-container, .content-wrapper {
    padding: 0.5rem !important;
    border-radius: 5px;
  }
} 

/* Mobile bottom nav */
.mobile-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 64px;
  background: var(--white);
  border-top: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 1200;
}

.mobile-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 11.5px;
}

.mobile-nav a .mn-ic { width: 20px; height: 20px; display: block; }
.mobile-nav a.active { color: var(--primary-dark); }

@media (min-width: 1025px) { .mobile-nav { display: none; } }

/* Floating action button (mobile) */
.fab {
  position: fixed;
  right: 16px;
  bottom: 84px; /* above bottom nav */
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 20px rgba(14,165,233,.35);
  z-index: 1201;
}

.fab:active { transform: scale(0.98); }
@media (min-width: 1025px) { .fab { display: none; } }

@media (max-width: 600px) {
  .content-section#dashboard {
    display:block !important;
    height:auto !important;
    overflow:visible !important;
    min-width:0 !important;
    min-height:100px !important;
    padding-bottom: 18px !important;
  }
  .stats-grid, .charts-grid {
    min-height:100px;
    padding: 0 4px !important;
    gap: 10px !important;
    overflow: visible;
    margin-bottom: 14px !important;
  }
  .section-header {
    margin-bottom:10px !important;
    padding: 0 4px !important;
  }
}

/* Notification Modal Styles */
.notification-modal {
  max-width: 600px !important;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.notification-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--border-color);
  padding: 0 1.5rem;
  margin-bottom: 1rem;
}

.notification-tab {
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.notification-tab:hover {
  color: var(--text-primary);
}

.notification-tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.notification-tab-badge {
  background: var(--error-color);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  min-width: 20px;
  text-align: center;
}

.notification-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 1.5rem 1.5rem;
}

.notification-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.notification-item {
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1rem;
  transition: var(--transition);
}

.notification-item:hover {
  box-shadow: var(--shadow);
}

.notification-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.notification-item-header strong {
  color: var(--text-primary);
  font-weight: 600;
}

.notification-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.notification-text {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.notification-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.notification-actions .btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
}

.notification-actions .btn-sm.btn-success {
  background: var(--success-color);
  color: white;
  border: none;
}

.notification-actions .btn-sm.btn-danger {
  background: var(--error-color);
  color: white;
  border: none;
}

.notification-actions .btn-sm.btn-secondary {
  background: var(--text-secondary);
  color: white;
  border: none;
}

.notification-empty {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}