/* =============================================
   车位摇号管理后台 - 公共主题样式
   主题：鎏金黑金（与小程序端 #D4AF37 金色呼应）
   ============================================= */
:root {
  --gold: #D4AF37;
  --gold-deep: #B8962E;
  --gold-light: #E6C75A;
  --gold-pale: #FBF6E8;
  --ink: #1B1E2B;
  --ink-2: #232838;
  --bg: #F3F4F8;
  --text: #333F50;
  --text-sub: #7A8499;
  --line: #ECEEF3;
  --blue: #3B82F6;
  --green: #22C55E;
  --orange: #F59E0B;
  --red: #EF4444;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(27, 30, 43, 0.06);
  --shadow-lg: 0 10px 30px rgba(27, 30, 43, 0.12);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* 滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #C7CBD6; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }
::-webkit-scrollbar-track { background: transparent; }

/* ========== 整体布局 ========== */
.admin-layout .layui-side {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 232px;
  background: linear-gradient(180deg, #141724 0%, #1B1E2B 60%, #202436 100%);
  transition: width .25s ease;
  z-index: 999;
  overflow: hidden;
}
.admin-layout .layui-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 232px;
  height: 60px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  transition: left .25s ease;
  z-index: 998;
}
.admin-layout .layui-body {
  position: relative;
  top: 60px;
  left: 0;
  min-height: calc(100vh - 60px);
  padding: 20px;
  transition: left .25s ease;
}

/* 折叠状态 */
.admin-layout.side-collapsed .layui-side { width: 64px; }
.admin-layout.side-collapsed .layui-header { left: 64px; }
.admin-layout.side-collapsed .layui-body { left: 0; }

/* ========== 品牌区 ========== */
.admin-brand {
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 16px;
  background: linear-gradient(135deg, rgba(212,175,55,.16), rgba(212,175,55,.02));
  border-bottom: 1px solid rgba(255,255,255,.06);
  overflow: hidden;
  white-space: nowrap;
}
.brand-logo {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, #F0D98C 0%, var(--gold) 45%, #A8841F 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(212,175,55,.45);
}
.brand-text {
  margin-left: 10px;
  color: #F5EFDC;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .5px;
}
.brand-sub {
  display: block;
  font-size: 10px;
  color: rgba(245,239,220,.55);
  font-weight: 400;
  margin-top: 2px;
}
.side-collapsed .brand-text { display: none; }
.side-collapsed .admin-brand { justify-content: center; padding: 0; }

/* ========== 侧边导航 ========== */
.admin-nav {
  background: transparent;
  padding: 10px 0 30px;
}
.admin-nav .layui-nav-item {
  margin: 2px 10px;
  border-radius: 8px;
  overflow: hidden;
}
.admin-nav .layui-nav-item > a {
  height: 44px;
  line-height: 44px;
  color: rgba(255,255,255,.72);
  padding: 0 14px !important;
  border-radius: 8px;
  transition: all .2s ease;
}
.admin-nav .layui-nav-item > a .layui-icon {
  margin-right: 8px;
  font-size: 16px;
  color: rgba(212,175,55,.85);
}
.admin-nav .layui-nav-item > a:hover {
  color: #fff;
  background: rgba(255,255,255,.06);
}
.admin-nav .layui-nav-itemed > a,
.admin-nav .layui-nav-item.layui-this > a {
  background: linear-gradient(135deg, #E6C75A 0%, var(--gold) 60%, #C9A227 100%);
  color: #2A2410;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(212,175,55,.35);
}
.admin-nav .layui-nav-itemed > a .layui-icon,
.admin-nav .layui-nav-item.layui-this > a .layui-icon { color: #2A2410; }
.admin-nav .layui-nav-child {
  background: transparent;
  padding: 0;
}
.admin-nav .layui-nav-child dd {
  margin: 2px 8px 2px 26px;
  border-radius: 6px;
}
.admin-nav .layui-nav-child dd a {
  height: 36px;
  line-height: 36px;
  color: rgba(255,255,255,.6);
  padding-left: 14px !important;
  font-size: 13px;
}
.admin-nav .layui-nav-child dd.layui-this a,
.admin-nav .layui-nav-child dd a:hover {
  background: rgba(212,175,55,.12);
  color: #F0D98C;
}
/* 折叠时隐藏文字 */
.side-collapsed .admin-nav .layui-nav-item > a { text-align: center; padding: 0 !important; }
.side-collapsed .admin-nav .layui-nav-item > a span { display: none; }
.side-collapsed .admin-nav .layui-nav-child { display: none !important; }

/* ========== 顶部栏 ========== */
.admin-header { display: flex; align-items: center; justify-content: space-between; padding: 0 18px; }
.header-left { display: flex; align-items: center; gap: 14px; }
.collapse-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-sub);
  cursor: pointer;
  transition: all .2s;
}
.collapse-btn:hover { background: var(--gold-pale); color: var(--gold-deep); }
.breadcrumb { font-size: 14px; color: var(--text-sub); }
.breadcrumb .sep { margin: 0 6px; color: #C7CBD6; }
.breadcrumb .current { color: var(--text); font-weight: 600; }

.header-right { display: flex; align-items: center; gap: 6px; }
.header-action {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--text-sub);
  cursor: pointer;
  transition: all .2s;
}
.header-action:hover { background: var(--gold-pale); color: var(--gold-deep); }
.admin-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all .2s;
  margin-left: 6px;
}
.admin-user:hover { background: var(--gold-pale); }
.admin-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F0D98C, var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #2A2410;
  font-weight: 600;
}
.admin-user-name { font-size: 13px; color: var(--text); font-weight: 500; }
.admin-user .layui-icon { font-size: 12px; color: #C7CBD6; }

/* ========== 页面容器 ========== */
.page-container { width: 90%; max-width: 1500px; margin: 0 auto; }
.page-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.page-title h2 { font-size: 18px; font-weight: 600; color: var(--text); }
.page-title .sub { font-size: 12px; color: var(--text-sub); margin-top: 4px; }

/* ========== 统计卡片 ========== */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-grid.cols-6 { grid-template-columns: repeat(6, 1fr); }
.stat-card {
  position: relative;
  border-radius: var(--radius);
  padding: 20px;
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.stat-card .stat-icon {
  position: absolute;
  right: 14px;
  top: 14px;
  font-size: 40px;
  opacity: .25;
}
.stat-card .stat-label { font-size: 13px; opacity: .9; }
.stat-card .stat-value { font-size: 30px; font-weight: 700; margin: 6px 0 4px; font-family: "Segoe UI", Arial, sans-serif; }
.stat-card .stat-trend { font-size: 12px; opacity: .85; }
.stat-gold { background: linear-gradient(135deg, #E6C75A 0%, var(--gold) 55%, #B8962E 100%); }
.stat-blue { background: linear-gradient(135deg, #60A5FA 0%, #3B82F6 55%, #2563EB 100%); }
.stat-green { background: linear-gradient(135deg, #4ADE80 0%, #22C55E 55%, #16A34A 100%); }
.stat-orange { background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 55%, #D97706 100%); }
.stat-red { background: linear-gradient(135deg, #F87171 0%, #EF4444 55%, #DC2626 100%); }
.stat-ink { background: linear-gradient(135deg, #3A4160 0%, #1B1E2B 55%, #10131C 100%); }

/* ========== 通用卡片 ========== */
.panel {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 18px;
}
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.panel-title h3 { font-size: 15px; font-weight: 600; }
.panel-title h3::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 14px;
  background: linear-gradient(180deg, #F0D98C, var(--gold-deep));
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: -2px;
}
.panel-title .panel-extra { font-size: 12px; color: var(--text-sub); }

/* 搜索/筛选栏 */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  background: #fff;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.toolbar .layui-form-item { margin: 0; }
.toolbar .layui-input,
.toolbar .layui-select { border-radius: 6px; height: 36px; }
.toolbar .layui-input:focus { border-color: var(--gold) !important; }

/* ========== Layui 控件主题覆盖 ========== */
/* 按钮 */
.layui-btn { border-radius: 6px; }
.layui-btn-primary { color: var(--text); border-color: #E3E6EE; background: #fff; }
.layui-btn-primary:hover { border-color: var(--gold); color: var(--gold-deep); }
.layui-btn-normal { background: var(--blue); }
.layui-btn-warm { background: var(--orange); }
.layui-btn-danger { background: var(--red); }
.layui-btn-green { background: var(--green); }
.btn-gold {
  background: linear-gradient(135deg, #E6C75A 0%, var(--gold) 60%, #C9A227 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(212,175,55,.35);
}
.btn-gold:hover { color: #fff; opacity: .92; box-shadow: 0 6px 18px rgba(212,175,55,.45); }
.layui-btn-radius { border-radius: 20px; }

/* 表单 */
.layui-input, .layui-textarea, .layui-select {
  border-radius: 6px;
  border-color: #E3E6EE;
  transition: border-color .2s, box-shadow .2s;
}
.layui-input:focus, .layui-textarea:focus, .layui-select:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(212,175,55,.12);
}
.layui-form-label { color: var(--text); }
.layui-form-select dl dd.layui-this { background: var(--gold-pale); color: var(--gold-deep); }

/* 表格 */
.layui-table-view { border-radius: var(--radius); border: none; overflow: hidden; }
.layui-table-box { border: 1px solid var(--line); border-radius: var(--radius); }
.layui-table-header .layui-table th {
  background: #F7F8FB;
  color: #4A5568;
  font-weight: 600;
  font-size: 13px;
  border-color: var(--line);
}
.layui-table td, .layui-table th { border-color: var(--line); }
.layui-table tr:hover td { background: #FBF9F1; }
.layui-table-cell { line-height: 28px; }
.layui-table-page {
  background: #FBFBFD;
  border-color: var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
}
.layui-laypage .layui-laypage-curr .layui-laypage-em { background: var(--gold); border-radius: 4px; }
.layui-laypage a, .layui-laypage span { border-radius: 4px; }

/* 标签 */
.layui-badge, .layui-badge-rim { border-radius: 4px; }
.badge-status { padding: 3px 10px; border-radius: 20px; font-size: 12px; }
.badge-success { background: #E9F9EF; color: #16A34A; }
.badge-warning { background: #FEF3E2; color: #D97706; }
.badge-danger { background: #FDECEC; color: #DC2626; }
.badge-info { background: #EAF1FE; color: #2563EB; }
.badge-gold { background: var(--gold-pale); color: var(--gold-deep); }
.badge-muted { background: #F1F2F6; color: #7A8499; }

/* 选项卡 */
.layui-tab-title .layui-this { color: var(--gold-deep); }
.layui-tab-title .layui-this::after { border-bottom-color: var(--gold); }
.layui-tab-title li:hover { color: var(--gold-deep); }

/* 弹窗 */
.layui-layer-title { color: var(--text); font-weight: 600; }
.layui-layer-btn a { border-radius: 6px; }
.layui-layer-btn .layui-layer-btn0 { background: linear-gradient(135deg, #E6C75A, var(--gold)); border-color: var(--gold); color: #fff; }

/* ========== 车位格 ========== */
.parking-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 10px; }
.parking-cell {
  position: relative;
  height: 74px;
  border-radius: 8px;
  border: 2px solid #E3E6EE;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s;
  overflow: hidden;
}
.parking-cell:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.parking-cell .p-num { font-size: 15px; font-weight: 700; color: #3A4160; }
.parking-cell .p-tag { font-size: 10px; color: #9AA3B2; margin-top: 2px; }
.parking-cell.free { border-color: #BBF7D0; background: linear-gradient(180deg, #F2FDF7, #E6F9EE); }
.parking-cell.free .p-num { color: #15803D; }
.parking-cell.free .p-tag { color: #4ADE80; }
.parking-cell.occupied { border-color: #F1C0C0; background: linear-gradient(180deg, #FDF3F3, #FAE9E9); }
.parking-cell.occupied .p-num { color: #B91C1C; }
.parking-cell.occupied .p-tag { color: #EF4444; }
.parking-cell.pending { border-color: #FDE3B4; background: linear-gradient(180deg, #FFFBF0, #FDF3DD); }
.parking-cell.pending .p-num { color: #B45309; }
.parking-cell.pending .p-tag { color: #F59E0B; }
.parking-cell.selected { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,.25); }

/* ========== 登录页 ========== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(212,175,55,.18), transparent 60%),
    radial-gradient(800px 400px at -10% 110%, rgba(212,175,55,.12), transparent 60%),
    linear-gradient(135deg, #141724 0%, #1B1E2B 55%, #232838 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  border: 1px solid rgba(212,175,55,.14);
  border-radius: 50%;
  top: -160px;
  right: -120px;
}
.login-page::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(212,175,55,.1);
  border-radius: 50%;
  bottom: -120px;
  left: -80px;
}
.login-box {
  position: relative;
  z-index: 2;
  width: 420px;
  background: rgba(255,255,255,.98);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
  padding: 40px 38px 34px;
  backdrop-filter: blur(8px);
}
.login-box .login-brand { text-align: center; margin-bottom: 28px; }
.login-box .login-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, #F0D98C 0%, var(--gold) 45%, #A8841F 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 10px 24px rgba(212,175,55,.5);
  animation: float 3s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.login-box .login-title { font-size: 22px; font-weight: 700; color: var(--text); }
.login-box .login-sub { font-size: 12px; color: var(--text-sub); margin-top: 6px; letter-spacing: 1px; }
.login-box .layui-form-item { margin-bottom: 18px; }
.login-box .layui-input {
  height: 44px;
  border-radius: 8px;
  padding-left: 40px;
  background: #F7F8FB;
  border-color: #E9EBF2;
}
.login-box .layui-input:focus { background: #fff; }
.login-box .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #B7BECB;
  font-size: 16px;
  z-index: 1;
}
.login-box .layui-form-item { position: relative; }
.login-box .layui-form-item .layui-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #B7BECB; font-size: 16px; z-index: 1; }
.login-box .login-btn {
  width: 100%;
  height: 44px;
  border-radius: 8px;
  font-size: 15px;
  letter-spacing: 2px;
}
.login-box .login-tip { text-align: center; font-size: 12px; color: #B0B6C4; margin-top: 16px; }
.login-footer { text-align: center; color: rgba(255,255,255,.45); font-size: 12px; margin-top: 24px; position: relative; z-index: 2; }

/* ========== 其它组件 ========== */
.empty-tip { text-align: center; color: #B0B6C4; padding: 60px 0; font-size: 14px; }
.empty-tip .layui-icon { font-size: 48px; display: block; margin-bottom: 10px; color: #D5D9E2; }

.garage-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; transition: all .2s; background: #fff; }
.garage-item:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.garage-item .g-name { font-size: 15px; font-weight: 600; color: var(--text); display: flex; align-items: center; justify-content: space-between; }
.garage-item .g-meta { font-size: 12px; color: var(--text-sub); margin-top: 6px; line-height: 1.8; }

/* 响应式 */
@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid.cols-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .admin-layout .layui-side { width: 64px; }
  .admin-layout .layui-header { left: 64px; }
  .admin-layout .layui-body { left: 0; }
  .brand-text, .admin-nav .layui-nav-item > a span { display: none; }
  .admin-user-name { display: none; }
}
/* ========== 用户下拉菜单 ========== */
.user-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 52px;
  width: 150px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(27,30,43,.16);
  padding: 6px;
  z-index: 9999;
}
.admin-user { position: relative; }
.user-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
  transition: all .2s;
}
.user-menu a:hover { background: var(--gold-pale); color: var(--gold-deep); }
.user-menu a.danger { color: var(--red); }
.user-menu a.danger:hover { background: #FDECEC; }

/* ========== 表格操作按钮 ========== */
.table-actions .layui-btn { margin: 2px 0; }

/* ========== 仪表盘 ========== */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.dash-grid > * { min-width: 0; } /* 防止表格内容无限撑宽网格轨道 */
.dash-grid .panel { margin-bottom: 0; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }

.quick-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.quick-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: all .2s;
  background: #fff;
}
.quick-link:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: var(--shadow); }
.quick-link .ql-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
}
.quick-link .ql-title { font-size: 14px; font-weight: 600; color: var(--text); }
.quick-link .ql-desc { font-size: 12px; color: var(--text-sub); margin-top: 2px; }

/* 简易进度条 */
.simple-progress { height: 8px; border-radius: 4px; background: #EFF1F6; overflow: hidden; margin-top: 8px; }
.simple-progress i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #F0D98C, var(--gold)); }

/* 通知列表 */
.notice-list li {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}
.notice-list li:last-child { border-bottom: none; }
.notice-list .n-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-top: 6px; flex-shrink: 0; }
.notice-list .n-text { flex: 1; font-size: 13px; color: var(--text); line-height: 1.6; }
.notice-list .n-time { font-size: 12px; color: #B0B6C4; white-space: nowrap; }

/* ========== 详情页/表单 ========== */
.info-list { padding: 0; }
.info-list li { display: flex; padding: 12px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.info-list li:last-child { border-bottom: none; }
.info-list .i-label { width: 96px; color: var(--text-sub); flex-shrink: 0; }
.info-list .i-value { color: var(--text); }

/* 弹窗表单 */
.pop-form { padding: 20px 30px 0 10px; }

/* 平面图卡片 */
.plan-card { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; transition: all .2s; background: #fff; }
.plan-card:hover { border-color: var(--gold); box-shadow: var(--shadow); transform: translateY(-2px); }
.plan-card .plan-img { height: 140px; background: linear-gradient(135deg, #F5EFDC, #EFE6C8); display: flex; align-items: center; justify-content: center; font-size: 40px; }
.plan-card .plan-name { padding: 10px 12px; font-size: 13px; color: var(--text); text-align: center; }
