/* Abdullah Electronic ERP — dashboard (light + purple accent, card UI) */

:root {
  --bg-page: #eef0f6;
  --bg-card: #ffffff;
  --text: #1e1b2e;
  --text-muted: #6b6a7a;
  --primary: #6c5ce7;
  --primary-dark: #5646c9;
  --primary-soft: rgba(108, 92, 231, 0.12);
  --success: #00c48c;
  --success-soft: rgba(0, 196, 140, 0.12);
  --warning: #ffb020;
  --warning-soft: rgba(255, 176, 32, 0.15);
  --danger: #e85454;
  --danger-soft: rgba(232, 84, 84, 0.12);
  --blue: #4f8cff;
  --blue-soft: rgba(79, 140, 255, 0.12);
  --sidebar: #ffffff;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 8px 28px rgba(30, 27, 46, 0.08);
  --shadow-sm: 0 4px 14px rgba(30, 27, 46, 0.06);
  --border: 1px solid #e8e9f0;
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
}

.theme-dark {
  --bg-page: #12101c;
  --bg-card: #1c1a28;
  --text: #f4f3f8;
  --text-muted: #9c9aae;
  --primary-soft: rgba(108, 92, 231, 0.22);
  --danger-soft: rgba(232, 84, 84, 0.18);
  --sidebar: #16141f;
  --border: 1px solid #2a2738;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.25);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  background: var(--bg-page);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 268px;
  flex-shrink: 0;
  background: var(--sidebar);
  border-right: var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.35rem 1.1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  box-shadow: var(--shadow-sm);
  overflow-y: auto;
  overflow-x: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  padding: 0 0.35rem;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #a29bfe);
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(108, 92, 231, 0.45);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-text strong {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.brand-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 1.1rem 0.5rem 0.45rem;
  font-weight: 700;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list .nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.nav-list .nav-link:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.nav-list .nav-link.active {
  background: var(--primary-soft);
  color: var(--primary);
}

/* Reports: expandable sub-pages */
.nav-group {
  margin: 0.15rem 0;
}

.nav-group-head {
  display: flex;
  align-items: stretch;
  gap: 0.15rem;
}

.nav-group-head .nav-link-reports-main {
  flex: 1;
  min-width: 0;
}

.nav-group-toggle {
  flex-shrink: 0;
  width: 2rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.65rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, transform 0.2s ease;
}

.nav-group-toggle:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.nav-group.is-collapsed .nav-group-toggle {
  transform: rotate(-90deg);
}

.nav-group.is-collapsed .nav-sublist {
  display: none;
}

.nav-sublist {
  list-style: none;
  margin: 0.2rem 0 0.35rem;
  padding: 0 0 0 0.25rem;
  border-left: 2px solid var(--primary-soft);
  margin-left: 0.85rem;
}

.nav-sublink {
  display: block;
  padding: 0.38rem 0.5rem 0.38rem 0.65rem;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  line-height: 1.35;
  transition: background 0.15s, color 0.15s;
}

.nav-sublink:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.nav-sublink-hub {
  font-weight: 700;
  margin-top: 0.2rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  border-radius: 0;
}

.theme-dark .nav-sublink-hub {
  border-top-color: var(--border);
}

.nav-icon {
  width: 22px;
  height: 22px;
  opacity: 0.85;
}

.mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
  margin-top: 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-page);
}

.theme-dark .mode-row {
  background: #252336;
}

.mode-row span {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  background: #cfd3e6;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.2s;
}

.theme-dark .toggle {
  background: var(--primary);
}

.toggle::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 4px;
  transition: transform 0.2s;
}

.theme-dark .toggle::after {
  transform: translateX(18px);
}

.sidebar-spacer {
  flex: 1;
}

.upgrade-card {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), #a29bfe);
  color: #fff;
  box-shadow: 0 10px 28px rgba(108, 92, 231, 0.35);
}

.upgrade-card p {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  opacity: 0.95;
}

