:root {
  --bg: #f3f7f8;
  --panel: rgba(255, 255, 255, 0.82);
  --line: #dce8e8;
  --brand: #79d9d2;
  --brand-deep: #39b9b1;
  --brand-soft: #eaf9f7;
  --text: #0f172a;
  --muted: #667085;
  --pink: #eefbfa;
  --success: #16a085;
  --warning: #d58f1a;
  --danger: #c95c6e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(121, 217, 210, 0.22), transparent 24%),
    radial-gradient(circle at left top, rgba(185, 241, 235, 0.24), transparent 22%),
    linear-gradient(180deg, #f8fbfc, #f1f6f7);
  color: var(--text);
  font-family: "PingFang SC", "SF Pro Display", "Helvetica Neue", sans-serif;
}

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

#app {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  min-height: 100vh;
  padding: 20px;
}

.sidebar,
.main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel {
  background: var(--panel);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  box-shadow: 0 22px 48px rgba(19, 37, 56, 0.08);
}

h3,
h4,
p {
  margin-top: 0;
}

.brand {
  padding: 10px 4px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-symbol {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(127, 222, 215, 0.98), rgba(57, 185, 177, 0.94));
  box-shadow: 0 14px 30px rgba(57, 185, 177, 0.16);
  overflow: hidden;
  flex-shrink: 0;
}

.brand-symbol::before,
.brand-symbol::after {
  content: "";
  position: absolute;
  border-radius: 999px;
}

.brand-symbol::before {
  top: 10px;
  left: 10px;
  width: 30px;
  height: 12px;
  background: rgba(255, 255, 255, 0.9);
  transform: rotate(-36deg);
}

.brand-symbol::after {
  right: 10px;
  bottom: 10px;
  width: 22px;
  height: 10px;
  background: rgba(234, 249, 247, 0.76);
  transform: rotate(-36deg);
}

.brand-en,
.eyebrow {
  margin: 0;
  letter-spacing: 0.25em;
  font-size: 12px;
  color: var(--brand-deep);
}

.brand h1,
.topbar h2 {
  margin: 8px 0 0;
  font-size: 28px;
}

.brand-sub {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.login-card,
.nav,
.topbar,
.view {
  padding: 20px;
}

.field-label,
.tips {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
}

.input,
.textarea {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.textarea {
  min-height: 88px;
  padding: 12px 14px;
}

.input:focus,
.textarea:focus {
  outline: none;
  border-color: rgba(57, 185, 177, 0.28);
  box-shadow: 0 0 0 4px rgba(121, 217, 210, 0.14);
  background: rgba(255, 255, 255, 0.96);
}

.gold-btn,
.light-btn,
.nav-item {
  min-height: 44px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
}

.gold-btn {
  color: #fff;
  background: linear-gradient(135deg, #7fded7, #39b9b1);
  box-shadow: 0 10px 22px rgba(57, 185, 177, 0.16);
}

.light-btn {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(57, 185, 177, 0.22);
  color: var(--brand-deep);
}

.gold-btn:hover,
.light-btn:hover,
.nav-item:hover,
.tab-btn:hover {
  transform: translateY(-1px);
}

.full-btn {
  width: 100%;
}

.nav {
  display: grid;
  gap: 12px;
}

.nav-item {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  text-align: left;
  padding: 0 16px;
}

.nav-item.active {
  background: rgba(234, 249, 247, 0.96);
  border-color: rgba(57, 185, 177, 0.2);
  color: var(--brand-deep);
}

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}

.topbar::after {
  content: "";
  position: absolute;
  right: -32px;
  top: -28px;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(121, 217, 210, 0.16), transparent 68%);
}

.user-chip {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(234, 249, 247, 0.92);
  color: var(--brand-deep);
  position: relative;
  z-index: 1;
}

.topbar h2,
.topbar .eyebrow,
.topbar-sub {
  position: relative;
  z-index: 1;
}

.topbar-sub {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.workbench-header,
.workbench-panel,
.inner-panel {
  padding: 20px;
}

.workbench-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.workbench-header {
  background:
    radial-gradient(circle at top right, rgba(121, 217, 210, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(246, 252, 252, 0.82));
}

.workbench-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.module-editor {
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(248, 253, 252, 0.92);
  border: 1px solid rgba(121, 217, 210, 0.14);
}

.activity-editor {
  margin-bottom: 18px;
}

.workbench-guide {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(248, 253, 252, 0.9);
  border: 1px solid rgba(121, 217, 210, 0.12);
}

.task-steps {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(248, 253, 252, 0.92);
  border: 1px solid rgba(121, 217, 210, 0.12);
}

.task-steps-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-deep);
}

.task-steps-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.task-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(121, 217, 210, 0.1);
}

