/* 博友传媒 · 电商风格运营台账。只重绘视觉，不改业务控件和权限。 */
:root {
  --background: #f6f7fb;
  --foreground: #172235;
  --card: #fff;
  --card-foreground: #172235;
  --popover: #fff;
  --popover-foreground: #172235;
  --primary: #eb552d;
  --primary-foreground: #fff;
  --secondary: #fff5f0;
  --secondary-foreground: #a7351c;
  --muted: #f3f5f8;
  --muted-foreground: #667386;
  --accent: #fff0e8;
  --accent-foreground: #a7351c;
  --border: #e6e9ef;
  --input: #d9dfe8;
  --ring: #f58057;
  --success: #168a65;
  --warning: #e69727;
  --info: #4077cf;
  --radius: 0.875rem;
  --shadow-sm: 0 2px 8px rgb(31 45 71 / 0.04);
  --shadow: 0 8px 28px rgb(31 45 71 / 0.06);
  --shadow-md: 0 12px 34px rgb(31 45 71 / 0.09);
  --primary-border: #d94925;
  --secondary-border: #f7dfd3;
  --font-sans: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

html, body, #root { min-height: 100%; }
body { color: #172235; background: #f6f7fb; font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
::selection { color: #8d2e19; background: #ffe1d0; }

/* 全站工作台骨架 */
#root > .flex.h-screen { background: #f6f7fb !important; }
#root > .flex.h-screen > aside,
#root > .flex.h-screen > div > div > aside {
  background: #fff !important;
  color: #25334a !important;
  border-right: 1px solid #e8ebf0;
  box-shadow: 4px 0 24px rgb(22 36 65 / 0.025);
}
#root > .flex.h-screen > aside { width: 232px !important; }
#root aside > div:first-child {
  min-height: 78px;
  height: 78px !important;
  border-bottom: 1px solid #edf0f4 !important;
  padding: 0 22px;
  color: #1b2940;
  letter-spacing: .02em;
}
#root aside > div:first-child svg {
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: 11px;
  color: #fff !important;
  background: linear-gradient(145deg, #ff8050, #e84726);
  box-shadow: 0 5px 13px rgb(235 85 45 / .23);
}
#root aside > div:first-child span { font-size: 16px; font-weight: 800; }
#root aside nav { padding: 17px 12px !important; }
#root aside nav button {
  min-height: 43px;
  margin-bottom: 4px;
  padding: 10px 13px !important;
  border: 0 !important;
  border-radius: 11px;
  color: #667386 !important;
  font-weight: 600;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
#root aside nav button:hover { color: #c34225 !important; background: #fff3ed !important; transform: translateX(2px); }
#root aside nav button[class*="bg-emerald-700"] {
  color: #c94526 !important;
  background: linear-gradient(90deg, #ffede3, #fff8f4) !important;
  box-shadow: inset 3px 0 #ef6039;
}
#root aside nav button svg { width: 17px; height: 17px; }
#root aside > div:last-child {
  margin: 8px 12px 13px;
  padding: 14px 10px 3px !important;
  border-top: 1px solid #edf0f4 !important;
  color: #223047;
}
#root aside > div:last-child .bg-emerald-700 { background: #ffebe1 !important; color: #d84b26; }
#root aside > div:last-child [class*="text-emerald-"] { color: #8c98a8 !important; }
#root aside > div:last-child button { color: #68768a !important; border-radius: 9px; }
#root aside > div:last-child button:hover { background: #fff2ec !important; color: #c94425 !important; }
#root header[class*="bg-emerald-900"] {
  height: 58px !important;
  color: #243147 !important;
  background: #fff !important;
  border-bottom: 1px solid #e7eaf0 !important;
  box-shadow: 0 2px 12px rgb(17 33 60 / .04);
}
#root header[class*="bg-emerald-900"] button { color: #d6512d; }
#root main { background: radial-gradient(circle at 98% 0%, #fff0e9 0, transparent 280px), #f6f7fb; }
#root main > div[class*="p-3"], #root main > div[class*="p-4"] { padding: 24px !important; }
#root main h1 { color: #1b2940; font-size: clamp(20px, 1.7vw, 25px) !important; font-weight: 800 !important; letter-spacing: -.015em; }
#root main h2 { color: #24324b; }
#root main p.text-muted-foreground { color: #738094; }