.upgrade-card strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.btn-upgrade {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 0.55rem;
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

/* Main */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.75rem;
  background: transparent;
}

.topbar h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pill {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--bg-card);
  border: var(--border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}

.content {
  padding: 0 1.75rem 2rem;
  flex: 1;
}

.view-section {
  display: none;
}

.view-section.is-visible {
  display: block;
}

/* Cards grid */
.grid-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: var(--border);
  padding: 1.15rem 1.25rem;
}

.card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 700;
}

.metric-value {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.metric-sub {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.tag-growth {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 0.5rem;
}

.grid-charts {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 1100px) {
  .grid-charts {
    grid-template-columns: 1fr;
  }
}

.chart-card {
  min-height: 280px;
}

.chart-card .chart-wrap {
  position: relative;
  height: 220px;
  margin-top: 0.5rem;
}

.chart-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

.filter-chip {
  border: none;
  background: var(--bg-page);
  color: var(--text-muted);
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.theme-dark .filter-chip {
  background: #252336;
}

.filter-chip.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.grid-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 900px) {
  .grid-bottom {
    grid-template-columns: 1fr;
  }
}

.donut-wrap {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.donut-wrap .chart-wrap {
  width: 160px;
  height: 160px;
  flex-shrink: 0;
}

/* Forms */
.module-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.module-head h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
}

.module-head p {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  max-width: 640px;
}

.module-head-actions {
  flex-shrink: 0;
  align-self: flex-start;
}

.nav-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  margin-left: 0.35rem;
  padding: 0.12rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
  border-radius: 999px;
  background: var(--danger, #e17055);
  color: #fff;
  vertical-align: middle;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem 1rem;
}

[hidden] {
  display: none !important;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field input,
.field select,
.field textarea {
  font: inherit;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  border: var(--border);
  background: var(--bg-page);
  color: var(--text);
  outline: none;
  transition: border 0.15s, box-shadow 0.15s;
}

.theme-dark .field input,
.theme-dark .field select,
.theme-dark .field textarea {
  background: #252336;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.field-full {
  grid-column: 1 / -1;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.15rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 6px 18px rgba(108, 92, 231, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 8px 22px rgba(108, 92, 231, 0.45);
}

.btn-ghost {
  background: var(--bg-page);
  color: var(--text);
  border: var(--border);
}

.theme-dark .btn-ghost {
  background: #252336;
}

.btn-sm {
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

/* Variations */
.variations-block {
  margin-top: 0.5rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-page);
  border: var(--border);
}

.theme-dark .variations-block {
  background: #252336;
}

.variation-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.5rem;
  align-items: end;
  margin-bottom: 0.5rem;
}

@media (max-width: 600px) {
  .variation-row {
    grid-template-columns: 1fr;
  }
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
  border-radius: var(--radius-sm);
  border: var(--border);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.data-table th,
.data-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: var(--border);
}

.data-table th {
  background: var(--bg-page);
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.theme-dark .data-table th {
  background: #252336;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: var(--primary-soft);
}

.thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bg-page);
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--blue-soft);
  color: var(--blue);
}

.toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow);
  z-index: 1000;
  max-width: 320px;
  display: none;
}

.toast.show {
  display: block;
}

.toast.err {
  background: #e74c3c;
}

.toast.ok {
  background: var(--success);
}

.loading-dot::after {
  content: " …";
  animation: blink 1s infinite;
}

@keyframes blink {
  50% {
    opacity: 0.3;
  }
}

.balance-highlight {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--warning);
}

.purchase-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

@media (max-width: 700px) {
  .purchase-summary {
    grid-template-columns: 1fr;
  }
}

.summary-tile {
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-page);
  border: var(--border);
}

.summary-tile strong {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.summary-tile span {
  font-size: 1.2rem;
  font-weight: 800;
}

.inline-add {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-top: 0.75rem;
}

.inline-add .field {
  flex: 1;
  min-width: 140px;
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }

  .app {
    flex-direction: column;
  }
}

