:root {
  --gold: #b48b1b;
  --gold-strong: #8f6d10;
  --gold-soft: #f5e9c9;
  --ink: #111827;
  --ink-2: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-2: #d1d5db;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --page: #f3f4f6;
  --sidebar: #0f1115;
  --sidebar-2: #171a20;
  --success: #166534;
  --success-bg: #dcfce7;
  --danger: #991b1b;
  --danger-bg: #fee2e2;
  --warning: #92400e;
  --warning-bg: #fef3c7;
  --info: #1d4ed8;
  --info-bg: #dbeafe;
  --shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 2px 12px rgba(15, 23, 42, 0.05);
  --radius: 18px;
  --radius-sm: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(180, 139, 27, 0.09), transparent 26%),
    linear-gradient(180deg, #fafafa 0%, #f3f4f6 100%);
}
a { color: var(--gold-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.hidden { display: none; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 290px minmax(0, 1fr); }
.sidebar {
  background: linear-gradient(180deg, #0d0f14 0%, #151921 56%, #1a202b 100%);
  color: white;
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.brand-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: #fff;
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 4px 18px rgba(0,0,0,.24);
}
.brand strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
}
.brand-subtitle { font-size: 12px; color: #c5cad3; margin-top: 4px; }
.brand-chip {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: rgba(180, 139, 27, 0.18);
  color: #f6e8ba;
}
.nav-section-label {
  color: #7d8695;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 10px;
  margin: 14px 10px 8px;
  font-weight: 700;
}
.nav { display: flex; flex-direction: column; gap: 6px; }
.nav a {
  color: #d5d9e0;
  padding: 11px 12px;
  border-radius: 12px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: .16s ease;
  border: 1px solid transparent;
}
.nav a:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
  text-decoration: none;
}
.nav a.active {
  background: linear-gradient(90deg, rgba(180,139,27,.24), rgba(180,139,27,.06));
  border-color: rgba(180, 139, 27, 0.35);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  flex: 0 0 auto;
}
.nav a.active .nav-dot { background: var(--gold); }
.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 16px;
  color: #bcc3cf;
  font-size: 12px;
}
.sidebar-footer .meta-title {
  color: #fff;
  font-weight: 700;
  margin-bottom: 6px;
}
.main { min-width: 0; }
.topbar {
  height: 78px;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(17,24,39,.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-title { font-size: 13px; color: var(--muted); }
.topbar-title strong { display: block; color: var(--ink); font-size: 15px; }
.topbar .user { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #111827, #374151);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
}
.role-pill {
  background: var(--gold-soft);
  color: #6b4d00;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .04em;
}
.content { padding: 28px; max-width: 1560px; margin: 0 auto; }
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.page-head.compact { margin-bottom: 14px; }
.page-head .copy { max-width: 780px; }
h1 {
  font-family: Georgia, serif;
  font-weight: 600;
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.02em;
  color: #111827;
}
h2 { font-size: 18px; margin: 0; color: #111827; }
h3 { font-size: 15px; margin: 0; color: #111827; }
.subtle { color: var(--muted); font-size: 13px; margin-top: 8px; line-height: 1.5; }
.card {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(17,24,39,0.07);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-soft);
}
.card + .card { margin-top: 18px; }
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.card-header .subtle { margin-top: 5px; }
.hero {
  background: linear-gradient(135deg, #111827 0%, #1f2937 46%, #695116 100%);
  color: white;
  border: 1px solid rgba(17,24,39,0.1);
  box-shadow: var(--shadow);
}
.hero h1, .hero h2, .hero h3, .hero .subtle { color: inherit; }
.hero .subtle { color: rgba(255,255,255,.8); }
.hero-grid { display: grid; grid-template-columns: 1.35fr .95fr; gap: 22px; align-items: stretch; }
.hero-stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.hero-stat {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 14px;
}
.hero-stat .label { color: rgba(255,255,255,.7); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.hero-stat .value { font-size: 26px; font-weight: 800; margin-top: 6px; }
.hero-stat .hint { font-size: 12px; color: rgba(255,255,255,.74); margin-top: 4px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.metric {
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.metric::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -18px;
  width: 90px;
  height: 90px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(180,139,27,.16) 0%, rgba(180,139,27,0) 72%);
}
.metric .label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.metric .value { font-size: 30px; font-weight: 800; margin-top: 8px; line-height: 1; }
.metric .hint { color: var(--muted); font-size: 12px; margin-top: 7px; }
.metric .trend { margin-top: 12px; display: inline-flex; padding: 5px 8px; border-radius: 999px; background: var(--gold-soft); color: #6b4d00; font-size: 11px; font-weight: 700; }
.mini-metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.mini-metric {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.mini-metric .label { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.mini-metric .value { font-size: 24px; font-weight: 800; }
.section-title {
  border-left: 4px solid var(--gold);
  padding-left: 10px;
  margin-bottom: 14px;
}
.section-title h2 { margin: 0; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  transition: .16s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; filter: grayscale(.15); box-shadow: none; }
.btn-primary { background: linear-gradient(180deg, #c89a1b, var(--gold)); color: #111; box-shadow: 0 8px 18px rgba(180, 139, 27, 0.24); }
.btn-dark { background: #111827; color: white; }
.btn-light { background: white; color: #222; border-color: var(--line); }
.btn-danger { background: #b91c1c; color: white; }
.btn-sm { padding: 8px 10px; font-size: 12px; border-radius: 10px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.alert { border-radius: 14px; padding: 14px 16px; margin-bottom: 18px; font-size: 13px; border: 1px solid transparent; line-height: 1.5; }
.alert strong { display: inline-block; margin-bottom: 4px; }
.alert-success { color: var(--success); background: var(--success-bg); border-color: #bbf7d0; }
.alert-danger { color: var(--danger); background: var(--danger-bg); border-color: #fecaca; }
.alert-warning { color: var(--warning); background: var(--warning-bg); border-color: #fde68a; }
.alert-info { color: var(--info); background: var(--info-bg); border-color: #bfdbfe; }
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}
table { width: 100%; border-collapse: collapse; min-width: 620px; }
th {
  text-align: left;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f9fafb;
  white-space: nowrap;
}
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  vertical-align: top;
}
tr:last-child td { border-bottom: none; }
.data-row-main { font-weight: 700; color: var(--ink); }
.data-row-sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  text-transform: capitalize;
}
.badge-valid, .badge-completed, .badge-approved { background: var(--success-bg); color: var(--success); }
.badge-blocked, .badge-failed { background: var(--danger-bg); color: var(--danger); }
.badge-warning, .badge-review_required { background: var(--warning-bg); color: var(--warning); }
.badge-imported, .badge-pending { background: var(--info-bg); color: var(--info); }
.badge-processing, .badge-generating { background: #ede9fe; color: #5b21b6; }
.badge-disabled { background: #f3f4f6; color: #4b5563; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid .span-2 { grid-column: 1 / -1; }
label { display: block; font-size: 12px; font-weight: 800; margin-bottom: 7px; color: #374151; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  font-size: 13px;
  background: white;
  color: var(--ink);
}
textarea { min-height: 100px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(180,139,27,.14);
}
.help { color: var(--muted); font-size: 11px; margin-top: 6px; line-height: 1.45; }
.checkline { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.checkline input { width: auto; margin: 0; }
.searchbar { display: flex; gap: 8px; max-width: 560px; }
.searchbar input { flex: 1; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; color: var(--muted); font-size: 12px; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 10px 16px; font-size: 13px; }
.kv > div:nth-child(odd) { color: var(--muted); font-weight: 700; }
.validation-list { margin: 7px 0 0; padding-left: 18px; font-size: 12px; }
.validation-list li { margin: 4px 0; }
.progress { height: 11px; background: #eceff3; border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--gold), #dfb74a); }
.empty-state {
  border: 1px dashed var(--line-2);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: linear-gradient(180deg, #fff, #fafafa);
}
.empty-state strong { display: block; color: var(--ink); margin-bottom: 6px; font-size: 16px; }
.status-list { display: flex; flex-direction: column; gap: 12px; }
.status-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
}
.status-item .left { min-width: 0; }
.status-item .title { font-weight: 700; }
.status-item .desc { color: var(--muted); font-size: 12px; margin-top: 4px; }
.status-indicator { width: 10px; height: 10px; border-radius: 999px; background: var(--line-2); margin-top: 5px; }
.status-indicator.success { background: #22c55e; }
.status-indicator.warning { background: #f59e0b; }
.status-indicator.danger { background: #ef4444; }
.status-indicator.info { background: #3b82f6; }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.info-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #fafafa);
  padding: 16px;
}
.info-panel h3 { margin-bottom: 10px; }
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 430px);
  background: linear-gradient(135deg, #0b0d11 0%, #171b22 58%, #6d5414 100%);
}
.login-aside {
  padding: 56px 64px;
  color: white;
  display: flex;
  align-items: center;
}
.login-showcase { max-width: 640px; }
.login-mark {
  width: 94px;
  height: 94px;
  border-radius: 24px;
  background: rgba(255,255,255,0.1);
  display: grid;
  place-items: center;
  padding: 12px;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}
.login-showcase h1 {
  color: white;
  font-size: 44px;
  line-height: 1.05;
  margin-bottom: 12px;
}
.login-showcase p {
  color: rgba(255,255,255,.78);
  font-size: 16px;
  line-height: 1.7;
  margin: 0;
}
.login-bullets { display: grid; gap: 12px; margin-top: 28px; }
.login-bullet {
  border: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.06);
  border-radius: 16px;
  padding: 14px 16px;
}
.login-bullet strong { display: block; margin-bottom: 4px; }
.login-card-wrap { display: grid; place-items: center; padding: 24px; }
.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255,255,255,.96);
  border-radius: 24px;
  padding: 34px;
  box-shadow: 0 22px 70px rgba(0,0,0,.26);
  border: 1px solid rgba(255,255,255,.6);
}
.login-card img { width: 110px; height: 110px; object-fit: contain; display: block; margin: 0 auto 16px; }
.login-card h1 { text-align: center; font-size: 28px; }
.login-card .subtle { text-align: center; margin-bottom: 24px; }
.login-card .btn { width: 100%; margin-top: 8px; padding: 13px; }
.login-footer-note { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }
hr.soft { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.logo-preview { max-width: 180px; max-height: 180px; object-fit: contain; border: 1px solid var(--line); border-radius: 14px; background: white; padding: 10px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.page-grid { display: grid; grid-template-columns: 1.4fr .9fr; gap: 18px; }
.note-card {
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(180deg, #fff, #fafafa);
  border: 1px solid var(--line);
}
.note-card strong { display: block; margin-bottom: 6px; }
.data-callout {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #fafafa);
  border: 1px solid var(--line);
}
.data-callout .icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--gold-soft);
  color: #6b4d00;
  font-weight: 900;
}
.page-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}
.page-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--gold);
}
@media (max-width: 1220px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-grid, .hero-grid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .grid-4, .grid-3, .grid-2, .form-grid, .info-grid, .mini-metric-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .content { padding: 18px; }
  .topbar { padding: 0 18px; }
  .login-shell { grid-template-columns: 1fr; }
  .login-aside { display: none; }
  .login-card-wrap { padding: 18px; }
}

/* v1.0.10 - minimal corporate login */
.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 15%, rgba(180, 139, 27, 0.16), transparent 34%),
    linear-gradient(145deg, #0c0d11 0%, #151820 58%, #30260e 100%);
}
.login-shell.login-shell-minimal {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  padding: 28px;
  background: transparent;
}
.login-card-wrap.login-card-wrap-minimal {
  width: 100%;
  display: grid;
  place-items: center;
  padding: 0;
}
.login-card.login-card-minimal {
  width: 100%;
  max-width: 430px;
  padding: 38px 36px 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.985);
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: 0 30px 80px rgba(0,0,0,.36), 0 2px 6px rgba(0,0,0,.08);
}
.login-brand-block {
  text-align: center;
  margin-bottom: 30px;
}
.login-card.login-card-minimal .login-primary-logo {
  width: 104px;
  height: 104px;
  object-fit: contain;
  display: block;
  margin: 0 auto 17px;
}
.login-card.login-card-minimal h1 {
  margin: 0;
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
  line-height: 1.15;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.02em;
}
.login-form { margin: 0; }
.login-field { margin-bottom: 16px; }
.login-field label {
  margin-bottom: 7px;
  font-size: 12px;
  color: #252b36;
}
.login-field input {
  min-height: 46px;
  border-radius: 12px;
  background: #fff;
}
.login-submit {
  width: 100%;
  min-height: 46px;
  margin-top: 5px;
  border-radius: 12px;
  font-size: 13px;
}
.login-powered {
  margin-top: 27px;
  padding-top: 18px;
  border-top: 1px solid #eceef1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #7a808b;
  font-size: 10.5px;
  letter-spacing: .02em;
}
.login-powered img {
  width: 104px !important;
  height: auto !important;
  max-height: 24px;
  object-fit: contain;
  display: block;
  margin: 0 !important;
}
@media (max-width: 560px) {
  .login-shell.login-shell-minimal { padding: 18px; }
  .login-card.login-card-minimal {
    max-width: 100%;
    padding: 32px 26px 24px;
    border-radius: 22px;
  }
  .login-card.login-card-minimal .login-primary-logo {
    width: 94px;
    height: 94px;
  }
  .login-card.login-card-minimal h1 { font-size: 27px; }
}
