/* 传奇世界管理后台 - 2006 复古游戏风格 */
/* 配色：鎏金 #d4a945 / 朱红 #8f2b1f / 深褐底 #0d0803 / 羊皮金 #e8d5a3 */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --gold: #d4a945;
  --gold-lt: #ffe9b0;
  --gold-dk: #8a6a2f;
  --brown: #4a351a;
  --red: #8f2b1f;
  --bg-1: #221507;
  --bg-2: #180f05;
  --bg-3: #0f0803;
}

body {
  background: #0a0602;
  color: #e8d5a3;
  font-family: "SimSun", "宋体", serif;
  font-size: 14px;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 50% -12%, rgba(130, 85, 30, .16), transparent 55%),
    radial-gradient(ellipse at 50% 115%, rgba(120, 50, 20, .12), transparent 60%),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="72" height="72"><g fill="none" stroke="%234a351a" stroke-width="1" opacity="0.5"><path d="M36 6L66 36 36 66 6 36z"/><path d="M36 21L51 36 36 51 21 36z"/><circle cx="36" cy="36" r="2" fill="%234a351a"/></g></svg>'),
    linear-gradient(180deg, #1c1206 0%, #0d0803 55%, #0a0602 100%);
}

.hidden { display: none !important; }

/* 复古滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0d0803; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #8a6a2f, #5a3c18);
  border: 1px solid #3a2814;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #a8823c, #6b4a20); }
::selection { background: #6b2014; color: #ffe9b0; }

/* ---------- 登录 ---------- */
#login-wrap {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse at 50% 28%, rgba(140, 42, 20, .28), transparent 55%),
    radial-gradient(ellipse at 50% 112%, rgba(130, 85, 30, .22), transparent 60%),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="72" height="72"><g fill="none" stroke="%234a351a" stroke-width="1" opacity="0.5"><path d="M36 6L66 36 36 66 6 36z"/><path d="M36 21L51 36 36 51 21 36z"/></g></svg>'),
    #0d0803;
}
.login-card {
  position: relative;
  width: 360px;
  padding: 38px 44px 32px;
  background: linear-gradient(180deg, #261806, #180f05 65%, #1c1106);
  border: 1px solid var(--gold-dk);
  box-shadow:
    0 0 0 3px rgba(18, 11, 4, .9),
    0 0 0 4px #4a351a,
    0 14px 44px rgba(0, 0, 0, .8),
    inset 0 0 54px rgba(100, 65, 20, .12);
  text-align: center;
}
/* 四角金色角饰 */
.cn { position: absolute; width: 16px; height: 16px; border: 0 solid var(--gold); pointer-events: none; }
.cn-tl { top: -5px; left: -5px; border-top-width: 2px; border-left-width: 2px; }
.cn-tr { top: -5px; right: -5px; border-top-width: 2px; border-right-width: 2px; }
.cn-bl { bottom: -5px; left: -5px; border-bottom-width: 2px; border-left-width: 2px; }
.cn-br { bottom: -5px; right: -5px; border-bottom-width: 2px; border-right-width: 2px; }
.login-logo {
  width: 72px; height: 72px; line-height: 72px;
  margin: 0 auto;
  background: linear-gradient(180deg, #9a2d1e, #4a0f0f);
  border: 2px solid var(--gold);
  outline: 1px solid #3a2814; outline-offset: 3px;
  box-shadow: 0 0 20px rgba(212, 169, 69, .35), inset 0 1px 0 rgba(255, 220, 150, .25);
  color: var(--gold-lt); font-size: 38px; font-weight: bold;
  text-shadow: 0 1px 3px #000;
  border-radius: 3px;
}
.login-card h1 {
  margin-top: 20px;
  font-size: 30px; letter-spacing: 8px; font-weight: bold;
  background: linear-gradient(180deg, #ffe9b0, #d4a945 55%, #a87c2c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .85));
}
.login-sub {
  color: #b08d4f; margin: 10px 0 22px; letter-spacing: 10px; font-size: 13px;
  white-space: nowrap;
}
.login-sub::before, .login-sub::after {
  content: ''; display: inline-block; width: 44px; height: 1px;
  vertical-align: middle; margin: 0 10px;
}
.login-sub::before { background: linear-gradient(90deg, transparent, #8a6a2f); }
.login-sub::after { background: linear-gradient(90deg, #8a6a2f, transparent); }
.login-card input {
  width: 100%; padding: 11px 13px; margin-bottom: 14px;
  background: #0f0803; color: #e8d5a3;
  border: 1px solid #5a4420; outline: none; font-size: 14px;
  font-family: inherit;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .7);
  transition: all .15s;
}
.login-card input:focus {
  border-color: var(--gold);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .7), 0 0 10px rgba(212, 169, 69, .28);
}
.login-card button {
  width: 100%; padding: 11px 0; margin-top: 8px;
  background: linear-gradient(180deg, #a83525 0%, #83220f 45%, #6d1c10 55%, #5c160f 100%);
  border: 1px solid #c89a4a;
  box-shadow: inset 0 1px 0 rgba(255, 220, 150, .4), inset 0 -3px 5px rgba(0, 0, 0, .5), 0 3px 8px rgba(0, 0, 0, .6);
  color: #ffe9b0; font-size: 16px; letter-spacing: 12px;
  cursor: pointer; font-family: inherit; text-shadow: 0 1px 1px #000;
  transition: all .15s;
}
.login-card button:hover {
  background: linear-gradient(180deg, #c04028 0%, #9a2a15 45%, #7d2414 55%, #6d1c10 100%);
  box-shadow: inset 0 1px 0 rgba(255, 220, 150, .45), inset 0 -3px 5px rgba(0, 0, 0, .5), 0 3px 10px rgba(0, 0, 0, .6), 0 0 12px rgba(212, 169, 69, .25);
}
.login-card button:active { transform: translateY(1px); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .65); }
.login-msg { color: #e06a4a; margin-top: 12px; min-height: 18px; font-size: 13px; text-shadow: 0 1px 1px #000; }
.login-foot {
  position: fixed; bottom: 26px; left: 0; right: 0;
  text-align: center; color: #6d5a38; font-size: 12px; letter-spacing: 3px;
  text-shadow: 0 1px 1px #000;
}

/* ---------- 顶栏 ---------- */
.topbar {
  height: 60px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px;
  background: linear-gradient(180deg, #57220f, #33150a 55%, #2a1208);
  border-bottom: 1px solid #6b5226;
  box-shadow: 0 1px 0 #c89a4a, 0 4px 14px rgba(0, 0, 0, .55);
  position: relative; z-index: 10;
}
.brand { display: flex; align-items: center; }
.brand-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; margin-right: 12px;
  background: linear-gradient(180deg, #a83525, #5c160f);
  border: 1px solid var(--gold);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, .4), 0 0 10px rgba(212, 169, 69, .3);
  color: var(--gold-lt); font-size: 22px; font-weight: bold;
  text-shadow: 0 1px 2px #000; border-radius: 3px;
}
.brand-text {
  font-size: 20px; color: var(--gold-lt); letter-spacing: 4px; font-weight: bold;
  text-shadow: 0 1px 2px #000, 0 0 14px rgba(212, 169, 69, .3);
}
.brand-text em {
  font-style: normal; font-size: 12px; color: #b08d4f;
  letter-spacing: 5px; margin-left: 12px; font-weight: normal;
}
.top-right { display: flex; align-items: center; }
.admin-chip {
  padding: 5px 13px; border: 1px solid #6b5226;
  background: linear-gradient(180deg, #241708, #170e05);
  box-shadow: inset 0 1px 0 rgba(255, 220, 150, .12);
  color: #c9ae7a; font-size: 13px;
}
.admin-chip b { color: var(--gold-lt); margin-left: 4px; font-weight: bold; }
.logout {
  color: #e8a55a; margin-left: 14px; text-decoration: none; font-size: 13px;
  padding: 5px 14px; border: 1px solid #6b5226;
  background: linear-gradient(180deg, #2a1d0e, #1b1207);
  box-shadow: inset 0 1px 0 rgba(255, 220, 150, .1);
  transition: all .15s;
}
.logout:hover {
  color: var(--gold-lt); border-color: var(--gold);
  box-shadow: inset 0 1px 0 rgba(255, 220, 150, .15), 0 0 9px rgba(212, 169, 69, .25);
}

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: calc(100vh - 60px); }
.menu {
  width: 176px; flex: none;
  background: linear-gradient(90deg, #150d05, #1a1108 60%, #150d05);
  border-right: 1px solid #4a351a;
  box-shadow: inset -1px 0 0 #241708, 2px 0 10px rgba(0, 0, 0, .4);
  padding: 14px 0 18px;
}
.menu-head {
  text-align: center; color: #8a6a2f; font-size: 12px; letter-spacing: 4px;
  padding: 4px 0 14px; margin: 0 16px 6px;
  border-bottom: 1px solid #3a2814;
  position: relative;
  text-shadow: 0 1px 1px #000;
}
.menu-head::after {
  content: ''; position: absolute; bottom: -1px; left: 18%; right: 18%; height: 1px;
  background: linear-gradient(90deg, transparent, #8a6a2f, transparent);
}
.menu a {
  display: block; margin: 3px 10px; padding: 11px 14px;
  color: #c9ae7a; text-decoration: none; font-size: 15px;
  border: 1px solid transparent; border-radius: 2px;
  transition: all .15s;
}
.menu a .mi { margin-right: 8px; color: #8a6a2f; font-size: 12px; }
.menu a:hover {
  background: linear-gradient(90deg, #2a1a08, #1d1206);
  color: #ffe9b0; border-color: #4a351a;
}
.menu a.active {
  background: linear-gradient(180deg, #3a1c0a, #291205);
  border-color: #8a6a2f;
  box-shadow: inset 0 0 12px rgba(140, 90, 30, .28), 0 0 9px rgba(212, 169, 69, .18);
  color: var(--gold-lt);
  text-shadow: 0 1px 1px #000;
}
.menu a.active .mi { color: var(--gold-lt); }
.menu-foot {
  text-align: center; color: #4a351a; font-size: 12px;
  margin-top: 14px; letter-spacing: 2px;
}

/* ---------- 内容区 ---------- */
.content { flex: 1; padding: 22px; min-width: 0; }

.page-title {
  display: flex; align-items: center; gap: 12px;
  color: var(--gold-lt); font-size: 19px; margin-bottom: 18px;
  letter-spacing: 3px; font-weight: bold;
  text-shadow: 0 1px 2px #000, 0 0 12px rgba(212, 169, 69, .25);
}
.page-title::before { content: '◆'; color: #8a6a2f; font-size: 14px; }
.page-title::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, #6b5226, transparent);
}

/* 卡片 */
.card {
  background: linear-gradient(180deg, #221507, #180f05 80%);
  border: 1px solid #4a351a;
  box-shadow: 0 0 0 1px #170e05, inset 0 0 22px rgba(0, 0, 0, .45);
  padding: 18px; margin-bottom: 16px;
  position: relative;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(212, 169, 69, .6), transparent);
  pointer-events: none;
}
.cards { display: flex; gap: 16px; flex-wrap: wrap; }
.stat-card {
  flex: 1; min-width: 150px; padding: 24px 16px; text-align: center;
  background: linear-gradient(180deg, #241708, #180f05);
  border: 1px solid #4a351a;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, .4);
  position: relative;
  transition: all .2s;
}
.stat-card::before {
  content: ''; position: absolute; top: -1px; left: 12%; right: 12%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .6;
}
.stat-card:hover {
  border-color: #8a6a2f;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, .4), 0 0 14px rgba(212, 169, 69, .15);
}
.stat-card .num {
  font-size: 32px; color: var(--gold-lt); font-weight: bold;
  text-shadow: 0 0 12px rgba(212, 169, 69, .5), 0 1px 2px #000;
}
.stat-card .lbl { margin-top: 8px; color: #b08d4f; font-size: 13px; letter-spacing: 2px; }

/* 工具条 */
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.toolbar input[type=text], .toolbar select {
  padding: 7px 12px; background: #0f0803; color: #e8d5a3;
  border: 1px solid #5a4420; outline: none; font-family: inherit; font-size: 13px;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .6);
  transition: all .15s;
}
.toolbar input[type=text]:focus, .toolbar select:focus {
  border-color: var(--gold);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .6), 0 0 8px rgba(212, 169, 69, .22);
}
.toolbar .spacer { flex: 1; }

/* 按钮 */
.btn {
  padding: 7px 18px;
  background: linear-gradient(180deg, #a83525 0%, #83220f 45%, #6d1c10 55%, #5c160f 100%);
  border: 1px solid #c89a4a;
  box-shadow: inset 0 1px 0 rgba(255, 220, 150, .35), inset 0 -2px 4px rgba(0, 0, 0, .45), 0 2px 5px rgba(0, 0, 0, .5);
  color: #ffe9b0; cursor: pointer;
  font-family: inherit; font-size: 13px; letter-spacing: 2px;
  text-shadow: 0 1px 1px #000;
  transition: all .15s;
}
.btn:hover {
  background: linear-gradient(180deg, #c04028 0%, #9a2a15 45%, #7d2414 55%, #6d1c10 100%);
  box-shadow: inset 0 1px 0 rgba(255, 220, 150, .4), inset 0 -2px 4px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .5), 0 0 10px rgba(212, 169, 69, .22);
}
.btn:active { transform: translateY(1px); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .65); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-plain {
  background: linear-gradient(180deg, #33240f, #221708);
  border-color: #5a4420; color: #c9ae7a;
  text-shadow: none;
}
.btn-plain:hover {
  background: linear-gradient(180deg, #3d2c13, #2a1a08);
  border-color: #8a6a2f; color: #ffe9b0;
}
.btn-sm { padding: 4px 10px; font-size: 12px; letter-spacing: 1px; }
.btn-push { background: linear-gradient(180deg, #7a5a1a, #4a3410); border-color: #8a6a2f; }
.btn-push:hover { background: linear-gradient(180deg, #90682a, #5a3e14); }
.btn-danger { background: linear-gradient(180deg, #6d2a2a, #421515); border-color: #8a4a3a; }
.btn-danger:hover { background: linear-gradient(180deg, #83322f, #521c16); }

/* 表格 */
table.grid { width: 100%; border-collapse: collapse; }
table.grid th {
  background: linear-gradient(180deg, #3a2610, #2a1a08);
  color: var(--gold-lt); padding: 10px; text-align: left;
  border: 1px solid #5a4420; font-weight: bold; white-space: nowrap;
  text-shadow: 0 1px 1px #000; letter-spacing: 1px;
}
table.grid td { padding: 9px 10px; border: 1px solid #3a2814; color: #d8c496; }
table.grid tr:nth-child(even) td { background: rgba(30, 20, 8, .5); }
table.grid tr:hover td { background: #2a1c0a; }

/* 分页 */
.pager { display: flex; gap: 8px; margin-top: 14px; align-items: center; color: #b08d4f; }
.pager button {
  padding: 4px 14px;
  background: linear-gradient(180deg, #33240f, #221708);
  border: 1px solid #6b5226; color: #c9ae7a; cursor: pointer;
  font-family: inherit; font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 220, 150, .12);
  transition: all .15s;
}
.pager button:hover:not(:disabled) { border-color: var(--gold); color: #ffe9b0; }
.pager button:disabled { opacity: .4; cursor: default; }

/* 标签 */
.tag { display: inline-block; padding: 1px 8px; font-size: 12px; border: 1px solid; border-radius: 2px; }
.tag-on { color: #7ec07e; border-color: #4a6a3a; background: rgba(60, 100, 40, .12); }
.tag-push { color: #f0b94a; border-color: #8a6a2f; background: rgba(160, 120, 40, .15); }
.tag-off { color: #c9ae7a; border-color: #5a4420; }
.tag-top { color: #e8a55a; border-color: #8a6a2f; background: rgba(140, 100, 40, .12); }

/* 表单 */
.form-row { margin-bottom: 14px; }
.form-row label { display: block; color: #c9ae7a; margin-bottom: 5px; font-size: 13px; }
.form-row input[type=text], .form-row input[type=password], .form-row input[type=number],
.form-row select, .form-row textarea {
  width: 100%; padding: 8px 10px; background: #0f0803; color: #e8d5a3;
  border: 1px solid #5a4420; outline: none; font-family: inherit; font-size: 13px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .6);
  transition: all .15s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: var(--gold);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .6), 0 0 8px rgba(212, 169, 69, .22);
}
.form-row textarea { resize: vertical; line-height: 1.6; }
.form-inline { display: flex; gap: 14px; }
.form-inline > div { flex: 1; }
.checkbox-row { display: flex; gap: 20px; align-items: center; color: #c9ae7a; }
.checkbox-row label { display: flex; gap: 6px; align-items: center; cursor: pointer; }

/* 模态框 */
#modal-mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .68);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal-box {
  width: 640px; max-width: 92vw; max-height: 86vh; overflow: auto;
  background: linear-gradient(180deg, #221507, #180f05);
  border: 1px solid #8a6a2f;
  box-shadow: 0 0 0 3px #170e05, 0 0 0 4px #4a351a, 0 14px 44px rgba(0, 0, 0, .85);
  position: relative;
}
.modal-box.modal-wide { width: 960px; max-width: 96vw; }
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  background: linear-gradient(180deg, #4a2410, #2f1608);
  border-bottom: 1px solid #6b5226;
  color: var(--gold-lt); letter-spacing: 3px; font-weight: bold;
  text-shadow: 0 1px 1px #000;
}
.modal-head a { color: #c9ae7a; text-decoration: none; font-size: 18px; }
.modal-head a:hover { color: var(--gold-lt); }
.modal-body { padding: 16px; }
.modal-foot {
  padding: 12px 16px; text-align: right;
  border-top: 1px solid #4a351a;
  background: rgba(0, 0, 0, .15);
}
.modal-foot .btn { margin-left: 10px; }
.modal-foot .modal-link { float: left; margin-left: 0; }

/* 提示 */
.toast {
  position: fixed; top: 74px; left: 50%; transform: translateX(-50%);
  padding: 11px 26px;
  background: linear-gradient(180deg, #2a1a08, #1b1207);
  border: 1px solid #c89a4a;
  box-shadow: 0 0 16px rgba(212, 169, 69, .3), 0 6px 18px rgba(0, 0, 0, .6);
  color: var(--gold-lt); z-index: 99; font-size: 14px; letter-spacing: 1px;
  text-shadow: 0 1px 1px #000;
}

/* 轮播图配置 */
.car-block { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #4a351a; }
.car-title { color: var(--gold-lt); font-size: 14px; margin-bottom: 12px; letter-spacing: 1px; }
.car-hint { color: #b08d4f; font-size: 13px; margin-bottom: 12px; }
.car-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.car-item {
  background: linear-gradient(180deg, #1d1206, #150d05);
  border: 1px solid #4a351a; padding: 10px;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, .35);
}
.car-head { color: #c9ae7a; font-size: 13px; margin-bottom: 8px; letter-spacing: 1px; }
.car-preview {
  height: 84px; display: flex; align-items: center; justify-content: center;
  background: #0f0803; border: 1px dashed #5a4420;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .6);
  margin-bottom: 8px; overflow: hidden;
}
.car-preview img { max-width: 100%; max-height: 100%; }
.car-empty { color: #6d5a38; font-size: 12px; }
.car-actions { display: flex; gap: 8px; margin-bottom: 10px; }

/* ---------- 页面目录 ---------- */
.pg-group { margin-bottom: 18px; }
.pg-group-head {
  color: #e8c987; font-size: 14px; font-weight: bold;
  margin-bottom: 8px; letter-spacing: 1px;
}
.pg-group-head::before { content: '▣ '; color: #8a6a2f; }
.pg-url { font-family: Consolas, "Courier New", monospace; font-size: 12px; word-break: break-all; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .layout { flex-direction: column; }
  .menu {
    width: 100%; border-right: 0; border-bottom: 1px solid #4a351a;
    display: flex; flex-wrap: wrap; padding: 8px;
  }
  .menu-head, .menu-foot { display: none; }
  .menu a { margin: 2px; padding: 8px 12px; }
  .content { padding: 14px; }
  .form-inline { flex-direction: column; gap: 0; }
  .brand-text em { display: none; }
}
