:root {
  --bg: #f4f0e6;
  --panel: #fffdf6;
  --panel-2: #fff8e6;
  --line: #e1c982;
  --line-soft: #efe2b8;
  --ink: #3d2a18;
  --muted: #816a4d;
  --gold: #c99b22;
  --gold-dark: #95670d;
  --green: #2f9b62;
  --red: #c94b37;
  --blue: #2e74a6;
  --shadow: 0 18px 48px rgba(108, 73, 28, .12);
  --radius: 10px;
  --font: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html,
body {
  height: 100%;
  width: 100%;
  max-width: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 221, 115, .28), transparent 28%),
    linear-gradient(135deg, #fff9e7 0%, #f4f0e6 48%, #efe4d5 100%);
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  height: 100vh;
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  padding: 14px;
}

.top-bar {
  display: grid;
  grid-template-columns: auto minmax(520px, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 72px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255,255,255,.72), transparent 70%),
    var(--panel);
  box-shadow: var(--shadow);
  min-width: 0;
  max-width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 230px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.8);
  background: linear-gradient(180deg, #f5d466, #bd7a18);
  color: #fff9d7;
  font-weight: 900;
  box-shadow: inset 0 1px rgba(255,255,255,.55), 0 8px 20px rgba(149, 103, 13, .2);
}

.brand h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  color: #6c3d16;
}

.brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.top-controls {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(160px, 220px) auto;
  align-items: end;
  gap: 12px;
  min-width: 0;
}

.control,
.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.control span,
.field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

input[type="text"],
input[type="number"],
input[type="date"],
select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 252, 241, .92);
  color: var(--ink);
  padding: 7px 10px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 155, 34, .18);
}

input[type="radio"],
input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--gold);
}

.switch-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #fff8e6;
  color: #68481e;
  font-weight: 800;
  white-space: nowrap;
}

.top-actions,
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.btn {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 900;
  color: #fff;
}

