/*
 * style-core.css —— 由 tools/build-frontend-styles.js 自动生成，请勿手工编辑。
 *
 * 用途：登录页精简样式包（login.html 引用，不含壳层与业务组件）
 *
 * 修改方式：改 static/css/src/ 下的源文件，然后执行
 *   node tools/build-frontend-styles.js
 *
 * 成员（按层叠顺序）：
 *    1. src/tokens.css  设计令牌（:root 变量）与全局元素基线
 *    2. src/login.css  登录页专属（login.html 不引用 layout.html）
 */

/* ===== 源文件：static/css/src/tokens.css ===== */

/* ==================== Base ==================== */
:root {
  --sidebar-width: 230px;
  --sidebar-width-collapsed: 60px;
  --sidebar-bg: #1e293b;
  --sidebar-hover: #334155;
  --sidebar-active: #3565e6;
  --topbar-height: 56px;
  --primary: #3565e6;
  --primary-dark: #2a50b8;
  --bg-body: #f1f4f9;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-light: #e9edf4;
  --card-radius: 10px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --page-section-gap: 24px;
  --toolbar-gap-top: 12px;
  --toolbar-gap-bottom: 18px;
  --page-section-gap-md: 18px;
  --toolbar-gap-top-md: 10px;
  --toolbar-gap-bottom-md: 14px;
  --page-section-gap-sm: 16px;
  --toolbar-gap-top-sm: 8px;
  --toolbar-gap-bottom-sm: 12px;

  /* 状态徽标（badge 组件）配色：底色统一低透明度，文字用同色系实色 */
  --badge-success-bg: rgba(34, 197, 94, 0.12);
  --badge-success-text: #16a34a;
  --badge-danger-bg: rgba(239, 68, 68, 0.12);
  --badge-danger-text: #dc2626;
  --badge-warning-bg: rgba(245, 158, 11, 0.14);
  --badge-warning-text: #b45309;
  --badge-info-bg: rgba(6, 182, 212, 0.1);
  --badge-info-text: #0891b2;
  --badge-muted-bg: #f1f5f9;
  --badge-muted-text: #94a3b8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
}

/* ===== 源文件：static/css/src/login.css ===== */

/* ==================== Login ==================== */
.login-page {
  background: #f7f8fc;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-wrapper {
  display: flex;
  width: 100%;
  max-width: 1050px;
  min-height: 560px;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
  position: relative;
}

.login-left {
  flex: 1;
  position: relative;
  background: #f0f4fc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.iso-illustration {
  width: 70%;
  max-width: 400px;
  z-index: 2;
}

.iso-svg { width: 100%; height: auto; }

.deco-circle {
  position: absolute;
  border-radius: 50%;
  z-index: 1;
}

.deco-circle-green {
  width: 260px;
  height: 260px;
  background: rgba(134, 239, 172, 0.25);
  top: -40px;
  left: -60px;
}

.deco-shape {
  position: absolute;
  border-radius: 14px;
  z-index: 1;
}

.deco-shape-blue-1 {
  width: 80px; height: 50px;
  background: rgba(53, 101, 230, 0.12);
  top: 30px; right: 40px;
  transform: rotate(-12deg);
}

.deco-shape-blue-2 {
  width: 50px; height: 32px;
  background: rgba(53, 101, 230, 0.15);
  bottom: 60px; left: 40px;
  transform: rotate(20deg);
}

.deco-shape-green-1 {
  width: 40px; height: 40px;
  background: rgba(74, 222, 128, 0.2);
  bottom: 30px; right: 20px;
  transform: rotate(35deg);
}

.deco-shape-blue-3 {
  width: 60px; height: 38px;
  background: rgba(53, 101, 230, 0.1);
  top: 50%; left: 15px;
  transform: rotate(-8deg);
}

.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.login-card {
  width: 100%;
  max-width: 360px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
}

.brand-hex {
  width: 48px;
  height: 48px;
  background: var(--primary);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-hex span {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
}

.brand-text {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1e293b;
}

.login-alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 20px;
  border: none;
}

.field-error {
  display: none;
  color: #dc2626;
  font-size: 0.78rem;
  margin-top: 6px;
  line-height: 1.4;
}

.field-error.show {
  display: block;
}

.ui-toast-container {
  position: fixed;
  top: 18px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
  pointer-events: none;
}

.ui-toast {
  min-width: 240px;
  max-width: 360px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: auto;
}

.ui-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.ui-toast.hide {
  opacity: 0;
  transform: translateY(-6px);
}

.ui-toast-body {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-primary);
}

.ui-toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
}

.ui-toast-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.ui-toast-close {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.ui-toast-close:hover {
  color: var(--text-primary);
}

.ui-toast-warn {
  border-left: 4px solid #f59e0b;
}

.ui-toast-warn .ui-toast-icon {
  color: #f59e0b;
}

.ui-toast-error {
  border-left: 4px solid #dc2626;
}

.ui-toast-error .ui-toast-icon {
  color: #dc2626;
}

.ui-toast-success {
  border-left: 4px solid #16a34a;
}

.ui-toast-success .ui-toast-icon {
  color: #16a34a;
}

.input-group-custom.is-invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.08);
}

.input-group-custom {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: #fff;
  transition: border-color 0.2s;
}

.input-group-custom:focus-within {
  border-color: var(--primary);
}

.input-group-custom i {
  color: #9ca3af;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.input-group-custom input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 0.95rem;
  color: #1e293b;
}

.input-group-custom input::placeholder {
  color: #9ca3af;
}

.login-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
}

.btn-create {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 0;
  border: 1px solid #d1d5db;
  border-radius: 24px;
  background: #fff;
  color: #6b7280;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-create:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #374151;
}

.btn-login {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 0;
  border: none;
  border-radius: 24px;
  background: var(--primary);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-login:hover {
  background: var(--primary-dark);
}
