/**
 * Admin panel theme: ai-modelv1
 * AI Admin design system: glass panels, accent glow, 8px grid. Dark/light via body[data-theme].
 */

/* --- Light theme (default) --- */
body.admin-theme-ai-modelv1[data-theme="light"],
body.admin-theme-ai-modelv1:not([data-theme]) {
  --aim-bg: #f1f5f9;
  --aim-bg-elevated: #ffffff;
  --aim-text: #1e293b;
  --aim-text-muted: #64748b;
  --aim-border: #e2e8f0;
  --aim-sidebar-bg: #0f172a;
  --aim-sidebar-text: #f8fafc;
  --aim-sidebar-border: rgba(255,255,255,0.08);
  --aim-header-bg: #ffffff;
  --aim-header-border: #e2e8f0;
  --aim-card-bg: #ffffff;
  --aim-card-border: #e2e8f0;
  --aim-modal-bg: #ffffff;
  --aim-input-bg: #ffffff;
  --aim-input-border: #cbd5e1;
  --aim-input-focus: #3b82f6;
  --aim-table-border: #e2e8f0;
  --aim-table-stripe: #f8fafc;
  --aim-shadow: 0 1px 3px rgba(0,0,0,0.06);
  --aim-shadow-lg: 0 10px 30px rgba(0,0,0,0.08);
  --aim-radius: 0.75rem;
  --aim-radius-sm: 0.5rem;
  /* AI accent (light) */
  --aim-accent: #6366f1;
  --aim-accent2: #0ea5e9;
  --aim-glow: rgba(99,102,241,0.2);
  --aim-panel: rgba(0,0,0,0.03);
  --aim-surface: rgba(0,0,0,0.04);
  --aim-stroke: rgba(0,0,0,0.08);
  --aim-ease: cubic-bezier(0.2,0.8,0.2,1);
  --aim-dur: 180ms;
  /* So inline styles (e.g. product-edit) use theme colors */
  --light-color: #f1f5f9;
  --border-color: #e2e8f0;
  --text-color: #1e293b;
  --text-light: #64748b;
}

/* --- Dark theme (AI Admin style) --- */
body.admin-theme-ai-modelv1[data-theme="dark"] {
  --aim-bg: #0b1020;
  --aim-bg-elevated: #0f172a;
  --aim-text: rgba(255,255,255,0.92);
  --aim-text-muted: rgba(255,255,255,0.62);
  --aim-border: rgba(255,255,255,0.10);
  --aim-sidebar-bg: #0a0f1a;
  --aim-sidebar-text: rgba(255,255,255,0.92);
  --aim-sidebar-border: rgba(255,255,255,0.08);
  --aim-header-bg: rgba(255,255,255,0.04);
  --aim-header-border: rgba(255,255,255,0.10);
  --aim-card-bg: rgba(255,255,255,0.06);
  --aim-card-border: rgba(255,255,255,0.12);
  --aim-modal-bg: #0f172a;
  --aim-input-bg: rgba(0,0,0,0.2);
  --aim-input-border: rgba(255,255,255,0.14);
  --aim-input-focus: #60a5fa;
  --aim-table-border: rgba(255,255,255,0.10);
  --aim-table-stripe: rgba(0,0,0,0.12);
  --aim-shadow: 0 10px 30px rgba(0,0,0,0.35);
  --aim-shadow-lg: 0 18px 60px rgba(0,0,0,0.45);
  --aim-radius: 12px;
  --aim-radius-sm: 10px;
  /* AI accent (indigo/violet + cyan) */
  --aim-accent: #7c5cff;
  --aim-accent2: #20d3ff;
  --aim-glow: rgba(124,92,255,0.35);
  --aim-panel: rgba(255,255,255,0.04);
  --aim-surface: rgba(255,255,255,0.06);
  --aim-stroke: rgba(255,255,255,0.10);
  --aim-ease: cubic-bezier(0.2,0.8,0.2,1);
  --aim-dur: 180ms;
  /* So inline styles (e.g. product-edit) use theme colors */
  --light-color: #1e293b;
  --border-color: rgba(255,255,255,0.12);
  --text-color: rgba(255,255,255,0.92);
  --text-light: rgba(255,255,255,0.5);
}

