:root {
  --bg: #07131f;
  --bg-soft: #0d1b2a;
  --surface: rgba(10, 21, 35, 0.88);
  --surface-strong: rgba(15, 28, 48, 0.98);
  --surface-lite: rgba(255, 255, 255, 0.06);
  --text: #f8fbff;
  --muted: #aebfd2;
  --accent: #e67e22;
  --accent-soft: #ffd08a;
  --line: rgba(167, 184, 204, 0.18);
  --shadow: 0 30px 80px rgba(2, 8, 23, 0.34);
  font-family: "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.24), transparent 20%),
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 24%),
    linear-gradient(180deg, #04070d 0%, #000000 100%);
}

.hidden { display: none !important; }
.push-top { margin-top: 20px; }
.muted, .help, .brand p { color: var(--muted); margin: 0; }

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 20% 15%, rgba(249, 115, 22, 0.15), transparent 22%),
    radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.14), transparent 24%),
    linear-gradient(180deg, #02050a 0%, #000000 100%);
}

.login-card, .panel, .card, .notice, .modal-card, .summary-card, .status-card {
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  box-shadow: var(--shadow);
}

.login-card {
  width: min(100%, 430px);
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at top left, rgba(255, 208, 138, 0.11), transparent 20%),
    radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.1), transparent 24%),
    linear-gradient(180deg, rgba(11, 22, 38, 0.98), rgba(6, 14, 26, 0.98));
}

.login-card--compact {
  position: relative;
  overflow: hidden;
}

.login-card--compact::before {
  content: "";
  position: absolute;
  inset: auto auto -120px -120px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.18), transparent 70%);
  filter: blur(10px);
}

.login-card__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.login-card__brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #fb7185);
  box-shadow: 0 16px 34px rgba(249, 115, 22, 0.22);
}

.login-card h1 {
  margin: 2px 0 0;
  font-size: clamp(1.8rem, 6vw, 2.35rem);
  line-height: 1.1;
}

.login-card__intro {
  margin-top: 16px;
  line-height: 1.85;
  position: relative;
  z-index: 1;
}

.login-actions {
  justify-content: stretch;
  position: relative;
  z-index: 1;
}

#login-error {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(127, 29, 29, 0.22);
  border: 1px solid rgba(248, 113, 113, 0.24);
  color: #ffd1d1;
}

.login-actions .button-primary {
  width: 100%;
  min-height: 52px;
  padding-inline: 24px;
}

.password-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.password-field input {
  min-width: 0;
}

.password-toggle {
  width: auto;
  min-width: 92px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 208, 138, 0.18);
  color: var(--accent-soft);
}

.password-toggle:hover {
  background: rgba(255, 208, 138, 0.1);
}

.layout { min-height: 100vh; display: grid; grid-template-columns: 300px 1fr; }
.sidebar {
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(9, 18, 32, 0.98), rgba(5, 12, 24, 0.96)),
    radial-gradient(circle at top, rgba(249, 115, 22, 0.18), transparent 35%);
  border-left: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, #f97316, #fb7185);
  box-shadow: 0 16px 36px rgba(249, 115, 22, 0.22);
}

.nav { display: grid; gap: 10px; }
.nav button,
.button,
input,
select,
textarea {
  width: 100%;
  text-align: right;
  color: var(--text);
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(246, 249, 252, 0.08);
  border: 1px solid var(--line);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(249, 115, 22, 0.42);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

select,
option {
  background: #16263b;
  color: #f8fbff;
}

.nav button, .button { cursor: pointer; }
.nav button.active {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.22), rgba(59, 130, 246, 0.14));
  border-color: rgba(249, 115, 22, 0.34);
}

.content { padding: 24px; }
.topbar, .panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.topbar { margin-bottom: 22px; }
.topbar h1, .panel h3, .card h4, .login-card h1 { margin: 0; }
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.panel-head-stack { align-items: flex-start; }
.orders-head {
  align-items: flex-start;
  margin-bottom: 18px;
}
.orders-head__actions {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex-wrap: wrap;
  margin-inline-end: auto;
  margin-inline-start: 0;
}

