/* Corona dark admin theme adaptation */
:root {
  --ink: #ffffff;
  --muted: #6c7293;
  --line: #2c2e33;
  --panel: #191c24;
  --page: #000000;
  --soft: #12151e;
  --green: #00d25b;
  --red: #fc424a;
  --amber: #ffab00;
  --blue: #0090e7;
  --cyan: #8f5fe8;
  --nav: #191c24;
  --shadow: none;
}

body {
  color: #ffffff;
  background: #000000;
}

.app-shell::before {
  background-position: center 52%;
  background-size: min(760px, 68vw) auto;
  filter: saturate(1.08) contrast(1.05);
  opacity: 0.09;
}

button {
  border-radius: 4px;
  background: #0090e7;
  box-shadow: none;
}

button:hover {
  transform: none;
}

input,
select,
textarea {
  border-color: #2c2e33;
  border-radius: 4px;
  background: #2a3038;
  color: #ffffff;
}

input::placeholder,
textarea::placeholder {
  color: #6c7293;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #0090e7;
  box-shadow: 0 0 0 2px rgba(0, 144, 231, 0.18);
}

.sidebar {
  width: 260px;
  gap: 18px;
  padding: 22px 18px;
  background: #191c24;
  border-right: 1px solid #2c2e33;
}

.brand {
  min-height: 70px;
  border-bottom: 1px solid #2c2e33;
  padding-bottom: 18px;
}

.company-brand strong {
  color: #ffffff;
  font-size: 15px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  background: linear-gradient(135deg, #0090e7, #8f5fe8);
  color: #ffffff;
  font-size: 24px;
}

.brand-logo {
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
}

.brand-logo-large {
  width: 106px;
  height: 106px;
}

.brand small,
.role-panel label,
.role-panel p,
p {
  color: #6c7293;
}

nav {
  gap: 4px;
}

nav a {
  min-height: 48px;
  gap: 12px;
  border-radius: 0 999px 999px 0;
  color: #6c7293;
  font-size: 15px;
  padding: 11px 12px;
}

nav a .menu-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 4px;
  background: #0f1015;
  color: #6c7293;
  font-size: 18px;
}

nav a.active,
nav a:hover {
  background: #0f1015;
  color: #ffffff;
}

nav a.active .menu-icon,
nav a:hover .menu-icon {
  color: #8f5fe8;
}

.role-panel {
  border-color: #2c2e33;
  border-radius: 4px;
  background: #0f1015;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-color: #2c2e33;
  border-radius: 4px;
  background: #0f1015;
  color: #ffffff;
}

.app {
  margin-left: 260px;
  padding: 26px clamp(20px, 3vw, 34px) 44px;
}

.topbar {
  min-height: 72px;
  border: 1px solid #2c2e33;
  border-radius: 4px;
  background: #191c24;
  padding: 16px 18px;
}

.eyebrow {
  color: #8f5fe8;
}

h1 {
  font-size: clamp(24px, 3vw, 34px);
}

h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 600;
}

h2 .mdi {
  color: #8f5fe8;
  font-size: 21px;
}

.metric-card,
.panel {
  border-color: #2c2e33;
  border-radius: 4px;
  background: #191c24;
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 132px;
  padding: 22px;
}

.metric-card::after {
  display: none;
  border-radius: 50%;
  background: rgba(143, 95, 232, 0.14);
}

.metric-icon {
  display: grid;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  background: rgba(143, 95, 232, 0.14);
  color: #8f5fe8;
  font-size: 27px;
}

.metric-icon.blue {
  background: rgba(0, 144, 231, 0.14);
  color: #0090e7;
}

.metric-icon.green {
  background: rgba(0, 210, 91, 0.14);
  color: #00d25b;
}

.metric-icon.amber {
  background: rgba(255, 171, 0, 0.14);
  color: #ffab00;
}

.metric-card.accent::after {
  background: rgba(0, 210, 91, 0.14);
}

.metric-card.warning::after {
  background: rgba(255, 171, 0, 0.14);
}

.metric-card span {
  color: #6c7293;
}

.metric-card strong {
  color: #ffffff;
  font-weight: 700;
}

.metric-card small {
  color: #6c7293;
}

.pill {
  border: 1px solid rgba(0, 144, 231, 0.35);
  background: rgba(0, 144, 231, 0.12);
  color: #0090e7;
}

.bar-track {
  background: #2a3038;
}

.bar-track span {
  background: #0090e7;
}