/* Base – AI Admin layout */
body.admin-theme-ai-modelv1 {
  background: var(--aim-bg);
  color: var(--aim-text);
  font-feature-settings: "rlig" 1, "calt" 1;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body.admin-theme-ai-modelv1[data-theme="dark"] {
  background: radial-gradient(1200px 800px at 10% 10%, rgba(124,92,255,0.12), transparent 55%),
              radial-gradient(1000px 700px at 85% 0%, rgba(32,211,255,0.08), transparent 60%),
              linear-gradient(180deg, #0b1020, #0a0f1a);
}

body.admin-theme-ai-modelv1 .admin-main {
  background: transparent;
  padding: 1.5rem 2rem;
}

/* Header – AI topbar: glass, stroke, rounded */
body.admin-theme-ai-modelv1 .admin-header {
  background: var(--aim-header-bg);
  border: 1px solid var(--aim-stroke);
  border-radius: var(--aim-radius);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--aim-shadow);
  backdrop-filter: blur(10px);
  border-left: 3px solid var(--aim-accent);
}

body.admin-theme-ai-modelv1 .admin-header::before {
  display: none;
}

body.admin-theme-ai-modelv1 .admin-header h1 {
  color: var(--aim-text);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
}

body.admin-theme-ai-modelv1 .admin-user {
  color: var(--aim-text);
}

body.admin-theme-ai-modelv1 .admin-theme-badge {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: var(--aim-panel);
  border: 1px solid var(--aim-stroke);
  color: var(--aim-text-muted);
}

/* Sidebar – dark panel for contrast (light/dark theme both use --aim-sidebar-bg) */
body.admin-theme-ai-modelv1 .admin-sidebar {
  background: var(--aim-sidebar-bg);
  color: var(--aim-sidebar-text);
  border-right: 1px solid var(--aim-sidebar-border);
  box-shadow: 2px 0 20px rgba(0,0,0,0.2);
  backdrop-filter: blur(10px);
}

body.admin-theme-ai-modelv1 .admin-logo {
  border-bottom: 1px solid var(--aim-sidebar-border);
  padding: 1.25rem 1rem;
  color: var(--aim-sidebar-text);
}

body.admin-theme-ai-modelv1 .admin-logo h2,
body.admin-theme-ai-modelv1 .admin-logo p {
  color: var(--aim-sidebar-text);
}

/* Logo orijinal renklerde (inline filter: brightness(0) invert(1) kaldırılır) */
body.admin-theme-ai-modelv1 .admin-logo img {
  filter: none !important;
}

/* Sidebar kapalıyken logo tamamen gizli, sadece ilk harf görünsün */
body.admin-theme-ai-modelv1 .admin-sidebar.sidebar-closed .admin-logo a,
body.admin-theme-ai-modelv1 .admin-sidebar.sidebar-closed .admin-logo img {
  display: none !important;
}

/* Sidebar kapalıyken tenant isminin ilk harfi – tema rengi */
body.admin-theme-ai-modelv1 .admin-logo-initial {
  color: var(--aim-sidebar-text);
  font-weight: 700;
  font-size: 1.5rem;
}

body.admin-theme-ai-modelv1 .sidebar-toggle-inner {
  color: var(--aim-sidebar-text);
  background: rgba(255,255,255,0.08);
}
body.admin-theme-ai-modelv1 .sidebar-toggle-inner:hover {
  background: rgba(255,255,255,0.12);
}

body.admin-theme-ai-modelv1 .nav-item {
  color: var(--aim-sidebar-text);
  border-radius: var(--aim-radius-sm);
  margin: 0 0.5rem;
  border: 1px solid transparent;
  transition: transform var(--aim-dur) var(--aim-ease), background var(--aim-dur) var(--aim-ease), border-color var(--aim-dur) var(--aim-ease);
}

body.admin-theme-ai-modelv1 .nav-item:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.10);
  transform: translateY(-1px);
}

body.admin-theme-ai-modelv1 .nav-item.active {
  background: linear-gradient(90deg, rgba(124,92,255,0.16), rgba(32,211,255,0.08));
  border-color: rgba(124,92,255,0.25);
  box-shadow: 0 0 0 5px rgba(124,92,255,0.06);
}

body.admin-theme-ai-modelv1 .nav-group-header {
  color: rgba(255,255,255,0.6);
}

/* Cards / stat cards – AI card: glass, stroke, glow on hover */
body.admin-theme-ai-modelv1 .stat-card,
body.admin-theme-ai-modelv1 .kpi-card {
  background: var(--aim-card-bg);
  border: 1px solid var(--aim-card-border);
  box-shadow: var(--aim-shadow);
  border-radius: var(--aim-radius);
  padding: 1.25rem;
  transition: transform var(--aim-dur) var(--aim-ease), box-shadow var(--aim-dur) var(--aim-ease), border-color var(--aim-dur) var(--aim-ease);
}

body.admin-theme-ai-modelv1 .stat-card:hover,
body.admin-theme-ai-modelv1 .kpi-card:hover {
  box-shadow: var(--aim-shadow-lg);
  transform: translateY(-1px);
  border-color: var(--aim-stroke);
}