.data-table td.cell-numeric,
.data-table th.cell-numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Dashboard: discount alerts */
.discount-alerts-panel {
  margin-bottom: 1.25rem;
}

.discount-alerts-head {
  margin-bottom: 0.35rem;
}

.discount-alerts-head h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  text-transform: none;
}

.discount-alerts-root {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.85rem 1rem;
  align-items: start;
}

/* Single placeholder / empty message spans full width */
.discount-alerts-root > :only-child {
  grid-column: 1 / -1;
}

.discount-alerts-placeholder,
.discount-alerts-empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Notifications — professional feed (card grid) */
.notifications-page {
  width: 100%;
  max-width: 1180px;
}

.notifications-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.notifications-hero-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.notifications-hero-lead {
  margin: 0.4rem 0 0;
  max-width: 36rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.notifications-refresh-btn {
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(108, 92, 231, 0.35);
}

.notifications-card {
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.notifications-card-header {
  padding: 1.25rem 1.35rem 1rem;
  border-bottom: var(--border);
  background: linear-gradient(180deg, rgba(108, 92, 231, 0.06) 0%, transparent 100%);
}

.theme-dark .notifications-card-header {
  background: linear-gradient(180deg, rgba(108, 92, 231, 0.12) 0%, transparent 100%);
}

.notifications-card-heading {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.notifications-card-sub {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.notifications-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-bottom: var(--border);
}

@media (max-width: 720px) {
  .notifications-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.notifications-kpi {
  padding: 1rem 1.1rem;
  border-right: var(--border);
  min-width: 0;
}

.notifications-kpi:last-child {
  border-right: none;
}

@media (max-width: 720px) {
  .notifications-kpi:nth-child(2n) {
    border-right: none;
  }
  .notifications-kpi:nth-child(-n + 2) {
    border-bottom: var(--border);
  }
}

.notifications-kpi-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
}

.notifications-kpi-label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.notifications-kpi--payments .notifications-kpi-value {
  color: var(--primary);
}

.notifications-kpi--stock .notifications-kpi-value {
  color: var(--warning);
}

.notifications-kpi--discount .notifications-kpi-value {
  color: var(--blue);
}

.notifications-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  border-bottom: var(--border);
  background: var(--bg-page);
}

.theme-dark .notifications-filter-row {
  background: rgba(0, 0, 0, 0.2);
}

.notifications-filter-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-right: 0.35rem;
}

.notifications-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: var(--border);
  background: var(--bg-card);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.notifications-filter-chip:hover {
  color: var(--text);
  border-color: rgba(108, 92, 231, 0.35);
}

.notifications-filter-chip.is-active {
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-color: rgba(108, 92, 231, 0.45);
  box-shadow: 0 2px 8px rgba(108, 92, 231, 0.15);
}

.notifications-filter-chip:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.theme-dark .notifications-filter-chip.is-active {
  color: var(--text);
}

.notifications-filter-chip .notifications-filter-count {
  font-size: 0.72rem;
  font-weight: 800;
  opacity: 0.85;
}

.notifications-feed {
  padding: 1.25rem 1.35rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.05rem 1.15rem;
  align-items: stretch;
  min-height: 120px;
}

.notifications-feed > .notifications-skeleton-grid,
.notifications-feed > .notifications-empty-state {
  grid-column: 1 / -1;
}

.notifications-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
  width: 100%;
}

.notifications-skeleton-card {
  min-height: 148px;
  border-radius: var(--radius-sm);
  border: var(--border);
  background: var(--bg-card);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  box-shadow: var(--shadow-sm);
}

.notifications-skeleton-line {
  height: 11px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    var(--border) 0%,
    rgba(108, 92, 231, 0.1) 50%,
    var(--border) 100%
  );
  background-size: 200% 100%;
  animation: notif-shimmer 1.2s ease-in-out infinite;
}

.notifications-skeleton-line--short {
  width: 55%;
}

.notifications-skeleton-line--medium {
  width: 78%;
}

@keyframes notif-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .notifications-skeleton-line {
    animation: none;
    background: var(--border);
  }
}