.bar-track.profit span {
  background: #00d25b;
}

.dashboard-brand-group {
  border-top-color: #2c2e33;
}

.dashboard-brand-head strong {
  color: #ffffff;
}

.dashboard-brand-head .mdi {
  color: #8f5fe8;
}

.brand-stock-alert {
  border-color: rgba(0, 210, 91, 0.45);
  color: #00d25b;
}

.brand-stock-alert.has-low {
  border-color: rgba(255, 171, 0, 0.45);
  color: #ffab00;
}

.dashboard-part-row {
  border-bottom-color: #2c2e33;
}

.audit-summary span,
.watch-item,
.cart-item,
.sale-row,
.empty-state {
  border-color: #2c2e33;
  border-radius: 4px;
  background: #12151e;
}

.audit-summary strong,
.watch-item strong,
.cart-item strong,
.sale-row strong {
  color: #ffffff;
}

.sale-row-actions button,
.export-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-color: rgba(0, 210, 91, 0.35);
  border-radius: 4px;
  background: rgba(0, 210, 91, 0.12);
  color: #00d25b;
}

.primary-wide {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 4px;
  background: #00d25b;
  color: #05140b;
}

.product-form button,
.sale-form button,
.member-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ghost-light {
  border-color: #2c2e33;
  border-radius: 4px;
  background: #2a3038;
  color: #ffffff;
}

table {
  color: #ffffff;
}

th,
td {
  border-bottom-color: #2c2e33;
}

th {
  color: #6c7293;
}

tbody tr:hover {
  background: #12151e;
}

td input {
  background: #2a3038;
}

.brand-group-row td {
  border-bottom-color: #2c2e33;
  background: #0f1015;
  color: #ffffff;
  padding: 13px 12px;
}

.brand-group-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #8f5fe8;
  font-weight: 700;
}

.brand-group-row .mdi {
  font-size: 18px;
}

.brand-group-row small {
  color: #6c7293;
  margin-left: 10px;
}

.status {
  border-radius: 4px;
}

.status.good {
  border: 1px solid rgba(0, 210, 91, 0.45);
  background: transparent;
  color: #00d25b;
}

.status.low {
  border: 1px solid rgba(255, 171, 0, 0.45);
  background: transparent;
  color: #ffab00;
}

.status.out {
  border: 1px solid rgba(252, 66, 74, 0.45);
  background: transparent;
  color: #fc424a;
}

.row-actions button,
.cart-item button {
  border: 1px solid #2c2e33;
  border-radius: 4px;
  background: #2a3038;
  color: #ffffff;
}

.row-actions .danger,
.cart-item button {
  border-color: rgba(252, 66, 74, 0.35);
  background: rgba(252, 66, 74, 0.12);
  color: #fc424a;
}

.locked {
  color: #6c7293;
}

.login-view {
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.94), rgba(25, 28, 36, 0.86)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260'%3E%3Cg fill='none' stroke='%238f5fe8' stroke-opacity='.16' stroke-width='2'%3E%3Cpath d='M32 198h62l25-55h38l25 55h48'/%3E%3Ccircle cx='64' cy='198' r='30'/%3E%3Ccircle cx='198' cy='198' r='30'/%3E%3Cpath d='M116 143l-20-48h38l23 48m0 0l20-40h25'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover, 300px;
}

.login-view::before {
  background-position: center;
  background-size: min(760px, 90vw) auto;
  filter: saturate(1.12) contrast(1.08);
  opacity: 0.2;
}

.login-card {
  border-color: #2c2e33;
  border-radius: 4px;
  background: #191c24;
  color: #ffffff;
}

