@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  --erp-bg: #eef2f6;
  --erp-bg-accent: #e4ebf3;
  --erp-panel: #ffffff;
  --erp-border: #d5dde8;
  --erp-border-soft: #e8eef5;
  --erp-text: #1a2332;
  --erp-muted: #64748b;
  --erp-menu: #0f1c2e;
  --erp-menu-text: #c8d4e4;
  --erp-accent: #0d9488;
  --erp-accent-dark: #0f766e;
  --erp-accent-light: #2dd4bf;
  --erp-accent-mid: #14b8a6;
  --erp-accent-soft: rgba(13, 148, 136, 0.12);
  --erp-accent-glow: rgba(13, 148, 136, 0.08);
  --erp-accent-glow-strong: rgba(13, 148, 136, 0.18);
  --erp-accent-shadow: rgba(13, 148, 136, 0.28);
  --erp-accent-mark-glow: rgba(45, 212, 191, 0.2);
  --erp-teal: #14b8a6;
  --erp-menu: #0f1c2e;
  --erp-menu-mid: #16324f;
  --erp-green: #16a34a;
  --erp-red: #e11d48;
  --erp-orange: #f59e0b;
  --erp-blue: #2563eb;
  --erp-slate: #334155;
  --erp-select: #fde68a;
  --erp-status: #0f1c2e;
  --shadow-sm: 0 1px 2px rgba(15, 28, 46, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 28, 46, 0.08);
  --radius: 10px;
  --radius-sm: 8px;
  --font: "DM Sans", system-ui, sans-serif;
  --font-digital: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 500px at 10% -10%, var(--erp-accent-glow), transparent 50%),
    radial-gradient(900px 400px at 100% 0%, rgba(37, 99, 235, 0.06), transparent 45%),
    var(--erp-bg);
  color: var(--erp-text);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
.icon { display: inline-block; vertical-align: -0.2em; flex-shrink: 0; }

/* ===== Shell ===== */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.brand-bar {
  background: linear-gradient(90deg, var(--erp-menu) 0%, var(--erp-menu-mid) 55%, var(--erp-accent-dark) 140%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  gap: 12px;
}
.brand-bar .brand {
  display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.02em;
}
.brand-bar .brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--erp-accent-light), var(--erp-accent));
  display: grid; place-items: center;
  box-shadow: 0 0 0 3px var(--erp-accent-mark-glow);
}
.brand-bar .user-chip {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  padding: 4px 6px 4px 10px;
  font-size: 13px;
}

.top-menu {
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--erp-border);
  display: flex;
  gap: 4px;
  padding: 6px 12px;
  overflow-x: auto;
  flex-wrap: nowrap;
  align-items: center;
}
.top-menu a {
  padding: 8px 12px;
  white-space: nowrap;
  color: var(--erp-muted);
  cursor: pointer;
  border-radius: 8px;
  font-weight: 500;
  font-size: 13px;
  transition: background .15s, color .15s;
}
.top-menu a:hover { background: var(--erp-accent-soft); color: var(--erp-accent-dark); }
.top-menu a.active {
  background: var(--erp-accent);
  color: #fff;
  box-shadow: 0 4px 12px var(--erp-accent-shadow);
}

.ribbon {
  background: transparent;
  display: flex;
  gap: 8px;
  padding: 10px 16px 4px;
  overflow-x: auto;
}
.ribbon-item {
  min-width: 88px;
  text-align: center;
  padding: 10px 10px 8px;
  border: 1px solid var(--erp-border);
  border-radius: var(--radius-sm);
  color: var(--erp-slate);
  background: var(--erp-panel);
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.ribbon-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #b7c6d8;
}
.ribbon-item .ri {
  width: 36px; height: 36px; margin: 0 auto 6px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--erp-accent-soft);
  color: var(--erp-accent-dark);
}
.ribbon-item small { display: block; font-size: 11px; line-height: 1.25; font-weight: 600; }

.app-body { flex: 1; padding: 16px 20px 56px; overflow: auto; }
.status-bar {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: 32px;
  background: var(--erp-status);
  color: #9fb0c5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; font-size: 12px; z-index: 50;
}

