/**
 * 文件路径: /log.othello.gmbh/public/css/main.css
 * 说明:
 * 1. 全局极简 CRM 风格
 * 2. 登录页、表单、按钮、表格、简单条形进度统一样式
 * 3. 字重统一 400 / 500 / 600
 */

:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --line: #e6edf5;
  --line-dark: #d7e2ee;
  --text: #0f172a;
  --text-soft: #64748b;
  --primary: #17324d;
  --primary-2: #1f476d;
  --primary-3: #2a6ebb;
  --success: #16a34a;
  --success-bg: #ecfdf3;
  --success-line: #bbf7d0;
  --warning: #c2410c;
  --warning-bg: #fff7ed;
  --warning-line: #fed7aa;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-line: #fecaca;
  --info: #1d4ed8;
  --info-bg: #eff6ff;
  --info-line: #bfdbfe;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.card-soft {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.page-header {
  padding: 28px 0 0;
}

.page-header__title {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
}

.page-header__desc {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.9;
  font-weight: 400;
}

.section {
  margin-top: 18px;
}

.section__head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.section__title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.section__desc {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.8;
  font-weight: 400;
}

.section__body {
  padding: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  padding: 18px;
}

.stat-card__label {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 10px;
}

.stat-card__value {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}

.stat-card__desc {
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.8;
  font-weight: 400;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field--span-2 {
  grid-column: span 2;
}

.field--span-3 {
  grid-column: span 3;
}

.field--span-4 {
  grid-column: span 4;
}

.label {
  color: #334155;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.input,
.select {
  height: 44px;
  padding: 0 14px;
}

.textarea {
  min-height: 96px;
  padding: 12px 14px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: #a9bfd8;
  box-shadow: 0 0 0 4px rgba(31, 71, 109, 0.08);
}

.input::placeholder,
.textarea::placeholder {
  color: #94a3b8;
}

.form-help {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.8;
  font-weight: 400;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 20px rgba(23, 50, 77, 0.14);
}

.btn--primary:hover {
  background: #112940;
}

.btn--secondary {
  background: #fff;
  color: var(--primary);
  border-color: var(--line-dark);
}

.btn--secondary:hover {
  background: #f8fbff;
}

.btn--green {
  background: var(--success);
  color: #fff;
}

.btn--green:hover {
  background: #15803d;
}

.btn--red {
  background: var(--danger);
  color: #fff;
}

.btn--red:hover {
  background: #b91c1c;
}

.btn--small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.badge--gray {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

.badge--blue {
  background: var(--info-bg);
  color: var(--info);
  border-color: var(--info-line);
}

.badge--green {
  background: var(--success-bg);
  color: #166534;
  border-color: var(--success-line);
}

.badge--orange {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: var(--warning-line);
}

.badge--red {
  background: var(--danger-bg);
  color: #991b1b;
  border-color: var(--danger-line);
}

.flash {
  margin-top: 18px;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.8;
}

.flash--success {
  background: var(--success-bg);
  color: #166534;
  border-color: var(--success-line);
}

.flash--error {
  background: var(--danger-bg);
  color: #991b1b;
  border-color: var(--danger-line);
}

.note {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: #475569;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.9;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.detail-item {
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.detail-item__label {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 6px;
}

.detail-item__value {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.8;
  word-break: break-word;
}

.table-wrap {
  overflow: auto;
}

.table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.8;
}

.table th {
  background: var(--surface-soft);
  color: #475569;
  font-weight: 600;
  white-space: nowrap;
}

.table td {
  font-weight: 400;
}

.table td strong,
.table td b {
  font-weight: 600;
}

.muted {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 400;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.empty {
  padding: 28px 18px;
  text-align: center;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.9;
  font-weight: 400;
}

/* 简单条形进度 */
.biz-progress {
  min-width: 150px;
}

.biz-progress__bar {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #edf2f7;
  border: 1px solid #e2e8f0;
}

.biz-progress__value {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-3) 100%);
}

.biz-progress__text {
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

/* 登录页 */
.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(42, 110, 187, 0.08), transparent 28%),
    radial-gradient(circle at right center, rgba(23, 50, 77, 0.08), transparent 26%),
    var(--bg);
}

.auth-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(420px, 520px);
  gap: 24px;
  align-items: stretch;
  padding: 24px 0;
}

.auth-hero {
  background: linear-gradient(180deg, rgba(23, 50, 77, 0.96) 0%, rgba(31, 71, 109, 0.96) 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 26px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  padding: 30px;
  position: relative;
  overflow: hidden;
}

.auth-hero::before {
  content: "";
  position: absolute;
  inset: auto -80px -80px auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  filter: blur(8px);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand__dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #4ade80;
  box-shadow: 0 0 0 6px rgba(74, 222, 128, 0.12);
}

.auth-brand__title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
}

.auth-brand__sub {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 400;
}

.auth-hero__content {
  margin-top: 54px;
  max-width: 640px;
}

.auth-hero__title {
  margin: 0;
  font-size: 40px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.2px;
}

.auth-hero__desc {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 2;
  font-weight: 400;
}

.auth-feature-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.auth-feature {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(2px);
}

.auth-feature__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.auth-feature__desc {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  line-height: 1.9;
  font-weight: 400;
}

.auth-demo {
  margin-top: 24px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-demo__title {
  font-size: 13px;
  font-weight: 600;
}

.auth-demo__list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.auth-demo__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.auth-demo__name {
  font-size: 13px;
  font-weight: 600;
}

.auth-demo__meta {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 400;
  margin-top: 3px;
}

.auth-demo__code {
  color: #dbeafe;
  font-size: 12px;
  font-weight: 500;
  text-align: right;
  line-height: 1.8;
}

.auth-panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-panel__title {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
}

.auth-panel__desc {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.9;
  font-weight: 400;
}

.auth-type-switch {
  margin-top: 20px;
  padding: 6px;
  border-radius: 16px;
  background: #f8fbff;
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.auth-type-switch__item {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
}

.auth-type-switch__item.is-active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 20px rgba(23, 50, 77, 0.12);
}

.auth-form {
  margin-top: 20px;
}

.auth-submit {
  width: 100%;
  min-height: 46px;
}

.auth-mini-links {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-mini-links a {
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
}

.auth-tips {
  margin-top: 20px;
  padding: 16px;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.auth-tips__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.auth-tips__list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.9;
}

.auth-footer {
  margin-top: 22px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.8;
  text-align: center;
}

@media (max-width: 1180px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-hero {
    min-height: auto;
  }

  .auth-hero__content {
    margin-top: 36px;
  }

  .auth-hero__title {
    font-size: 32px;
  }
}

@media (max-width: 980px) {
  .stats-grid,
  .grid-4,
  .grid-3,
  .grid-2,
  .form-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .field--span-2,
  .field--span-3,
  .field--span-4 {
    grid-column: span 1;
  }

  .table {
    min-width: 860px;
  }

  .auth-feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container,
  .auth-shell {
    width: min(100%, calc(100% - 20px));
  }

  .auth-hero,
  .auth-panel {
    padding: 20px;
    border-radius: 20px;
  }

  .auth-hero__title {
    font-size: 28px;
  }

  .page-header__title,
  .auth-panel__title {
    font-size: 24px;
  }

  .section__head,
  .section__body {
    padding: 16px;
  }
}