.notifications-empty-state {
  text-align: center;
  padding: 2.5rem 1.5rem 2.25rem;
  border: 2px dashed rgba(108, 92, 231, 0.22);
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--primary-soft), var(--bg-card));
  box-shadow: var(--shadow-sm);
}

.notifications-empty-state-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 16px;
  background: var(--bg-card);
  border: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.notifications-empty-state h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

.notifications-empty-state p {
  margin: 0.5rem auto 0;
  max-width: 22rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.notif-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 1.15rem 1.2rem 1.2rem;
  padding-top: 1.05rem;
  border-radius: var(--radius);
  border: var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.22s, border-color 0.2s, transform 0.18s ease;
  overflow: hidden;
}

.notif-card:hover {
  box-shadow: var(--shadow);
  border-color: rgba(108, 92, 231, 0.28);
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  .notif-card:hover {
    transform: none;
  }
}

.notif-card__accent {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  width: auto;
  border-radius: 0;
  background: var(--text-muted);
}

.notif-card--high .notif-card__accent {
  background: linear-gradient(90deg, var(--danger), #ff8a65);
}

.notif-card--medium .notif-card__accent {
  background: linear-gradient(90deg, var(--warning), #ffd56f);
}

.notif-card--low .notif-card__accent {
  background: linear-gradient(90deg, var(--blue), var(--primary));
}

.notif-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 800;
  flex-shrink: 0;
  align-self: center;
  margin: 0.2rem 0 0.75rem;
  box-shadow: 0 4px 12px rgba(30, 27, 46, 0.08);
}

.theme-dark .notif-card__icon {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.notif-card__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.notif-card--payment .notif-card__icon {
  background: var(--primary-soft);
  color: var(--primary);
}

.notif-card--stock .notif-card__icon {
  background: var(--warning-soft);
  color: #c27a00;
}

.theme-dark .notif-card--stock .notif-card__icon {
  color: var(--warning);
}

.notif-card--discount .notif-card__icon {
  background: var(--blue-soft);
  color: var(--blue);
}

.notif-card__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.65rem;
  margin-bottom: 0.45rem;
}

.notif-card__category {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.notif-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.notif-pill--urgent {
  background: var(--danger-soft);
  color: var(--danger);
}

.notif-pill--attention {
  background: var(--warning-soft);
  color: #a66b00;
}

.theme-dark .notif-pill--attention {
  color: var(--warning);
}

.notif-pill--info {
  background: var(--blue-soft);
  color: var(--blue);
}

.notif-card__title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.32;
  color: var(--text);
  text-align: left;
}

.notif-card__body {
  margin: 0.5rem 0 0;
  font-size: 0.87rem;
  line-height: 1.55;
  color: var(--text-muted);
  text-align: left;
  flex: 1;
  min-height: 2.5rem;
}

.notif-card__actions {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: stretch;
}

.notif-card__actions .notif-card__btn {
  flex: 1 1 auto;
  min-width: 0;
}

.notif-card__actions .notif-card__btn:only-child {
  flex: 1 1 100%;
}

.notif-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  border: var(--border);
  background: var(--bg-page);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.notif-card__btn:hover {
  background: var(--primary-soft);
  border-color: rgba(108, 92, 231, 0.35);
  color: var(--primary-dark);
  text-decoration: none;
}

.theme-dark .notif-card__btn:hover {
  color: var(--text);
}

.notif-card__btn--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.notif-card__btn--primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}

.notif-card.is-filtered-out {
  display: none;
}