.orders-head__actions--wide {
  width: 100%;
}

.orders-head__title {
  min-width: 220px;
}

.expenses-head-copy {
  justify-content: flex-end;
  width: 100%;
}

.operator-strip,
.payment-method-strip {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.operator-card,
.payment-filter-card {
  border-radius: 20px;
  border: 1px solid rgba(255, 208, 138, 0.16);
  background: linear-gradient(180deg, rgba(18, 31, 50, 0.98), rgba(9, 19, 34, 0.98));
  box-shadow: 0 18px 40px rgba(2, 8, 23, 0.24);
}

.operator-card {
  padding: 16px 18px;
}

.operator-card span,
.payment-filter-card span {
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}

.operator-card strong,
.payment-filter-card strong {
  color: var(--text);
}

.operator-card p {
  margin: 6px 0 0;
  color: var(--accent-soft);
}

.payment-method-strip {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.payment-filter-card {
  padding: 14px 16px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.payment-filter-card:hover,
.payment-filter-card.is-active {
  transform: translateY(-2px);
  border-color: rgba(255, 208, 138, 0.36);
  box-shadow: 0 22px 42px rgba(230, 126, 34, 0.16);
}
.button { width: auto; display: inline-flex; align-items: center; justify-content: center; }
.button-primary { background: linear-gradient(135deg, #f97316, #fb7185); color: white; }
.slim-button { padding: 8px 12px; border-radius: 12px; font-size: .92rem; }
.danger-button {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.28);
  color: #ffd6d6;
}
.danger-button:hover {
  background: rgba(220, 38, 38, 0.18);
}
.table-link { color: var(--accent-soft); text-decoration: none; }
.eyebrow { display: inline-block; color: var(--accent-soft); font-size: .84rem; letter-spacing: .12em; margin-bottom: 10px; font-weight: 700; }

.dashboard-shell,
.dashboard-grid,
.summary-grid,
.status-cards,
.cards-grid,
.form-grid { display: grid; gap: 16px; }
.dashboard-shortcuts { margin-bottom: 18px; }
.dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.status-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; }
.summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 18px; }
.cards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel { padding: 20px; }

.dashboard-hero {
  margin-bottom: 18px;
  background:
    radial-gradient(circle at top right, rgba(255, 208, 138, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(18, 31, 50, 0.98), rgba(9, 19, 34, 0.98));
}

.dashboard-profile-card,
.profile-badge {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dashboard-profile-card {
  justify-content: space-between;
  flex-wrap: wrap;
}

.dashboard-profile-card__intro,
.dashboard-profile-card__stats {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.dashboard-profile-card__stats div {
  min-width: 140px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 208, 138, 0.14);
}

.dashboard-profile-card__stats span,
.profile-meta span,
.profile-meta small {
  display: block;
  color: var(--muted);
}

.profile-meta strong {
  display: block;
  color: var(--text);
  font-size: 1.04rem;
  margin-bottom: 4px;
}

.profile-avatar {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.32), rgba(59, 130, 246, 0.22));
  border: 1px solid rgba(255, 208, 138, 0.2);
  box-shadow: 0 14px 30px rgba(2, 8, 23, 0.22);
}

.profile-avatar--large {
  width: 72px;
  height: 72px;
  border-radius: 22px;
}

.profile-avatar__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar__fallback {
  font-weight: 800;
  color: var(--accent-soft);
  letter-spacing: 0.08em;
}

.status-card,
.summary-card,
.card,
.notice,
.modal-card { padding: 18px; }

.dashboard-shortcut {
  width: 100%;
  text-align: right;
  display: grid;
  gap: 8px;
  justify-items: start;
  background:
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(15, 32, 58, 0.98), rgba(9, 18, 34, 0.98));
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-shortcut:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 46px rgba(59, 130, 246, 0.16);
}

.orders-action-card {
  width: 168px;
  min-height: 78px;
  display: grid;
  gap: 6px;
  align-content: center;
  text-align: center;
  justify-items: center;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(20, 33, 52, 0.98), rgba(11, 21, 35, 0.98));
  border: 1px solid rgba(182, 196, 215, 0.16);
  box-shadow: 0 18px 40px rgba(2, 8, 23, 0.34);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.orders-action-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.orders-action-card strong {
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.5;
}

.orders-status-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
  gap: 10px;
  flex: 1;
}

