/* ============================================================
   中天创实装饰 · 家装ERP 主题
   白 + 橙 商务风（与报价单 PDF 同色系，主橙 #F57C00）
   Bootstrap 5.3.3 变量覆盖 + 组件质感升级
   ============================================================ */

/* ---------- 品牌色变量 ---------- */
:root {
  --brand: #F57C00;            /* 主橙 */
  --brand-dark: #E06A00;       /* 深橙 hover */
  --brand-light: #FF8C26;      /* 浅橙 */
  --brand-bg: #FFF4E8;         /* 浅橙底(徽章/高亮) */
  --brand-rgb: 245, 124, 0;

  /* 覆盖 Bootstrap 主色 == 橙 */
  --bs-primary: #F57C00;
  --bs-primary-rgb: 245, 124, 0;
  --bs-link-color: #F57C00;
  --bs-link-hover-color: #DB6A00;
  --bs-link-color-rgb: 245, 124, 0;
  --bs-link-hover-color-rgb: 219, 106, 0;

  --bs-body-bg: #F4F5F7;
  --bs-body-color: #2B2F36;

  /* 状态色微调为更耐看的商务色 */
  --bs-warning: #F0A500;
  --bs-danger: #E5484D;
  --bs-success: #16A34A;
  --bs-info: #3B82F6;
}

/* ---------- 全局文字 & 背景 ---------- */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: #2B2F36;
  letter-spacing: .01em;
}

main { max-width: 1500px; margin: 0 auto; }

/* ---------- 顶栏 ---------- */
.grand-nav {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.grand-nav .navbar-brand {
  font-weight: 700;
  color: #1F2329;
}
.grand-nav .navbar-brand .brand-name { color: var(--brand); }
.grand-nav .nav-link {
  color: #4B5563;
  font-weight: 500;
  border-radius: 8px;
  transition: all .15s ease;
}
.grand-nav .nav-link:hover { color: var(--brand); background: var(--brand-bg); }
.grand-nav .nav-link.active { color: var(--brand); background: var(--brand-bg); font-weight: 600; }
.grand-nav .brand-logo { max-height: 34px; }

/* 顶部品牌顶部条 */
.top-accent-bar {
  height: 3px;
  background: linear-gradient(90deg, #F57C00 0%, #FFB25C 50%, #F57C00 100%);
}

/* ---------- 卡片 ---------- */
.card {
  border: 1px solid rgba(0,0,0,.05);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(31,35,41,.06);
  background: #fff;
}
.card-header {
  background: #fff;
  font-weight: 600;
  border-bottom: 1px solid #F1F3F5;
  color: #1F2329;
  padding: .8rem 1rem;
}
.card-header .card-header-title { color: #1F2329; }

/* ---------- 按钮 ---------- */
/* Bootstrap 按钮 primary/outline-primary 颜色硬编码，需单独覆盖为橙 */
.btn-primary {
  --bs-btn-bg: #F57C00;
  --bs-btn-border-color: #F57C00;
  --bs-btn-hover-bg: #E06A00;
  --bs-btn-hover-border-color: #E06A00;
  --bs-btn-active-bg: #DB6A00;
  --bs-btn-active-border-color: #DB6A00;
  --bs-btn-disabled-bg: #F5A354;
  --bs-btn-disabled-border-color: #F5A354;
  --bs-btn-focus-shadow-rgb: 245, 124, 0;
}
.btn-outline-primary {
  --bs-btn-color: #F57C00;
  --bs-btn-border-color: #F57C00;
  --bs-btn-hover-bg: #F57C00;
  --bs-btn-hover-border-color: #F57C00;
  --bs-btn-active-bg: #E06A00;
  --bs-btn-active-border-color: #E06A00;
  --bs-btn-focus-shadow-rgb: 245, 124, 0;
}
.btn:hover { transition: background .15s ease, color .15s ease; }

/* ---------- 徽章 ---------- */
.badge-soft {
  font-weight: 600;
  padding: .35em .65em;
  border-radius: 6px;
}
.badge-soft.bg-primary, .badge.bg-primary {
  background-color: var(--brand-bg) !important;
  color: var(--brand-dark) !important;
}
.badge.bg-warning, .badge-soft.text-dark.bg-warning {
  background-color: #FFF4DC !important; color: #B87900 !important;
}
.badge.bg-secondary { background-color: #EDF0F3 !important; color: #6B7280 !important; }
.badge.bg-success { background-color: #E7F7EE !important; color: #14883F !important; }
.badge.bg-danger { background-color: #FDEBEC !important; color: #C43C41 !important; }
.badge.bg-info { background-color: #E8F1FE !important; color: #2563EB !important; }
.badge.bg-dark { background-color: #31363D !important; color: #fff !important; }

/* ---------- 表格 ---------- */
.table thead th {
  font-weight: 600;
  color: #6B7280;
  background: #F8F9FB;
  border-bottom: 1px solid #EEF0F3;
  white-space: nowrap;
}
.table-hover tbody tr:hover { background: #FFFBF5; }
.table td, .table th { vertical-align: middle; }

/* ---------- 表单 ---------- */
.form-control:focus, .form-select:focus {
  border-color: #F5A354;
  box-shadow: 0 0 0 .25rem rgba(245,124,0,.12);
}
.form-control, .form-select { border-radius: 8px; }

/* ---------- 统计卡片（Dashboard） ---------- */
.stat-card {
  border-radius: 14px;
  border: none;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.stat-card .icon-holder {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  background: rgba(255,255,255,.2);
  color: #fff;
}
.stat-card .stat-value { font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.stat-card .stat-label { font-size: .82rem; opacity: .92; margin-top: 4px; }
.card.bg-primary, .card.bg-success, .card.bg-danger, .card.bg-info, .card.bg-warning { color: #fff; }

/* 渐变统计卡配色 */
.grad-orange  { background: linear-gradient(135deg, #FF9D33 0%, #F57C00 60%, #E06A00 100%); }
.grad-blue    { background: linear-gradient(135deg, #4C93FF 0%, #3B82F6 100%); }
.grad-green   { background: linear-gradient(135deg, #34C268 0%, #16A34A 100%); }
.grad-red     { background: linear-gradient(135deg, #FF6D6D 0%, #E5484D 100%); }
.grad-purple  { background: linear-gradient(135deg, #A78BFA 0%, #7C3AED 100%); }
.grad-teal    { background: linear-gradient(135deg, #2DD4BF 0%, #0D9488 100%); }
.grad-slate   { background: linear-gradient(135deg, #94A3B8 0%, #64748B 100%); }

/* ---------- 页面标题 ---------- */
.page-title { color: #1F2329; font-weight: 700; }
.page-title i { color: var(--brand); }

/* ---------- 登录页 ---------- */
.login-wrap {
  min-height: 100vh;
  background: linear-gradient(135deg, #FF9D33 0%, #F57C00 40%, #E06A00 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.login-wrap::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 15%, rgba(255,255,255,.18), transparent 40%),
              radial-gradient(circle at 85% 80%, rgba(255,255,255,.12), transparent 45%);
}
.login-card {
  width: 100%; max-width: 400px;
  position: relative; z-index: 1;
}
.login-card .card {
  border: none; border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
  padding: 2rem;
}
.login-brand-logo { max-height: 52px; }
.login-sub { color: #6B7280; }

/* ---------- 链接 / 其他 ---------- */
a { text-decoration: none; }
a:hover { text-decoration: none; }

.dropdown-item.active, .dropdown-item:active { background-color: var(--brand); }
.pagination .page-link { color: #F57C00; }
.pagination .page-item.active .page-link { background-color: var(--brand); border-color: var(--brand); }
