/* ============ 咿呀宝贝 管理后台样式（奶油系） ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "PingFang SC", "Microsoft YaHei", sans-serif; background: #FFF8F0; color: #4A3F35; }
body.guest #appView { display: none; }
body.logged #loginView { display: none; }

.ipt {
  width: 100%; padding: 12px 14px; border: 1.5px solid #F0DDC8; border-radius: 12px;
  font-size: 14px; background: #fff; outline: none; transition: border .2s;
}
.ipt:focus { border-color: #F5A46B; }
textarea.ipt { resize: vertical; min-height: 90px; font-family: inherit; line-height: 1.6; }
select.ipt { appearance: none; }

.btn {
  padding: 10px 18px; border: 1.5px solid #F0DDC8; border-radius: 10px; background: #fff;
  color: #6B5B4E; font-size: 14px; cursor: pointer; transition: all .2s;
}
.btn:hover { border-color: #F5A46B; color: #D97B3F; }
.btn-primary { background: #F5A46B; border-color: #F5A46B; color: #fff; font-weight: 600; }
.btn-primary:hover { background: #E89250; color: #fff; }
.btn-danger { color: #E05B5B; border-color: #F2C9C9; }
.btn-danger:hover { background: #FDF1F1; border-color: #E05B5B; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }

/* ---- 登录 ---- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #FFF8F0 0%, #FFE9D6 100%); }
.login-card { width: 380px; background: #fff; border-radius: 20px; padding: 40px 36px; box-shadow: 0 12px 40px rgba(217,123,63,.18); text-align: center; }
.login-logo { font-size: 44px; }
.login-card h1 { margin: 12px 0 4px; color: #D97B3F; font-size: 24px; }
.login-sub { color: #A08D7C; font-size: 13px; margin-bottom: 22px; }
.login-card .ipt { margin-bottom: 14px; }
.login-msg { color: #E05B5B; font-size: 13px; min-height: 18px; margin-bottom: 6px; }
.login-hint { margin-top: 16px; color: #B9A894; font-size: 12px; }

/* ---- 布局 ---- */
.app-wrap { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #fff; border-right: 1px solid #F3E5D5; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { padding: 22px 20px; font-size: 18px; font-weight: 700; color: #D97B3F; border-bottom: 1px solid #F7EDE1; }
.nav { flex: 1; padding: 14px 10px; }
.nav-item { display: block; padding: 11px 14px; border-radius: 10px; color: #6B5B4E; text-decoration: none; font-size: 14px; margin-bottom: 4px; cursor: pointer; transition: background .15s; }
.nav-item:hover { background: #FFF3E6; }
.nav-item.active { background: #F5A46B; color: #fff; font-weight: 600; }
.sidebar-foot { padding: 16px 20px; border-top: 1px solid #F7EDE1; font-size: 13px; color: #A08D7C; }
.logout { color: #E05B5B; cursor: pointer; margin-left: 10px; text-decoration: none; }
.logout:hover { text-decoration: underline; }

.main { flex: 1; padding: 22px 28px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.topbar h2 { font-size: 20px; color: #4A3F35; }
.topbar-hint { font-size: 12px; color: #B9A894; background: #FBF1E4; padding: 4px 12px; border-radius: 20px; }

/* ---- 总览卡片 ---- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card { background: #fff; border-radius: 16px; padding: 20px 18px; box-shadow: 0 4px 14px rgba(217,123,63,.08); }
.stat-card .num { font-size: 30px; font-weight: 700; color: #D97B3F; }
.stat-card .lbl { font-size: 13px; color: #A08D7C; margin-top: 4px; }

/* ---- 通用列表 ---- */
.panel { background: #fff; border-radius: 16px; padding: 20px; box-shadow: 0 4px 14px rgba(217,123,63,.06); }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel-head h3 { font-size: 16px; }
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; padding: 10px 8px; color: #A08D7C; font-weight: 600; border-bottom: 2px solid #F7EDE1; white-space: nowrap; }
.table td { padding: 10px 8px; border-bottom: 1px solid #FBF4EA; vertical-align: middle; }
.table tr:hover td { background: #FFF9F2; }
.tag { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; background: #FFF3E6; color: #D97B3F; }
.tag-green { background: #EAF7EC; color: #4C9A5F; }
.tag-blue { background: #EAF3FB; color: #4A7FB8; }
.tag-red { background: #FDEBEB; color: #D05050; }
.muted { color: #B9A894; font-size: 12px; }
.empty { text-align: center; color: #B9A894; padding: 40px 0; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.item-card { background: #fff; border-radius: 14px; padding: 16px; box-shadow: 0 3px 10px rgba(217,123,63,.06); }
.item-card .t { font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.item-card .d { color: #8A7A6C; font-size: 13px; line-height: 1.7; white-space: pre-wrap; word-break: break-all; }
.ops { display: flex; gap: 8px; margin-top: 10px; }
.ops .btn { padding: 5px 12px; font-size: 12.5px; }

/* ---- 弹窗 ---- */
.modal-mask { position: fixed; inset: 0; background: rgba(74,63,53,.45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal { width: 560px; max-width: 94vw; max-height: 88vh; background: #fff; border-radius: 16px; display: flex; flex-direction: column; overflow: hidden; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #F7EDE1; }
.modal-head span { font-size: 16px; font-weight: 600; }
.modal-close { border: none; background: none; font-size: 22px; color: #A08D7C; cursor: pointer; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid #F7EDE1; display: flex; justify-content: flex-end; gap: 10px; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; color: #8A7A6C; margin-bottom: 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

/* ---- 提示 ---- */
.toast { position: fixed; top: 28px; left: 50%; transform: translateX(-50%); background: #4A3F35; color: #fff; padding: 10px 22px; border-radius: 30px; font-size: 13.5px; opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 99; }
.toast.show { opacity: 1; }