.discount-alert {
  min-width: 0;
  border: var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.theme-dark .discount-alert {
  background: var(--bg-card);
}

.discount-alert--expired,
.discount-alert--inactive {
  opacity: 0.72;
}

.discount-alert--upcoming {
  border-color: rgba(79, 140, 255, 0.35);
  background: var(--blue-soft);
}

.discount-alert--active.discount-alert--has-tiers {
  border-left: 4px solid var(--primary);
}

.discount-alert-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.discount-alert-kind {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.discount-alert-status {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.discount-alert-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.discount-alert-summary {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.discount-alert-times {
  margin: 0 0 0.65rem;
  padding-left: 1.15rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.discount-alert-times li {
  margin-bottom: 0.2rem;
}

.discount-alert-tiers {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.discount-tier {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: var(--bg-page);
  border: 1px solid rgba(128, 128, 128, 0.12);
}

.theme-dark .discount-tier {
  background: rgba(0, 0, 0, 0.2);
}

.discount-tier.achieved {
  border-color: rgba(0, 196, 140, 0.35);
  background: var(--success-soft);
}

.discount-tier-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.45rem;
}

.discount-tier-meta {
  font-weight: 500;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.discount-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(128, 128, 128, 0.18);
  overflow: hidden;
}

.discount-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--blue));
  transition: width 0.35s ease;
}

.discount-tier.achieved .discount-progress-bar {
  background: var(--success);
}

.discount-tier-note {
  margin: 0.4rem 0 0;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Dashboard: sales ledger */
.sales-ledger-card {
  margin-bottom: 1.25rem;
  border-left: 4px solid var(--success);
  overflow: hidden;
}

.sales-ledger-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 0.75rem;
}

.sales-ledger-intro h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  text-transform: none;
}

.sales-ledger-lead {
  margin: 0;
  max-width: 520px;
  line-height: 1.45;
}

.sales-ledger-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.sales-ledger-kpi {
  min-width: 8.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--bg-page);
  border: var(--border);
}

.theme-dark .sales-ledger-kpi {
  background: rgba(0, 0, 0, 0.2);
}

.sales-ledger-kpi-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.sales-ledger-kpi-value {
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.sales-ledger-wrap {
  max-height: min(420px, 55vh);
  overflow: auto;
  border-radius: var(--radius-sm);
  border: var(--border);
}

.sales-ledger-table {
  margin: 0;
  font-size: 0.82rem;
}

.sales-ledger-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-card);
  box-shadow: 0 1px 0 var(--border);
}

.theme-dark .sales-ledger-table thead th {
  background: var(--bg-card);
}

.sales-ledger-table tbody tr:nth-child(even) {
  background: var(--bg-page);
}

.theme-dark .sales-ledger-table tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.15);
}

.sales-ledger-placeholder {
  text-align: center;
  color: var(--text-muted);
  padding: 1.25rem 1rem !important;
}

.ledger-sale-no {
  font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
}

.sales-ledger-foot {
  margin: 0.85rem 0 0;
  font-size: 0.84rem;
}

.sales-ledger-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.sales-ledger-link:hover {
  text-decoration: underline;
}

/* —— Visual refresh & hub pages (customers, ledger, masters, team, docs, settings) —— */

body {
  background-color: var(--bg-page);
  background-image: radial-gradient(ellipse 920px 520px at 0% -15%, rgba(108, 92, 231, 0.14), transparent),
    radial-gradient(ellipse 720px 420px at 100% 0%, rgba(79, 140, 255, 0.1), transparent),
    radial-gradient(ellipse 600px 360px at 50% 100%, rgba(0, 196, 140, 0.06), transparent);
  background-attachment: fixed;
}

body.theme-dark {
  background-image: radial-gradient(ellipse 900px 500px at 0% -10%, rgba(108, 92, 231, 0.2), transparent),
    radial-gradient(ellipse 640px 400px at 100% 5%, rgba(79, 140, 255, 0.12), transparent);
}