.btn-refresh {
  background: linear-gradient(180deg, #d9b84c, #b07d17);
  border-color: #9f7116;
}

.btn-reset,
.btn-dialog-cancel {
  background: #8c8a82;
  border-color: #77756f;
}

.btn-save,
.btn-dialog-confirm {
  background: linear-gradient(180deg, #4bbb7a, #24844f);
  border-color: #1f7445;
}

.btn-quick-pass {
  background: linear-gradient(180deg, #ef9b45, #c7651f);
  border-color: #ad5318;
}

.workspace {
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 14px;
}

.sidebar {
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 246, .92);
  box-shadow: var(--shadow);
}

.sidebar-content {
  height: 100%;
  overflow: auto;
  padding: 12px;
}

.sidebar-section {
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: rgba(255, 255, 255, .68);
  padding: 12px;
  margin-bottom: 12px;
}

.sidebar-section h4 {
  margin: -2px 0 10px;
  color: #7a541c;
  font-size: 13px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field {
  margin-bottom: 10px;
}

.sidebar-section .field:last-child {
  margin-bottom: 0;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.choice-grid label,
.choice-row label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #fffaf0;
  color: #584025;
  font-weight: 700;
}

.choice-grid .wide {
  grid-column: 1 / -1;
}

.choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.helper p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.content-body {
  min-width: 0;
  max-width: 100%;
  min-height: 0;
}

.table-card {
  min-width: 0;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.table-toolbar {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #fff9e5, #fff6db);
}

.table-summary {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
}

.table-toolbar strong {
  display: inline-flex;
  color: #6c3d16;
  font-size: 16px;
  line-height: 1.2;
}

#totalInfo {
  display: inline-flex;
  color: var(--muted);
  font-size: 12px;
}

.audit-stats {
  color: #7d551d;
  font-size: 12px;
  font-weight: 800;
}

.last-submit {
  margin: 8px 12px 0;
  padding: 8px 10px;
  border: 1px solid #ecd79d;
  border-radius: 8px;
  background: #fff8dc;
  color: #75511d;
  font-size: 12px;
  font-weight: 800;
}

.last-submit.hidden {
  display: none;
}

.table-wrapper {
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-rows: 1fr auto;
}

.table-scroll {
  min-height: 0;
  min-width: 0;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 1120px;
}

thead {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f1df9d;
  box-shadow: 0 1px 0 var(--line);
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee4c4;
  text-align: left;
  vertical-align: top;
}

th {
  color: #5b421e;
  font-size: 13px;
}

tbody tr:nth-child(even) {
  background: #fffaf0;
}

tbody tr:hover {
  background: #fff2ca;
}

.risk-row {
  background: #fff2e8 !important;
}

.risk-row:hover {
  background: #ffe5d5 !important;
}

.info-cell {
  color: #4b3720;
  font-size: 13px;
  line-height: 1.55;
}

.item-name {
  color: var(--blue);
  font-weight: 900;
}

.price-val {
  color: #c65e1b;
  font-weight: 900;
}

.risk-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  margin-top: 6px;
  padding: 3px 7px;
  border: 1px solid #e6a178;
  border-radius: 999px;
  background: #fff0e4;
  color: #ad4d1b;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
  word-break: keep-all;
}

.role-name-link {
  color: var(--blue);
  text-decoration: underline;
  cursor: pointer;
}

.role-name-link:hover {
  color: #184e73;
}

.audit-group,
.audit-head-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.audit-group label,
.audit-head-group label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #fffaf0;
  border: 1px solid var(--line-soft);
  color: #604522;
  font-weight: 800;
}

.th-with-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-name-filter {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid #d3bd7e;
  border-radius: 6px;
  background: #fff8df;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-name-filter:hover,
.btn-name-filter.active {
  background: #fce9a9;
  border-color: var(--gold);
}

.icon-filter {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid #8a6d3b;
  transform: translateY(1px);
}

.pager-bar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-top: 1px solid var(--line-soft);
  background: #fffaf0;
}

.pager-bar .controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.pager-bar button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdf6;
  color: #5d4037;
  padding: 0 10px;
  font-weight: 800;
}

#inputPage,
#pageSizeSelect {
  width: auto;
  min-height: 30px;
  padding: 4px 7px;
  font-size: 12px;
}

#inputPage {
  width: 66px;
}

.op-mask,
.dialog-mask {
  position: fixed;
  inset: 0;
  background: rgba(40, 28, 16, .42);
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.dialog-mask.active {
  display: flex;
}

.op-mask-box,
.dialog-card,
.name-filter-popup {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(35, 25, 16, .22);
}

.op-mask-box {
  min-width: 190px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.op-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line-soft);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: op-spin .8s linear infinite;
}

@keyframes op-spin {
  to { transform: rotate(360deg); }
}

.dialog-card {
  width: min(440px, calc(100vw - 32px));
  padding: 18px;
}

.dialog-title {
  margin-bottom: 14px;
  color: #7a541c;
  font-size: 17px;
  font-weight: 900;
}