/* 电商后台式模块卡片与统计卡 */
#root main .bg-card,
#root main .rounded-xl.border.bg-card,
#root main .bg-white.rounded-lg.border,
#root main .bg-white.rounded-xl.border {
  background: #fff !important;
  border: 1px solid #e7eaf0 !important;
  border-radius: 16px !important;
  box-shadow: 0 6px 25px rgb(25 39 67 / .045) !important;
}
#root main .bg-card:hover { box-shadow: 0 9px 30px rgb(25 39 67 / .07) !important; }
#root main .grid > .bg-card { position: relative; overflow: hidden; }
#root main .grid > .bg-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f0623a, #ffb16d);
  opacity: .85;
}
#root main [data-ai-section-type="card-stat"] { gap: 10px; padding: 3px 1px 11px; }
#root main [data-ai-section-type="card-stat"] > button {
  min-width: 144px;
  height: 75px;
  padding: 13px 16px;
  border: 1px solid #e8ebf0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 18px rgb(25 39 67 / .045);
}
#root main [data-ai-section-type="card-stat"] > button:hover { border-color: #f4b59f; box-shadow: 0 7px 22px rgb(235 85 45 / .11); }
#root main [data-ai-section-type="card-stat"] > button[class*="border-primary"] { border-color: #ee744f; background: #fff7f2; }
#root main [data-ai-section-type="card-stat"] > button span.text-xl { font-size: 23px; font-weight: 800; }
#root main [class*="bg-muted/20"] { background: transparent !important; }
#root main [class*="bg-gray-50"] { background: transparent !important; }

