/* Nebim V3 ↔ OpenCart — Mockup Design System */
:root {
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --border: #e8ecf4;
  --border-strong: #d4dae8;
  --text: #1a2236;
  --text-muted: #6b7a99;
  --text-light: #94a3b8;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: rgba(79, 70, 229, 0.1);
  --accent: #06b6d4;
  --accent-soft: rgba(6, 182, 212, 0.12);
  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.12);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.12);
  --sidebar-bg: #0f172a;
  --sidebar-bg2: #1e293b;
  --sidebar-text: #cbd5e1;
  --sidebar-muted: #64748b;
  --sidebar-active: rgba(79, 70, 229, 0.25);
  --sidebar-accent: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --sidebar-w: 260px;
  --header-h: 64px;
  --transition: 0.2s ease;
}

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

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-hover); }

img { max-width: 100%; display: block; }

/* Accessibility: skip link — gizli, yalnızca klavye odağında görünür */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  z-index: 9999;
}

.skip-link:focus,
.skip-link:focus-visible {
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.5rem 1rem;
  overflow: visible;
  clip: auto;
  white-space: normal;
  left: 0.5rem;
  top: 0.5rem;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

/* ─── Layout: Admin / App ─── */
.layout-panel {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 200;
  transition: transform var(--transition);
  overflow-y: auto;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--sidebar-accent);
}

.sidebar-brand {
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
}

.sidebar-brand-sub {
  font-size: 0.78rem;
  color: var(--sidebar-muted);
  font-weight: 400;
  margin-top: 0.15rem;
}

.sidebar-nav {
  flex: 1;
  padding: 0.75rem 0.75rem 1rem;
}

.nav-section {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--sidebar-muted);
  padding: 0.75rem 0.75rem 0.35rem;
  text-transform: uppercase;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-link.active {
  background: var(--sidebar-active);
  color: #fff;
}

.nav-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.75;
}

.nav-link.active svg { opacity: 1; }

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  color: var(--sidebar-muted);
}

.main-wrap {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

.topbar {
  height: var(--header-h);
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: var(--text);
  border-radius: var(--radius-sm);
}

.menu-toggle:hover { background: var(--primary-soft); }

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb strong { color: var(--text); font-weight: 600; }

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

.user-menu {
  position: relative;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.75rem 0.35rem 0.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
}

.user-chip:hover {
  border-color: var(--border-strong);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--sidebar-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
}

.user-menu-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 0.35rem 0;
  z-index: 200;
}

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

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.user-menu-item:hover {
  background: var(--primary-soft);
}

.user-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 0.35rem 0;
}

.user-menu-form {
  margin: 0;
}

.content {
  flex: 1;
  padding: 1.5rem;
  max-width: 1400px;
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.content.content-fluid,
.content-fluid {
  max-width: none;
  overflow-x: hidden;
  min-width: 0;
}

main {
  min-width: 0;
  overflow-x: hidden;
}

.page-head {
  margin-bottom: 1.5rem;
}

.page-title {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.page-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ─── Cards ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-body { padding: 1.25rem; }

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

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
}

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

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.kpi-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: 4px 0 0 4px;
}

.kpi-card--primary::after { background: var(--primary); }
.kpi-card--success::after { background: var(--success); }
.kpi-card--warning::after { background: var(--warning); }
.kpi-card--danger::after { background: var(--danger); }

.kpi-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 0.25rem;
  letter-spacing: -0.02em;
}