.dialog-row {
  display: grid;
  grid-template-columns: 82px 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.dialog-row label {
  color: var(--muted);
  font-weight: 800;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.name-filter-popup {
  position: fixed;
  z-index: 9997;
  width: min(340px, calc(100vw - 24px));
  max-height: min(440px, calc(100vh - 24px));
  display: none;
  overflow: hidden;
}

.name-filter-popup.active {
  display: block;
}

.name-filter-head {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line-soft);
  background: #fff2c8;
  color: #70501d;
  font-weight: 900;
}

.name-filter-clear {
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf6;
  color: #70501d;
  padding: 0 9px;
  font-weight: 800;
}

.name-filter-list {
  max-height: 390px;
  overflow: auto;
  padding: 8px;
}

.name-filter-item {
  width: 100%;
  margin-bottom: 6px;
  padding: 7px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #fffaf0;
  color: var(--ink);
  text-align: left;
}

.name-filter-item:hover,
.name-filter-item.active {
  border-color: var(--gold);
  background: #fce9a9;
  font-weight: 900;
}

.name-filter-empty {
  padding: 10px;
  color: var(--muted);
}

@media (max-width: 1100px) {
  body {
    overflow: auto;
    overflow-x: hidden;
  }

  .app-shell {
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
  }

  .top-bar {
    grid-template-columns: 1fr;
    align-items: stretch;
    min-width: 0;
  }

  .top-controls {
    grid-template-columns: 1fr 1fr;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .workspace {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .sidebar {
    max-height: none;
  }

  .table-card {
    min-height: 680px;
  }
}

@media (max-width: 680px) {
  .app-shell {
    display: flex;
    flex-direction: column;
    width: 100vw;
    max-width: 100vw;
    padding: 10px;
    gap: 10px;
  }

  .top-bar,
  .workspace,
  .sidebar,
  .content-body,
  .table-card {
    width: calc(100% - 10px);
    max-width: 100%;
  }

  .top-controls,
  .field-grid,
  .choice-grid {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .brand h1 {
    font-size: 20px;
  }

  .toolbar-actions,
  .top-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-width: 0;
  }

  .btn {
    width: 100%;
    min-width: 0;
  }

  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .dialog-row {
    grid-template-columns: 1fr;
  }
}

/* ===================================
   Minimal glass refresh
====================================== */
:root {
  --bg: #12323b;
  --panel: rgba(24, 55, 64, .7);
  --panel-2: rgba(255, 255, 255, .105);
  --line: rgba(255, 255, 255, .22);
  --line-soft: rgba(255, 255, 255, .14);
  --ink: #f7fbff;
  --muted: rgba(236, 247, 255, .72);
  --gold: #3fbda8;
  --gold-dark: #64b7ff;
  --green: #3fbda8;
  --red: #ff6f91;
  --blue: #7ed0ff;
  --shadow: 0 24px 70px rgba(0, 0, 0, .23);
  --radius: 18px;
  --motion: 240ms cubic-bezier(.2, .8, .2, 1);
}

body {
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(101, 231, 200, .22), transparent 34%),
    linear-gradient(235deg, rgba(100, 183, 255, .2), transparent 42%),
    linear-gradient(180deg, #12313b 0%, #153b46 56%, #102b33 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .74), transparent 82%);
}

.app-shell {
  gap: 16px;
  padding: 16px;
}

.top-bar,
.sidebar,
.table-card,
.dialog-card,
.name-filter-popup,
.op-mask-box {
  border-color: var(--line);
  background: var(--panel);
  -webkit-backdrop-filter: blur(24px) saturate(1.35);
  backdrop-filter: blur(24px) saturate(1.35);
  box-shadow: var(--shadow);
}

.top-bar {
  grid-template-columns: auto minmax(500px, 1fr) auto;
  min-height: 76px;
  padding: 12px 16px;
  border-radius: 999px;
}

.brand {
  min-width: 250px;
}

.brand-mark {
  border-radius: 14px;
  border-color: rgba(255, 255, 255, .38);
  color: #071318;
  background: linear-gradient(135deg, var(--green), var(--gold-dark));
  box-shadow: 0 16px 34px rgba(78, 188, 218, .2);
}

.brand h1,
.table-toolbar strong,
.sidebar-section h4,
.dialog-title,
.name-filter-head {
  color: var(--ink);
  letter-spacing: 0;
}

.brand p,
.control span,
.field span,
.helper p,
#totalInfo,
.audit-stats,
.pager-bar .controls,
.dialog-row label,
.name-filter-empty {
  color: var(--muted);
}

input[type="text"],
input[type="number"],
input[type="date"],
select {
  min-height: 38px;
  border-color: var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .12);
  color: var(--ink);
  transition: border-color var(--motion), box-shadow var(--motion), background var(--motion);
}

input[type="text"]::placeholder,
input[type="number"]::placeholder {
  color: rgba(236, 247, 255, .44);
}

input:focus,
select:focus {
  border-color: rgba(101, 231, 200, .82);
  background: rgba(255, 255, 255, .16);
  box-shadow: 0 0 0 4px rgba(101, 231, 200, .13);
}

select option {
  color: #0f242c;
  background: #f7fbff;
}

input[type="radio"],
input[type="checkbox"] {
  accent-color: var(--green);
}

.switch-line,
.choice-grid label,
.choice-row label,
.audit-group label,
.audit-head-group label,
.pager-bar button,
.name-filter-clear,
.name-filter-item {
  border-color: var(--line-soft);
  border-radius: 999px;
  color: rgba(247, 251, 255, .84);
  background: rgba(255, 255, 255, .105);
  transition: transform var(--motion), background var(--motion), border-color var(--motion), color var(--motion);
}

.choice-grid label:hover,
.choice-row label:hover,
.audit-group label:hover,
.audit-head-group label:hover,
.pager-bar button:hover,
.name-filter-clear:hover,
.name-filter-item:hover,
.name-filter-item.active {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, .32);
  background: rgba(255, 255, 255, .15);
  color: var(--ink);
}

.btn {
  min-height: 38px;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .14);
  transition: transform var(--motion), box-shadow var(--motion), background var(--motion), opacity var(--motion);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(0, 0, 0, .18);
}

