/* ============================================================
   雁鸿小站 · 私人网盘定制样式
   适用于 FileBrowser v2.30+ branding 体系（仅支持 custom.css）
   覆盖范围：仅 #login 登录页 + 文件列表区 + 公共导航
   ============================================================ */

:root {
  /* 雁红主题色 */
  --yan-primary: #c2532f;          /* 雁红（主色）*/
  --yan-primary-dark: #a23a18;     /* 雁红（深，hover）*/
  --yan-primary-light: #e6a78a;    /* 雁红（浅，边框/聚焦光晕）*/
  --yan-gold: #d99f5b;             /* 夕阳金（点缀）*/
  --yan-bg: #faf6f1;               /* 暖米白（文件列表背景）*/
  --yan-text: #3a2e26;             /* 深棕（正文）*/

  /* 覆盖FileBrowser默认变量（保留深色模式） */
  --blue: var(--yan-primary);
  --dark-blue: var(--yan-primary-dark);
  --action: var(--yan-primary);
  --background: var(--yan-bg);
  --iconPrimary: var(--yan-primary);
  --iconSecondary: var(--yan-primary);
}

/* ============================================================
   #login 登录页
   ============================================================ */
#login {
  background:
    radial-gradient(ellipse at top, #e6a78a 0%, transparent 55%),
    radial-gradient(ellipse at bottom, #d99f5b 0%, transparent 45%),
    linear-gradient(135deg, #c2532f 0%, #8a2e10 100%) !important;
  position: fixed;
  overflow: hidden;
}

/* 顶部柔光带 */
#login::before {
  content: "";
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 30%;
  background: radial-gradient(ellipse, rgba(255, 230, 200, 0.25), transparent 70%);
  pointer-events: none;
}

/* 卡片容器（原 form） */
#login form {
  background: #ffffff;
  border-radius: 24px;
  padding: 2.7em 2em 2em !important;
  max-width: 22em !important;
  width: 90%;
  box-shadow:
    0 25px 60px rgba(40, 15, 5, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* 顶部logo：完全用 CSS 重写（隐藏原img，伪元素造圆形徽标） */
#login img {
  display: none !important;  /* 隐藏原 FileBrowser logo */
}

/* 卡片顶部悬浮的圆形"雁"字徽标 */
#login form::before {
  content: "雁";
  position: absolute;
  top: -1.5em;
  left: 50%;
  transform: translateX(-50%);
  width: 3em;
  height: 3em;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--yan-primary) 0%, var(--yan-primary-dark) 100%);
  color: #ffffff;
  font-size: 1.6em;
  font-weight: 700;
  line-height: 3em;
  text-align: center;
  box-shadow:
    0 6px 18px rgba(194, 83, 47, 0.35),
    0 0 0 4px rgba(255, 255, 255, 0.95),
    0 0 0 5px rgba(194, 83, 47, 0.15);
  letter-spacing: 0;
  z-index: 10;
  font-family: "PingFang SC", "Microsoft YaHei", "STKaiti", "KaiTi", serif;
}

/* 标题（品牌名） */
#login h1 {
  text-align: center !important;
  font-size: 1.9em !important;
  font-weight: 700 !important;
  color: var(--yan-primary) !important;
  margin: 0.2em 0 0.05em !important;
  letter-spacing: 0.05em;
  position: relative;
}

/* 副标题（标题下方小字） */
#login h1::after {
  content: "网格资料云盘";
  display: block;
  font-size: 0.42em;
  font-weight: 400;
  color: #998273;
  letter-spacing: 0.18em;
  margin-top: 0.5em;
  text-transform: none;
}

/* 分隔线（h1下方的横线，JS已渲染） */
#login > form > div:first-of-type {
  margin: 1.4em 0 1em !important;
  height: 1px;
  background: linear-gradient(to right, transparent, #e8d8cc, transparent);
}

/* 输入框 */
#login .input--block {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.85em 1em !important;
  margin-bottom: 0.9em !important;
  font-size: 1em;
  border: 1.5px solid #e0d3c5 !important;
  border-radius: 10px !important;
  background: #fdfaf6 !important;
  color: var(--yan-text);
  outline: none;
  transition: all 0.2s ease;
}