.kpi-meta {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 0.35rem;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.btn-outline {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

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

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

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ─── Forms ─── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.15rem;
}

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

.form-group.full,
.form-grid .span-full { grid-column: 1 / -1; }

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.form-input,
.form-select,
.form-textarea {
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.form-textarea { min-height: 100px; resize: vertical; }

.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.form-check input { width: 16px; height: 16px; accent-color: var(--primary); }

.role-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.65rem;
}

.role-option {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.role-option:hover {
  border-color: var(--border-strong);
  background: var(--bg);
}

.role-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 1px var(--primary);
}

.role-option:has(input:focus-visible) {
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.role-option:has(input:checked):has(input:focus-visible) {
  box-shadow: 0 0 0 1px var(--primary), 0 0 0 3px var(--primary-soft);
}

.role-option input {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 0.15rem;
  accent-color: var(--primary);
}

.role-option-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.role-option-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.role-option-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.file-upload {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  background: var(--bg);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.file-upload:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.file-upload-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 0.5rem;
  color: var(--text-muted);
}

.file-upload-text { font-size: 0.85rem; color: var(--text-muted); }
.file-upload-text strong { color: var(--primary); }

/* ─── Tables ─── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

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

.table tbody tr:hover { background: rgba(79, 70, 229, 0.03); }

.table tbody tr:last-child td { border-bottom: none; }

.table-check { width: 40px; text-align: center; }

.table-check input { accent-color: var(--primary); }

.table-actions {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  padding: 0.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  line-height: 0;
  text-decoration: none;
}

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

.btn-icon.btn-icon-danger:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-soft);
}

.btn-icon:disabled,
.btn-icon[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.pw-wrap .form-input {
  padding-right: 2.6rem;
}

.pw-toggle {
  position: absolute;
  right: 0.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color var(--transition);
  line-height: 0;
}

.pw-toggle:hover { color: var(--primary); }

.pw-toggle .pw-icon-hide { display: none; }

.toggle-wrap {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.toggle-input:focus-visible + .toggle {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.toggle-input:checked + .toggle {
  background: var(--success);
}

.toggle-input:checked + .toggle::after {
  transform: translateX(20px);
}

/* ─── Badges ─── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: #b45309; }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--accent-soft); color: #0891b2; }
.badge-muted { background: #f1f5f9; color: var(--text-muted); }

/* ─── Tabs ─── */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.tab-btn {
  padding: 0.65rem 1rem;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  margin-bottom: -1px;
  transition: all var(--transition);
  white-space: nowrap;
}

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

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

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.integration-tab-groups {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.integration-tab-group-label {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.integration-stock-service {
  gap: 0.5rem;
}

.integration-stock-service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1.25rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.integration-stock-service-grid .form-group--stock-service-check {
  margin: 0;
  gap: 0;
  justify-content: center;
}

.integration-stock-service-grid .form-check {
  min-height: 2.25rem;
  margin: 0;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}

.integration-stock-service-grid .form-check:hover {
  background: var(--primary-soft);
}

.integration-stock-service-grid .form-check span {
  line-height: 1.35;
  color: var(--text);
}

.form-group--checkbox,
.form-group--stock-service-check {
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .integration-stock-service-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Filters ─── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.filter-bar .form-group { min-width: 160px; }

.filter-bar__page-size {
  min-width: 130px;
}

.filter-bar__page-size .form-select {
  min-width: 110px;
}

/* ─── Alerts ─── */
.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.alert-info { background: var(--accent-soft); color: #0e7490; border: 1px solid rgba(6, 182, 212, 0.2); }
.alert-success { background: var(--success-soft); color: #047857; border: 1px solid rgba(16, 185, 129, 0.2); }
.alert-warning { background: var(--warning-soft); color: #b45309; border: 1px solid rgba(245, 158, 11, 0.2); }
.alert-danger { background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }

.alert-dismissible { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }

.alert-close {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: inherit;
  opacity: 0.6;
  padding: 0;
  font-family: inherit;
}

.alert-close:hover { opacity: 1; }

/* ─── Subnav ─── */
.subnav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.subnav-link {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
}

.subnav-link:hover { border-color: var(--primary); color: var(--primary); }
.subnav-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ─── Paged list (pagination) ─── */
.paged-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.paged-list-page-size {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.35rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.82rem;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.04));
}

.paged-list-page-size .form-label {
  margin: 0;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.paged-list-page-size select {
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  padding: 0.15rem 1.25rem 0.15rem 0.25rem;
  cursor: pointer;
  min-width: 4.5rem;
  outline: none;
}

.paged-list-footer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.paged-list-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.paged-list-nav__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  height: 2.35rem;
  padding: 0 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: all var(--transition);
  line-height: 1;
}

.paged-list-nav__btn:hover:not(.is-disabled):not(.is-active) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.paged-list-nav__btn.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.paged-list-nav__btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: default;
}

.paged-list-nav__pages {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.paged-list-nav__ellipsis {
  color: var(--text-light);
  padding: 0 0.15rem;
  user-select: none;
  line-height: 1;
}

.paged-list-summary {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0.75rem 0 0;
}

/* ─── Operations ─── */
.operations-page {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.operations-toolbar-card {
  display: grid;
  gap: 0.9rem;
}

.operations-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.75rem;
}

.operations-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.operations-btn-group--media {
  justify-content: flex-start;
}

.operations-action-btn--media {
  min-width: 9rem;
}

.operations-runtime-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.operations-runtime-item {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  min-width: 0;
}

.operations-runtime-item--wide {
  grid-column: span 2;
}

.operations-runtime-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.operations-runtime-item strong {
  display: block;
  font-size: 0.83rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.operations-grid-card {
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
}

.operations-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: auto;
  max-height: 32rem;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
}

.operations-table {
  margin-bottom: 0;
  table-layout: auto;
  width: max-content;
  min-width: 100%;
}

.operations-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg);
}

.operations-table tbody tr:nth-child(odd) {
  background: #f8f9fa;
}

.operations-table tbody tr:nth-child(even) {
  background: #fff;
}

.operations-table tbody tr:hover {
  background: rgba(79, 70, 229, 0.08);
}

.operations-table tbody tr.is-selected {
  background: rgba(79, 70, 229, 0.12);
}

.operations-table th,
.operations-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.operations-table--products th {
  white-space: nowrap;
  min-width: 8.5rem;
}

.operations-table--products td {
  white-space: nowrap;
  min-width: 8.5rem;
}

.operations-table .table-check {
  min-width: 3rem;
  width: 3rem;
  overflow: visible;
  text-overflow: clip;
}

.operations-table .operations-col-name {
  width: 10%;
  min-width: 7.5rem;
  padding-left: 0.6rem;
}

.operations-table .operations-col-product-code {
  width: 16%;
  min-width: 18rem;
  padding-right: 0.6rem;
  overflow: visible;
  text-overflow: clip;
}

.operations-table .operations-col-features {
  width: 8%;
  min-width: 6rem;
}

.operations-table .operations-col-notes {
  width: 16%;
  min-width: 12rem;
}

.operations-grid-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.8rem 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--surface);
}

.operations-progress {
  color: var(--primary);
  font-weight: 600;
}

.operations-progress--banner {
  width: 100%;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 0.875rem;
  line-height: 1.45;
  word-break: break-word;
}

.operations-progress--banner:empty {
  display: none;
}

.operations-action-btn.is-loading {
  opacity: 0.65;
}

.operations-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.operations-modal-open {
  overflow: hidden;
}

.operations-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.operations-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.operations-modal__dialog {
  position: relative;
  width: min(34rem, calc(100% - 2rem));
  margin: 10vh auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.operations-modal__header {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
}

.operations-modal__header h2 {
  margin: 0;
  font-size: 1rem;
}

.operations-modal__body {
  display: grid;
  gap: 0.6rem;
  padding: 1rem;
}

.operations-modal__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  font-size: 0.86rem;
}

.operations-modal__row span {
  color: var(--text-muted);
}

.operations-modal__row strong {
  color: var(--text);
}

.operations-modal__summary {
  margin: 0.25rem 0 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.operations-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* ─── Order detail ─── */
.order-detail {
  display: none;
  margin: 0 1rem 1rem;
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.order-detail.is-open {
  display: block;
}

.order-detail-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.order-master-row.expanded {
  background: color-mix(in srgb, var(--primary) 4%, var(--surface));
}

.order-detail-table {
  margin: 0;
  width: 100%;
  font-size: 0.875rem;
}

.order-detail-table thead th {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.order-detail-table tbody td {
  padding: 0.55rem 0.75rem;
  vertical-align: top;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.order-detail-table tbody tr:last-child td {
  border-bottom: none;
}

/* ─── Service cards ─── */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

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

.service-card-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition);
}

.toggle.on { background: var(--success); }

.toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: var(--shadow-sm);
}

.toggle.on::after { transform: translateX(20px); }

/* ─── Auth split layout ─── */
.layout-auth {
  min-height: 100vh;
  display: flex;
}

.auth-visual {
  flex: 1;
  background: var(--sidebar-bg);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem;
  overflow: hidden;
}

.auth-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(79, 70, 229, 0.35) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(6, 182, 212, 0.25) 0%, transparent 55%);
}

.auth-visual-content {
  position: relative;
  z-index: 1;
  max-width: 420px;
}

.auth-visual-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.5rem;
}