.orders-mini-card {
  min-height: 78px;
  border-radius: 18px;
  padding: 12px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  background:
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(15, 32, 58, 0.96), rgba(9, 18, 34, 0.98));
  border: 1px solid rgba(96, 165, 250, 0.18);
  box-shadow: 0 18px 40px rgba(8, 15, 28, 0.22);
}

.orders-mini-card span {
  color: #c8daf9;
  font-size: 0.88rem;
}

.orders-mini-card strong {
  color: #ffffff;
  font-size: 1.1rem;
}

.orders-add-card {
  background: linear-gradient(135deg, rgba(230, 126, 34, 0.34), rgba(201, 90, 32, 0.24));
  border-color: rgba(230, 126, 34, 0.38);
}

.orders-add-card:hover,
.orders-add-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 24px 54px rgba(230, 126, 34, 0.24);
  border-color: rgba(255, 208, 138, 0.46);
}

.orders-add-card:active {
  transform: translateY(1px) scale(0.985);
  background: linear-gradient(135deg, rgba(255, 165, 82, 0.34), rgba(232, 114, 54, 0.28));
}

.expense-top-card {
  background:
    radial-gradient(circle at top right, rgba(255, 208, 138, 0.14), transparent 26%),
    linear-gradient(180deg, rgba(18, 31, 50, 0.98), rgba(9, 19, 34, 0.98));
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.expense-top-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(230, 126, 34, 0.18);
}

.cashbox-top-card {
  background:
    radial-gradient(circle at top right, rgba(133, 217, 255, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(18, 31, 50, 0.98), rgba(9, 19, 34, 0.98));
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  min-height: 112px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  padding: 14px;
}

.cashbox-top-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(59, 130, 246, 0.16);
}

.cashbox-top-card h4 {
  margin: 6px 0 0;
  font-size: 1rem;
  line-height: 1.4;
  position: relative;
  z-index: 1;
}

.cashbox-top-card .card-chip {
  position: relative;
  z-index: 1;
  margin-bottom: 4px;
}

.cashbox-top-card__orb {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  position: absolute;
  top: 12px;
  left: 12px;
  background:
    radial-gradient(circle at 35% 35%, rgba(255,255,255,0.72), transparent 28%),
    linear-gradient(135deg, rgba(255, 208, 138, 0.85), rgba(230, 126, 34, 0.9));
  box-shadow: 0 10px 22px rgba(230, 126, 34, 0.22);
  animation: floatOrb 3.4s ease-in-out infinite;
}

.cashbox-top-card--client {
  background:
    radial-gradient(circle at top right, rgba(255, 208, 138, 0.18), transparent 26%),
    linear-gradient(180deg, rgba(45, 30, 18, 0.98), rgba(24, 16, 10, 0.98));
  box-shadow: 0 18px 44px rgba(230, 126, 34, 0.16);
}

.cashbox-top-card--store {
  background:
    radial-gradient(circle at top right, rgba(133, 217, 255, 0.18), transparent 26%),
    linear-gradient(180deg, rgba(11, 30, 45, 0.98), rgba(8, 18, 28, 0.98));
  box-shadow: 0 18px 44px rgba(59, 130, 246, 0.16);
}