/* 操作按钮、筛选、标签 */
button, input, select, textarea, [role="combobox"] { font-family: inherit; }
button { cursor: pointer; }
#root main button, [role="dialog"] button { border-radius: 10px; }
[data-slot="button"] { min-height: 38px; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
[data-slot="button"]:not(:disabled):hover { transform: translateY(-1px); }
[data-slot="button"][class*="bg-primary"],
[data-slot="button"][class*="bg-emerald-700"] {
  color: #fff !important;
  background: linear-gradient(135deg, #fa7449, #e94e2c) !important;
  border-color: #e94e2c !important;
  box-shadow: 0 5px 12px rgb(233 78 44 / .17);
}
[data-slot="button"][class*="bg-primary"]:hover,
[data-slot="button"][class*="bg-emerald-700"]:hover { box-shadow: 0 8px 17px rgb(233 78 44 / .25); }
[data-slot="button"][class*="bg-destructive"] { background: #d94143 !important; color: #fff !important; }
[data-slot="button"][class*="border"]:not([class*="bg-destructive"]):not([class*="bg-primary"]) { border-color: #e1e5ec; }
input:not([type="checkbox"]):not([type="radio"]), textarea, [role="combobox"] {
  border-radius: 10px !important;
  border-color: #dfe4eb !important;
  background: #fff !important;
  box-shadow: inset 0 1px 2px rgb(31 45 71 / .015);
}
input:focus-visible, textarea:focus-visible, [role="combobox"]:focus-visible { outline-color: #f17b56 !important; border-color: #f5a386 !important; }
input::placeholder, textarea::placeholder { color: #a0aab8; }
[role="tablist"] { padding: 4px; border-radius: 11px; background: #f4f5f8; }
[role="tab"][data-state="active"] { border-radius: 8px; color: #bd4024; background: #fff; box-shadow: 0 2px 8px rgb(25 39 67 / .08); }
[role="dialog"] { border: 1px solid #e7eaf0; border-radius: 18px !important; box-shadow: 0 22px 70px rgb(22 38 67 / .16) !important; }
[data-radix-popper-content-wrapper] [role="listbox"], [data-radix-popper-content-wrapper] [role="menu"] { border-radius: 12px; box-shadow: 0 12px 35px rgb(22 38 67 / .14); }

/* 业务列表：表头、行密度、分页 */
#root main .ant-table-wrapper, #root main .ant-table { color: #304057; }
#root main .ant-table-container { border: 0 !important; }
#root main .ant-table-thead > tr > th {
  color: #657185 !important;
  background: #f7f8fb !important;
  border-bottom: 1px solid #e6eaf0 !important;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
#root main .ant-table-tbody > tr > td { border-bottom: 1px solid #eff1f4 !important; font-size: 13px; }
#root main .ant-table-tbody > tr:hover > td { background: #fff7f2 !important; }
#root main .ant-table-tbody > tr:nth-child(even) > td { background-color: #fdfdfe; }
#root main .ant-table-tbody > tr:nth-child(even):hover > td { background-color: #fff7f2; }
#root main .ant-pagination .ant-pagination-item-active { border-color: #f26b43; background: #fff3ec; }
#root main .ant-pagination .ant-pagination-item-active a { color: #d94e2b; }
#root main table:not(.ant-table table) { border-collapse: separate; border-spacing: 0; }
#root main table:not(.ant-table table) thead { background: #f7f8fb; }
#root main table:not(.ant-table table) th { color: #627087; font-size: 12px; font-weight: 700; }
#root main table:not(.ant-table table) td { border-bottom: 1px solid #edf0f4; }
#root main table:not(.ant-table table) tbody tr:hover { background: #fff8f3; }

/* 提醒、状态与页脚入口 */
[data-sonner-toaster] [data-sonner-toast] { border: 1px solid #e7eaf0; border-left: 4px solid #ef6541; border-radius: 12px; box-shadow: 0 10px 32px rgb(22 38 67 / .13); }
body > a[href="/upload-batches"] {
  right: 22px !important;
  bottom: 22px !important;
  padding: 11px 17px !important;
  border-radius: 12px !important;
  color: #fff !important;
  background: linear-gradient(135deg, #fb794d, #e94e2c) !important;
  box-shadow: 0 9px 22px rgb(233 78 44 / .25) !important;
  font-weight: 700 !important;
  text-decoration: none;
}
body > a[href="/upload-batches"]:hover { filter: brightness(1.04); transform: translateY(-2px); }

/* 登录页：电商首页的明亮品牌感，保持表单清晰。 */
#root > div[class*="min-h-screen"][class*="from-emerald"] {
  position: relative;
  overflow: hidden;
  gap: clamp(36px, 7vw, 112px);
  padding: 36px !important;
  background: radial-gradient(circle at 15% 15%, #ffe8d9 0, transparent 36%),
    radial-gradient(circle at 88% 88%, #ffdfc9 0, transparent 31%),
    linear-gradient(135deg, #fff8f3, #f5f7fb 62%, #f2f4fa) !important;
}
#root > div[class*="min-h-screen"][class*="from-emerald"]::before {
  content: "BOYOU MEDIA\A把主播运营\A变成可见的增长";
  white-space: pre-line;
  display: block;
  width: 440px;
  flex: 0 1 440px;
  color: #26334a;
  font-size: clamp(30px, 3.6vw, 51px);
  line-height: 1.34;
  letter-spacing: -.035em;
  font-weight: 850;
}
#root > div[class*="min-h-screen"][class*="from-emerald"] > .bg-card {
  position: relative;
  z-index: 1;
  flex: 0 1 460px;
  max-width: 460px !important;
  padding: 12px 8px 10px;
  border: 1px solid #fff0e8 !important;
  border-radius: 22px !important;
  background: #fff !important;
  box-shadow: 0 24px 68px rgb(86 55 44 / .11) !important;
}
#root > div[class*="min-h-screen"][class*="from-emerald"] .bg-emerald-700 {
  background: linear-gradient(140deg, #ff8052, #ec4d2b) !important;
  box-shadow: 0 7px 16px rgb(236 77 43 / .18);
}
#root > div[class*="min-h-screen"][class*="from-emerald"] .bg-emerald-700:hover { background: #dc4324 !important; }
#root > div[class*="min-h-screen"][class*="from-emerald"] input { min-height: 42px; }
#root > div[class*="min-h-screen"][class*="from-emerald"] label { font-weight: 600; color: #34435a; }

@media (max-width: 900px) {
  #root > div[class*="min-h-screen"][class*="from-emerald"]::before { display: none; }
}
@media (max-width: 767px) {
  #root main > div[class*="p-3"], #root main > div[class*="p-4"] { padding: 15px !important; }
  #root aside > div:first-child { height: 64px !important; min-height: 64px; }
  #root main h1 { font-size: 21px !important; }
  #root main .ant-table-wrapper { overflow-x: auto; }
  [role="dialog"] { max-width: calc(100vw - 24px) !important; }
  body > a[href="/upload-batches"] { right: 12px !important; bottom: 12px !important; font-size: 12px !important; padding: 9px 12px !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
