:root {
  --bg: #f6efe5;
  --panel: #fffaf2;
  --line: #ead8bc;
  --text: #2b2219;
  --muted: #8b7a64;
  --gold: #b97b34;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.hidden { display: none !important; }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 780px; background: var(--panel); border-radius: 18px; padding: 28px; box-shadow: 0 18px 40px rgba(51, 36, 19, 0.12); }
.login-card h1 { margin: 0; font-size: 42px; }
.login-card p { margin: 10px 0 0; color: var(--muted); }
.login-row { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr 120px; gap: 10px; }

.layout { min-height: 100vh; display: grid; grid-template-columns: 220px 1fr; }
.sidebar { background: linear-gradient(180deg, #1d1712, #2b2118); padding: 20px 14px; }
.brand { color: #f2d19a; font-weight: 800; margin-bottom: 20px; letter-spacing: 1px; }
.menu { width: 100%; height: 42px; border-radius: 10px; border: none; margin-bottom: 8px; text-align: left; padding: 0 12px; background: transparent; color: #d8c1a2; cursor: pointer; }
.menu.active { background: rgba(242, 209, 154, 0.15); color: #f7ddae; }

.main { padding: 18px; }
.topbar { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; height: 64px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; }
.title { font-size: 22px; font-weight: 800; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.admin-tag { padding: 6px 10px; border: 1px solid #dabb84; border-radius: 999px; color: #855f2f; background: #f7ebd7; font-size: 13px; }

.cards { margin-top: 16px; display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 12px; }
.stat-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.stat-card .k { font-size: 32px; font-weight: 800; }
.stat-card .v { margin-top: 6px; color: var(--muted); }

.panel { margin-top: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; }
.panel-head h2 { margin: 0; }
.toolbar { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.table-wrap { margin-top: 12px; overflow: auto; }

input, select, button { height: 38px; border-radius: 10px; border: 1px solid #e5d3ba; padding: 0 12px; background: #fff; color: var(--text); }
input, select { min-width: 140px; }
textarea { min-width: 320px; min-height: 78px; border-radius: 10px; border: 1px solid #e5d3ba; padding: 10px 12px; background: #fff; color: var(--text); resize: vertical; }
button { cursor: pointer; }
.btn-gold { border: none; background: linear-gradient(135deg, #f2d19a, #b97b34); color: #2f210f; font-weight: 700; }
.btn-outline { background: #fff7ea; color: #7e5a2e; }
.tip { margin-top: 8px; color: #9b362f; min-height: 20px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 8px; border-bottom: 1px solid #f0e2ce; white-space: nowrap; }

@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: flex; gap: 8px; overflow: auto; }
  .brand { margin: 0 12px 0 0; }
  .cards { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
  .login-row { grid-template-columns: 1fr; }
}