.btn-refresh,
.btn-save,
.btn-dialog-confirm {
  color: #071318;
  border-color: rgba(255, 255, 255, .42);
  background: linear-gradient(135deg, var(--green), var(--gold-dark));
}

.btn-reset,
.btn-dialog-cancel {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, .12);
}

.btn-quick-pass {
  color: #071318;
  border-color: rgba(255, 255, 255, .38);
  background: linear-gradient(135deg, #ffd56e, #ff9b61);
}

.workspace {
  gap: 16px;
}

.sidebar {
  border-radius: 22px;
}

.sidebar-content {
  padding: 14px;
}

.sidebar-section {
  border-color: var(--line-soft);
  border-radius: 18px;
  background: rgba(255, 255, 255, .085);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045);
}

.table-card {
  border-radius: 22px;
}

.table-toolbar {
  min-height: 54px;
  border-bottom-color: var(--line-soft);
  background: rgba(255, 255, 255, .1);
}

.last-submit {
  border-color: var(--line-soft);
  background: rgba(255, 213, 110, .12);
  color: var(--ink);
}

.table-scroll {
  background: rgba(11, 30, 37, .3);
}

thead {
  background: rgba(44, 89, 99, .94);
  box-shadow: 0 1px 0 var(--line);
}

th,
td {
  border-bottom-color: rgba(255, 255, 255, .1);
}

th {
  color: rgba(247, 251, 255, .88);
}

td {
  color: rgba(236, 247, 255, .78);
}

tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, .045);
}

tbody tr:hover {
  background: rgba(101, 231, 200, .095);
}

.risk-row {
  background: rgba(255, 111, 145, .105) !important;
}

.risk-row:hover {
  background: rgba(255, 111, 145, .16) !important;
}

.info-cell {
  color: rgba(236, 247, 255, .82);
}

.item-name,
.role-name-link {
  color: var(--blue);
}

.role-name-link:hover {
  color: var(--green);
}

.price-val {
  color: var(--gold);
}

.risk-badge {
  border-color: rgba(255, 111, 145, .28);
  background: rgba(255, 111, 145, .13);
  color: #ffd0d9;
  white-space: nowrap;
  word-break: keep-all;
}

.btn-name-filter {
  border-color: var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, .1);
}

.btn-name-filter:hover,
.btn-name-filter.active {
  border-color: rgba(101, 231, 200, .74);
  background: rgba(101, 231, 200, .16);
}

.icon-filter {
  border-top-color: rgba(247, 251, 255, .76);
}

.pager-bar {
  border-top-color: var(--line-soft);
  background: rgba(255, 255, 255, .09);
}

