:root {
  --page-background: #edf3f8;
  --panel-background: #ffffff;
  --panel-background-strong: #0f2740;
  --panel-border: #d6e2ee;
  --text-primary: #122033;
  --text-secondary: #557086;
  --text-light: #eff6fc;
  --accent: #1570ef;
  --accent-hover: #0d5fcc;
  --danger: #c23b3b;
  --shadow: 0 18px 40px rgba(15, 39, 64, 0.12);
  --radius-large: 24px;
  --radius-medium: 16px;
  --radius-small: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-primary);
  background:
    radial-gradient(circle at top left, rgba(21, 112, 239, 0.14), transparent 35%),
    linear-gradient(180deg, #f6f9fc 0%, var(--page-background) 100%);
}

button,
input {
  font: inherit;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.page-title,
.dashboard-header h1,
.panel-header h2,
.card-header h2 {
  margin: 0;
}

.page-description,
.panel-description,
.card-header p,
.stats-card span,
.item-meta,
.empty-state,
.user-summary small {
  color: var(--text-secondary);
}

.auth-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: 100vh;
}

.auth-panel {
  padding: 48px;
}

.auth-panel-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(15, 39, 64, 0.96), rgba(15, 39, 64, 0.8)),
    linear-gradient(180deg, #17324f, #0f2740);
  color: var(--text-light);
}

.auth-panel-brand .eyebrow,
.auth-panel-brand .page-description,
.auth-panel-brand .feature-card p {
  color: rgba(239, 246, 252, 0.82);
}

.auth-panel-brand .page-title {
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.1;
}

.feature-list {
  display: grid;
  gap: 16px;
  margin-top: 36px;
}

.feature-card {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-medium);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}

.feature-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.feature-card p {
  margin: 0;
  line-height: 1.7;
}

.auth-panel-form {
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-card,
.content-card,
.stats-card {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-large);
  background: var(--panel-background);
  box-shadow: var(--shadow);
}

.panel-card {
  width: min(460px, 100%);
  padding: 36px;
}

.panel-header {
  margin-bottom: 28px;
}

.panel-header h2 {
  font-size: 32px;
}

.form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 14px;
  font-weight: 600;
}

.field input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-small);
  background: #f9fbfd;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(21, 112, 239, 0.14);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: var(--radius-small);
  border: 0;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
}

.primary-button:hover {
  background: var(--accent-hover);
}

.secondary-button {
  background: #eaf2fb;
  color: var(--text-primary);
  font-weight: 600;
}

.secondary-button:hover {
  background: #dce8f7;
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.form-message {
  min-height: 24px;
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--danger);
}

.dashboard-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.dashboard-header h1 {
  font-size: 40px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-summary {
  display: grid;
  gap: 4px;
  justify-items: end;
}

.user-summary span {
  font-weight: 700;
}

.status-banner {
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid #f0c6c6;
  border-radius: var(--radius-medium);
  background: #fff5f5;
  color: var(--danger);
}

.stats-grid,
.content-grid {
  display: grid;
  gap: 20px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 24px;
}

.stats-card {
  padding: 22px;
}

.stats-label {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.stats-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 28px;
}

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

.content-card {
  padding: 24px;
}

.card-header {
  margin-bottom: 18px;
}

.card-header p {
  margin: 8px 0 0;
}

.item-list {
  display: grid;
  gap: 14px;
}

.item-card {
  padding: 16px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-medium);
  background: #f8fbff;
}

.item-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.item-title-row strong {
  font-size: 18px;
}

.item-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #dcebff;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.item-card p {
  margin: 0 0 8px;
  line-height: 1.7;
}

.item-meta {
  display: grid;
  gap: 4px;
  font-size: 13px;
}

.empty-state {
  padding: 24px;
  border: 1px dashed var(--panel-border);
  border-radius: var(--radius-medium);
  text-align: center;
}

@media (max-width: 960px) {
  .auth-layout,
  .content-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    padding: 28px 20px;
  }

  .dashboard-header,
  .header-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .user-summary {
    justify-items: start;
  }
}

@media (max-width: 640px) {
  .panel-card,
  .content-card,
  .stats-card {
    border-radius: var(--radius-medium);
  }

  .panel-card {
    padding: 24px;
  }

  .auth-panel-brand .page-title,
  .dashboard-header h1,
  .panel-header h2 {
    font-size: 28px;
  }
}