.cashbox-top-card--shipping,
.cashbox-top-card--delivery {
  background:
    radial-gradient(circle at top right, rgba(142, 240, 181, 0.16), transparent 26%),
    linear-gradient(180deg, rgba(11, 35, 30, 0.98), rgba(7, 19, 18, 0.98));
  box-shadow: 0 18px 44px rgba(34, 197, 94, 0.14);
}

.cashbox-top-card--vip .cashbox-top-card__orb {
  background:
    radial-gradient(circle at 35% 35%, rgba(255,255,255,0.78), transparent 28%),
    linear-gradient(135deg, rgba(255, 214, 102, 0.9), rgba(245, 158, 11, 0.95));
}

.cashbox-top-card--gold .cashbox-top-card__orb {
  background:
    radial-gradient(circle at 35% 35%, rgba(255,255,255,0.76), transparent 28%),
    linear-gradient(135deg, rgba(255, 232, 147, 0.92), rgba(234, 179, 8, 0.95));
}

.cashbox-top-card--premium .cashbox-top-card__orb {
  background:
    radial-gradient(circle at 35% 35%, rgba(255,255,255,0.72), transparent 28%),
    linear-gradient(135deg, rgba(133, 217, 255, 0.92), rgba(59, 130, 246, 0.95));
}

.cashbox-top-card--good .cashbox-top-card__orb {
  background:
    radial-gradient(circle at 35% 35%, rgba(255,255,255,0.72), transparent 28%),
    linear-gradient(135deg, rgba(142, 240, 181, 0.92), rgba(34, 197, 94, 0.95));
}

.cashbox-top-card--challenger .cashbox-top-card__orb {
  background:
    radial-gradient(circle at 35% 35%, rgba(255,255,255,0.72), transparent 28%),
    linear-gradient(135deg, rgba(251, 146, 60, 0.92), rgba(239, 68, 68, 0.95));
}

.cashbox-top-card--shipping .cashbox-top-card__orb,
.cashbox-top-card--delivery .cashbox-top-card__orb {
  background:
    radial-gradient(circle at 35% 35%, rgba(255,255,255,0.72), transparent 28%),
    linear-gradient(135deg, rgba(110, 231, 183, 0.92), rgba(16, 185, 129, 0.95));
}

#cashbox-top-cards {
  margin-top: 18px;
}

@keyframes floatOrb {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-4px) scale(1.03); }
}

.modal-head {
  margin-bottom: 18px;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-title__icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: inline-block;
  background:
    radial-gradient(circle at 35% 35%, rgba(255,255,255,0.42), transparent 24%),
    linear-gradient(135deg, rgba(255, 208, 138, 0.78), rgba(230, 126, 34, 0.9));
  box-shadow: 0 16px 34px rgba(230, 126, 34, 0.2);
}

.status-card span,
.summary-card span {
  color: var(--muted);
  display: block;
  margin-bottom: 10px;
}

.status-card strong,
.summary-card strong,
.card strong {
  font-size: 1.5rem;
  color: var(--accent-soft);
}

.summary-card--accent strong { color: #ffd08a; }
.summary-card--success strong { color: #8ef0b5; }
.summary-card--info strong { color: #85d9ff; }
.summary-card--violet strong { color: #c7b5ff; }

.list { display: grid; gap: 12px; }
.list-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.badge,
.status-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.status-select {
  min-width: 150px;
  width: auto;
  padding-inline: 16px;
}

.table-wrap { overflow: auto; border-radius: 18px; }
.table-wrap#orders-table-wrap {
  max-height: 72vh;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(5, 12, 22, 0.42);
}
.table-wrap#expenses-table-wrap {
  max-height: 68vh;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background:
    radial-gradient(circle at top left, rgba(255, 208, 138, 0.08), transparent 30%),
    rgba(5, 12, 22, 0.42);
}
.table-wrap#cashbox-table-wrap {
  max-height: 70vh;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background:
    radial-gradient(circle at top left, rgba(133, 217, 255, 0.08), transparent 30%),
    rgba(5, 12, 22, 0.42);
}
.table-scroll#cashbox-top-scroll {
  margin-bottom: 10px;
}
.table-scroll { overflow: auto; height: 14px; margin-bottom: 8px; }
.table-scroll div { height: 1px; }
html {
  scroll-behavior: smooth;
}
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 208, 138, 0.55) rgba(255, 255, 255, 0.06);
}
*::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}
*::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 208, 138, 0.6), rgba(230, 126, 34, 0.7));
  border-radius: 999px;
}
table { width: 100%; min-width: 1800px; border-collapse: collapse; }
.compact-table { min-width: 900px; }
.expenses-table { min-width: 1120px; }
.cashbox-table { min-width: 1100px; }

