:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-deep: #1e1b4b;
  --panel: rgba(15, 23, 42, 0.58);
  --panel-strong: rgba(30, 27, 75, 0.62);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(34, 211, 238, 0.32);
  --text: #e5eefb;
  --muted: #aab6ca;
  --cyan: #22d3ee;
  --teal: #2dd4bf;
  --amber: #f59e0b;
  --danger: #fb7185;
  --success: #34d399;
  --radius: 16px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  direction: rtl;
  font-family: "Cairo", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(34, 211, 238, 0.14), transparent 28rem),
    radial-gradient(circle at 82% 18%, rgba(245, 158, 11, 0.10), transparent 25rem),
    linear-gradient(145deg, var(--bg), var(--bg-deep) 52%, #07111f);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 82%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.ambient {
  position: fixed;
  inset: auto 0 0 auto;
  width: 42vw;
  height: 42vw;
  pointer-events: none;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.10), transparent 66%);
  filter: blur(12px);
  z-index: -1;
}

.sidebar {
  position: fixed;
  top: 18px;
  bottom: 18px;
  right: 18px;
  width: 240px;
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  margin-bottom: 24px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #06131f;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--teal), var(--amber));
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.25);
}

.brand-title,
.gradient-text {
  color: transparent;
  background: linear-gradient(90deg, var(--cyan), var(--teal), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
}

.brand-title {
  font-size: 1.55rem;
  font-weight: 800;
}

.nav-list {
  display: grid;
  gap: 10px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--muted);
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.nav-item:hover,
.nav-item.active {
  transform: translateX(-3px);
  color: var(--text);
  border-color: var(--line-strong);
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.18), rgba(45, 212, 191, 0.06));
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.10);
}

.nav-item.active::after {
  position: absolute;
  inset: 10px auto 10px -1px;
  width: 3px;
  content: "";
  border-radius: 99px;
  background: var(--cyan);
}

.nav-sub {
  min-height: 42px;
  margin-right: 20px;
  padding-right: 12px;
  font-size: 0.92rem;
  opacity: 0.85;
  border-right: 1px solid rgba(148, 163, 184, 0.18);
}

.nav-sub b {
  font-weight: 600;
}

.nav-sub:hover,
.nav-sub.active {
  transform: translateX(-2px);
  opacity: 1;
  border-color: rgba(34, 211, 238, 0.22);
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.11), rgba(45, 212, 191, 0.04));
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.06);
}

.nav-sub.active::after {
  inset: 11px auto 11px -1px;
  background: rgba(34, 211, 238, 0.72);
}

.sidebar-note {
  margin: auto 4px 0;
  color: rgba(226, 232, 240, 0.5);
  font-size: 0.82rem;
  line-height: 1.8;
}

.main-shell {
  min-height: 100vh;
  padding: 24px 288px 24px 24px;
}

.view-shell {
  max-width: 1220px;
  margin: 0 auto;
  animation: fadeIn 0.35s ease both;
}

.page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.page-title {
  margin: 0 0 4px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.18;
  font-weight: 800;
}

.page-subtitle {
  margin: 0;
  color: var(--muted);
}

.grid-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.glass-card,
.table-panel,
.filter-bar,
.modal-card,
.product-card,
.customer-history {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(15, 23, 42, 0.46));
  backdrop-filter: blur(20px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.glass-card,
.product-card {
  position: relative;
  overflow: hidden;
  min-height: 142px;
  padding: 18px;
  border-radius: var(--radius);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  animation: slideUp 0.5s ease both;
}

.glass-card::before,
.product-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, var(--cyan), var(--teal), var(--amber));
}

.glass-card:hover,
.product-card:hover {
  transform: scale(1.02);
  border-color: var(--line-strong);
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.18), 0 22px 60px rgba(0, 0, 0, 0.28);
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stat-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.18);
}

