:root {
  --bg: #f5efe6;
  --panel: #fffaf4;
  --panel-strong: #fff4e8;
  --card: #ffffff;
  --ink: #1f2937;
  --muted: #7b8794;
  --line: rgba(55, 65, 81, 0.12);
  --accent: #d97706;
  --accent-strong: #b45309;
  --accent-soft: rgba(217, 119, 6, 0.14);
  --success: #0f766e;
  --danger: #b91c1c;
  --shadow: 0 24px 60px rgba(31, 41, 55, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --sidebar-width: 260px;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(217, 119, 6, 0.18), transparent 26%),
    linear-gradient(180deg, #f6efe5 0%, #f4f1ea 100%);
  color: var(--ink);
}

body {
  min-height: 100vh;
}

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

button {
  cursor: pointer;
  border: 0;
}

.eyebrow,
.topbar-kicker,
.card-kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.admin-login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.login-shell {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 28px;
  align-items: stretch;
}

.login-hero,
.login-card,
.sidebar,
.main-shell {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.login-hero {
  background:
    linear-gradient(135deg, rgba(217, 119, 6, 0.18), transparent 55%),
    linear-gradient(180deg, #1f2937 0%, #111827 100%);
  color: #fff8ef;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 520px;
}

.login-hero h1 {
  margin: 18px 0 0;
  font-size: 54px;
  line-height: 1.04;
}

.hero-copy {
  margin: 20px 0 0;
  max-width: 520px;
  font-size: 18px;
  line-height: 1.75;
  color: rgba(255, 248, 239, 0.76);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-tags span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 248, 239, 0.1);
  border: 1px solid rgba(255, 248, 239, 0.14);
  font-size: 14px;
}

.login-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-head h2 {
  margin: 10px 0 8px;
  font-size: 34px;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.field span {
  font-size: 14px;
  color: var(--muted);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid rgba(107, 114, 128, 0.16);
  border-radius: var(--radius-md);
  background: #fffdf9;
  min-height: 52px;
  padding: 0 16px;
  outline: none;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
  min-height: 110px;
  padding-top: 14px;
  padding-bottom: 14px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(217, 119, 6, 0.55);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.1);
}

.primary-btn,
.ghost-btn,
.mini-btn {
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.primary-btn:hover,
.ghost-btn:hover,
.mini-btn:hover {
  transform: translateY(-1px);
}

.primary-btn {
  min-height: 54px;
  padding: 0 18px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
  font-weight: 700;
}

.ghost-btn {
  min-height: 44px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  border: 1px solid var(--line);
}

.mini-btn {
  min-height: 38px;
  padding: 0 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
}

.form-message {
  margin: 14px 0 0;
  min-height: 22px;
  color: var(--danger);
}

.admin-dashboard-page {
  padding: 18px;
}

.admin-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 18px;
  min-height: calc(100vh - 36px);
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(255, 244, 232, 0.96) 0%, rgba(255, 250, 244, 0.92) 100%);
  border: 1px solid rgba(107, 114, 128, 0.08);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.brand-block h1 {
  margin: 10px 0 6px;
  font-size: 28px;
}

.brand-sub,
.sidebar-foot p {
  margin: 0;
  color: var(--muted);
}

.sidebar-nav {
  display: grid;
  gap: 10px;
  margin-top: 30px;
}

.nav-link {
  min-height: 52px;
  border-radius: 16px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 0 16px;
  font-weight: 700;
}

.nav-link.active {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.14), rgba(217, 119, 6, 0.04));
  color: var(--accent-strong);
}

.sidebar-foot {
  margin-top: auto;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}

.sidebar-foot strong {
  display: block;
  margin-top: 6px;
}

.main-shell {
  background: rgba(255, 250, 244, 0.72);
  border: 1px solid rgba(107, 114, 128, 0.08);
  padding: 18px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 8px 20px;
}

.topbar h2 {
  margin: 8px 0 0;
  font-size: 32px;
}

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

.user-chip {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: rgba(31, 41, 55, 0.06);
  font-weight: 700;
}

.flash {
  margin: 0 8px 18px;
  padding: 14px 18px;
  border-radius: 16px;
  background: #fff4d8;
  color: #9a6700;
  border: 1px solid rgba(154, 103, 0, 0.18);
}

.flash.error {
  background: #ffe6e6;
  color: var(--danger);
  border-color: rgba(185, 28, 28, 0.18);
}

.view-mount {
  min-height: 480px;
}

.dashboard-grid,
.settings-grid,
.split-layout {
  display: grid;
  gap: 18px;
}

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

.split-layout {
  grid-template-columns: 420px 1fr;
}

.stats-card,
.panel,
.table-panel {
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid rgba(107, 114, 128, 0.08);
  box-shadow: 0 16px 44px rgba(31, 41, 55, 0.06);
}

.stats-card p {
  margin: 0;
}

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

.stats-card .stat-value {
  margin-top: 10px;
  font-size: 34px;
  font-weight: 800;
}

.panel-head,
.table-head,
.section-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-head h3,
.table-head h3,
.section-headline h3 {
  margin: 0;
  font-size: 22px;
}

.panel-sub {
  margin: 8px 0 0;
  color: var(--muted);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.toolbar .field-inline {
  min-width: 180px;
}

.field-inline input,
.field-inline select {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fffdf9;
  padding: 0 14px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(107, 114, 128, 0.08);
  vertical-align: top;
  font-size: 14px;
}

.data-table th {
  color: var(--muted);
  font-weight: 600;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(31, 41, 55, 0.08);
  font-size: 12px;
  font-weight: 700;
}

.status-chip.pending {
  background: rgba(217, 119, 6, 0.14);
  color: var(--accent-strong);
}

.status-chip.approved,
.status-chip.completed {
  background: rgba(15, 118, 110, 0.14);
  color: var(--success);
}

.status-chip.rejected,
.status-chip.cancelled {
  background: rgba(185, 28, 28, 0.14);
  color: var(--danger);
}

.empty {
  padding: 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--muted);
  text-align: center;
}

.muted {
  color: var(--muted);
}

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

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.check-row input {
  width: 18px;
  height: 18px;
}

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

.grid-fields .field {
  margin-bottom: 0;
}

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

@media (max-width: 1080px) {
  .login-shell,
  .admin-shell,
  .split-layout,
  .dashboard-grid,
  .settings-grid,
  .grid-fields {
    grid-template-columns: 1fr;
  }

  .admin-dashboard-page {
    padding: 12px;
  }

  .topbar {
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
  }
}