body.admin-theme-ai-modelv1 .stat-card-header h3,
body.admin-theme-ai-modelv1 .stat-card h3 {
  color: var(--aim-text);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

body.admin-theme-ai-modelv1 .stat-card p,
body.admin-theme-ai-modelv1 .stat-value,
body.admin-theme-ai-modelv1 .stat-change {
  color: var(--aim-text);
}

body.admin-theme-ai-modelv1 .stat-card-header i {
  color: var(--aim-text-muted);
}

/* Table container and tables – AI card table */
body.admin-theme-ai-modelv1 .table-container {
  background: var(--aim-card-bg);
  border: 1px solid var(--aim-card-border);
  box-shadow: var(--aim-shadow);
  border-radius: var(--aim-radius);
  overflow: hidden;
  transition: border-color var(--aim-dur) var(--aim-ease);
}

body.admin-theme-ai-modelv1 .table-container:hover {
  border-color: var(--aim-stroke);
}

body.admin-theme-ai-modelv1 table {
  border-color: var(--aim-table-border);
}

body.admin-theme-ai-modelv1 table th,
body.admin-theme-ai-modelv1 table td {
  border-color: var(--aim-table-border);
  color: var(--aim-text);
  padding: 0.75rem 1rem;
}

body.admin-theme-ai-modelv1 table thead th {
  background: var(--aim-surface);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: -0.01em;
  text-transform: none;
}

body.admin-theme-ai-modelv1 table tbody tr {
  transition: background var(--aim-dur) var(--aim-ease);
}

body.admin-theme-ai-modelv1 table tbody tr:hover {
  background: var(--aim-panel);
}

body.admin-theme-ai-modelv1 table tbody tr:nth-child(even) {
  background: var(--aim-table-stripe);
}

body.admin-theme-ai-modelv1 table tbody tr:nth-child(even):hover {
  background: var(--aim-panel);
}

body.admin-theme-ai-modelv1 table td a {
  color: var(--aim-text);
}
body.admin-theme-ai-modelv1 table td a:hover {
  color: var(--aim-text-muted);
}

/* Form inputs (scoped to admin-content / main) */
body.admin-theme-ai-modelv1 .form-group input,
body.admin-theme-ai-modelv1 .form-group textarea,
body.admin-theme-ai-modelv1 .form-group select {
  background: var(--aim-input-bg);
  border-color: var(--aim-input-border);
  color: var(--aim-text);
}

body.admin-theme-ai-modelv1 .form-group input:focus,
body.admin-theme-ai-modelv1 .form-group textarea:focus,
body.admin-theme-ai-modelv1 .form-group select:focus {
  border-color: var(--aim-input-focus);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

body.admin-theme-ai-modelv1 .form-group label {
  color: var(--aim-text);
}

body.admin-theme-ai-modelv1 .form-group small {
  color: var(--aim-text-muted);
}

/* Primary button – AI btn-ai: accent border, glow */
body.admin-theme-ai-modelv1 .btn-primary {
  background: linear-gradient(90deg, rgba(124,92,255,0.28), rgba(32,211,255,0.12));
  border: 1px solid rgba(124,92,255,0.38);
  color: var(--aim-text);
  box-shadow: 0 0 0 5px rgba(124,92,255,0.06), var(--aim-shadow);
  border-radius: var(--aim-radius-sm);
  transition: transform var(--aim-dur) var(--aim-ease), filter var(--aim-dur) var(--aim-ease);
}

body.admin-theme-ai-modelv1[data-theme="light"] .btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border-color: rgba(99,102,241,0.4);
  color: #fff;
  box-shadow: 0 2px 12px rgba(99,102,241,0.25);
}

body.admin-theme-ai-modelv1 .btn-primary:hover {
  transform: translateY(-1px);
  filter: saturate(1.05);
  box-shadow: 0 0 0 6px rgba(124,92,255,0.08), var(--aim-shadow-lg);
}

body.admin-theme-ai-modelv1[data-theme="light"] .btn-primary:hover {
  box-shadow: 0 4px 16px rgba(99,102,241,0.35);
}

/* Secondary button (logout, toggle) */
body.admin-theme-ai-modelv1 .btn-secondary {
  background: var(--aim-bg-elevated);
  border: 1px solid var(--aim-border);
  color: var(--aim-text);
  border-radius: var(--aim-radius-sm);
}

body.admin-theme-ai-modelv1 .btn-secondary:hover {
  background: var(--aim-border);
  color: var(--aim-text);
}

/* Theme toggle button */
body.admin-theme-ai-modelv1 .admin-theme-toggle {
  padding: 0.5rem 0.75rem;
  min-width: 2.5rem;
  border-radius: var(--aim-radius-sm);
}

body.admin-theme-ai-modelv1 .admin-theme-toggle .admin-theme-toggle-icon {
  font-size: 1.1rem;
}

/* Filter / pill buttons – AI chip style */
body.admin-theme-ai-modelv1 .filter-btn {
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border: 1px solid var(--aim-stroke);
  background: var(--aim-surface);
  color: var(--aim-text-muted);
  transition: transform var(--aim-dur) var(--aim-ease), background var(--aim-dur) var(--aim-ease), border-color var(--aim-dur) var(--aim-ease);
}

body.admin-theme-ai-modelv1 .filter-btn:hover {
  background: var(--aim-panel);
  color: var(--aim-text);
  transform: translateY(-1px);
}

body.admin-theme-ai-modelv1 .filter-btn.active {
  border-color: rgba(124,92,255,0.35);
  background: rgba(124,92,255,0.14);
  color: var(--aim-text);
  box-shadow: 0 0 0 5px rgba(124,92,255,0.05);
}

/* Admin-content form controls – arama, sayfa formu, vb. (tüm input/textarea/select) */
body.admin-theme-ai-modelv1 .admin-content input,
body.admin-theme-ai-modelv1 .admin-content textarea,
body.admin-theme-ai-modelv1 .admin-content select {
  border-radius: var(--aim-radius-sm);
  border: 1px solid var(--aim-input-border);
  background: var(--aim-input-bg);
  color: var(--aim-text);
  transition: border-color var(--aim-dur) var(--aim-ease);
}

body.admin-theme-ai-modelv1 .admin-content input::placeholder,
body.admin-theme-ai-modelv1 .admin-content textarea::placeholder {
  color: var(--aim-text-muted);
}

body.admin-theme-ai-modelv1 .admin-content input:focus,
body.admin-theme-ai-modelv1 .admin-content textarea:focus,
body.admin-theme-ai-modelv1 .admin-content select:focus {
  border-color: var(--aim-input-focus);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Gece modunda admin-content input/textarea/select – koyu arka plan (sayfa formu vb.) */
body.admin-theme-ai-modelv1[data-theme="dark"] .admin-content input,
body.admin-theme-ai-modelv1[data-theme="dark"] .admin-content textarea,
body.admin-theme-ai-modelv1[data-theme="dark"] .admin-content select {
  background: #1e293b !important;
  border-color: rgba(255,255,255,0.14) !important;
  color: rgba(255,255,255,0.92) !important;
}

body.admin-theme-ai-modelv1[data-theme="dark"] .admin-content input::placeholder,
body.admin-theme-ai-modelv1[data-theme="dark"] .admin-content textarea::placeholder {
  color: rgba(255,255,255,0.5) !important;
}

/* Modal – agent card */
body.admin-theme-ai-modelv1 .modal-content {
  background: var(--aim-card-bg);
  border: 1px solid var(--aim-border);
  box-shadow: var(--aim-shadow-lg);
  border-radius: var(--aim-radius);
}

body.admin-theme-ai-modelv1 .modal-header {
  border-bottom: 1px solid var(--aim-border);
  color: var(--aim-text);
  padding: 1rem 1.5rem;
}

body.admin-theme-ai-modelv1 .modal-body {
  color: var(--aim-text);
  padding: 1.5rem;
}

/* Content sections / page titles */
body.admin-theme-ai-modelv1 .admin-content h2,
body.admin-theme-ai-modelv1 .admin-content h3 {
  color: var(--aim-text);
  font-weight: 600;
}

/* Breadcrumb / secondary text */
body.admin-theme-ai-modelv1 .admin-content small,
body.admin-theme-ai-modelv1 .admin-content .text-muted {
  color: var(--aim-text-muted);
}

/* --- Text: no red; use theme color (day=black, night=white) --- */
body.admin-theme-ai-modelv1 .order-detail h3,
body.admin-theme-ai-modelv1 .calendar-order-time,
body.admin-theme-ai-modelv1 .calendar-order-total,
body.admin-theme-ai-modelv1 .calendar-day.today .calendar-day-number,
body.admin-theme-ai-modelv1 .form-group:focus-within label,
body.admin-theme-ai-modelv1 .form-group label::before,
body.admin-theme-ai-modelv1 .form-group small strong,
body.admin-theme-ai-modelv1 .admin-content a:not(.btn):not(.btn-primary):not(.btn-secondary),
body.admin-theme-ai-modelv1 .upload-area-label,
body.admin-theme-ai-modelv1 .drag-drop-text {
  color: var(--aim-text);
}
body.admin-theme-ai-modelv1 .form-group:focus-within label {
  border-left-color: var(--aim-input-focus);
}
body.admin-theme-ai-modelv1 table td a:hover {
  color: var(--aim-text-muted) !important;
}

/* ===== Content sections: search, filter, table header, modal, toggle, card, quill ===== */

/* Search section – theme card */
body.admin-theme-ai-modelv1 .search-section {
  background: var(--aim-card-bg);
  border: 1px solid var(--aim-card-border);
  border-radius: var(--aim-radius);
  padding: 1rem;
  box-shadow: var(--aim-shadow);
  color: var(--aim-text);
}

body.admin-theme-ai-modelv1 .search-section input {
  background: var(--aim-input-bg);
  border: 1px solid var(--aim-input-border);
  color: var(--aim-text);
  border-radius: var(--aim-radius-sm);
}

body.admin-theme-ai-modelv1 .search-section input::placeholder {
  color: var(--aim-text-muted);
}

body.admin-theme-ai-modelv1 .search-section input:focus {
  border-color: var(--aim-input-focus);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

body.admin-theme-ai-modelv1 .search-section .fa-search,
body.admin-theme-ai-modelv1 .search-section [class*="fa-"] {
  color: var(--aim-text-muted);
}

/* Filter section – theme card */
body.admin-theme-ai-modelv1 .filter-section {
  background: var(--aim-card-bg);
  border: 1px solid var(--aim-card-border);
  border-radius: var(--aim-radius);
  padding: 1rem;
  box-shadow: var(--aim-shadow);
  color: var(--aim-text);
}

body.admin-theme-ai-modelv1 .filter-section .filter-btn {
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border: 1px solid var(--aim-stroke);
  background: var(--aim-surface);
  color: var(--aim-text-muted);
}

body.admin-theme-ai-modelv1 .filter-section .filter-btn:hover {
  background: var(--aim-panel);
  color: var(--aim-text);
}

body.admin-theme-ai-modelv1 .filter-section .filter-btn.active {
  border-color: rgba(124, 92, 255, 0.35);
  background: rgba(124, 92, 255, 0.14);
  color: var(--aim-text);
}

/* Table header – explicit theme colors */
body.admin-theme-ai-modelv1 table thead {
  background: var(--aim-surface);
}

body.admin-theme-ai-modelv1 table thead th {
  background: var(--aim-surface);
  color: var(--aim-text);
  border-bottom: 1px solid var(--aim-table-border);
  font-weight: 600;
  font-size: 0.8rem;
}

/* Modal overlay */
body.admin-theme-ai-modelv1 .modal {
  background: rgba(0, 0, 0, 0.5);
}

body.admin-theme-ai-modelv1[data-theme="dark"] .modal {
  background: rgba(0, 0, 0, 0.65);
}

/* Modal content, header, body, close – opaque so text doesn’t blend with overlay */
body.admin-theme-ai-modelv1 .modal-content {
  background: var(--aim-modal-bg);
  border: 1px solid var(--aim-card-border);
  box-shadow: var(--aim-shadow-lg);
  border-radius: var(--aim-radius);
  color: var(--aim-text);
}

body.admin-theme-ai-modelv1 .modal-content h2,
body.admin-theme-ai-modelv1 .modal-header h2 {
  color: var(--aim-text);
  font-weight: 600;
}

body.admin-theme-ai-modelv1 .modal-header {
  border-bottom: 1px solid var(--aim-border);
  color: var(--aim-text);
}

body.admin-theme-ai-modelv1 .modal-body {
  color: var(--aim-text);
}

body.admin-theme-ai-modelv1 .modal-close,
body.admin-theme-ai-modelv1 .modal .close {
  color: var(--aim-text-muted);
  background: transparent;
  border: none;
}

body.admin-theme-ai-modelv1 .modal-close:hover,
body.admin-theme-ai-modelv1 .modal .close:hover {
  color: var(--aim-text);
  background: var(--aim-panel);
}

/* Modal form controls – tüm modallarda (kategori, banner, kampanya, kur, sipariş, cevap vb.) */
body.admin-theme-ai-modelv1 .modal-content input,
body.admin-theme-ai-modelv1 .modal-content textarea,
body.admin-theme-ai-modelv1 .modal-content select {
  background: var(--aim-input-bg) !important;
  border: 1px solid var(--aim-input-border) !important;
  color: var(--aim-text) !important;
  border-radius: var(--aim-radius-sm);
}

body.admin-theme-ai-modelv1 .modal-content input::placeholder,
body.admin-theme-ai-modelv1 .modal-content textarea::placeholder {
  color: var(--aim-text-muted) !important;
}

body.admin-theme-ai-modelv1 .modal-content input:focus,
body.admin-theme-ai-modelv1 .modal-content textarea:focus,
body.admin-theme-ai-modelv1 .modal-content select:focus {
  border-color: var(--aim-input-focus) !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

body.admin-theme-ai-modelv1 .modal-content label {
  color: var(--aim-text) !important;
}

/* Gece modunda modal input/textarea/select – koyu arka plan, açık yazı */
body.admin-theme-ai-modelv1[data-theme="dark"] .modal-content input,
body.admin-theme-ai-modelv1[data-theme="dark"] .modal-content textarea,
body.admin-theme-ai-modelv1[data-theme="dark"] .modal-content select {
  background: #1e293b !important;
  border-color: rgba(255,255,255,0.14) !important;
  color: rgba(255,255,255,0.92) !important;
}

body.admin-theme-ai-modelv1[data-theme="dark"] .modal-content input::placeholder,
body.admin-theme-ai-modelv1[data-theme="dark"] .modal-content textarea::placeholder {
  color: rgba(255,255,255,0.5) !important;
}

body.admin-theme-ai-modelv1[data-theme="dark"] .modal-content label {
  color: rgba(255,255,255,0.92) !important;
}

/* Generic card in admin-content (product-edit, etc.) */
body.admin-theme-ai-modelv1 .admin-content .card {
  background: var(--aim-card-bg);
  border: 1px solid var(--aim-card-border);
  box-shadow: var(--aim-shadow);
  border-radius: var(--aim-radius);
  color: var(--aim-text);
  border-top: 4px solid var(--aim-accent);
}

/* Product-edit main card: opaque so content doesn’t blend with page background */
body.admin-theme-ai-modelv1 .admin-content .card:has(#product-form) {
  background: var(--aim-modal-bg) !important;
}

body.admin-theme-ai-modelv1 .admin-content .card::before,
body.admin-theme-ai-modelv1 .admin-content .card::after {
  background: var(--aim-accent);
}

body.admin-theme-ai-modelv1 .admin-content .card h2,
body.admin-theme-ai-modelv1 .admin-content .card h3 {
  color: var(--aim-text);
}

/* Product-edit: gallery, AI panel, progress – theme colors (override inline styles) */
body.admin-theme-ai-modelv1 .product-images-gallery {
  background: var(--aim-surface) !important;
  border-color: var(--aim-border) !important;
  color: var(--aim-text);
}

body.admin-theme-ai-modelv1 #ai-tools-panel {
  background: var(--aim-surface) !important;
  border-color: var(--aim-border) !important;
  color: var(--aim-text);
}

body.admin-theme-ai-modelv1 #ai-tools-panel h3 {
  color: var(--aim-accent) !important;
}

/* Gece modu: AI panel ve alt bloklar – inline background/color override */
body.admin-theme-ai-modelv1[data-theme="dark"] #ai-tools-panel {
  background: var(--aim-card-bg) !important;
  border-color: var(--aim-card-border) !important;
  color: var(--aim-text) !important;
}

body.admin-theme-ai-modelv1[data-theme="dark"] #ai-tools-panel h3,
body.admin-theme-ai-modelv1[data-theme="dark"] #ai-tools-panel label {
  color: var(--aim-text) !important;
}