.auth-visual-logo span {
  background: var(--sidebar-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-visual h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.auth-visual p {
  color: var(--sidebar-text);
  font-size: 1rem;
  line-height: 1.6;
}

.auth-features {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--sidebar-text);
  font-size: 0.9rem;
}

.auth-feature-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}

.auth-panel {
  width: 480px;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.auth-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.auth-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}

.auth-input-wrap .form-input { padding-left: 2.5rem; }

.auth-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0.75rem 0 1.25rem;
  font-size: 0.85rem;
}

.auth-submit { width: 100%; padding: 0.7rem; }

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.auth-back:hover { color: var(--primary); }

/* ─── Hub index ─── */
.layout-hub {
  min-height: 100vh;
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  padding: 2rem;
}

.hub-container { max-width: 960px; margin: 0 auto; }

.hub-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-top: 1rem;
}

.hub-logo {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.hub-logo span {
  background: var(--sidebar-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hub-desc {
  color: var(--sidebar-text);
  font-size: 0.95rem;
}

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

.hub-section-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sidebar-muted);
  margin-bottom: 0.75rem;
  padding-left: 0.25rem;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.65rem;
}

.hub-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: #e2e8f0;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
}

.hub-link:hover {
  background: rgba(79, 70, 229, 0.2);
  border-color: rgba(79, 70, 229, 0.4);
  color: #fff;
  transform: translateY(-1px);
}

.hub-link-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sidebar-accent);
  flex-shrink: 0;
}

/* ─── Utilities ─── */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.text-center { text-align: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 150;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .auth-visual { display: none; }
  .auth-panel { width: 100%; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open { display: block; }

  .main-wrap { margin-left: 0; }
  .menu-toggle { display: flex; }
  .content { padding: 1rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }

  .operations-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .operations-btn-group--media {
    justify-content: flex-start;
  }

  .operations-runtime-info {
    grid-template-columns: 1fr;
  }

  .operations-runtime-item--wide {
    grid-column: auto;
  }

  .operations-table thead,
  .operations-table tbody,
  .operations-table tbody tr {
    display: initial;
  }

  .operations-table thead {
    display: table-header-group;
  }

  .operations-table tbody {
    display: table-row-group;
  }

  .operations-table tbody tr {
    display: table-row;
  }

  .operations-table tbody {
    max-height: none;
    overflow: visible;
  }
}

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