.op-mask,
.dialog-mask {
  background: rgba(3, 10, 13, .52);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.dialog-card {
  border-radius: 22px;
}

.name-filter-head {
  border-bottom-color: var(--line-soft);
  background: rgba(255, 255, 255, .12);
}

.name-filter-list {
  background: rgba(10, 27, 34, .4);
}

.op-spinner {
  border-color: rgba(255, 255, 255, .2);
  border-top-color: var(--green);
}

@media (max-width: 1100px) {
  .top-bar {
    border-radius: 24px;
    grid-template-columns: 1fr;
  }

  .top-controls {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .app-shell {
    padding: 10px;
  }

  .top-bar,
  .workspace,
  .sidebar,
  .content-body,
  .table-card {
    width: 100%;
  }

  .brand {
    min-width: 0;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .sidebar-section {
    padding: 12px;
  }
}

/* ===================================
   Sunlight tuning
====================================== */
:root {
  --bg: #276b78;
  --panel: rgba(54, 96, 106, .54);
  --panel-2: rgba(255, 255, 255, .14);
  --line: rgba(255, 255, 255, .28);
  --line-soft: rgba(255, 255, 255, .18);
  --muted: rgba(243, 251, 255, .78);
  --shadow: 0 24px 64px rgba(0, 0, 0, .2);
}

body {
  background:
    linear-gradient(135deg, rgba(101, 231, 200, .32), transparent 34%),
    linear-gradient(235deg, rgba(100, 183, 255, .3), transparent 42%),
    linear-gradient(180deg, #276b78 0%, #2f7f8c 56%, #23626d 100%);
}

body::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .64), transparent 82%);
}

.top-bar,
.sidebar,
.table-card,
.dialog-card,
.name-filter-popup,
.op-mask-box {
  background: rgba(54, 96, 106, .54);
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
.switch-line,
.choice-grid label,
.choice-row label,
.audit-group label,
.audit-head-group label,
.pager-bar button,
.name-filter-clear,
.name-filter-item {
  background: rgba(255, 255, 255, .14);
}

.sidebar-section,
.table-toolbar,
.pager-bar {
  background: rgba(255, 255, 255, .13);
}

.table-scroll,
.name-filter-list {
  background: rgba(24, 72, 82, .22);
}

thead {
  background: rgba(75, 130, 142, .88);
}

tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, .06);
}

.op-mask,
.dialog-mask {
  background: rgba(3, 10, 13, .36);
}

/* ===================================
   Unified Frosted Glass
====================================== */
:root {
  --glass-blur: 30px;
  --glass-saturate: 1.55;
  --glass-frost: rgba(255, 255, 255, .17);
  --glass-frost-strong: rgba(255, 255, 255, .24);
  --glass-shadow: 0 26px 72px rgba(14, 61, 74, .22);
}

.top-bar,
.sidebar,
.sidebar-section,
.table-card,
.table-toolbar,
.pager-bar,
.dialog-card,
.name-filter-popup,
.op-mask-box {
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, var(--glass-frost-strong), rgba(255, 255, 255, .08));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  box-shadow: var(--glass-shadow), inset 0 1px rgba(255, 255, 255, .28);
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
.switch-line,
.choice-grid label,
.choice-row label,
.audit-group label,
.audit-head-group label,
.pager-bar button,
.btn,
.name-filter-clear,
.name-filter-item {
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  backdrop-filter: blur(20px) saturate(1.35);
}

/* ===================================
   Contrast tuning for glass panels
====================================== */
:root {
  --ink-strong: #062833;
  --ink: #123d48;
  --ink-soft: rgba(18, 61, 72, .76);
}

.top-bar,
.top-bar h1,
.top-bar p,
.sidebar,
.sidebar h4,
.sidebar label,
.table-card,
.table-card strong,
.table-toolbar,
.dialog-card,
.dialog-card label,
.name-filter-popup {
  color: var(--ink-strong);
  text-shadow: none;
}