body.admin-theme-ai-modelv1[data-theme="dark"] #ai-tools-panel .ai-field-tool {
  background: var(--aim-surface) !important;
  border-color: var(--aim-border) !important;
  color: var(--aim-text) !important;
}

body.admin-theme-ai-modelv1[data-theme="dark"] #ai-tools-panel .ai-field-tool label {
  color: var(--aim-text) !important;
}

body.admin-theme-ai-modelv1[data-theme="dark"] #ai-tools-panel .ai-draft-preview {
  background: rgba(30,41,59,0.6) !important;
  border-color: var(--aim-border) !important;
  color: var(--aim-text) !important;
}

body.admin-theme-ai-modelv1[data-theme="dark"] #ai-tools-panel .ai-draft-preview * {
  color: inherit;
}

body.admin-theme-ai-modelv1[data-theme="dark"] #ai-tools-panel .ai-draft-preview div[style*="background"] {
  background: var(--aim-input-bg) !important;
  color: var(--aim-text) !important;
}

body.admin-theme-ai-modelv1[data-theme="dark"] #ai-tools-panel #ai-safe-facts-override {
  background: var(--aim-input-bg) !important;
  border-color: var(--aim-input-border) !important;
  color: var(--aim-text) !important;
}

body.admin-theme-ai-modelv1[data-theme="dark"] #ai-tools-panel #ai-safe-facts-override::placeholder {
  color: rgba(255,255,255,0.5) !important;
}