#orders table {
  min-width: 1680px;
}

#clients .compact-table,
#shipping-companies .compact-table,
#inventory .compact-table,
#stores .compact-table,
#delivery-agents .compact-table,
#employees .compact-table,
#users .compact-table,
#payroll .compact-table {
  min-width: 980px;
}

#users .compact-table {
  min-width: 1800px;
}

#cashbox-body tr {
  transition: background 0.18s ease;
}

#cashbox-body tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

#cashbox-body td:nth-child(7) {
  color: #ffd08a;
  font-weight: 700;
}
th, td { padding: 14px 12px; text-align: right; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--accent-soft); white-space: nowrap; position: sticky; top: 0; background: #132338; z-index: 1; }

#orders th,
#orders td,
#clients th,
#clients td,
#shipping-companies th,
#shipping-companies td,
#inventory th,
#inventory td,
#stores th,
#stores td,
#delivery-agents th,
#delivery-agents td,
#employees th,
#employees td,
#users th,
#users td,
#payroll th,
#payroll td {
  padding: 10px 8px;
  font-size: 0.78rem;
  line-height: 1.25;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

#orders td,
#clients td,
#shipping-companies td,
#inventory td,
#stores td,
#delivery-agents td,
#employees td,
#users td,
#payroll td {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

#orders td a,
#clients td a,
#shipping-companies td a,
#inventory td a,
#stores td a,
#delivery-agents td a,
#employees td a,
#users td a,
#payroll td a {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

#orders .status-select,
#orders .badge,
#clients .badge,
#shipping-companies .badge,
#inventory .badge,
#stores .badge,
#delivery-agents .badge,
#employees .badge,
#users .badge,
#payroll .badge {
  font-size: 0.73rem;
  padding: 6px 10px;
}

#orders .button,
#clients .button,
#shipping-companies .button,
#inventory .button,
#stores .button,
#delivery-agents .button,
#employees .button,
#users .button,
#payroll .button {
  font-size: 0.74rem;
  padding: 7px 10px;
}

#clients .table-wrap,
#shipping-companies .table-wrap,
#inventory .table-wrap,
#stores .table-wrap,
#delivery-agents .table-wrap,
#employees .table-wrap,
#users .table-wrap,
#payroll .table-wrap {
  max-height: 68vh;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(5, 12, 22, 0.34);
}

.users-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0 auto;
  accent-color: #f97316;
}

.notice-card {
  background:
    radial-gradient(circle at top right, rgba(255, 208, 138, 0.14), transparent 26%),
    linear-gradient(180deg, rgba(18, 31, 50, 0.98), rgba(9, 19, 34, 0.98));
  min-height: 150px;
}
.order-row {
  transition: background 0.18s ease, transform 0.18s ease;
}
.order-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.client-tier-royal td,
.order-row.order-tier-royal {
  background:
    linear-gradient(90deg, rgba(255, 215, 110, 0.16), rgba(255, 240, 186, 0.06));
  box-shadow: inset 0 0 0 1px rgba(255, 215, 110, 0.16);
}

.client-tier-diamond td,
.order-row.order-tier-diamond {
  background:
    linear-gradient(90deg, rgba(96, 165, 250, 0.16), rgba(191, 219, 254, 0.06));
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.16);
}