/* ===== Tiles dashboard ===== */
.bureau-title {
  font-size: 22px; font-weight: 700; margin: 4px 0 6px; color: var(--erp-text);
  letter-spacing: -0.02em;
}
.bureau-sub {
  color: var(--erp-muted); margin: 0 0 18px; font-size: 14px;
}
.tile-sections { display: flex; gap: 28px; flex-wrap: wrap; align-items: flex-start; }
.tile-section h3 {
  margin: 0 0 12px; font-size: 12px; font-weight: 700; color: var(--erp-muted);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.tile-grid {
  display: grid;
  grid-template-columns: repeat(2, 118px);
  gap: 12px;
}
.tile {
  width: 118px; height: 118px;
  border-radius: 14px;
  color: #fff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  position: relative;
  box-shadow: 0 10px 20px rgba(15, 28, 46, 0.12);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s;
  overflow: hidden;
}
.tile::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,0.22), transparent 45%);
  pointer-events: none;
}
.tile:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 16px 28px rgba(15, 28, 46, 0.18);
  filter: saturate(1.05);
}
.tile .tile-icon {
  width: 44px; height: 44px; margin-bottom: 10px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(4px);
}
.tile .tile-icon .icon { width: 24px; height: 24px; }
.tile .tile-label { font-size: 12px; font-weight: 700; padding: 0 8px; line-height: 1.25; position: relative; }
.tile .tile-badge {
  position: absolute; right: 8px; bottom: 6px;
  font-size: 11px; opacity: .9;
  background: rgba(0,0,0,0.18);
  padding: 1px 6px; border-radius: 999px;
}