/* AI Run Popup & AI Önerileri modal – gece modu (ai-modelv1) */
body.admin-theme-ai-modelv1[data-theme="dark"] #ai-run-popup .ai-run-popup-panel,
body.admin-theme-ai-modelv1[data-theme="dark"] #ai-proposals-modal .ai-run-popup-panel {
  background: var(--aim-modal-bg) !important;
  color: var(--aim-text) !important;
  border-color: var(--aim-card-border) !important;
}
body.admin-theme-ai-modelv1[data-theme="dark"] #ai-run-popup .ai-run-popup-close,
body.admin-theme-ai-modelv1[data-theme="dark"] #ai-proposals-modal .ai-run-popup-close {
  color: var(--aim-text-muted) !important;
}
body.admin-theme-ai-modelv1[data-theme="dark"] #ai-run-popup .ai-run-popup-close:hover,
body.admin-theme-ai-modelv1[data-theme="dark"] #ai-proposals-modal .ai-run-popup-close:hover {
  color: var(--aim-text) !important;
}
body.admin-theme-ai-modelv1[data-theme="dark"] #ai-run-popup .ai-run-popup-title,
body.admin-theme-ai-modelv1[data-theme="dark"] #ai-run-popup .ai-run-popup-label,
body.admin-theme-ai-modelv1[data-theme="dark"] #ai-proposals-modal .ai-run-popup-title,
body.admin-theme-ai-modelv1[data-theme="dark"] #ai-proposals-modal .ai-run-popup-label {
  color: var(--aim-text) !important;
}
body.admin-theme-ai-modelv1[data-theme="dark"] .ai-run-popup-muted {
  color: var(--aim-text-muted) !important;
}
body.admin-theme-ai-modelv1[data-theme="dark"] #ai-run-popup .ai-run-popup-textarea {
  background: var(--aim-input-bg) !important;
  border-color: var(--aim-input-border) !important;
  color: var(--aim-text) !important;
}
body.admin-theme-ai-modelv1[data-theme="dark"] #ai-run-popup .ai-run-popup-textarea::placeholder {
  color: rgba(255,255,255,0.5) !important;
}
body.admin-theme-ai-modelv1[data-theme="dark"] #ai-run-popup .ai-run-popup-pre {
  background: var(--aim-input-bg) !important;
  border-color: var(--aim-input-border) !important;
  color: var(--aim-text) !important;
}
body.admin-theme-ai-modelv1[data-theme="dark"] #ai-run-popup .ai-run-popup-loading,
body.admin-theme-ai-modelv1[data-theme="dark"] #ai-run-popup .ai-run-popup-loading p {
  color: var(--aim-text-muted) !important;
}
body.admin-theme-ai-modelv1[data-theme="dark"] #ai-run-popup .ai-run-popup-run-btn {
  color: #fff !important;
}

