:root {
  --vn-red: #d9322b;
  --vn-red-dark: #b92520;
  --vn-black: #121416;
  --vn-charcoal: #1c1f22;
  --vn-graphite: #34383d;
  --vn-line: #dedfe1;
  --vn-paper: #f4f4f3;
  --blue: var(--vn-red);
  --border: var(--vn-line);
  color: #1b1d20;
  background: var(--vn-paper);
}

::selection { background: #d9322b33; color: #111; }
body { background: var(--vn-paper); }
.eyebrow { color: var(--vn-red); letter-spacing: 2.2px; }
.muted { color: #777b80; }

/* Login: dark industrial canvas with a restrained VisionNav-red signal. */
.login-brand {
  background:
    linear-gradient(118deg, transparent 0 56%, #d9322b14 56% 56.35%, transparent 56.35%),
    linear-gradient(160deg, #25282c 0%, #16181b 47%, #0e0f11 100%);
}
.login-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(105deg, transparent 0 16%, #ffffff05 16% 25%, transparent 25%),
    radial-gradient(circle at 15% 86%, #d9322b1e, transparent 28%);
}
.login-brand::after {
  width: 440px;
  height: 440px;
  right: -265px;
  bottom: -150px;
  border: 1px solid #d9322b70;
  border-radius: 0;
  transform: rotate(28deg);
  box-shadow: 0 0 0 70px #ffffff04, 0 0 0 140px #ffffff03;
}
.login-brand > * { position: relative; z-index: 1; }
.login-brand h1 { font-weight: 760; letter-spacing: -2.5px; }
.company-lockup { display: flex; align-items: center; gap: 16px; margin-bottom: 62px; }
.company-lockup .brand-mark.large { flex: 0 0 auto; margin: 0; }
.company-lockup strong, .company-lockup span { display: block; color: #fff; line-height: 1; }
.company-lockup strong { font-size: 22px; letter-spacing: .2px; }
.company-lockup span { margin-top: 4px; font-size: 14px; letter-spacing: 1.8px; color: #b8babd; }
.brand-copy { color: #aeb1b5; }
.brand-stats { border-top: 1px solid #ffffff1c; padding-top: 22px; }
.brand-stats strong { color: #fff; }
.brand-stats span { color: #92969b; }
.brand-mark {
  clip-path: none;
  background: center / contain no-repeat url('/vts-icon.svg');
}
.brand-mark span { display: none; }
.eyebrow.light { color: #ed554e; }
.login-panel { background: #fafafa; }
.login-card h2 { color: var(--vn-black); }
.login-language {
  position: fixed;
  top: 22px;
  right: 24px;
  z-index: 12;
}
.language-toggle {
  min-width: 42px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid #cfd1d4;
  border-radius: 3px;
  background: #fff;
  color: #292c30;
  font-size: 11px;
  font-weight: 700;
}
.language-toggle:hover { border-color: var(--vn-red); color: var(--vn-red); }
.input-wrap { border-color: #d7d9dc; border-radius: 5px; background: #fff; }
.input-wrap:focus-within { border-color: var(--vn-red); box-shadow: 0 0 0 3px #d9322b16; }
.check input { accent-color: var(--vn-red); }
.link-button, .text-action { color: var(--vn-red); }
.primary-button {
  border-radius: 4px;
  background: var(--vn-red);
  box-shadow: none;
}
.primary-button:hover { background: var(--vn-red-dark); }
.secondary-button { border-radius: 4px; color: #272a2e; background: #fff; }
.secondary-button:hover { border-color: #aaaeb3; background: #f8f8f8; }

/* Portal shell */
.sidebar {
  background:
    linear-gradient(145deg, #ffffff05 0 18%, transparent 18% 100%),
    linear-gradient(180deg, #17191c, #101113);
  box-shadow: 5px 0 20px #00000012;
}
.sidebar-brand { border-bottom-color: #ffffff14; }
.sidebar-brand::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 2px;
  height: 76px;
  background: var(--vn-red);
}
.nav-item { color: #a8aaad; border-radius: 4px; }
.sidebar-brand-copy { min-width: 0; }
.sidebar-brand .sidebar-brand-copy b {
  display: block;
  max-width: 148px;
  font-size: 12px;
  line-height: 1.25;
  letter-spacing: 0;
}
.sidebar-brand .sidebar-brand-copy small { margin-top: 4px; }
.mobile-logo small { display: block; margin-top: 4px; color: #8a8e93; font-size: 9px; letter-spacing: 1px; }
.nav-item:hover { background: #ffffff0c; color: #fff; }
.nav-item.active {
  background: var(--vn-red);
  color: #fff;
  box-shadow: none;
}
.sidebar-footer { border-top-color: #ffffff14; }
.status-dot { background: #45c58a; }
.portal-main { background: var(--vn-paper); }
.topbar {
  border-top: 2px solid var(--vn-red);
  border-bottom-color: #dedfe1;
  background: #fff;
  box-shadow: 0 2px 12px #11111108;
}
.breadcrumb b { color: #222529; }
.avatar { border-radius: 5px; background: #fce9e7; color: var(--vn-red-dark); }
.account-menu-button { border-radius: 6px; }
.account-dropdown { border-radius: 5px; border-color: #d8dadd; box-shadow: 0 16px 42px #1111111f; }
.account-dropdown > button { border-radius: 3px; }
.account-dropdown > button:hover { background: #fff0ef; color: var(--vn-red-dark); }
.notification-button i { background: var(--vn-red); }
.portal-language { min-width: 42px; width: 42px; height: 38px; margin-right: 0; padding: 0; }

/* Content surfaces: white planes, black hierarchy, red interaction. */
.page-heading h1, .page-heading h2 { color: var(--vn-black); letter-spacing: -.4px; }
.panel, .metric-card {
  border-color: #dedfe1;
  border-radius: 5px;
  box-shadow: 0 2px 9px #17191c08;
}
.metric-card { position: relative; overflow: hidden; border-top: 2px solid var(--vn-black); }
.metric-card:first-child { border-top-color: var(--vn-red); }
.metric-card.blue .metric-icon { background: #fce8e6; color: var(--vn-red); }
.metric-card.green .metric-icon, .metric-card.violet .metric-icon { background: #eeeff0; color: #34383d; }
.metric-icon { border-radius: 4px; }
.metric-card strong { color: var(--vn-black); font-weight: 720; }
.panel-title { border-bottom-color: #e7e8e9; }
.signal-dot, .quick-icon.blue { border-radius: 4px; background: #fce8e6; color: var(--vn-red); }
.quick-icon.green { border-radius: 4px; background: #eeeff0; color: #33373b; }
.quick-action:hover { background: #faf6f6; }
.upload-panel, .table-panel { border-radius: 5px; }
.file-picker span { border-color: #bfc2c5; border-radius: 4px; }
th { background: #f1f1f1; color: #60646a; }
th, td { border-bottom-color: #e5e6e7; }
.mini-avatar { border-radius: 4px; background: #fce8e6; color: var(--vn-red-dark); }
.table-action { color: #3a3d41; }
.table-action:hover { color: var(--vn-red); }
.danger-text, .form-error { color: var(--vn-red-dark); }
.role-badge.super { background: #fce7e5; color: #b42520; }
.role-badge.admin { background: #292d31; color: #fff; }
.role-badge.user { background: #e8e9ea; color: #44484d; }
.role-notice { border-color: #f0cbc8; border-radius: 4px; background: #fff1f0; color: #753632; }
.role-notice > span { background: var(--vn-red); }
.modal { border-radius: 6px; border-top: 3px solid var(--vn-red); }
.modal-note { border-radius: 4px; }
.toast { border-radius: 4px; background: var(--vn-black); }
.toast.error, .danger-button { background: var(--vn-red-dark); }

/* Profile and administration */
.profile-avatar { border-radius: 8px; background: #fce8e6; color: var(--vn-red-dark); }
.profile-tabs button { border-radius: 0; }
.profile-tabs button.active { border-bottom-color: var(--vn-red); color: var(--vn-red-dark); }
.admin-navigation > button {
  border-radius: 3px;
  background: var(--vn-red);
  color: #fff;
}
.admin-navigation > button small { color: #ffd4d1; }
.status-badge { border-radius: 3px; }
.status-badge.deleted { background: #e8e9ea; color: #555a60; }
.input-wrap select { border-radius: 0; }
.form-actions .primary-button { min-width: 132px; }

/* Shared semantic SVG icon system */
.ui-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.input-icon { width: 17px; height: 17px; color: #8f969d; }
.password-toggle { display: grid; place-items: center; padding: 6px; }
.password-toggle .ui-icon { width: 18px; height: 18px; }
.wide .ui-icon { width: 17px; height: 17px; }
.nav-icon { display: grid; width: 22px; place-items: center; }
.nav-icon .ui-icon { width: 20px; height: 20px; stroke-width: 1.5; }
.nav-item:hover .ui-icon, .nav-item.active .ui-icon { stroke-width: 1.7; }
.menu-button { place-items: center; }
.menu-button .ui-icon { width: 21px; height: 21px; }
.account-dropdown > button > .ui-icon { width: 19px; height: 19px; justify-self: center; }
.icon-label-button,
.text-action,
.quality-heading-actions .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.icon-label-button .ui-icon,
.text-action .ui-icon,
.quality-heading-actions .ui-icon { width: 15px; height: 15px; }
.metric-icon .ui-icon { width: 24px; height: 24px; stroke-width: 1.45; }
.quick-icon .ui-icon { width: 20px; height: 20px; }
.quick-chevron { width: 17px; height: 17px; color: #a6afbd; }
.quick-action:hover .quick-chevron { color: var(--vn-red); transform: translateX(2px); }
.quality-filter-icon .ui-icon { width: 19px; height: 19px; }
.profile-tabs button > .ui-icon { width: 17px; height: 17px; }
.admin-navigation > button > .ui-icon { width: 19px; height: 19px; justify-self: center; }
.role-notice > span .ui-icon { width: 14px; height: 14px; stroke-width: 1.9; }
.modal-close { display: grid; width: 32px; height: 32px; place-items: center; padding: 0; }
.modal-close .ui-icon { width: 20px; height: 20px; }
.notification-state .notification-icon { width: 17px; height: 17px; stroke-width: 1.8; }
.notification-item.in-progress .notification-icon { animation: notification-clock 1.8s linear infinite; }
.signal-dot .ui-icon { width: 19px; height: 19px; }
@keyframes notification-clock { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .sidebar { background: linear-gradient(180deg, #17191c, #101113); }
}
@media (max-width: 600px) {
  .login-language { top: 14px; right: 14px; }
  .portal-language { min-width: 38px; padding: 0 7px; }
}
