/* Ozon Pro — React (MUI) ThemeContext ile bire bir */
:root,
[data-theme="light"] {
  --primary: #1976d2;
  --primary-dark: #1565c0;
  --primary-light: #42a5f5;
  --secondary: #dc004e;
  --bg: #f5f5f5;
  --bg-paper: #ffffff;
  --text: #212121;
  --text-secondary: #757575;
  --success: #2e7d32;
  --success-light: #4caf50;
  --warning: #ed6c02;
  --error: #d32f2f;
  --divider: rgba(0, 0, 0, 0.12);
  --action-hover: rgba(0, 0, 0, 0.04);
  --nav-active-bg: #42a5f5;
  --nav-active-color: #1565c0;
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-login: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-btn: 0 4px 12px rgba(25, 118, 210, 0.3);
  --chart-green: #10b981;
  --trend-up: #10b981;
  --trend-down: #ef4444;
  --sidebar-width: 260px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

[data-theme="dark"] {
  --primary: #29b6f6;
  --primary-dark: #0288d1;
  --primary-light: #4fc3f7;
  --secondary: #f50057;
  --bg: #0a1929;
  --bg-paper: #102035;
  --text: #e3f2fd;
  --text-secondary: #b3e5fc;
  --success: #00e676;
  --success-light: #33eb91;
  --warning: #ffea00;
  --error: #f44336;
  --divider: rgba(255, 255, 255, 0.12);
  --action-hover: rgba(255, 255, 255, 0.08);
  --nav-active-bg: rgba(41, 182, 246, 0.2);
  --nav-active-color: #4fc3f7;
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-login: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-btn: 0 4px 12px rgba(41, 182, 246, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', 'Roboto', 'Helvetica', 'Arial', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

#app { min-height: 100vh; }

.material-symbols-outlined.icon {
  font-size: 1.25rem;
  vertical-align: middle;
  line-height: 1;
}

.material-symbols-outlined.icon-sm { font-size: 1.125rem; }
.material-symbols-outlined.icon-lg { font-size: 2rem; }
.material-symbols-outlined.icon-xl { font-size: 4rem; }

/* Loading */
.app-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  gap: 1rem;
  color: var(--text-secondary);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--divider);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, var(--divider) 25%, var(--action-hover) 50%, var(--divider) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: var(--radius-lg);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-kpi { height: 130px; }
.skeleton-chart { height: 350px; margin-bottom: 1.5rem; }
.skeleton-table { height: 400px; }

/* Login — sabit gradient (React ile aynı) */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: linear-gradient(135deg, #1a237e 0%, #0d47a1 100%);
}

.login-card {
  width: 100%;
  max-width: 444px;
  background: var(--bg-paper);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-login);
}

/* IZAI logo — beyaz yazı / siyah zemin PNG; tema ile blend */
.brand-logo {
  display: block;
  object-fit: contain;
  object-position: left center;
  max-width: 100%;
}

.brand-logo--sidebar {
  height: 34px;
  width: auto;
  max-width: 160px;
  transform: scale(1.45);
  transform-origin: left center;
}
.brand-logo--mobile { height: 26px; width: auto; max-width: 110px; object-position: center; }
.brand-logo--hero {
  height: 96px;
  width: auto;
  max-width: 300px;
  margin: 0 auto;
  object-position: center;
}
.brand-logo--login {
  height: 56px;
  width: auto;
  max-width: 180px;
  margin: 0 auto 1.5rem;
  object-position: center;
}
.brand-logo--admin { height: 28px; width: auto; max-width: 100px; }

/*
 * Logo PNG: beyaz IZAI + siyah zemin.
 * Açık tema: invert → siyah logo, beyaz zemin kaynağa karışır.
 * Koyu tema: screen → beyaz logo, siyah zemin kaybolur.
 */
[data-theme="light"] .brand-logo--theme {
  filter: invert(1);
  mix-blend-mode: normal;
  opacity: 1;
}

[data-theme="dark"] .brand-logo--theme {
  filter: none;
  mix-blend-mode: screen;
  opacity: 1;
}

/* Giriş kartı her zaman açık kağıt — tema bağımsız invert */
.login-card .brand-logo--login {
  filter: invert(1);
  mix-blend-mode: normal;
}

/* Admin mavi AppBar — beyaz logo */
.admin-appbar .brand-logo {
  filter: none;
  mix-blend-mode: screen;
}

/* blend-mode için temiz stacking context */
.sidebar-brand,
.brand-logo-wrap,
.barcode-hero .brand-logo-wrap {
  isolation: isolate;
}

.login-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.barcode-hero .brand-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 0;
  line-height: 0;
}