body.admin-theme-ai-modelv1 #upload-progress div[style*="background"] {
  background: var(--aim-surface) !important;
}

body.admin-theme-ai-modelv1 #upload-progress-text,
body.admin-theme-ai-modelv1 .admin-content .card small {
  color: var(--aim-text-muted) !important;
}

/* Toggle switch (price display, etc.) */
body.admin-theme-ai-modelv1 .toggle-switch label {
  background-color: var(--aim-input-border);
  color: var(--aim-text);
}

body.admin-theme-ai-modelv1 .toggle-switch label::before {
  background-color: var(--aim-bg-elevated);
  box-shadow: var(--aim-shadow);
}

body.admin-theme-ai-modelv1 .toggle-switch input:checked + label {
  background-color: var(--aim-accent);
}

body.admin-theme-ai-modelv1 .toggle-label-left,
body.admin-theme-ai-modelv1 .toggle-label-right {
  color: var(--aim-text);
}

body.admin-theme-ai-modelv1 .toggle-switch input:not(:checked) + label .toggle-label-left {
  color: var(--aim-text);
  font-weight: 600;
}

body.admin-theme-ai-modelv1 .toggle-switch input:not(:checked) + label .toggle-label-right {
  color: var(--aim-text-muted);
}

body.admin-theme-ai-modelv1 .toggle-switch input:checked + label .toggle-label-left {
  color: var(--aim-text-muted);
}

body.admin-theme-ai-modelv1 .toggle-switch input:checked + label .toggle-label-right {
  color: var(--aim-text);
  font-weight: 600;
}

body.admin-theme-ai-modelv1 .price-toggle-container {
  color: var(--aim-text);
}

/* View toggle buttons (Liste / Kanban vb.) – tema ile okunabilir */
body.admin-theme-ai-modelv1 .view-toggle-btn {
  background: var(--aim-surface) !important;
  border: 1px solid var(--aim-stroke) !important;
  color: var(--aim-text) !important;
  border-radius: var(--aim-radius-sm);
  transition: background var(--aim-dur) var(--aim-ease), border-color var(--aim-dur) var(--aim-ease), color var(--aim-dur) var(--aim-ease);
}

body.admin-theme-ai-modelv1 .view-toggle-btn:hover {
  background: var(--aim-panel) !important;
  border-color: var(--aim-border) !important;
  color: var(--aim-text) !important;
}

body.admin-theme-ai-modelv1 .view-toggle-btn.active {
  background: var(--aim-accent) !important;
  border-color: var(--aim-accent) !important;
  color: #fff !important;
}

body.admin-theme-ai-modelv1 .view-toggle-container {
  color: var(--aim-text);
}

/* Gece modunda view-toggle – koyu arka plan, açık yazı */
body.admin-theme-ai-modelv1[data-theme="dark"] .view-toggle-btn {
  background: #1e293b !important;
  border-color: rgba(255,255,255,0.14) !important;
  color: rgba(255,255,255,0.92) !important;
}

body.admin-theme-ai-modelv1[data-theme="dark"] .view-toggle-btn:hover {
  background: rgba(255,255,255,0.08) !important;
  color: rgba(255,255,255,0.92) !important;
}

body.admin-theme-ai-modelv1[data-theme="dark"] .view-toggle-btn.active {
  background: var(--aim-accent) !important;
  border-color: var(--aim-accent) !important;
  color: #fff !important;
}

