:root {
  color-scheme: light;
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f3f5f9;
  font-synthesis: none;
  --brand: #ff6b2c;
  --brand-deep: #e94e16;
  --brand-soft: #fff1e9;
  --ink: #172033;
  --muted: #7b8497;
  --line: #e7eaf0;
  --surface: #ffffff;
  --sidebar: #101827;
  --sidebar-soft: #182236;
  --green: #16a46f;
  --red: #e34850;
  --yellow: #e5a21a;
  --blue: #3a71e8;
  --shadow: 0 12px 34px rgba(22, 31, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1080px;
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.boot-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--ink);
}

.boot-screen .brand-mark,
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  font-size: 23px;
  font-weight: 900;
  background: linear-gradient(145deg, #ff8b38, #ee4418);
  box-shadow: 0 9px 22px rgba(238, 68, 24, 0.28);
}

.boot-screen strong,
.boot-screen span {
  display: block;
}

.boot-screen strong {
  font-size: 18px;
}

.boot-screen span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(520px, 1.1fr) minmax(450px, 0.9fr);
  background: #fff;
}

.auth-hero {
  position: relative;
  overflow: hidden;
  padding: 54px 8vw;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 123, 53, 0.3), transparent 30%),
    radial-gradient(circle at 82% 75%, rgba(66, 103, 214, 0.24), transparent 32%),
    linear-gradient(145deg, #0c1320 0%, #17233b 58%, #111927 100%);
}

.auth-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
  pointer-events: none;
}

.hero-brand,
.hero-copy,
.hero-points {
  position: relative;
  z-index: 1;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.hero-brand strong,
.hero-brand span {
  display: block;
}

.hero-brand strong {
  font-size: 18px;
}

.hero-brand span {
  margin-top: 2px;
  color: #9eabc1;
  font-size: 12px;
  letter-spacing: 0.12em;
}

.hero-copy {
  max-width: 650px;
}

.hero-kicker {
  display: inline-flex;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  color: #ffc2a4;
  background: rgba(255, 107, 44, 0.09);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.hero-copy h1 {
  margin: 20px 0 18px;
  font-size: clamp(42px, 4.6vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-copy h1 span {
  color: #ff7d3d;
}

.hero-copy p {
  max-width: 580px;
  margin: 0;
  color: #aeb8ca;
  font-size: 17px;
  line-height: 1.8;
}

.hero-points {
  display: flex;
  gap: 28px;
}

.hero-point {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #c5ccda;
  font-size: 13px;
}

.hero-point i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 5px rgba(255, 107, 44, 0.12);
}

.auth-panel {
  padding: 68px clamp(48px, 7vw, 110px);
  display: flex;
  align-items: center;
  background: #fff;
}

.auth-box {
  width: 100%;
  max-width: 440px;
  margin: auto;
}

.auth-box h2 {
  margin: 0;
  font-size: 31px;
}

.auth-subtitle {
  margin: 10px 0 30px;
  color: var(--muted);
  line-height: 1.7;
}

.auth-tabs {
  display: flex;
  gap: 5px;
  padding: 5px;
  margin-bottom: 25px;
  border-radius: 12px;
  background: #f2f4f7;
}

.auth-tab {
  flex: 1;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  color: #6e7788;
  background: transparent;
}

.auth-tab.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 3px 10px rgba(26, 33, 50, 0.08);
  font-weight: 650;
}

.field {
  margin-bottom: 17px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 650;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #dfe3eb;
  border-radius: 10px;
  padding: 12px 13px;
  outline: none;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #ff8c5b;
  box-shadow: 0 0 0 3px rgba(255, 107, 44, 0.11);
}

.field-hint {
  margin-top: 7px;
  color: #98a0af;
  font-size: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #394154;
  background: #fff;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.btn-primary {
  color: #fff;
  border-color: var(--brand);
  background: linear-gradient(135deg, #ff7b38, #f0541e);
  box-shadow: 0 8px 18px rgba(239, 79, 24, 0.19);
}

.btn-primary:hover {
  box-shadow: 0 10px 24px rgba(239, 79, 24, 0.28);
}

.btn-outline {
  border-color: #dfe3eb;
}

.btn-danger {
  color: var(--red);
  border-color: #ffdadd;
  background: #fff7f7;
}

.btn-block {
  width: 100%;
  min-height: 46px;
}

.btn-small {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
}

.auth-footnote {
  margin-top: 22px;
  color: #98a0af;
  text-align: center;
  font-size: 12px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
}

.sidebar {
  position: fixed;
  z-index: 5;
  inset: 0 auto 0 0;
  width: 236px;
  display: flex;
  flex-direction: column;
  color: #e7ebf3;
  background: var(--sidebar);
}

.sidebar-brand {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-brand .brand-mark {
  width: 37px;
  height: 37px;
  border-radius: 11px;
  font-size: 20px;
}

.sidebar-brand strong,
.sidebar-brand span {
  display: block;
}

.sidebar-brand strong {
  font-size: 14px;
}

.sidebar-brand span {
  margin-top: 3px;
  color: #8390a7;
  font-size: 10px;
  letter-spacing: 0.06em;
}

.nav-area {
  flex: 1;
  padding: 17px 12px;
  overflow-y: auto;
}

.nav-label {
  padding: 12px 11px 7px;
  color: #68768e;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.13em;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 3px 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  color: #99a5b9;
  background: transparent;
  text-align: left;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.045);
  transform: none;
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(255, 107, 44, 0.22), rgba(255, 107, 44, 0.08));
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #aeb8c9;
  background: rgba(255, 255, 255, 0.055);
  font-size: 13px;
}

.nav-item.active .nav-icon {
  color: #fff;
  background: var(--brand);
}

.sidebar-user {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(145deg, #5e6e8c, #35415a);
  font-weight: 800;
}

.user-chip strong,
.user-chip span {
  display: block;
  max-width: 118px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip strong {
  font-size: 13px;
}

.user-chip span {
  margin-top: 3px;
  color: #78869d;
  font-size: 10px;
}

.logout-btn {
  margin-left: auto;
  border: 0;
  color: #7f8ca1;
  background: transparent;
  font-size: 17px;
}

.main-column {
  grid-column: 2;
  min-width: 0;
}

.topbar {
  position: sticky;
  z-index: 4;
  top: 0;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.page-title h1 {
  margin: 0;
  font-size: 20px;
}

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

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.license-pill {
  padding: 8px 12px;
  border: 1px solid #cdeede;
  border-radius: 999px;
  color: #127c57;
  background: #effbf5;
  font-size: 12px;
  font-weight: 650;
}

.content {
  padding: 26px 30px 38px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
}

.stat-card,
.panel,
.module-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 3px 12px rgba(31, 42, 66, 0.035);
}

.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  padding: 20px;
}

.stat-card::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  right: -28px;
  top: -28px;
  border-radius: 50%;
  background: var(--stat-soft, #f3f6fb);
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
}

.stat-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--stat-color, var(--blue));
  background: var(--stat-soft, #eef3ff);
}

.stat-value {
  margin-top: 17px;
  font-size: 28px;
  font-weight: 780;
  letter-spacing: -0.04em;
}

.stat-note {
  margin-top: 5px;
  color: #9aa2b2;
  font-size: 11px;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr);
  gap: 18px;
  margin-top: 18px;
}

.panel {
  min-width: 0;
}

.panel-head {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 15px 19px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  margin: 0;
  font-size: 15px;
}

.panel-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.panel-body {
  padding: 18px;
}

.panel-body.flush {
  padding: 0;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.module-card {
  min-height: 150px;
  padding: 20px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.module-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.module-card .module-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--module-color, var(--brand));
  background: var(--module-soft, var(--brand-soft));
  font-size: 18px;
}

.module-card h3 {
  margin: 15px 0 7px;
  font-size: 15px;
}

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

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f4;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff8b43, #ef4f1c);
}