.sidebar-brand .brand-logo { flex-shrink: 0; }

.mobile-header .brand-logo-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.admin-appbar .brand-logo-wrap {
  display: flex;
  align-items: center;
  margin-right: 0.5rem;
}

.login-card h1 {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.login-card .subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

/* Outlined input (MUI TextField) */
.field-outlined {
  margin-bottom: 1rem;
}

.field-outlined label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  font-weight: 500;
}

.field-outlined .field-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  background: var(--bg-paper);
  padding: 0 0.75rem;
  transition: border-color 0.15s;
}

.field-outlined .field-wrap:focus-within {
  border-color: var(--primary);
  outline: 1px solid var(--primary);
}

.field-outlined .field-wrap .material-symbols-outlined {
  color: var(--text-secondary);
  margin-right: 0.5rem;
  font-size: 1.25rem;
}

.field-outlined input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 1rem 0;
  font-size: 1rem;
  color: var(--text);
  font-family: inherit;
  min-width: 0;
}

.field-outlined input:focus { outline: none; }

.field-outlined .icon-btn-inline {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0.25rem;
  display: flex;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-transform: none;
  transition: filter 0.15s, box-shadow 0.15s;
}

.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) { filter: brightness(1.05); }

.btn-login {
  width: 100%;
  padding: 0.75rem;
  font-size: 1.1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-btn);
  margin-top: 0.5rem;
}

.btn-outlined {
  background: transparent;
  border: 1px solid var(--divider);
  color: var(--text);
}

.btn-outlined-error {
  background: transparent;
  border: 1px solid var(--error);
  color: var(--error);
  width: 100%;
  margin-top: 0.5rem;
}

.btn-contained-add {
  background: var(--primary);
  color: #fff;
}

.btn-block { width: 100%; }
.btn-sm { padding: 0.35rem 0.65rem; font-size: 0.8125rem; }

/* Alerts */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.alert-error {
  background: rgba(211, 47, 47, 0.1);
  color: var(--error);
  border: 1px solid rgba(211, 47, 47, 0.3);
}

.alert-warning {
  background: rgba(237, 108, 2, 0.1);
  color: var(--warning);
  border: 1px solid rgba(237, 108, 2, 0.3);
}

/* Store layout */
.layout-store {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-paper);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  display: none;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1200;
}

[data-theme="dark"] .sidebar {
  border-right-color: var(--divider);
}

@media (min-width: 900px) {
  .sidebar { display: flex; }
  .layout-store .main-wrap { margin-left: var(--sidebar-width); }
}

.sidebar.open { display: flex; }

.sidebar-brand {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 48px;
  overflow: hidden;
}

.sidebar-divider {
  height: 1px;
  background: var(--divider);
  margin: 0 0 0.5rem;
}

.sidebar-menu-label {
  padding: 0 1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.sidebar-nav { padding: 0 0.5rem; flex: 1; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  transition: background 0.15s;
}

.nav-item .material-symbols-outlined { min-width: 40px; }

.nav-item:hover { background: var(--action-hover); color: var(--text); }

.nav-item.active {
  background: var(--nav-active-bg);
  color: var(--nav-active-color);
  font-weight: 700;
}

.nav-item.active .material-symbols-outlined { color: var(--primary); }

.sidebar-footer {
  padding: 1rem;
  margin-top: auto;
}

.user-card {
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--divider);
  margin-top: 0.5rem;
}