/* Dashboard view toggle (Liste / Takvim) */
body.admin-theme-ai-modelv1 .dashboard-view-toggle-btn {
  background: var(--aim-surface) !important;
  border: 1px solid var(--aim-stroke) !important;
  color: var(--aim-text) !important;
  border-radius: var(--aim-radius-sm);
}

body.admin-theme-ai-modelv1 .dashboard-view-toggle-btn:hover,
body.admin-theme-ai-modelv1 .dashboard-view-toggle-btn:not(.active):hover {
  background: var(--aim-panel) !important;
  color: var(--aim-text) !important;
}

body.admin-theme-ai-modelv1 .dashboard-view-toggle-btn.active {
  background: var(--aim-accent) !important;
  border-color: var(--aim-accent) !important;
  color: #fff !important;
}

body.admin-theme-ai-modelv1[data-theme="dark"] .dashboard-view-toggle-btn {
  background: #1e293b !important;
  border-color: rgba(255,255,255,0.14) !important;
  color: rgba(255,255,255,0.92) !important;
}

body.admin-theme-ai-modelv1[data-theme="dark"] .dashboard-view-toggle-btn:hover {
  background: rgba(255,255,255,0.08) !important;
  color: rgba(255,255,255,0.92) !important;
}

/* Form group in modals and pages */
body.admin-theme-ai-modelv1 .modal .form-group,
body.admin-theme-ai-modelv1 .admin-content .form-group {
  background: var(--aim-panel);
  border-radius: var(--aim-radius-sm);
  border-left: 3px solid transparent;
  color: var(--aim-text);
}

body.admin-theme-ai-modelv1 .modal .form-group:hover,
body.admin-theme-ai-modelv1 .admin-content .form-group:hover {
  background: var(--aim-surface);
  border-left-color: var(--aim-accent);
}

/* Product-edit: all inputs readable (override inline styles) */
body.admin-theme-ai-modelv1 #product-form input,
body.admin-theme-ai-modelv1 #product-form textarea,
body.admin-theme-ai-modelv1 #product-form select {
  background: var(--aim-input-bg) !important;
  border: 1px solid var(--aim-input-border) !important;
  color: var(--aim-text) !important;
  border-radius: var(--aim-radius-sm);
}

body.admin-theme-ai-modelv1 #product-form input::placeholder,
body.admin-theme-ai-modelv1 #product-form textarea::placeholder {
  color: var(--aim-text-muted) !important;
}

body.admin-theme-ai-modelv1 #product-form input:focus,
body.admin-theme-ai-modelv1 #product-form textarea:focus {
  border-color: var(--aim-input-focus) !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Readonly inputs – theme background (override inline #f0f0f0) */
body.admin-theme-ai-modelv1 #product-form input[readonly] {
  background: var(--aim-surface) !important;
  color: var(--aim-text-muted) !important;
  border-color: var(--aim-border) !important;
  cursor: not-allowed;
}

/* Specifications section – list container and items */
body.admin-theme-ai-modelv1 #specifications-list,
body.admin-theme-ai-modelv1 #specifications-list > div {
  background: var(--aim-surface) !important;
  border-color: var(--aim-border) !important;
  color: var(--aim-text) !important;
  border-radius: var(--aim-radius-sm);
}

body.admin-theme-ai-modelv1 #specifications-list input,
body.admin-theme-ai-modelv1 #specifications-list select,
body.admin-theme-ai-modelv1 #specifications-list button {
  background: var(--aim-input-bg) !important;
  border-color: var(--aim-input-border) !important;
  color: var(--aim-text) !important;
}

body.admin-theme-ai-modelv1 #specifications-list label,
body.admin-theme-ai-modelv1 #specifications-section label {
  color: var(--aim-text) !important;
}

/* Quill editor (product-edit) – content and placeholder readable */
body.admin-theme-ai-modelv1 #product-description-editor .ql-editor {
  background: var(--aim-input-bg) !important;
  color: var(--aim-text) !important;
  border-color: var(--aim-input-border);
}

body.admin-theme-ai-modelv1 #product-description-editor .ql-editor.ql-blank::before {
  color: var(--aim-text-muted) !important;
}

body.admin-theme-ai-modelv1 #product-description-editor .ql-editor p,
body.admin-theme-ai-modelv1 #product-description-editor .ql-editor div,
body.admin-theme-ai-modelv1 #product-description-editor .ql-editor span {
  color: inherit;
}

body.admin-theme-ai-modelv1 #product-description-editor .ql-toolbar {
  background: var(--aim-surface);
  border-color: var(--aim-input-border);
}

body.admin-theme-ai-modelv1 #product-description-editor .ql-toolbar button {
  color: var(--aim-text-muted);
}

body.admin-theme-ai-modelv1 #product-description-editor .ql-toolbar button:hover,
body.admin-theme-ai-modelv1 #product-description-editor .ql-toolbar button.ql-active {
  color: var(--aim-accent);
  background: var(--aim-panel);
}

body.admin-theme-ai-modelv1 #product-description-editor .ql-container {
  background: var(--aim-input-bg);
  border-color: var(--aim-input-border);
}

body.admin-theme-ai-modelv1 #product-description-editor:focus-within .ql-container {
  border-color: var(--aim-input-focus);
}

/* ----- Dark mode: Quill toolbar + editor + spec inputs (koyu arka plan, açık yazı) ----- */
body.admin-theme-ai-modelv1[data-theme="dark"] #product-description-editor .ql-toolbar.ql-snow {
  background: #1e293b !important;
  border-color: rgba(255,255,255,0.12) !important;
}

body.admin-theme-ai-modelv1[data-theme="dark"] #product-description-editor .ql-toolbar .ql-stroke {
  stroke: rgba(255,255,255,0.7) !important;
}