.task-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(121, 217, 210, 0.16);
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.task-step-text {
  color: var(--text);
  line-height: 1.6;
}

.collapsible-block {
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(121, 217, 210, 0.1);
  overflow: hidden;
}

.collapsible-trigger {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 16px;
  border: none;
  background: rgba(248, 253, 252, 0.78);
  text-align: left;
  cursor: pointer;
}

.collapsible-arrow {
  color: var(--brand-deep);
  font-size: 13px;
  white-space: nowrap;
}

.collapsible-content {
  padding: 0 0 2px;
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.activity-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(121, 217, 210, 0.12);
}

.activity-card-top,
.activity-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.activity-meta {
  color: var(--muted);
  line-height: 1.7;
}

.activity-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.activity-metrics div {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(248, 253, 252, 0.88);
  border: 1px solid rgba(121, 217, 210, 0.1);
}

.activity-metrics span {
  color: var(--muted);
  font-size: 13px;
}

.activity-metrics strong {
  font-size: 22px;
  color: var(--text);
}

.activity-meta {
  color: var(--muted);
  line-height: 1.6;
}

.activity-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.activity-metrics div {
  padding: 12px;
  border-radius: 18px;
  background: rgba(248, 253, 252, 0.88);
  border: 1px solid rgba(121, 217, 210, 0.1);
}

.activity-metrics span,
.activity-metrics strong {
  display: block;
}

.activity-metrics span {
  color: var(--muted);
  font-size: 12px;
}

.activity-metrics strong {
  margin-top: 8px;
  font-size: 20px;
}

.material-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.material-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(121, 217, 210, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  cursor: pointer;
}

.material-thumb {
  display: block;
  height: 120px;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
}

.material-name {
  font-size: 14px;
  color: var(--text);
  text-align: left;
}

.material-actions {
  flex-wrap: wrap;
}

.hidden-file-input {
  display: none;
}

.tab-btn {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(121, 217, 210, 0.18);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  cursor: pointer;
}

.tab-btn.active {
  background: linear-gradient(135deg, #7fded7, #39b9b1);
  color: #fff;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

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

.metric-card {
  position: relative;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(121, 217, 210, 0.12);
  overflow: hidden;
}

.metric-card::after {
  content: "";
  position: absolute;
  right: -18px;
  top: -18px;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(121, 217, 210, 0.18), transparent 68%);
}

.metric-card--success::after {
  background: radial-gradient(circle, rgba(22, 160, 133, 0.14), transparent 68%);
}

.metric-card--warning::after {
  background: radial-gradient(circle, rgba(213, 143, 26, 0.16), transparent 68%);
}

.warn-card {
  border: 1px solid rgba(217, 107, 123, 0.24);
  background: linear-gradient(180deg, rgba(255, 247, 248, 0.95), rgba(255, 242, 244, 0.98));
}

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

.metric-icon {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(121, 217, 210, 0.14);
  border: 1px solid rgba(57, 185, 177, 0.1);
  flex-shrink: 0;
}

.metric-icon::before,
.metric-icon::after {
  content: "";
  position: absolute;
}

.metric-icon--spark::before {
  inset: 7px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(57, 185, 177, 0.9), rgba(57, 185, 177, 0.25));
}