.brand p,
.sidebar span,
.table-summary span,
.audit-stats,
.dialog-card label {
  color: var(--ink-soft);
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
.choice-grid label,
.choice-row label,
.switch-line,
.pager-bar button,
.name-filter-item {
  color: var(--ink-strong);
  background: rgba(255, 255, 255, .38);
}

input::placeholder {
  color: rgba(6, 40, 51, .52);
}

th {
  color: #062833;
}

td {
  color: rgba(236, 247, 255, .84);
}

/* ===================================
   Promo palette alignment
====================================== */
:root {
  --bg: #d9f8fb;
  --panel: rgba(54, 112, 124, .48);
  --panel-2: rgba(255, 255, 255, .18);
  --line: rgba(255, 255, 255, .36);
  --line-soft: rgba(255, 255, 255, .24);
  --green: #3fbda8;
  --blue: #64b7ff;
  --gold: #ffc65a;
  --gold-dark: #ff9f45;
  --glass-frost: rgba(255, 255, 255, .13);
  --glass-frost-strong: rgba(50, 105, 116, .48);
}

body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(18, 70, 78, .34)),
    linear-gradient(145deg, rgba(101, 231, 200, .3), transparent 38%),
    linear-gradient(235deg, rgba(100, 183, 255, .3), transparent 44%),
    url("../PromoWeb/admin-bg-glass.png") center center / cover fixed no-repeat,
    linear-gradient(180deg, #d9f8fb, #27717d);
}

body::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
  opacity: .62;
}

.top-bar,
.sidebar,
.sidebar-section,
.table-card,
.table-toolbar,
.pager-bar,
.dialog-card,
.name-filter-popup,
.op-mask-box {
  background:
    linear-gradient(145deg, rgba(54, 112, 124, .54), rgba(255, 255, 255, .12));
}

.table-scroll,
.name-filter-list {
  background: rgba(54, 112, 124, .26);
}

thead {
  background: linear-gradient(180deg, rgba(255, 255, 255, .24), rgba(54, 112, 124, .22));
}

.btn-refresh,
.btn-save,
.btn-dialog-confirm,
.brand-mark {
  color: #061318;
  background: linear-gradient(135deg, var(--green), var(--blue));
}

.btn-reset,
.btn-dialog-cancel,
.pager-bar button,
.choice-grid label,
.choice-row label,
.switch-line,
input[type="text"],
input[type="number"],
input[type="date"],
select {
  background: rgba(255, 255, 255, .38);
}

/* ===================================
   Lingjing unified brand icon
====================================== */
.brand-mark {
  display: block;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  object-fit: cover;
  background: rgba(255, 255, 255, .28);
  box-shadow: 0 14px 30px rgba(14, 61, 74, .24), inset 0 1px rgba(255, 255, 255, .3);
}

/* ===================================
   Final typography polish
====================================== */
.brand h1,
.sidebar h4,
.table-card strong {
  color: #073240;
  font-weight: 800;
  letter-spacing: 0 !important;
  text-shadow: none;
}

.brand h1 {
  font-size: 21px;
  line-height: 1.15;
}

.brand p,
.sidebar span,
.table-summary span {
  color: rgba(7, 50, 64, .68);
  font-weight: 560;
  text-shadow: none;
}

/* ===================================
   Audit readability colors
====================================== */
.info-cell [style*="color:#27ae60"],
.info-cell [style*="color: #27ae60"],
.dialog-card [style*="color:#27ae60"],
.dialog-card [style*="color: #27ae60"] {
  color: #0b6b5f !important;
  font-weight: 760;
  text-shadow: none !important;
}

.info-cell [style*="color:#0b6b5f"],
.dialog-card [style*="color:#0b6b5f"] {
  color: #0b6b5f !important;
  font-weight: 760;
  text-shadow: none !important;
}

.role-name-link:hover,
.btn-name-filter:hover,
.btn-name-filter.active {
  color: #07564d !important;
}