.stat-label {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.stat-number {
  margin: 14px 0 0;
  font-size: 2.1rem;
  font-weight: 800;
  animation: pulse 1.2s ease both;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border-radius: var(--radius);
}

.field {
  display: grid;
  gap: 7px;
  min-width: 180px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.field.grow {
  flex: 1 1 260px;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  color: var(--text);
  outline: 0;
  background: rgba(2, 6, 23, 0.36);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.input,
.select {
  padding: 0 12px;
}

.textarea {
  min-height: 92px;
  padding: 10px 12px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.10);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 12px;
  color: #06131f;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  box-shadow: 0 12px 28px rgba(34, 211, 238, 0.18);
  transition: transform 0.25s ease, filter 0.25s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.btn.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.btn.warn {
  color: #1f1300;
  border-color: rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, var(--amber), #fbbf24);
}

.table-panel {
  overflow: hidden;
  border-radius: var(--radius);
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-title h2 {
  margin: 0;
  font-size: 1.12rem;
}

.loading-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 18px var(--cyan);
  opacity: 0;
}

.loading-dot.active {
  opacity: 1;
  animation: pulse 0.9s ease infinite;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 14px 16px;
  text-align: right;
  border-bottom: 1px solid rgba(148, 163, 184, 0.11);
}

th {
  color: var(--muted);
  font-size: 0.82rem;
}

tbody tr {
  transition: background 0.25s ease;
}

tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.025);
}

tbody tr.clickable:hover {
  background: rgba(34, 211, 238, 0.08);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  background: rgba(148, 163, 184, 0.12);
}

.badge::before {
  width: 8px;
  height: 8px;
  content: "";
  border-radius: 999px;
  background: currentColor;
}

.badge.pending { color: var(--amber); border-color: rgba(245, 158, 11, 0.26); background: rgba(245, 158, 11, 0.10); }
.badge.in_progress { color: var(--cyan); border-color: rgba(34, 211, 238, 0.28); background: rgba(34, 211, 238, 0.10); }
.badge.completed { color: var(--success); border-color: rgba(52, 211, 153, 0.26); background: rgba(52, 211, 153, 0.10); }
.badge.delivered { color: #c084fc; border-color: rgba(192, 132, 252, 0.28); background: rgba(192, 132, 252, 0.10); }
.badge.cancelled { color: var(--danger); border-color: rgba(251, 113, 133, 0.26); background: rgba(251, 113, 133, 0.10); }

.status-select {
  width: 146px;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.62);
}

.production-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.production-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.production-tab::after {
  position: absolute;
  right: 18px;
  left: 18px;
  bottom: -5px;
  height: 2px;
  content: "";
  border-radius: 999px;
}

.production-tab:hover {
  transform: translateY(-2px);
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.06);
}

.production-tab[data-production-tab="pending"]:hover {
  border-color: rgba(217, 165, 32, 0.4);
  background: rgba(245, 158, 11, 0.15);
}

.production-tab[data-production-tab="in_progress"]:hover {
  border-color: rgba(14, 116, 144, 0.4);
  background: rgba(56, 189, 248, 0.15);
}

.production-tab[data-production-tab="completed"]:hover {
  border-color: rgba(21, 128, 61, 0.4);
  background: rgba(74, 222, 128, 0.15);
}

.production-tab[data-production-tab="delivered"]:hover {
  border-color: rgba(126, 34, 206, 0.4);
  background: rgba(192, 132, 252, 0.15);
}

.production-tab[data-production-tab="pending"].active {
  color: #3d2e00;
  background: linear-gradient(135deg, #f8c84a, #eab308);
  border-color: rgba(217, 165, 32, 0.7);
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.35);
}

.production-tab[data-production-tab="pending"].active::after {
  background: #f59e0b;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.50);
}

.production-tab[data-production-tab="in_progress"].active {
  color: #082f49;
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  border-color: rgba(14, 116, 144, 0.7);
  box-shadow: 0 12px 28px rgba(56, 189, 248, 0.35);
}

.production-tab[data-production-tab="in_progress"].active::after {
  background: #0ea5e9;
  box-shadow: 0 0 16px rgba(14, 165, 233, 0.50);
}