.license-card {
  padding: 4px 0;
}

.license-card strong {
  display: block;
  margin: 12px 0 7px;
  font-size: 26px;
}

.license-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toolbar input,
.toolbar select {
  min-height: 38px;
  border: 1px solid #dfe3eb;
  border-radius: 9px;
  padding: 8px 11px;
  outline: none;
  background: #fff;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  align-items: end;
}

.form-grid .field {
  margin: 0;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid #edf0f4;
  text-align: left;
  white-space: nowrap;
}

th {
  color: #7a8394;
  background: #fafbfc;
  font-size: 11px;
  font-weight: 650;
}

tbody tr:hover {
  background: #fffaf7;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 650;
}

.tag::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.tag-green {
  color: #0b8a5d;
  background: #eaf8f1;
}

.tag-red {
  color: #d83b43;
  background: #fff0f1;
}

.tag-yellow {
  color: #ad7600;
  background: #fff7df;
}

.tag-gray {
  color: #758096;
  background: #f0f2f5;
}

.actions {
  display: flex;
  gap: 6px;
}

.code-text {
  color: #21314d;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.empty-state {
  padding: 54px 20px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.placeholder-workspace {
  min-height: 470px;
  display: grid;
  place-items: center;
  border: 1px dashed #d9dee7;
  border-radius: 14px;
  color: var(--muted);
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 107, 44, 0.08), transparent 32%),
    #fff;
  text-align: center;
}

.placeholder-workspace .big-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 20px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 28px;
}

.placeholder-workspace h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 20px;
}

.placeholder-workspace p {
  max-width: 470px;
  margin: 0 auto 18px;
  line-height: 1.7;
}

.modal-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 16, 28, 0.54);
  backdrop-filter: blur(4px);
}

.modal {
  width: min(520px, 100%);
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(8, 14, 27, 0.28);
}

.modal-head,
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 17px 20px;
}

.modal-head {
  border-bottom: 1px solid var(--line);
}

.modal-head h3 {
  margin: 0;
  font-size: 16px;
}

.modal-body {
  padding: 20px;
}

.modal-foot {
  border-top: 1px solid var(--line);
  justify-content: flex-end;
}

.temporary-password {
  padding: 15px;
  border: 1px dashed #ffb28f;
  border-radius: 10px;
  color: #b53e12;
  background: #fff7f2;
  font-family: Consolas, monospace;
  font-size: 18px;
  font-weight: 750;
  text-align: center;
  user-select: all;
}

#toast-root {
  position: fixed;
  z-index: 100;
  right: 24px;
  top: 24px;
  display: grid;
  gap: 10px;
}

.toast {
  min-width: 280px;
  max-width: 420px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 10px;
  color: #263047;
  background: #fff;
  box-shadow: var(--shadow);
  animation: toast-in 0.18s ease-out;
}

.toast.error {
  border-left-color: var(--red);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-grid {
    grid-template-columns: 1fr;
  }
}