.metric-icon--profile::before {
  top: 6px;
  left: 9px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(57, 185, 177, 0.88);
}

.metric-icon--profile::after {
  left: 6px;
  right: 6px;
  bottom: 6px;
  height: 8px;
  border-radius: 999px 999px 8px 8px;
  background: rgba(57, 185, 177, 0.2);
}

.metric-icon--gift::before {
  left: 7px;
  right: 7px;
  top: 9px;
  bottom: 7px;
  border-radius: 6px;
  background: rgba(57, 185, 177, 0.22);
  border: 1px solid rgba(57, 185, 177, 0.18);
}

.metric-icon--gift::after {
  left: 13px;
  top: 6px;
  width: 2px;
  height: 16px;
  background: rgba(57, 185, 177, 0.92);
  box-shadow: -5px 3px 0 -1px rgba(57, 185, 177, 0.92), 5px 3px 0 -1px rgba(57, 185, 177, 0.92);
}

.metric-icon--check::before {
  left: 8px;
  top: 12px;
  width: 12px;
  height: 6px;
  border-left: 2px solid rgba(22, 160, 133, 0.9);
  border-bottom: 2px solid rgba(22, 160, 133, 0.9);
  transform: rotate(-45deg);
}

.metric-icon--pulse::before {
  left: 6px;
  right: 6px;
  top: 13px;
  height: 2px;
  background: rgba(57, 185, 177, 0.18);
}

.metric-icon--pulse::after {
  left: 7px;
  top: 9px;
  width: 14px;
  height: 10px;
  border-left: 2px solid rgba(57, 185, 177, 0.9);
  border-bottom: 2px solid rgba(57, 185, 177, 0.9);
  transform: skewX(-28deg) rotate(-12deg);
}

.metric-icon--shield::before {
  left: 7px;
  right: 7px;
  top: 6px;
  bottom: 6px;
  border-radius: 10px 10px 14px 14px;
  background: rgba(213, 143, 26, 0.14);
  border: 1px solid rgba(213, 143, 26, 0.16);
}

.metric-label {
  color: var(--muted);
  font-size: 14px;
}

.metric-value {
  margin-top: 10px;
  font-size: 32px;
  font-weight: 700;
}

.layout-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.section-head-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.section-icon {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(121, 217, 210, 0.14);
  border: 1px solid rgba(57, 185, 177, 0.1);
  flex-shrink: 0;
}

.section-icon::before,
.section-icon::after {
  content: "";
  position: absolute;
}

.section-icon--spark::before {
  inset: 7px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(57, 185, 177, 0.9), rgba(57, 185, 177, 0.22));
}

.section-icon--profile::before {
  top: 6px;
  left: 9px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(57, 185, 177, 0.88);
}

.section-icon--profile::after {
  left: 6px;
  right: 6px;
  bottom: 6px;
  height: 8px;
  border-radius: 999px 999px 8px 8px;
  background: rgba(57, 185, 177, 0.2);
}

.section-icon--gift::before {
  left: 7px;
  right: 7px;
  top: 9px;
  bottom: 7px;
  border-radius: 6px;
  background: rgba(57, 185, 177, 0.22);
  border: 1px solid rgba(57, 185, 177, 0.18);
}

.section-icon--gift::after {
  left: 13px;
  top: 6px;
  width: 2px;
  height: 16px;
  background: rgba(57, 185, 177, 0.92);
  box-shadow: -5px 3px 0 -1px rgba(57, 185, 177, 0.92), 5px 3px 0 -1px rgba(57, 185, 177, 0.92);
}