.main .topbar {
  background: color-mix(in srgb, var(--bg-card) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

.theme-dark .main .topbar {
  background: color-mix(in srgb, var(--bg-card) 92%, transparent);
}

.sidebar {
  background: linear-gradient(180deg, var(--sidebar) 0%, color-mix(in srgb, var(--sidebar) 96%, var(--primary-soft)) 100%);
}

.card {
  border: 1px solid color-mix(in srgb, var(--text) 6%, transparent);
  box-shadow: var(--shadow-sm), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.theme-dark .card {
  box-shadow: var(--shadow-sm);
}

.card:hover {
  box-shadow: var(--shadow);
}

.grid-metrics .card:hover {
  transform: translateY(-2px);
}

.page-hero-pro {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.1rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 18%, var(--bg-card)) 0%, var(--bg-card) 55%, var(--bg-card) 100%);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
  box-shadow: var(--shadow-sm);
}

.page-hero-pro--slate {
  background: linear-gradient(135deg, color-mix(in srgb, var(--blue) 14%, var(--bg-card)) 0%, var(--bg-card) 60%, var(--bg-card) 100%);
  border-color: color-mix(in srgb, var(--blue) 20%, transparent);
}

.page-hero-pro--violet {
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 22%, var(--bg-card)) 0%, var(--bg-card) 50%, var(--bg-card) 100%);
}

.page-hero-pro--teal {
  background: linear-gradient(135deg, color-mix(in srgb, var(--success) 16%, var(--bg-card)) 0%, var(--bg-card) 55%, var(--bg-card) 100%);
  border-color: color-mix(in srgb, var(--success) 25%, transparent);
}

.page-hero-pro-copy h2 {
  margin: 0.35rem 0 0.5rem;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.page-hero-pro-copy p {
  margin: 0;
  max-width: 44rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.page-hero-eyebrow {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  opacity: 0.95;
}

.page-hero-kpis {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-kpi {
  background: var(--bg-card);
  border: var(--border);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.85rem;
  min-width: 7rem;
  box-shadow: var(--shadow-sm);
}

.hero-kpi-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.hero-kpi strong {
  font-size: 0.95rem;
  color: var(--text);
}

.hub-toolbar-card {
  padding: 1rem 1.15rem 1.15rem;
}

.hub-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.65rem;
}

.hub-search {
  flex: 1;
  min-width: 200px;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  border: var(--border);
  background: var(--bg-page);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.88rem;
}

.hub-search:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.hub-meta {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hub-meta--hero {
  margin: 0;
  align-self: center;
  font-weight: 600;
  color: var(--text);
}

.hub-table-wrap {
  max-height: min(58vh, 28rem);
  overflow: auto;
  border-radius: var(--radius-sm);
  border: var(--border);
}

.hub-placeholder {
  text-align: center;
  color: var(--text-muted);
  padding: 1rem !important;
  font-size: 0.88rem;
}

.hub-placeholder--err {
  color: var(--danger);
}

.hub-pill {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 700;
}

.hub-three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 1100px) {
  .hub-three-col {
    grid-template-columns: 1fr;
  }
}

.hub-master-card h3.hub-card-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}

.hub-panel-hint {
  margin: -0.35rem 0 0.65rem;
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.hub-panel-hint .settings-code {
  font-size: 0.72rem;
}

.hub-master-secondary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

@media (max-width: 900px) {
  .hub-master-secondary {
    grid-template-columns: 1fr;
  }
}

.hub-muted {
  color: var(--text-muted);
  font-style: italic;
}

.hub-code {
  font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.78rem;
  font-weight: 600;
}

.hub-master-card .table-wrap {
  max-height: 280px;
  overflow: auto;
}

.data-table--compact td,
.data-table--compact th {
  padding: 0.45rem 0.55rem;
  font-size: 0.82rem;
}

.hub-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.hub-chip {
  display: inline-flex;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 700;
}

.hub-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  background: var(--text-muted);
  color: var(--bg-card);
}

.hub-badge--ok {
  background: var(--success-soft);
  color: var(--success);
}

.hub-doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.hub-doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}

.hub-doc-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.hub-doc-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.hub-doc-icon {
  font-size: 1.35rem;
  line-height: 1;
  opacity: 0.9;
}

.hub-doc-card strong {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text);
}

.hub-doc-blurb {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.settings-grid-pro {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 800px) {
  .settings-grid-pro {
    grid-template-columns: 1fr;
  }
}

.settings-tile h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 800;
}