.client-tier-golden td,
.order-row.order-tier-golden {
  background:
    linear-gradient(90deg, rgba(250, 204, 21, 0.14), rgba(254, 240, 138, 0.05));
  box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.14);
}

.client-tier-silver td,
.order-row.order-tier-silver {
  background:
    linear-gradient(90deg, rgba(203, 213, 225, 0.14), rgba(241, 245, 249, 0.05));
  box-shadow: inset 0 0 0 1px rgba(203, 213, 225, 0.14);
}

.client-tier-bronze td,
.order-row.order-tier-bronze {
  background:
    linear-gradient(90deg, rgba(180, 83, 9, 0.14), rgba(251, 191, 36, 0.05));
  box-shadow: inset 0 0 0 1px rgba(180, 83, 9, 0.14);
}

.badge.client-tier-royal {
  background: rgba(255, 215, 110, 0.16);
  border: 1px solid rgba(255, 215, 110, 0.24);
  color: #fff0b5;
}

.badge.client-tier-diamond {
  background: rgba(96, 165, 250, 0.16);
  border: 1px solid rgba(96, 165, 250, 0.24);
  color: #dbeafe;
}

.badge.client-tier-golden {
  background: rgba(250, 204, 21, 0.16);
  border: 1px solid rgba(250, 204, 21, 0.24);
  color: #fef3c7;
}

.badge.client-tier-silver {
  background: rgba(203, 213, 225, 0.16);
  border: 1px solid rgba(203, 213, 225, 0.24);
  color: #f8fafc;
}

.badge.client-tier-bronze {
  background: rgba(180, 83, 9, 0.18);
  border: 1px solid rgba(180, 83, 9, 0.24);
  color: #fde68a;
}

.page { display: none; }
.page.active { display: block; }
.field { display: grid; gap: 8px; }
.field.full { grid-column: 1 / -1; }
textarea { min-height: 100px; resize: vertical; }
.user-chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
}

.user-chip--profile {
  width: auto;
  min-width: 280px;
  border-radius: 24px;
  padding: 10px 14px;
  background:
    radial-gradient(circle at top right, rgba(255, 208, 138, 0.14), transparent 24%),
    rgba(255,255,255,0.06);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 9, 18, 0.72);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}
.modal.active { display: flex; }
.modal-card {
  width: min(100%, 1120px);
  max-height: 88vh;
  overflow: auto;
  background:
    radial-gradient(circle at top right, rgba(255, 185, 107, 0.14), transparent 24%),
    linear-gradient(180deg, rgba(17, 29, 47, 0.98), rgba(8, 17, 29, 0.98));
}

#expense-modal .modal-card {
  width: min(100%, 1280px);
}

.expense-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.empty-state { padding: 28px; text-align: center; color: var(--muted); }
.permission-note {
  padding: 12px 14px;
  margin: 14px 0 16px;
  border-radius: 16px;
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.22);
  color: #ffd7b4;
}

.card-chip {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(59, 130, 246, 0.26);
  color: #d8e8ff;
  margin-bottom: 10px;
}

#expenses-body tr {
  transition: background 0.18s ease;
}

#expenses-body tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

#expenses-body td:nth-child(7) {
  color: #ffd08a;
  font-weight: 700;
}

#expenses-body td:nth-child(9) {
  color: #ffd08a;
  font-weight: 700;
}

.modal-card .field span {
  color: #f5d8ad;
  font-weight: 600;
}

.form-section-title span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 208, 138, 0.1);
  border: 1px solid rgba(255, 208, 138, 0.16);
}

.modal-card input,
.modal-card select,
.modal-card textarea {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 208, 138, 0.14);
  color: #ffffff;
}

.modal-card input::placeholder,
.modal-card textarea::placeholder {
  color: #c9d4df;
}

.modal-card .button-primary {
  min-width: 180px;
  justify-self: flex-start;
  box-shadow: 0 18px 36px rgba(230, 126, 34, 0.2);
}