.section-icon--shield::before {
  left: 7px;
  right: 7px;
  top: 6px;
  bottom: 6px;
  border-radius: 10px 10px 14px 14px;
  background: rgba(213, 143, 26, 0.14);
  border: 1px solid rgba(213, 143, 26, 0.16);
}

.section-head h3,
.section-head h4 {
  margin-bottom: 0;
  letter-spacing: -0.02em;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  overflow: hidden;
}

th,
td {
  padding: 16px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 500;
  background: rgba(234, 249, 247, 0.56);
}

tbody tr {
  transition: background 0.18s ease;
}

tbody tr:hover {
  background: rgba(234, 249, 247, 0.24);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(234, 249, 247, 0.92);
  color: var(--brand-deep);
  font-size: 12px;
  border: 1px solid rgba(57, 185, 177, 0.1);
}

.badge.brand {
  background: rgba(121, 217, 210, 0.14);
  color: var(--brand-deep);
}

.badge.success {
  background: rgba(60, 140, 115, 0.12);
  color: var(--success);
  border-color: rgba(22, 160, 133, 0.12);
}

.badge.warning {
  background: rgba(247, 189, 67, 0.12);
  color: var(--warning);
  border-color: rgba(213, 143, 26, 0.14);
}

.badge.danger {
  background: rgba(217, 107, 123, 0.1);
  color: var(--danger);
  border-color: rgba(201, 92, 110, 0.14);
}

.badge.neutral {
  background: rgba(102, 112, 133, 0.1);
  color: #667085;
  border-color: rgba(102, 112, 133, 0.12);
}

.toolbar,
.form-grid {
  display: grid;
  gap: 12px;
}

.toolbar {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(248, 253, 252, 0.88);
  border: 1px solid rgba(121, 217, 210, 0.12);
}

.toolbar.redeem-toolbar {
  grid-template-columns: 1.6fr 1fr 1fr;
}

.toolbar.risk-toolbar {
  grid-template-columns: 1.4fr 1.1fr 1.1fr 0.8fr 0.8fr;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

.list-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(121, 217, 210, 0.1);
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 28px 20px;
  text-align: center;
}

.empty-state-visual {
  position: relative;
  width: 132px;
  height: 96px;
}

.empty-state-visual::before,
.empty-state-visual::after {
  content: "";
  position: absolute;
}

.empty-state-visual::before {
  inset: 12px 18px 8px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(234, 249, 247, 0.92));
  border: 1px solid rgba(121, 217, 210, 0.16);
  box-shadow: 0 16px 30px rgba(57, 185, 177, 0.1);
}

.empty-state-visual::after {
  left: 42px;
  right: 42px;
  bottom: 0;
  height: 12px;
  border-radius: 999px;
  background: rgba(57, 185, 177, 0.08);
  filter: blur(6px);
}

.empty-state-card,
.empty-state-orb {
  position: absolute;
  display: block;
}

.empty-state-card {
  top: 28px;
  left: 36px;
  width: 60px;
  height: 38px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(121, 217, 210, 0.16);
}

.empty-state-card::before,
.empty-state-card::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  height: 4px;
  border-radius: 999px;
  background: rgba(57, 185, 177, 0.16);
}

.empty-state-card::before {
  top: 11px;
}

.empty-state-card::after {
  top: 20px;
}

.empty-state-orb {
  top: 18px;
  right: 22px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.96), rgba(127, 222, 215, 0.98));
}

.empty-state-title {
  font-weight: 600;
}

.stack {
  display: grid;
  gap: 16px;
}

.muted {
  color: var(--muted);
  line-height: 1.7;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inner-panel {
  border: 1px solid rgba(121, 217, 210, 0.1);
}

@media (max-width: 1200px) {
  #app {
    grid-template-columns: 1fr;
  }

  .cards,
  .toolbar,
  .form-grid,
  .layout-grid,
  .material-grid,
  .activity-grid,
  .activity-metrics {
    grid-template-columns: 1fr;
  }
}