.user-card strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-card span {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.mobile-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem;
  min-height: 56px;
  background: var(--bg-paper);
  border-bottom: 1px solid var(--divider);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  color: var(--text);
}

@media (min-width: 900px) {
  .mobile-header { display: none; }
}

.mobile-header strong { flex: 1; font-size: 1.25rem; font-weight: 700; }

.main-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}

.main-content {
  flex: 1;
  padding: 1rem;
  margin-top: 56px;
}

@media (min-width: 900px) {
  .main-content { margin-top: 0; padding: 2rem; }
}

/* Admin layout — MUI AppBar primary */
.layout-admin {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
}

.admin-appbar {
  background: var(--primary);
  color: #fff;
  padding: 0 1rem;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 1100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-appbar h1 {
  font-size: 1.25rem;
  font-weight: 500;
  flex: 1;
  min-width: 120px;
}

.admin-appbar a,
.admin-appbar button,
.admin-appbar .admin-user {
  color: inherit;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  text-decoration: none;
  opacity: 0.95;
}

.admin-appbar a:hover,
.admin-appbar button:hover { opacity: 1; }

.admin-content { flex: 1; padding: 1rem; }

/* Page */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.page-title {
  font-size: 2.125rem;
  font-weight: 800;
  line-height: 1.2;
}

.page-title-sm {
  font-size: 1.5rem;
  font-weight: 500;
}

/* Date range */
.date-range-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.date-range-wrap .select {
  min-width: 150px;
  border-radius: var(--radius);
}

/* KPI */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

.kpi-card {
  background: var(--bg-paper);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
}

.kpi-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.kpi-card h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.kpi-value {
  font-size: 2.125rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.kpi-trend {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.kpi-trend.up { color: var(--trend-up); }
.kpi-trend.down { color: var(--trend-down); }
.kpi-trend .caption { font-weight: 400; color: var(--text-secondary); font-size: 0.75rem; margin-left: 0.25rem; }

/* Chart card */
.chart-card {
  background: var(--bg-paper);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  height: 350px;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
}

.chart-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.chart-card canvas { flex: 1; max-height: 260px; }

/* Paper / table */
.paper {
  background: var(--bg-paper);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.paper-padded { padding: 1.5rem; }

.table-wrap { overflow-x: auto; }

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

table.data-table th,
table.data-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--divider);
}

table.data-table th {
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg);
}

table.data-table tbody tr:hover { background: var(--action-hover); }

table.data-table .qty-cell {
  text-align: right;
  font-weight: 700;
  color: var(--success);
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.table-pagination select {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--divider);
  border-radius: 4px;
  background: var(--bg-paper);
  color: var(--text);
  font-family: inherit;
}

.th-sort {
  cursor: pointer;
  user-select: none;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Chips */
.chip {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.5;
}

.chip-success {
  background: rgba(46, 125, 50, 0.12);
  color: var(--success);
}

.chip-warning {
  background: rgba(237, 108, 2, 0.12);
  color: var(--warning);
}

.chip-outlined {
  background: transparent;
  border: 1px solid var(--divider);
  color: var(--text);
}

/* Barcode */
.barcode-page {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem;
}

.barcode-page.has-result {
  justify-content: flex-start;
}

.barcode-page:not(.has-result) {
  justify-content: center;
}

.barcode-inner { width: 100%; max-width: 700px; }

.barcode-page.has-result .barcode-inner { margin-bottom: 2rem; }

.barcode-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.barcode-hero .hero-icon { display: none; }

.barcode-hero h2 {
  font-size: 2.125rem;
  font-weight: 800;
  margin-top: 0.35rem;
  margin-bottom: 0.5rem;
}

.barcode-hero p { color: var(--text-secondary); }

.barcode-search-card {
  background: var(--bg-paper);
  border: 1px solid var(--divider);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.barcode-search-card.elevated {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.barcode-search-row {
  display: flex;
  align-items: center;
  padding: 0.25rem;
  gap: 0.25rem;
}

.barcode-search-row .search-icon {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  margin: 0 0.5rem 0 1rem;
}

.modal-md { max-width: 900px; }

.barcode-search-row input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1.2rem;
  padding: 1rem 0;
  color: var(--text);
  font-family: inherit;
  min-width: 0;
}

.barcode-search-row input:focus { outline: none; }

.barcode-search-row .btn-sorgula {
  border-radius: var(--radius-lg);
  padding: 0.75rem 2rem;
  min-width: 140px;
  font-weight: 700;
  margin: 0.25rem;
}

.barcode-results {
  width: 100%;
  max-width: 1000px;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.order-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.order-header h2 {
  font-size: 3rem;
  font-weight: 900;
  color: var(--primary-dark);
  letter-spacing: -1px;
  line-height: 1.1;
}

.order-header .posting {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-top: 0.25rem;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 1200px) {
  .product-grid.multi { grid-template-columns: repeat(2, 1fr); }
}

.product-card-mui {
  display: flex;
  flex-direction: column;
  background: var(--bg-paper);
  border: 1px solid var(--divider);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

@media (min-width: 600px) {
  .product-card-mui { flex-direction: row; }
}

.product-card-img {
  width: 100%;
  min-height: 250px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border-bottom: 1px solid var(--divider);
}

@media (min-width: 600px) {
  .product-card-img {
    width: 40%;
    min-height: 300px;
    border-bottom: none;
    border-right: 1px solid var(--divider);
  }
}

.product-card-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.1));
}

.product-card-body {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-overline {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.product-offer {
  font-size: 1.5rem;
  font-weight: 800;
  word-break: break-word;
  margin: 0.5rem 0 1.5rem;
  line-height: 1.2;
}

.product-divider {
  border: none;
  border-top: 1px solid var(--divider);
  margin: 0 0 1.5rem;
}

.qty-row .qty-value {
  font-size: 3.75rem;
  font-weight: 900;
  color: var(--success);
  line-height: 1;
}

.qty-row .qty-unit {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--success-light);
  margin-left: 0.5rem;
}

/* Forms */
.form-group { margin-bottom: 1rem; }

.form-group label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.input, .select, .textarea {
  width: 100%;
  padding: 0.875rem 0.75rem;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  background: var(--bg-paper);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}

.input:focus, .select:focus, .textarea:focus {
  outline: 1px solid var(--primary);
  border-color: var(--primary);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
}

.form-section-title {
  grid-column: 1 / -1;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.form-section-title:first-child { margin-top: 0; }

.form-divider {
  grid-column: 1 / -1;
  border: none;
  border-top: 1px solid var(--divider);
  margin: 0.5rem 0;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal {
  background: var(--bg-paper);
  border-radius: var(--radius);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 11px 15px rgba(0, 0, 0, 0.2);
}

.modal-md { max-width: 900px; }

.modal-header {
  padding: 1.25rem 1.5rem 0.5rem;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-header .modal-sub {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.modal-header.error-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--error);
}

.modal-body {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}

.modal-footer {
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  background: var(--bg);
}

.icon-btn-mui {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 50%;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn-mui:hover { background: var(--action-hover); }
.icon-btn-mui.danger { color: var(--error); }

.empty-state-mui {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  padding: 2rem;
  opacity: 0.6;
  text-align: center;
}

.empty-state-mui .material-symbols-outlined {
  font-size: 4rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.empty-state-mui h3 {
  font-size: 1.25rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1199;
}

@media (max-width: 899px) {
  .sidebar.open ~ .overlay { display: block; }
}

.icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  color: inherit;
  display: inline-flex;
}

.icon-btn:hover { background: var(--action-hover); }

.helper-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}