.settings-tile--wide {
  grid-column: 1 / -1;
}

.settings-code {
  font-family: ui-monospace, 'Consolas', monospace;
  font-size: 0.8rem;
  background: var(--bg-page);
  padding: 0.12rem 0.35rem;
  border-radius: 6px;
}

.settings-checklist {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.settings-checklist li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.settings-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-muted);
}

.settings-dot--ok {
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-soft);
}

.upgrade-card--pro {
  background: linear-gradient(145deg, var(--primary-soft), color-mix(in srgb, var(--bg-card) 92%, var(--primary)));
  border: 1px solid color-mix(in srgb, var(--primary) 28%, transparent);
  padding: 1rem 1.05rem;
  border-radius: var(--radius-sm);
}

.upgrade-card--pro .upgrade-card-label {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.upgrade-card--pro strong {
  display: block;
  margin: 0.35rem 0 0.25rem;
  font-size: 0.88rem;
  color: var(--text);
}

.upgrade-card-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ERP login */
.erp-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--bg);
}

.erp-login-wrap {
  width: 100%;
  max-width: 420px;
}

.erp-login-card {
  padding: 1.75rem 1.5rem;
}

.erp-login-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.erp-login-brand span {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.erp-login-card h1 {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
}

.erp-login-lead {
  margin: 0 0 1.1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.erp-login-error {
  background: var(--danger-soft, rgba(232, 84, 84, 0.12));
  color: var(--danger);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.erp-login-field {
  display: block;
  margin-bottom: 0.85rem;
}

.erp-login-field span {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--text-muted);
}

.erp-login-field input {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  background: var(--bg-card);
  color: var(--text);
}

.erp-login-submit {
  width: 100%;
  margin-top: 0.35rem;
}

.erp-login-demo {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.erp-login-demo ul {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}

.sidebar-user {
  margin-bottom: 0.75rem;
  padding: 0.85rem 1rem;
}

.sidebar-user-label {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sidebar-user strong {
  display: block;
  margin: 0.2rem 0;
  font-size: 0.9rem;
}

.sidebar-user-meta {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.sidebar-logout {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--danger);
}

.pill-user {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}

/* Staff & payroll */
.page-hero-pro--violet {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.14), rgba(162, 155, 254, 0.08));
  border-color: color-mix(in srgb, var(--primary) 22%, transparent);
}

.staff-toolbar {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
}

.staff-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.staff-month-label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.staff-month-input {
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
}

.staff-role-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.staff-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.staff-kpis {
  margin-bottom: 1rem;
}

.staff-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 1100px) {
  .staff-layout {
    grid-template-columns: 1.4fr 0.9fr;
  }
  .staff-detail-panel {
    position: sticky;
    top: 1rem;
    align-self: start;
  }
}

.staff-role-block {
  margin-bottom: 1rem;
  padding: 1rem;
}

.staff-role-title {
  margin: 0 0 0.65rem;
  font-size: 1rem;
}

.staff-role-count {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.staff-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.staff-detail-panel h3 {
  margin: 0;
}

.wf-status--task {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
}

.wf-status--task-pending {
  background: rgba(255, 176, 32, 0.2);
  color: #c8870a;
}

.wf-status--task-processing {
  background: rgba(52, 152, 219, 0.2);
  color: #2980b9;
}

.wf-status--task-on_hold {
  background: rgba(108, 92, 231, 0.15);
  color: #6c5ce7;
}

.wf-status--task-rejected {
  background: rgba(232, 84, 84, 0.15);
  color: #e85454;
}

.wf-status--task-completed {
  background: rgba(0, 196, 140, 0.15);
  color: #00a870;
}

@media print {
  .sidebar,
  .topbar-actions,
  .toast,
  .form-actions,
  .module-head,
  .btn {
    display: none !important;
  }

  .main {
    width: 100%;
  }

  .table-wrap {
    overflow: visible !important;
  }

  table.data-table {
    font-size: 9pt;
  }

  .view-section {
    display: block !important;
  }
}