.production-tab[data-production-tab="completed"].active {
  color: #052e16;
  background: linear-gradient(135deg, #4ade80, #16a34a);
  border-color: rgba(21, 128, 61, 0.7);
  box-shadow: 0 12px 28px rgba(74, 222, 128, 0.35);
}

.production-tab[data-production-tab="completed"].active::after {
  background: #22c55e;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.50);
}

.production-tab[data-production-tab="delivered"].active {
  color: #1a0533;
  background: linear-gradient(135deg, #c084fc, #9333ea);
  border-color: rgba(126, 34, 206, 0.7);
  box-shadow: 0 12px 28px rgba(192, 132, 252, 0.35);
}

.production-tab[data-production-tab="delivered"].active::after {
  background: #a855f7;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.50);
}

.sticky-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  align-items: start;
  padding: 10px;
}

.sticky-grid .empty-state {
  grid-column: 1 / -1;
}

.sticky-note {
  --note-bg: linear-gradient(155deg, #fff4aa, #fde68a 58%, #facc15);
  --note-border: rgba(217, 165, 32, 0.35);
  --note-pin: linear-gradient(135deg, #fb7185, #be123c);
  --rotate: 0deg;
  position: relative;
  min-height: 200px;
  padding: 14px 12px 12px;
  border: 1.5px solid var(--note-border);
  border-radius: 1px 1px 6px 6px;
  color: #172033;
  background: var(--note-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 2px 1px -1px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.08);
  transform: rotate(var(--rotate, 0deg));
  transform-origin: 50% 12px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: fadeIn 0.35s ease both;
}

.sticky-note:nth-child(odd) { --rotate: -0.8deg; }
.sticky-note:nth-child(even) { --rotate: 0.6deg; }
.sticky-note:nth-child(3n) { --rotate: 0.9deg; }
.sticky-note:nth-child(5n) { --rotate: -0.4deg; }

.sticky-note:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 3px 2px -1px rgba(0, 0, 0, 0.10), 0 12px 22px rgba(0, 0, 0, 0.18), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.sticky-note.pending {
  --note-bg: linear-gradient(155deg, #fff7bc, #fde68a 58%, #f8c84a);
  --note-border: rgba(217, 165, 32, 0.35);
}

.sticky-note.in_progress {
  --note-bg: linear-gradient(155deg, #dff7ff, #bae6fd 58%, #7dd3fc);
  --note-border: rgba(14, 116, 144, 0.28);
  --note-pin: linear-gradient(135deg, #38bdf8, #0369a1);
}

.sticky-note.completed {
  --note-bg: linear-gradient(155deg, #dcfce7, #bbf7d0 58%, #86efac);
  --note-border: rgba(21, 128, 61, 0.25);
  --note-pin: linear-gradient(135deg, #34d399, #15803d);
}

.sticky-note.delivered {
  --note-bg: linear-gradient(155deg, #f3e8ff, #e9d5ff 58%, #d8b4fe);
  --note-border: rgba(126, 34, 206, 0.25);
  --note-pin: linear-gradient(135deg, #c084fc, #7e22ce);
}

.sticky-note.delayed {
  border-color: rgba(251, 146, 60, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 0 8px rgba(251, 146, 60, 0.08), 0 2px 1px -1px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.08);
  --note-pin: linear-gradient(135deg, #fb923c, #dc2626);
}

.sticky-note.completed-today {
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 2px 1px -1px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.sticky-pin {
  position: absolute;
  top: 5px;
  right: 50%;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--note-pin);
  box-shadow: inset -2px -2px 4px rgba(0, 0, 0, 0.18), 0 3px 8px rgba(15, 23, 42, 0.28);
  transform: translateX(50%);
}

.sticky-pin::after {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 4px;
  height: 4px;
  content: "";
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.production-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}

.sticky-note h3 {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #111827;
}

.production-order-id {
  margin: 0;
  color: rgba(15, 23, 42, 0.66);
  font-size: 0.72rem;
  font-weight: 800;
}

.production-alert,
.production-done {
  display: grid;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.production-alert {
  color: #1f1300;
  background: var(--amber);
}

.production-done {
  color: #052e1e;
  background: var(--success);
}

.production-items {
  display: grid;
  gap: 4px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.production-items li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(15, 23, 42, 0.76);
  font-size: 0.8rem;
}

.production-items li span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.production-items li b {
  color: #111827;
}

.production-items-empty {
  margin: 0 0 12px;
  color: rgba(15, 23, 42, 0.64);
  font-size: 0.86rem;
}

.production-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 8px 0;
  padding-top: 8px;
  border-top: 1px solid rgba(15, 23, 42, 0.14);
}

.production-meta span {
  color: #075985;
  font-size: 0.82rem;
  font-weight: 800;
}

.production-meta time {
  color: rgba(15, 23, 42, 0.66);
  font-size: 0.72rem;
}

.production-card-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.sticky-note .btn {
  min-height: 32px;
  border-radius: 8px;
}

.production-select {
  width: 100%;
  min-height: 32px;
  padding: 0 8px;
  color: #172033;
  border-color: rgba(15, 23, 42, 0.18);
  background: rgba(255, 255, 255, 0.58);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.product-art {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  margin: 0 0 16px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(245, 158, 11, 0.14));
}

.product-art span {
  font-size: 2rem;
}

.product-card h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.price {
  margin: 12px 0 0;
  color: var(--cyan);
  font-size: 1.45rem;
  font-weight: 800;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.switch input {
  width: 42px;
  height: 24px;
  appearance: none;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.28);
  position: relative;
  transition: background 0.25s ease;
}

.switch input::after {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  content: "";
  border-radius: 999px;
  background: #fff;
  transition: transform 0.25s ease;
}

.switch input:checked {
  background: linear-gradient(90deg, var(--cyan), var(--teal));
}

.switch input:checked::after {
  transform: translateX(-18px);
}

.modal-root {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(2, 6, 23, 0.68);
  backdrop-filter: blur(10px);
  z-index: 30;
}

.modal-root.open {
  display: flex;
}

.modal-card {
  width: min(760px, 100%);
  max-height: min(86vh, 900px);
  overflow: auto;
  padding: 18px;
  border-radius: 18px;
  animation: slideUp 0.28s ease both;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.modal-head h2 {
  margin: 0;
}

.close-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.items-list {
  display: grid;
  gap: 10px;
}

.item-row {
  display: grid;
  grid-template-columns: 1fr 90px 44px;
  gap: 8px;
}

.customer-history {
  margin-top: 10px;
  padding: 14px;
  border-radius: 14px;
}

.toast {
  position: fixed;
  top: 20px;
  left: 24px;
  z-index: 40;
  max-width: min(360px, calc(100vw - 48px));
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.84);
  box-shadow: var(--shadow);
  transform: translateY(-16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.empty-state {
  padding: 26px;
  color: var(--muted);
  text-align: center;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 0 rgba(34, 211, 238, 0)); }
  50% { opacity: 0.78; filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.35)); }
}

@media (max-width: 1080px) {
  .grid-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sticky-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .sidebar {
    top: auto;
    right: 10px;
    left: 10px;
    bottom: 10px;
    width: auto;
    height: 72px;
    flex-direction: row;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
  }

  .brand,
  .sidebar-note {
    display: none;
  }

  .nav-list {
    grid-template-columns: repeat(6, 1fr);
    width: 100%;
    gap: 6px;
  }

  .nav-item {
    min-height: 52px;
    justify-content: center;
    padding: 0 6px;
  }

  .nav-sub {
    min-height: 52px;
    margin-right: 0;
    padding: 0 6px;
    font-size: 1rem;
    border-right: 0;
  }

  .nav-item b {
    display: none;
  }

  .nav-item.active::after {
    inset: auto 18px -1px;
    width: auto;
    height: 3px;
  }

  .main-shell {
    padding: 18px 14px 102px;
  }

  .page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .grid-stats,
  .form-grid,
  .sticky-grid {
    grid-template-columns: 1fr;
  }

  .table-wrap table {
    min-width: 640px;
  }

  .field {
    min-width: 100%;
  }
}