#login .input--block:focus {
  border-color: var(--yan-primary) !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(194, 83, 47, 0.15);
}

/* 输入框 label placeholder调整：FileBrowser使用placeholder */
#login input::placeholder {
  color: #b8a99c;
}

/* 忘记密码链接 */
#login p {
  text-align: right !important;
  color: var(--yan-primary) !important;
  text-transform: none !important;
  font-weight: 500;
  margin: 0.4rem 0 1rem !important;
  font-size: 0.9rem;
  cursor: pointer;
}

/* 提交按钮（input[type=submit]） */
#login input[type="submit"] {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box;
  padding: 0.9em 1em !important;
  margin: 0.5em 0 0 !important;
  font-size: 1.05em !important;
  font-weight: 600 !important;
  letter-spacing: 0.2em;
  color: #ffffff !important;
  background: linear-gradient(135deg, var(--yan-primary) 0%, var(--yan-primary-dark) 100%) !important;
  border: none !important;
  border-radius: 10px !important;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(194, 83, 47, 0.3);
  transition: all 0.2s ease;
}

#login input[type="submit"]:hover {
  background: linear-gradient(135deg, var(--yan-primary-dark) 0%, #7a2810 100%) !important;
  box-shadow: 0 8px 20px rgba(194, 83, 47, 0.45);
  transform: translateY(-1px);
}

#login input[type="submit"]:active {
  transform: translateY(0);
}

/* 错误提示 */
#login .wrong {
  background: #f8d7d2 !important;
  color: #a23a18 !important;
  border-radius: 8px;
  font-size: 0.9em;
}

/* 版权尾巴（卡片底部小字） */
#login form::after {
  content: "© 雁鸿小站 · 用心守护每一份资料";
  display: block;
  text-align: center;
  margin-top: 1.4em;
  font-size: 0.7em;
  color: #b8a99c;
  letter-spacing: 0.1em;
}

/* ============================================================
   文件列表主界面
   ============================================================ */

/* 顶栏：logo区 */
.sidebar .brand .logo svg,
.sidebar .brand .title {
  color: var(--yan-primary) !important;
}

/* 顶栏Logo图标背景渐变 */
.sidebar .brand {
  background: linear-gradient(180deg, #ffffff 0%, #faf6f1 100%);
}

/* 顶栏品牌名文字 */
.sidebar .brand .title,
#header .title,
header .title {
  color: var(--yan-primary) !important;
  font-weight: 700;
}

/* 工具栏按钮悬停色 */
.actionButtons button:hover,
.card-action button:hover {
  background-color: rgba(194, 83, 47, 0.08) !important;
  color: var(--yan-primary) !important;
}

/* 文件列表行悬停色 */
.item:hover,
.file-row:hover,
.directory-listing > div:hover {
  background-color: rgba(194, 83, 47, 0.05) !important;
}

/* 当前选中行 */
.item.selected,
.item[aria-selected="true"],
.file-row.selected {
  background-color: rgba(194, 83, 47, 0.12) !important;
  border-left: 3px solid var(--yan-primary);
}

/* 工具栏背景 */
header,
#header,
.bar {
  background: linear-gradient(180deg, #ffffff 0%, #faf6f1 100%) !important;
  border-bottom: 1px solid #ebdfd1;
}

/* ===== ICP备案信息（浙ICP备2026074167号）===== */
body::after {
  content: "浙ICP备2026074167号 ｜ 浙公网安备33039402026014号 ｜ 违法和不良信息举报 www.12377.cn ｜ 举报邮箱 wzwjm@qq.com";
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 99999;
  text-align: center;
  font-size: 12px;
  color: #999;
  background: rgba(255,255,255,.9);
  padding: 3px 0;
  pointer-events: none;
}

/* 备案条底部避让：filebrowser footer 操作栏不被遮挡 */
body { padding-bottom: 30px !important; }
footer, .footer, .page-footer, .action-bar, .toolbar { margin-bottom: 24px !important; }