body.admin-theme-ai-modelv1[data-theme="dark"] #product-description-editor .ql-toolbar .ql-fill {
  fill: rgba(255,255,255,0.7) !important;
}

body.admin-theme-ai-modelv1[data-theme="dark"] #product-description-editor .ql-toolbar button:hover .ql-stroke,
body.admin-theme-ai-modelv1[data-theme="dark"] #product-description-editor .ql-toolbar button.ql-active .ql-stroke {
  stroke: rgba(124,92,255,0.9) !important;
}

body.admin-theme-ai-modelv1[data-theme="dark"] #product-description-editor .ql-toolbar button:hover .ql-fill,
body.admin-theme-ai-modelv1[data-theme="dark"] #product-description-editor .ql-toolbar button.ql-active .ql-fill {
  fill: rgba(124,92,255,0.9) !important;
}

body.admin-theme-ai-modelv1[data-theme="dark"] #product-description-editor .ql-editor {
  background: #1e293b !important;
  color: rgba(255,255,255,0.92) !important;
}

body.admin-theme-ai-modelv1[data-theme="dark"] #product-description-editor .ql-editor.ql-blank::before {
  color: rgba(255,255,255,0.5) !important;
}

body.admin-theme-ai-modelv1[data-theme="dark"] #product-description-editor .ql-container.ql-snow {
  border-color: rgba(255,255,255,0.12) !important;
}

body.admin-theme-ai-modelv1[data-theme="dark"] #product-description-editor .ql-editor p,
body.admin-theme-ai-modelv1[data-theme="dark"] #product-description-editor .ql-editor div,
body.admin-theme-ai-modelv1[data-theme="dark"] #product-description-editor .ql-editor span {
  color: inherit !important;
}

/* Özellikler (spec) input’ları – gece modunda koyu arka plan, beyaz yazı */
body.admin-theme-ai-modelv1[data-theme="dark"] #specifications-list .spec-key,
body.admin-theme-ai-modelv1[data-theme="dark"] #specifications-list .spec-value,
body.admin-theme-ai-modelv1[data-theme="dark"] #specifications-list input,
body.admin-theme-ai-modelv1[data-theme="dark"] #specifications-list select {
  background: #1e293b !important;
  border-color: rgba(255,255,255,0.14) !important;
  color: rgba(255,255,255,0.92) !important;
}

body.admin-theme-ai-modelv1[data-theme="dark"] #specifications-list .spec-key::placeholder,
body.admin-theme-ai-modelv1[data-theme="dark"] #specifications-list .spec-value::placeholder,
body.admin-theme-ai-modelv1[data-theme="dark"] #specifications-list input::placeholder {
  color: rgba(255,255,255,0.5) !important;
}

body.admin-theme-ai-modelv1[data-theme="dark"] #specifications-list > div,
body.admin-theme-ai-modelv1[data-theme="dark"] .specification-item {
  background: rgba(30,41,59,0.6) !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: rgba(255,255,255,0.92) !important;
}

body.admin-theme-ai-modelv1[data-theme="dark"] #specifications-section label {
  color: rgba(255,255,255,0.92) !important;
}

/* Chart card (dashboard) */
body.admin-theme-ai-modelv1 .chart-card {
  background: var(--aim-card-bg);
  border: 1px solid var(--aim-card-border);
  border-radius: var(--aim-radius);
  box-shadow: var(--aim-shadow);
  color: var(--aim-text);
}

body.admin-theme-ai-modelv1 .chart-header h3 {
  color: var(--aim-text);
}

body.admin-theme-ai-modelv1 .period-btn {
  background: var(--aim-surface);
  border: 1px solid var(--aim-stroke);
  color: var(--aim-text-muted);
  border-radius: var(--aim-radius-sm);
}

body.admin-theme-ai-modelv1 .period-btn:hover,
body.admin-theme-ai-modelv1 .period-btn.active {
  background: var(--aim-panel);
  color: var(--aim-text);
  border-color: var(--aim-accent);
}

/* Inline-styled small text (e.g. "Boş bırakılırsa...") */
body.admin-theme-ai-modelv1 .admin-content small,
body.admin-theme-ai-modelv1 .modal small {
  color: var(--aim-text-muted);
}

/* Danger button (delete) – keep visible in both themes */
body.admin-theme-ai-modelv1 .btn-danger {
  background: rgba(239, 68, 68, 0.9);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fff;
  border-radius: var(--aim-radius-sm);
}

body.admin-theme-ai-modelv1 .btn-danger:hover {
  background: #ef4444;
  color: #fff;
}

/* Product-saved / inline popups – opaque inner box so text doesn’t blend */
body.admin-theme-ai-modelv1 [id$="popup-inner"] {
  background: var(--aim-modal-bg) !important;
  color: var(--aim-text) !important;
  border: 1px solid var(--aim-card-border) !important;
  border-radius: var(--aim-radius) !important;
  box-shadow: var(--aim-shadow-lg) !important;
}

body.admin-theme-ai-modelv1 [id$="popup-inner"] button:not(.btn-primary):not(.btn-secondary) {
  color: var(--aim-text-muted);
}

/* Select dropdowns in admin */
body.admin-theme-ai-modelv1 .admin-content select,
body.admin-theme-ai-modelv1 .modal select {
  background: var(--aim-input-bg);
  border: 1px solid var(--aim-input-border);
  color: var(--aim-text);
  border-radius: var(--aim-radius-sm);
}

/* Checkbox/label in forms */
body.admin-theme-ai-modelv1 .form-group label {
  color: var(--aim-text);
}

body.admin-theme-ai-modelv1 .form-group input[type="checkbox"] + label,
body.admin-theme-ai-modelv1 .form-group label:has(input[type="checkbox"]) {
  color: var(--aim-text);
}