.stat-cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-top: 24px; }
@media (max-width: 1100px) { .stat-cards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .stat-cards { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
  background: var(--erp-panel);
  border: 1px solid var(--erp-border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.stat-card .stat-label { color: var(--erp-muted); font-size: 12px; font-weight: 600; }
.stat-card .stat-value { font-size: 22px; font-weight: 700; margin-top: 4px; letter-spacing: -0.02em; }
.stat-card .stat-icon {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; margin-bottom: 8px;
  background: var(--erp-accent-soft); color: var(--erp-accent-dark);
}

/* ===== Cards / panels ===== */
.panel {
  background: var(--erp-panel);
  border: 1px solid var(--erp-border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.panel-title {
  font-size: 16px; font-weight: 700; margin: 0 0 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  letter-spacing: -0.01em;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .tile-grid { grid-template-columns: repeat(2, 108px); }
  .tile { width: 108px; height: 108px; }
}

/* ===== Forms ===== */
.form-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.form-group { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 160px; }
.form-group label { font-size: 12px; color: var(--erp-muted); font-weight: 600; }
.form-control, .form-select, textarea.form-control {
  border: 1px solid var(--erp-border); border-radius: var(--radius-sm);
  padding: 9px 11px; background: #fff; color: var(--erp-text);
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus, textarea.form-control:focus {
  outline: none; border-color: var(--erp-accent);
  box-shadow: 0 0 0 3px var(--erp-accent-soft);
}
.checkbox-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; color: var(--erp-slate); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--erp-border); background: #fff;
  padding: 8px 13px; border-radius: var(--radius-sm); cursor: pointer; color: var(--erp-text);
  font-weight: 600; transition: transform .12s, box-shadow .12s, background .12s;
}
.btn:hover { background: #f8fafc; box-shadow: var(--shadow-sm); }
.btn-primary {
  background: linear-gradient(180deg, var(--erp-accent-mid), var(--erp-accent));
  border-color: var(--erp-accent-dark); color: #fff;
  box-shadow: 0 6px 14px var(--erp-accent-shadow);
}
.btn-primary:hover { background: linear-gradient(180deg, var(--erp-accent-light), var(--erp-accent-dark)); }
.btn-success {
  background: linear-gradient(180deg, #22c55e, #16a34a);
  border-color: #15803d; color: #fff;
}
.btn-danger {
  background: linear-gradient(180deg, #fb7185, #e11d48);
  border-color: #be123c; color: #fff;
}
.btn-teal {
  background: linear-gradient(180deg, var(--erp-accent-light), var(--erp-accent));
  border-color: var(--erp-accent-dark); color: #fff;
}
.btn-sm { padding: 5px 9px; font-size: 12px; }
.btn-lg { padding: 12px 18px; font-size: 15px; font-weight: 700; min-width: 140px; border-radius: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ===== Tables ===== */
.table-wrap {
  overflow: auto; border: 1px solid var(--erp-border);
  border-radius: var(--radius-sm);
}
table.data { width: 100%; border-collapse: collapse; background: #fff; }
table.data th {
  background: #122033; color: #e2e8f0; text-align: left;
  padding: 10px 12px; font-weight: 600; font-size: 12px;
  white-space: nowrap; letter-spacing: 0.02em;
}
table.data td {
  padding: 9px 12px; border-bottom: 1px solid var(--erp-border-soft); vertical-align: middle;
}
table.data tr:hover td { background: #f5f9fc; }
table.data tr.selected td { background: var(--erp-select) !important; }
.badge {
  display: inline-block; padding: 3px 8px; border-radius: 999px;
  font-size: 11px; background: #eef2f7; color: var(--erp-slate); font-weight: 600;
}
.badge-ok { background: #dcfce7; color: #166534; }
.badge-warn { background: #fef3c7; color: #92400e; }
.badge-danger { background: #ffe4e6; color: #9f1239; }
.alert {
  padding: 11px 13px; border-radius: var(--radius-sm); margin-bottom: 12px;
  border: 1px solid; font-weight: 500;
}
.alert-success { background: #ecfdf5; border-color: #6ee7b7; color: #065f46; }
.alert-error { background: #fff1f2; border-color: #fda4af; color: #9f1239; }

/* ===== Login ===== */
.login-page {
  min-height: 100vh; display: grid; place-items: center;
  background:
    radial-gradient(circle at 15% 20%, var(--erp-accent-glow-strong), transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(37, 99, 235, .12), transparent 40%),
    linear-gradient(160deg, var(--erp-menu), var(--erp-menu-mid) 55%, var(--erp-accent-dark));
}
.login-card {
  width: min(420px, 92vw);
  background: #fff; border: none; border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.28); overflow: hidden;
}
.login-card .head {
  background: linear-gradient(135deg, var(--erp-menu), var(--erp-accent-dark));
  color: #fff; padding: 26px 24px;
}
.login-card .head .brand-mark {
  width: 42px; height: 42px; border-radius: 12px; margin-bottom: 12px;
  background: linear-gradient(135deg, var(--erp-accent-light), var(--erp-accent));
  display: grid; place-items: center;
}
.login-card .head h1 { margin: 0; font-size: 26px; letter-spacing: -0.02em; }
.login-card .head p { margin: 6px 0 0; opacity: .85; font-size: 13px; }
.login-card .body { padding: 22px 24px 26px; }
.login-card .btn { width: 100%; margin-top: 10px; padding: 11px; border-radius: 10px; }

/* ===== POS ===== */
.pos-page {
  min-height: 100vh; background: #eef2f6; display: flex; flex-direction: column;
}
.pos-topbar {
  height: 5px;
  background: linear-gradient(90deg, var(--erp-accent), #2563eb, var(--erp-accent));
  background-size: 200% 100%;
}
.pos-header {
  background: #fff; border-bottom: 1px solid var(--erp-border);
  display: flex; justify-content: space-between; align-items: stretch;
  padding: 12px 18px; gap: 16px;
  box-shadow: var(--shadow-sm);
}
.pos-header .meta { display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.pos-header .meta .label { font-size: 18px; font-weight: 700; color: var(--erp-slate); }
.pos-header .meta .sub { color: var(--erp-muted); font-size: 13px; }
.pos-total {
  font-family: var(--font-digital);
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 700; letter-spacing: -0.02em; color: #0f1c2e;
  line-height: 1; align-self: center;
}
.pos-main {
  flex: 1; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 0; min-height: 0;
}
@media (max-width: 1000px) {
  .pos-main { grid-template-columns: 1fr; }
}
.pos-left, .pos-right {
  background: #fff; border-right: 1px solid var(--erp-border);
  padding: 12px; display: flex; flex-direction: column; gap: 10px;
}
.pos-right { border-right: none; background: #f8fafc; }
.client-bar {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: #f0fdfa; border: 1px solid #99f6e4; border-radius: var(--radius-sm);
}
.client-bar .name { flex: 1; font-weight: 600; }
.tool-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tool-btn {
  flex: 1; min-width: 90px; padding: 9px 6px; border: 1px solid var(--erp-border);
  background: #fff; cursor: pointer; text-align: center; font-size: 11px;
  border-radius: 8px; font-weight: 600; color: var(--erp-slate);
  transition: background .12s, border-color .12s;
}
.tool-btn:hover { background: var(--erp-accent-soft); border-color: var(--erp-accent-light); }
.barcode-row {
  display: flex; gap: 6px; align-items: center;
}
.barcode-row input {
  flex: 1; padding: 11px 12px; border: 2px solid #94a3b8; font-size: 15px;
  border-radius: 10px; font-weight: 500;
}
.barcode-row input:focus {
  outline: none; border-color: var(--erp-accent);
  box-shadow: 0 0 0 3px var(--erp-accent-soft);
}
.cart-area { display: flex; gap: 8px; flex: 1; min-height: 220px; }
.cart-table-wrap { flex: 1; overflow: auto; border: 1px solid var(--erp-border); border-radius: var(--radius-sm); }
.cart-actions { display: flex; flex-direction: column; gap: 6px; }
.cart-actions button {
  width: 42px; height: 42px; border: 1px solid var(--erp-border);
  background: #fff; cursor: pointer; font-size: 16px; font-weight: 700;
  border-radius: 10px; color: var(--erp-slate);
}
.cart-actions button:hover { background: var(--erp-accent-soft); color: var(--erp-accent-dark); }
.pos-options {
  border-top: 1px solid var(--erp-border); padding-top: 10px;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  color: var(--erp-slate); font-size: 13px;
}
.pos-tabs {
  display: flex; border-bottom: 1px solid var(--erp-border); gap: 4px;
}
.pos-tabs button {
  border: 1px solid transparent; border-bottom: none; background: transparent;
  padding: 9px 14px; cursor: pointer; border-radius: 10px 10px 0 0;
  color: var(--erp-muted); font-weight: 600;
}
.pos-tabs button.active {
  background: #fff; color: var(--erp-accent-dark);
  border-color: var(--erp-border); box-shadow: 0 -2px 0 var(--erp-accent) inset;
}
.product-search-row { display: flex; gap: 8px; }
.product-search-input {
  flex: 1; padding: 11px 12px; border: 2px solid var(--erp-accent);
  border-radius: 10px; font-size: 15px; font-weight: 500; background: #fff;
}
.product-search-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--erp-accent-soft);
}
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px; padding: 10px 0; overflow: auto; flex: 1;
}
.product-tile {
  border: 1px solid var(--erp-border); background: #fff; cursor: pointer; text-align: center;
  padding: 10px; min-height: 150px; border-radius: 12px;
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.product-tile:hover,
.product-tile.is-focused {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--erp-accent);
  outline: 2px solid var(--erp-accent);
  outline-offset: 1px;
}
.product-tile img {
  width: 100%; height: 80px; object-fit: cover; background: #eef2f6;
  margin-bottom: 8px; border-radius: 8px;
}
.product-tile .pname { font-weight: 700; font-size: 12px; text-transform: uppercase; }
.product-tile .pprice { margin-top: 4px; color: var(--erp-accent-dark); font-weight: 700; }
.product-tile .pkey { color: var(--erp-muted); font-size: 11px; }
.pos-footer-actions { display: flex; gap: 10px; padding: 8px 0 4px; }
.pos-status {
  background: #0f1c2e; color: #9fb0c5;
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px; font-size: 12px;
}
.session-rail {
  width: 48px;
  background: linear-gradient(180deg, var(--erp-menu), var(--erp-accent-dark));
  display: flex; flex-direction: column;
  align-items: center; gap: 10px; padding: 12px 0;
}
.session-rail .dot {
  width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--erp-accent-dark);
  display: grid; place-items: center; font-weight: 700; font-size: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,.2);
}
.pos-layout { display: flex; flex: 1; min-height: 0; }

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .print-only { display: block !important; }
}
.receipt {
  max-width: 380px; margin: 20px auto; background: #fff; padding: 16px;
  border: 1px dashed #94a3b8; font-family: var(--font-digital); border-radius: 8px;
}
.receipt h2 { text-align: center; margin: 0 0 8px; }
.receipt .line { display: flex; justify-content: space-between; margin: 3px 0; }
.receipt hr { border: none; border-top: 1px dashed #94a3b8; margin: 8px 0; }

.pagination { display: flex; gap: 4px; margin-top: 12px; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 6px 10px; border: 1px solid var(--erp-border); background: #fff;
  border-radius: 8px; font-weight: 600;
}
.pagination .active span {
  background: var(--erp-accent); color: #fff; border-color: var(--erp-accent);
}

.empty { padding: 24px; text-align: center; color: var(--erp-muted); }
.icon-svg { width: 1em; height: 1em; fill: currentColor; display: inline-block; vertical-align: -0.15em; }

/* ===== Language switcher ===== */
.lang-switcher {
  display: inline-flex;
  gap: 4px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 3px;
}
.lang-switcher-compact {
  background: #f1f5f9;
  border-color: var(--erp-border);
}
.lang-btn {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: inherit;
  opacity: 0.7;
  transition: background .15s, opacity .15s, color .15s;
}
.lang-btn:hover { opacity: 1; }
.lang-btn.active {
  background: #fff;
  color: var(--erp-accent-dark);
  opacity: 1;
  box-shadow: var(--shadow-sm);
}
.lang-switcher-compact .lang-btn.active {
  background: var(--erp-accent);
  color: #fff;
}
.brand-bar .lang-switcher { margin-inline-end: 8px; }

/* ===== RTL ===== */
html[dir="rtl"] body { direction: rtl; }
html[dir="rtl"] .top-menu,
html[dir="rtl"] .ribbon,
html[dir="rtl"] .form-row,
html[dir="rtl"] .actions,
html[dir="rtl"] .tool-row,
html[dir="rtl"] .pos-options,
html[dir="rtl"] .pos-footer-actions,
html[dir="rtl"] .stat-cards,
html[dir="rtl"] .tile-sections { direction: rtl; }
html[dir="rtl"] .panel-title,
html[dir="rtl"] .status-bar,
html[dir="rtl"] .pos-header,
html[dir="rtl"] .pos-status,
html[dir="rtl"] .brand-bar,
html[dir="rtl"] .client-bar,
html[dir="rtl"] .receipt .line { flex-direction: row-reverse; }
html[dir="rtl"] table.data th,
html[dir="rtl"] table.data td { text-align: right; }
html[dir="rtl"] .tile-badge { right: auto; left: 8px; }
html[dir="rtl"] .session-rail { order: 2; }
html[dir="rtl"] .pos-layout { flex-direction: row-reverse; }
html[dir="rtl"] .pos-left { border-right: none; border-left: 1px solid var(--erp-border); }
html[dir="rtl"] .login-card .head,
html[dir="rtl"] .bureau-title,
html[dir="rtl"] .bureau-sub { text-align: right; }

/* ===== Stock module cards ===== */
.module-hub {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.module-hub-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 16px;
  border-radius: 14px;
  background: var(--erp-panel);
  border: 1px solid var(--erp-border);
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s, border-color .15s;
  color: var(--erp-text);
  min-height: 110px;
}
.module-hub-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #99f6e4;
}
.module-hub-card.active {
  border-color: var(--erp-accent);
  box-shadow: 0 0 0 3px var(--erp-accent-soft);
}
.module-hub-card .hub-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  color: #fff;
}
.module-hub-card .hub-title { font-weight: 700; font-size: 14px; }
.module-hub-card .hub-desc { font-size: 12px; color: var(--erp-muted); line-height: 1.35; }
.module-hub-card .hub-meta {
  margin-top: auto; font-size: 11px; font-weight: 700;
  color: var(--erp-accent-dark); background: var(--erp-accent-soft);
  padding: 3px 8px; border-radius: 999px;
}

.section-card {
  background: var(--erp-panel);
  border: 1px solid var(--erp-border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  overflow: hidden;
  scroll-margin-top: 16px;
}
.section-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--erp-border-soft);
  background: linear-gradient(180deg, #f8fafc, #fff);
}
.section-card-head .head-left {
  display: flex; align-items: center; gap: 12px;
}
.section-card-head .head-icon {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; color: #fff; flex-shrink: 0;
}
.section-card-head h3 {
  margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -0.01em;
}
.section-card-head p {
  margin: 2px 0 0; font-size: 12px; color: var(--erp-muted);
}
.section-card-body { padding: 16px 18px; }
.depot-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.depot-mini-card {
  border: 1px solid var(--erp-border);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.depot-mini-card:hover, .depot-mini-card.active {
  border-color: var(--erp-accent);
  box-shadow: 0 0 0 3px var(--erp-accent-soft);
}
.depot-mini-card .dname { font-weight: 700; margin-bottom: 4px; }
.depot-mini-card .dmeta { font-size: 12px; color: var(--erp-muted); }

/* ===== Notifications ===== */
.notif-dropdown { position: relative; }
.notif-bell {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  cursor: pointer;
  padding: 0;
}
.notif-bell:hover, .notif-dropdown.open .notif-bell { background: rgba(255,255,255,.2); }
.notif-badge {
  position: absolute;
  top: -4px;
  inset-inline-end: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--erp-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
  border: 2px solid var(--erp-menu);
}
.notif-panel {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  width: min(380px, 92vw);
  background: #fff;
  color: var(--erp-text);
  border: 1px solid var(--erp-border);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  z-index: 80;
  overflow: hidden;
}
.notif-panel[hidden] { display: none !important; }
.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--erp-border-soft);
  background: #f8fafc;
}
.notif-panel-list {
  max-height: 360px;
  overflow: auto;
}
.notif-panel-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 14px;
  border-bottom: 1px solid var(--erp-border-soft);
  color: inherit;
}
.notif-panel-item:hover { background: #f8fafc; }
.notif-panel-item.unread { background: #f0fdfa; }
.notif-panel-item.severity-danger.unread { background: #fff1f2; }
.notif-panel-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--erp-muted);
  font-size: 13px;
}
.notif-panel-footer {
  display: block;
  text-align: center;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 13px;
  color: var(--erp-accent-dark);
  background: #f8fafc;
  border-top: 1px solid var(--erp-border-soft);
}
.notif-panel-footer:hover { background: var(--erp-accent-soft); }
.notif-list { display: flex; flex-direction: column; gap: 8px; }
.notif-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--erp-border);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: border-color .15s, background .15s;
}
.notif-item:hover { border-color: var(--erp-accent); background: #f8fafc; }
.notif-item.unread { background: #f0fdfa; border-color: #99f6e4; }
.notif-item.severity-danger.unread { background: #fff1f2; border-color: #fecdd3; }
.notif-dot {
  width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex-shrink: 0;
  background: var(--erp-accent);
}
.notif-item.severity-danger .notif-dot,
.notif-panel-item.severity-danger .notif-dot { background: var(--erp-red); }
.notif-item:not(.unread) .notif-dot,
.notif-panel-item:not(.unread) .notif-dot { background: #cbd5e1; }
.notif-title { font-weight: 700; margin-bottom: 2px; font-size: 13px; }
.notif-text { color: var(--erp-slate); font-size: 12px; line-height: 1.35; }
.notif-meta { color: var(--erp-muted); font-size: 11px; margin-top: 5px; }