.login-brand .brand-mark {
  background: linear-gradient(135deg, #0090e7, #8f5fe8);
}

.login-error {
  color: #fc424a;
}

.receipt-modal {
  background: rgba(0, 0, 0, 0.78);
}

.receipt-paper {
  border-radius: 4px;
}

.export-paper {
  background: #191c24;
  color: #ffffff;
}

.export-status {
  color: #00d25b;
}

/* Production visual polish */
:root {
  --ink: #f7f8fb;
  --muted: #8f98ac;
  --line: #2e3544;
  --panel: #171b24;
  --page: #07080d;
  --soft: #10141c;
  --green: #19d77d;
  --red: #ff5a66;
  --amber: #ffb547;
  --blue: #12a8ff;
  --cyan: #a071ff;
  --nav: #10131b;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

body {
  background:
    linear-gradient(180deg, rgba(18, 20, 29, 0.98) 0%, #07080d 46%, #06070b 100%);
  color: var(--ink);
}

.app-shell::before {
  background-position: center 48%;
  background-size: min(860px, 72vw) auto;
  filter: saturate(1.18) contrast(1.08);
  opacity: 0.055;
}

.sidebar {
  width: 274px;
  gap: 18px;
  padding: 20px 16px;
  background: #10131b;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 16px 0 40px rgba(0, 0, 0, 0.18);
}

.brand {
  min-height: auto;
  border-bottom-color: rgba(255, 255, 255, 0.08);
  padding: 2px 4px 18px;
}

.company-brand strong {
  max-width: 160px;
  font-size: 15px;
  letter-spacing: 0;
}

.brand small {
  color: #8f98ac;
}

.sidebar .brand-logo {
  width: 60px;
  height: 60px;
}

nav {
  gap: 7px;
}

nav a {
  position: relative;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #9aa4b7;
  padding: 10px 12px;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

nav a .menu-icon {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: #0b0e14;
}

nav a.active,
nav a:hover {
  border-color: rgba(160, 113, 255, 0.34);
  background: rgba(160, 113, 255, 0.1);
}

nav a.active::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 0;
  width: 3px;
  border-radius: 999px;
  background: #a071ff;
}

nav a.active .menu-icon,
nav a:hover .menu-icon {
  border-color: rgba(160, 113, 255, 0.35);
  background: rgba(160, 113, 255, 0.13);
  color: #a071ff;
}

.role-panel {
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #0b0e14;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ghost-button {
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #0b0e14;
  color: #f7f8fb;
}

.ghost-button:hover {
  border-color: rgba(18, 168, 255, 0.34);
  background: rgba(18, 168, 255, 0.1);
}

.app {
  margin-left: 274px;
  padding: 28px clamp(22px, 3.2vw, 40px) 48px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: 82px;
  margin-bottom: 20px;
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(19, 23, 31, 0.92);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(14px);
}

.eyebrow {
  color: #a071ff;
}

h1 {
  color: #ffffff;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: 0;
}

h2 {
  color: #ffffff;
}

h2 .mdi {
  color: #a071ff;
}

button {
  border: 1px solid rgba(18, 168, 255, 0.4);
  border-radius: 8px;
  background: #108ee1;
  box-shadow: 0 10px 22px rgba(18, 168, 255, 0.16);
}

button:hover {
  filter: brightness(1.06);
}

input,
select,
textarea {
  min-height: 44px;
  border-color: #323a4a;
  border-radius: 8px;
  background: #111620;
  color: #f7f8fb;
}

input::placeholder,
textarea::placeholder {
  color: #737d91;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #12a8ff;
  box-shadow: 0 0 0 3px rgba(18, 168, 255, 0.14);
}

.top-actions input {
  border-color: rgba(255, 255, 255, 0.08);
  background: #10151f;
}

.metric-card,
.panel {
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: linear-gradient(180deg, #191e28 0%, #141821 100%);
  box-shadow: var(--shadow);
}

.metric-card {
  min-height: 130px;
  padding: 20px;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.metric-card:hover {
  border-color: rgba(160, 113, 255, 0.32);
  transform: translateY(-2px);
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: #a071ff;
}

.metric-card:nth-child(2)::before {
  background: #12a8ff;
}

.metric-card:nth-child(3)::before {
  background: #19d77d;
}

.metric-card:nth-child(4)::before {
  background: #ffb547;
}

.metric-icon {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(160, 113, 255, 0.34);
  border-radius: 8px;
  background: rgba(160, 113, 255, 0.12);
}

.metric-icon.blue {
  border-color: rgba(18, 168, 255, 0.32);
  background: rgba(18, 168, 255, 0.12);
  color: #12a8ff;
}

.metric-icon.green {
  border-color: rgba(25, 215, 125, 0.32);
  background: rgba(25, 215, 125, 0.12);
  color: #19d77d;
}

.metric-icon.amber {
  border-color: rgba(255, 181, 71, 0.36);
  background: rgba(255, 181, 71, 0.13);
  color: #ffb547;
}

.metric-card span,
.metric-card small,
.bar-head span,
.dashboard-brand-head span,
.dashboard-part-row span,
.watch-item span,
.cart-item span,
.sale-row span,
p {
  color: #8f98ac;
}

.metric-card strong {
  font-size: clamp(21px, 1.75vw, 28px);
}

.pill {
  border-color: rgba(18, 168, 255, 0.34);
  border-radius: 999px;
  background: rgba(18, 168, 255, 0.11);
  color: #12a8ff;
}

.bar-track {
  height: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #0d1118;
}

.bar-track span {
  background: #12a8ff;
}

.bar-track.profit span {
  background: #19d77d;
}

.audit-summary span,
.watch-item,
.cart-item,
.sale-row,
.dashboard-part-row,
.empty-state {
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #10151f;
}

.dashboard-brand-group {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.dashboard-brand-head strong,
.dashboard-part-row strong,
.audit-summary strong,
.watch-item strong,
.cart-item strong,
.sale-row strong {
  color: #ffffff;
}

.dashboard-part-row {
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 10px 12px;
}

.brand-stock-alert,
.status.good {
  border-color: rgba(25, 215, 125, 0.36);
  background: rgba(25, 215, 125, 0.1);
  color: #19d77d;
}

.brand-stock-alert.has-low,
.status.low {
  border-color: rgba(255, 181, 71, 0.38);
  background: rgba(255, 181, 71, 0.1);
  color: #ffb547;
}

.status.out {
  border-color: rgba(255, 90, 102, 0.42);
  background: rgba(255, 90, 102, 0.1);
  color: #ff5a66;
}

.sale-row-actions button,
.export-button,
.primary-wide {
  border-color: rgba(25, 215, 125, 0.36);
  border-radius: 8px;
  background: rgba(25, 215, 125, 0.12);
  color: #19d77d;
  box-shadow: none;
}

.ghost-light {
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #111620;
}

.table-wrap {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #10151f;
}

table {
  color: #f7f8fb;
}

th {
  background: #151a24;
  color: #9aa4b7;
  letter-spacing: 0;
}

td {
  border-bottom-color: rgba(255, 255, 255, 0.07);
}

tbody tr:hover {
  background: rgba(18, 168, 255, 0.06);
}

td input {
  background: #0d1118;
}

.brand-group-row td {
  background: #0d1118;
}

.brand-group-row span {
  color: #a071ff;
}

.row-actions button,
.cart-item button {
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #151a24;
  color: #f7f8fb;
  box-shadow: none;
}

.row-actions .danger,
.cart-item button {
  border-color: rgba(255, 90, 102, 0.34);
  background: rgba(255, 90, 102, 0.1);
  color: #ff5a66;
}

.login-view {
  background:
    linear-gradient(135deg, rgba(5, 7, 12, 0.96), rgba(20, 23, 32, 0.88)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260'%3E%3Cg fill='none' stroke='%2312a8ff' stroke-opacity='.14' stroke-width='2'%3E%3Cpath d='M32 198h62l25-55h38l25 55h48'/%3E%3Ccircle cx='64' cy='198' r='30'/%3E%3Ccircle cx='198' cy='198' r='30'/%3E%3Cpath d='M116 143l-20-48h38l23 48m0 0l20-40h25'/%3E%3C/g%3E%3C/svg%3E");
}

.login-card {
  width: min(460px, 100%);
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(19, 23, 31, 0.94);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(14px);
}

.receipt-paper {
  border-radius: 8px;
}

.export-paper {
  background: #171b24;
}

.member-tools,
.member-card,
.mechanic-commission-panel,
.mechanic-commission-row,
.member-empty {
  border-color: rgba(255, 255, 255, 0.08);
  background: #10151f;
}

.member-tools label,
.member-card span,
.mechanic-commission-head span,
.mechanic-commission-row span,
.member-empty {
  color: #8f98ac;
}

.member-card {
  color: #f7f8fb;
  box-shadow: none;
}

.member-card strong {
  color: #ffffff;
}

.mechanic-commission-head strong,
.mechanic-commission-row strong {
  color: #ffffff;
}

.mechanic-commission-row > strong {
  color: #19d77d;
}

.member-card:hover {
  border-color: rgba(18, 168, 255, 0.38);
  background: rgba(18, 168, 255, 0.08);
}

.commission-line,
.discount-line {
  border-top-color: rgba(255, 255, 255, 0.08);
  color: #12a8ff;
}

.discount-line {
  color: #19d77d;
}

.discount-pill {
  border-color: rgba(25, 215, 125, 0.36);
  background: rgba(25, 215, 125, 0.1);
  color: #19d77d;
}

@media (max-width: 860px) {
  .app {
    margin-left: 0;
  }

  .sidebar {
    width: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .topbar {
    position: static;
  }
}
