/* 拾光 · 相册博客 — 「暗房画廊」主题：全站深色 / 幽灵按钮 / 金色点缀 / 胶片元素 / 衬线标题 */
:root {
  --bg: #17181c;
  --bg-deep: #121316;
  --surface: #1e2026;
  --surface-2: #24262d;
  --text: #e8e6e1;
  --muted: #9a978e;
  --line: #2b2d34;
  --gold: #d4a860;
  --gold-soft: rgba(212, 168, 96, .14);
  --danger: #e06c5f;
  --success: #7fbf8e;
  --warning: #d4a860;
  --radius: 12px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-hover: 0 16px 40px rgba(0, 0, 0, .5);
  --serif: "Noto Serif SC", "Source Han Serif SC", STSong, SimSun, serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  min-width: 1080px;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: var(--gold); color: #17181c; }

/* ============ 布局骨架（暗房：纯深侧栏，无多余装饰） ============ */
.app-shell { display: flex; height: 100%; min-height: 100vh; }
.app-sidebar {
  width: 236px;
  flex: 0 0 236px;
  background: var(--bg-deep);
  border-right: 1px solid var(--line);
  color: #c9c7c0;
  display: flex;
  flex-direction: column;
  padding: 30px 18px 22px;
  position: sticky;
  top: 0;
  height: 100vh;
}
/* 品牌区：胶片格图形字标 */
.brand { display: flex; align-items: center; gap: 13px; padding: 0 8px 28px; }
.brand-mark {
  position: relative;
  width: 44px; height: 44px; flex: 0 0 44px;
  background: #0f1013;
  border: 1px solid #3a3d45;
  border-radius: 4px;
  display: grid; place-items: center;
  font-family: var(--serif);
  font-size: 19px; font-weight: 700; color: var(--gold);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .5);
}
.brand-mark::before, .brand-mark::after {
  content: '';
  position: absolute; left: 5px; right: 5px; height: 4px;
  background: repeating-linear-gradient(90deg, #3a3d45 0 4px, transparent 4px 10px);
  border-radius: 2px;
}
.brand-mark::before { top: 3px; }
.brand-mark::after { bottom: 3px; }
.brand-title {
  font-family: var(--serif);
  font-size: 16px; font-weight: 700; letter-spacing: 3px; color: #f0eee9;
}
.brand-sub { font-size: 10.5px; color: #6f6d66; margin-top: 3px; letter-spacing: 2px; }
.sidebar-nav { flex: 1; overflow-y: auto; }
.nav-group-title {
  font-size: 10.5px; letter-spacing: 2.5px; color: #5d5b55;
  padding: 20px 12px 8px; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px; margin: 2px 0;
  border-radius: 8px; color: #b3b1aa; font-size: 14px;
  border-left: 2px solid transparent;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.nav-item i { font-size: 16px; }
.nav-item:hover { background: rgba(255, 255, 255, .045); color: #f0eee9; }
.nav-item.is-active {
  background: transparent; color: var(--gold); font-weight: 600;
  border-left-color: var(--gold);
}
.sidebar-foot { font-size: 11px; color: #55534e; padding: 16px 12px 0; border-top: 1px solid var(--line); }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar {
  height: 72px; flex: 0 0 72px;
  background: rgba(18, 19, 22, .88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 34px;
}
.topbar-crumb { font-family: var(--serif); font-size: 17px; font-weight: 650; letter-spacing: 2px; color: #f0eee9; }
.topbar-date { font-size: 12px; color: var(--muted); margin-top: 3px; }
.topbar-right { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; }
.topbar-user { font-weight: 600; color: var(--text); }
.app-content { flex: 1; padding: 30px 34px 52px; overflow-y: auto; }
.page-inner { max-width: 1240px; margin: 0 auto; }

/* ============ 页面通用 ============ */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.page-title { font-family: var(--serif); font-size: 24px; font-weight: 750; letter-spacing: 3px; color: #f4f2ed; }
.page-desc { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.6; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 24px; margin-bottom: 20px;
}
.card.tight { padding: 18px 20px; }
.card-title { font-family: var(--serif); font-size: 16px; font-weight: 700; margin-bottom: 4px; letter-spacing: 1.5px; color: #f0eee9; }
.card-sub { font-size: 12px; color: var(--muted); margin-bottom: 18px; }
.section-title { font-family: var(--serif); font-size: 16px; font-weight: 700; margin: 4px 0 16px; display: flex; align-items: center; gap: 10px; letter-spacing: 1.5px; color: #f0eee9; }
.section-title::before {
  content: '';
  width: 18px; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), rgba(212, 168, 96, .25));
}

/* ============ 统计卡 ============ */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 20px; }
.stat-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 22px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: #3d3f47; }
.stat-label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat-value { font-size: 28px; font-weight: 750; margin-top: 12px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.stat-foot { font-size: 12px; color: var(--muted); margin-top: 8px; }
.stat-accent { color: var(--gold); }
.stat-success { color: var(--success); }
.stat-warn { color: var(--warning); }
.stat-danger { color: var(--danger); }

/* ============ 工具类 ============ */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar-spacer { flex: 1; }
.muted { color: var(--muted); }
.text-sm { font-size: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.gap-10 { gap: 10px; }
.flex { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.w-full { width: 100%; }
.pager { display: flex; justify-content: flex-end; margin-top: 18px; }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.empty::before { content: '✦'; display: block; font-size: 18px; color: #55534e; margin-bottom: 8px; }
.chart-box { height: 320px; width: 100%; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 22px; }
.form-grid .span-2 { grid-column: span 2; }

.grid-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-cards.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cards.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hover-card { transition: transform .18s ease, box-shadow .18s ease; cursor: pointer; }
.hover-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; }

code { font-family: Consolas, Monaco, monospace; font-size: 12.5px; background: #101114; color: var(--gold); padding: 2px 7px; border-radius: 5px; border: 1px solid var(--line); }

/* ============ 时间线 / 配置行 ============ */
.timeline { padding-left: 4px; }
.timeline-item { position: relative; padding: 10px 0 12px 18px; border-left: 1px solid var(--line); margin-left: 5px; }
.timeline-dot { position: absolute; left: -5px; top: 16px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }
.config-line { display: flex; justify-content: space-between; font-size: 13px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.config-line span { color: var(--muted); }

/* ============ 表格 / 徽标 / 幽灵按钮 ============ */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th {
  text-align: left; font-size: 12px; color: #7c7a73; font-weight: 600;
  padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
  letter-spacing: 1px;
}
.data-table td { padding: 12px; border-bottom: 1px solid #23252b; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #23252b; }
.data-table .note-cell { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 3px;
  font-size: 12px; line-height: 1.4; border: 1px solid transparent; white-space: nowrap;
}
.badge.b-primary { color: var(--gold); background: var(--gold-soft); border-color: rgba(212, 168, 96, .35); }
.badge.b-success { color: var(--success); background: rgba(127, 191, 142, .1); border-color: rgba(127, 191, 142, .3); }
.badge.b-info { color: #a8abb5; background: rgba(255, 255, 255, .05); border-color: #34373f; }
.badge.b-warning { color: var(--warning); background: var(--gold-soft); border-color: rgba(212, 168, 96, .35); }
.badge.b-danger { color: var(--danger); background: rgba(224, 108, 95, .1); border-color: rgba(224, 108, 95, .3); }

/* 幽灵按钮：描边无底色，hover 金色 */
.link-btn { color: var(--gold); font-size: 13px; cursor: pointer; position: relative; }
.link-btn.success { color: var(--success); }
.link-btn.warning { color: var(--warning); }
.link-btn.danger { color: var(--danger); }
.link-btn:hover { opacity: 1; color: #f0d9a8; }
.link-btn::after {
  content: '';
  display: block; height: 1px; width: 0;
  background: currentColor;
  transition: width .18s ease;
}
.link-btn:hover::after { width: 100%; }

/* layui 控件：统一幽灵化 */
.layui-btn {
  background: transparent; border: 1px solid #43464f;
  color: #e6e4df; border-radius: var(--radius-sm);
  transition: border-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.layui-btn:hover {
  border-color: var(--gold); color: var(--gold);
  box-shadow: inset 0 -2px 0 rgba(212, 168, 96, .55);
  opacity: 1;
}
.layui-btn-primary { background: transparent; color: #c9c7c0; border-color: #34373f; }
.layui-btn-primary:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
.layui-btn-normal, .layui-btn-danger, .layui-btn-warm { background: transparent; }
.layui-btn-danger { border-color: rgba(224, 108, 95, .5); color: var(--danger); }
.layui-btn-danger:hover { border-color: var(--danger); color: var(--danger); box-shadow: inset 0 -2px 0 rgba(224, 108, 95, .55); }
.layui-btn-warm { border-color: rgba(212, 168, 96, .5); color: var(--gold); }
.layui-btn-warm:hover { border-color: var(--gold); color: var(--gold); }

input.layui-input, select.layui-input, textarea.layui-textarea {
  border-radius: var(--radius-sm);
  background: #17181d; border-color: #34373f; color: var(--text);
}
input.layui-input::placeholder, textarea.layui-textarea::placeholder { color: #6d6b64; }
input.layui-input:focus, select.layui-input:focus, textarea.layui-textarea:focus { border-color: var(--gold) !important; box-shadow: 0 0 0 3px rgba(212, 168, 96, .12); background: #1b1c22; }
.layui-form-select .layui-edge { border-top-color: #8a8880; }
.layui-form-select dl { background: var(--surface-2); border: 1px solid #34373f; box-shadow: var(--shadow); }
.layui-form-select dl dd { color: #c9c7c0; }
.layui-form-select dl dd:hover { background: #2c2f37; color: var(--gold); }
.layui-form-select dl dd.layui-this { background: var(--gold-soft); color: var(--gold); }
.layui-form-radio > i:hover, .layui-form-radioed > i { color: var(--gold) !important; }
.layui-form-radio { color: #c9c7c0 !important; }
.layui-form-checkbox[lay-skin="primary"] > i:hover, .layui-form-checked[lay-skin="primary"] > i { background-color: var(--gold) !important; border-color: var(--gold) !important; }
.layui-form-checkbox > div { color: #c9c7c0; }
.layui-form-switch { border-radius: 999px; background: #34373f; }
.layui-form-switch > div { color: #8a8880; }
.layui-form-onswitch { background-color: var(--gold) !important; border-color: var(--gold) !important; }
.layui-form-onswitch > em { color: #17181c !important; }
.layui-laypage a, .layui-laypage span, .layui-laypage button { background: transparent !important; border: 1px solid #34373f; color: #c9c7c0; border-radius: 6px; margin: 0 3px; }
.layui-laypage a:hover { color: var(--gold); }
.layui-laypage .layui-laypage-curr { border: none; }
.layui-laypage .layui-laypage-curr .layui-laypage-em { background-color: var(--gold) !important; border-radius: 6px; color: #17181c; font-weight: 700; }
.layui-laypage .layui-laypage-curr em { color: #17181c; }

/* 弹窗 / 日期面板 深色化 */
.layui-layer { border-radius: 12px !important; box-shadow: 0 18px 50px rgba(0, 0, 0, .6) !important; }
.layui-layer-title {
  background: var(--surface-2) !important; color: #f0eee9 !important;
  border-bottom: 1px solid var(--line) !important;
  font-family: var(--serif); letter-spacing: 1px;
  border-radius: 12px 12px 0 0 !important;
}
.layui-layer-content { background: var(--surface) !important; }
.layui-layer-btn { background: var(--surface) !important; border-top: 1px solid var(--line) !important; }
.layui-layer-btn a { background: transparent !important; border: 1px solid #43464f !important; color: #e6e4df !important; border-radius: 8px !important; }
.layui-layer-btn .layui-layer-btn0 { background: var(--gold) !important; border-color: var(--gold) !important; color: #17181c !important; font-weight: 700; }
.layui-layer-btn a:hover { border-color: var(--gold) !important; color: var(--gold) !important; }
.layui-layer-btn .layui-layer-btn0:hover { color: #17181c !important; }
.layui-layer-msg { background: #26282f !important; color: var(--text) !important; border: 1px solid var(--line) !important; }
.layui-layer-dialog .layui-layer-content { color: var(--text) !important; }

.layui-laydate { background: var(--surface-2) !important; color: var(--text) !important; box-shadow: var(--shadow-hover) !important; }
.layui-laydate * { color: #c9c7c0; }
.layui-laydate-header i:hover, .laydate-prev-m:hover, .laydate-next-m:hover { background: #2c2f37 !important; }
.layui-laydate-content td, .layui-laydate-content th { color: #b3b1aa !important; }
.layui-laydate-content td.laydate-selected { background: var(--gold-soft) !important; color: var(--gold) !important; }
.layui-laydate-content td:hover, .layui-laydate-content td.layui-this { background: var(--gold) !important; color: #17181c !important; }
.layui-laydate-footer { border-top: 1px solid var(--line) !important; }
.layui-laydate-footer span:hover { color: var(--gold) !important; }
.layui-laydate-list { background: var(--surface-2) !important; }

/* ============ 拾光：随笔卡片 / 相册封面 / 照片墙（无边框 + 悬浮轻放大） ============ */
.post-card {
  background: var(--surface); border: none; border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; margin: 0; padding: 0; cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease;
}
.post-card:hover { transform: scale(1.02); box-shadow: var(--shadow-hover); z-index: 2; }
.post-cover { height: 168px; background: linear-gradient(135deg, #26262e, #1c1e26); background-size: cover; background-position: center; position: relative; }
.cover-placeholder { height: 100%; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; color: #6d6b64; font-size: 13px; letter-spacing: 3px; font-family: var(--serif); }
.cover-placeholder .layui-icon { font-size: 30px; color: #43464f; }
.cover-status { position: absolute; right: 12px; top: 12px; }
.album-cover { height: 190px; background: linear-gradient(135deg, #26262e, #1a1c24); background-size: cover; background-position: center; cursor: pointer; position: relative; transition: transform .22s ease, box-shadow .22s ease; }
.album-cover:hover { transform: scale(1.015); box-shadow: var(--shadow-hover); }
.album-count { position: absolute; right: 12px; bottom: 12px; background: rgba(0, 0, 0, .7); color: var(--gold); font-size: 12px; padding: 3px 10px; border-radius: 3px; border: 1px solid rgba(212, 168, 96, .35); }

.detail-cover { height: 280px; border-radius: var(--radius); overflow: hidden; margin-bottom: 22px; box-shadow: var(--shadow); }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-content { white-space: pre-wrap; line-height: 2.1; font-size: 15px; color: #c9c7c0; }

.photo-wall { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.photo-cell { background: var(--surface); border: none; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); transition: transform .22s ease, box-shadow .22s ease; }
.photo-cell:hover { transform: scale(1.025); box-shadow: var(--shadow-hover); z-index: 2; }
.photo-item { width: 100%; height: 190px; display: block; object-fit: cover; cursor: zoom-in; }
.photo-meta { padding: 9px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.photo-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-preview img { width: 100%; height: 78px; border-radius: 6px; border: 1px solid var(--line); object-fit: cover; cursor: pointer; transition: border-color .16s ease; }
.photo-preview img:hover { border-color: var(--gold); }

/* 上传拖放区 */
.upload-zone {
  border: 1.5px dashed #3d4048; border-radius: var(--radius); background: var(--bg-deep);
  padding: 34px 20px; text-align: center; cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}
.upload-zone:hover, .upload-zone.is-dragover { border-color: var(--gold); background: var(--gold-soft); }
.upload-zone .layui-icon { font-size: 44px; color: #55534e; }
.upload-zone:hover .layui-icon { color: var(--gold); }

/* 步骤条（存储配置页） */
.step { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.step-no { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; font-weight: 700; }

@media (max-width: 1180px) {
  .grid-cards.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============ 登录/注册（暗房画廊主题） ============ */
.auth-shell {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr;
  background: var(--bg);
}
.auth-visual {
  background: linear-gradient(160deg, #0f1013 0%, #17181c 55%, #26242a 130%);
  color: #e8e6e1; padding: 64px 68px; display: flex; flex-direction: column; justify-content: space-between;
  border-right: 1px solid var(--line);
}
.auth-panel { display: grid; place-items: center; padding: 48px; background: linear-gradient(180deg, #1e2026, #17181c); }
.auth-card { width: 400px; }
.auth-card h2 { color: #f0eee9; }
.auth-field { margin-bottom: 18px; }
.auth-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.auth-field .layui-input { height: 46px; border-radius: var(--radius-sm); background: var(--surface-2); border-color: #3a3d45; color: var(--text); }
.auth-field .layui-input:focus { border-color: var(--gold) !important; box-shadow: 0 0 0 3px var(--gold-soft); }
.auth-submit { height: 46px; border-radius: var(--radius-sm); font-size: 15px; letter-spacing: 4px; background: var(--gold); color: #17181c; }
.auth-submit:hover { background: #e0bc78 !important; color: #17181c !important; }
.auth-visual h1 { font-family: var(--serif); letter-spacing: 3px; color: #f0eee9; }
.muted.text-sm { color: var(--muted); }