.order-row.status-processing { background: rgba(245, 158, 11, 0.08); }
.order-row.status-purchased { background: rgba(37, 99, 235, 0.08); }
.order-row.status-shipping,
.status-card.status-shipping,
.status-select.status-shipping,
.badge.status-shipping { background: rgba(124, 58, 237, 0.14); border: 1px solid rgba(124, 58, 237, 0.32); color: #eadcff; }
.order-row.status-transit { background: rgba(13, 148, 136, 0.08); }
.order-row.status-agency,
.status-card.status-agency,
.status-select.status-agency,
.badge.status-agency { background: rgba(234, 88, 12, 0.14); border: 1px solid rgba(234, 88, 12, 0.32); color: #ffe1c7; }
.order-row.status-stock,
.status-card.status-stock,
.status-select.status-stock,
.badge.status-stock { background: rgba(219, 39, 119, 0.14); border: 1px solid rgba(219, 39, 119, 0.32); color: #ffd6e9; }
.order-row.status-delivered,
.status-card.status-delivered,
.status-select.status-delivered,
.badge.status-delivered { background: rgba(22, 163, 74, 0.14); border: 1px solid rgba(22, 163, 74, 0.32); color: #d7ffe3; }
.order-row.status-cancelled,
.status-card.status-cancelled,
.status-select.status-cancelled,
.badge.status-cancelled { background: rgba(220, 38, 38, 0.14); border: 1px solid rgba(220, 38, 38, 0.32); color: #ffd7d7; }
.status-card.status-processing,
.status-select.status-processing,
.badge.status-processing { background: rgba(245, 158, 11, 0.14); border: 1px solid rgba(245, 158, 11, 0.32); color: #ffe7bb; }
.status-card.status-purchased,
.status-select.status-purchased,
.badge.status-purchased { background: rgba(37, 99, 235, 0.14); border: 1px solid rgba(37, 99, 235, 0.32); color: #dce9ff; }
.status-card.status-transit,
.status-select.status-transit,
.badge.status-transit { background: rgba(13, 148, 136, 0.14); border: 1px solid rgba(13, 148, 136, 0.32); color: #d6fffb; }

@media (max-width: 1180px) {
  .layout,
  .dashboard-grid,
  .status-cards,
  .summary-grid,
  .cards-grid,
  .form-grid { grid-template-columns: 1fr; }
  .expense-form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .content,
  .sidebar,
  .login-screen { padding: 16px; }
  .login-card {
    width: 100%;
    padding: 22px 18px;
  }
  .login-actions .button-primary,
  .password-toggle {
    width: 100%;
  }
  .password-field {
    grid-template-columns: 1fr;
  }
  .login-card__brand {
    align-items: flex-start;
  }
  .login-card__brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }
  .login-card h1 {
    font-size: 1.7rem;
  }
  .topbar,
  .panel-head { flex-direction: column; align-items: stretch; }
  .orders-head__actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }
  .orders-action-card {
    width: 100%;
  }
  .orders-status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .modal-title {
    align-items: flex-start;
  }
  .dashboard-profile-card,
  .profile-badge,
  .dashboard-profile-card__intro,
  .dashboard-profile-card__stats,
  .topbar-actions { align-items: stretch; }
  .user-chip--profile { min-width: 100%; }
  table { min-width: 1400px; }
  .compact-table { min-width: 760px; }
  #orders th,
  #orders td,
  #clients th,
  #clients td,
  #shipping-companies th,
  #shipping-companies td,
  #inventory th,
  #inventory td,
  #stores th,
  #stores td,
  #delivery-agents th,
  #delivery-agents td,
  #employees th,
  #employees td,
  #users th,
  #users td,
  #payroll th,
  #payroll td {
    font-size: 0.72rem;
    padding: 8px 6px;
  }
  .orders-action-card {
    min-height: 70px;
  }
}
