:root {
  --primary: #2B7DE9;
  --primary-light: #E8F1FE;
  --success: #34A853;
  --warning: #F5A623;
  --danger: #E74C3C;
  --bg: #F5F7FA;
  --card: #FFFFFF;
  --text: #2C3E50;
  --text-light: #8A94A6;
  --border: #E8ECF1;
  --radius: 14px;
  --tabbar-h: 60px;
}
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html,body { height:100%; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif; background:var(--bg); color:var(--text); font-size:16px; }
body.big-font { font-size:19px; }
#app { max-width:600px; margin:0 auto; min-height:100vh; padding-bottom:calc(var(--tabbar-h) + 20px); }

/* Auth */
.auth-wrap { padding:60px 28px; text-align:center; }
.logo { font-size:48px; margin-bottom:12px; }
.auth-wrap h1 { font-size:26px; margin-bottom:6px; }
.auth-wrap .sub { color:var(--text-light); margin-bottom:36px; }
.field { margin-bottom:16px; text-align:left; }
.field label { display:block; font-size:14px; color:var(--text-light); margin-bottom:6px; }
.field input, .field select, .field textarea {
  width:100%; padding:14px 16px; border:1.5px solid var(--border); border-radius:12px;
  font-size:16px; background:#fff; outline:none; transition:border .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color:var(--primary); }
.btn {
  display:block; width:100%; padding:15px; border:none; border-radius:12px;
  background:var(--primary); color:#fff; font-size:17px; font-weight:600; cursor:pointer;
}
.btn:active { opacity:.85; }
.btn.ghost { background:var(--primary-light); color:var(--primary); }
.btn.danger { background:var(--danger); }
.btn.small { width:auto; padding:8px 16px; font-size:14px; display:inline-block; }
.link { color:var(--primary); text-align:center; margin-top:16px; cursor:pointer; font-size:15px; }

/* Header */
.header { background:var(--primary); color:#fff; padding:20px 20px 18px; border-radius:0 0 20px 20px; }
.header h2 { font-size:20px; }
.header .date { opacity:.85; font-size:13px; margin-top:4px; }

/* Cards */
.card { background:var(--card); border-radius:var(--radius); padding:16px; margin:12px; box-shadow:0 1px 3px rgba(0,0,0,.04); }
.stat-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:12px; }
.stat-box { background:var(--card); border-radius:var(--radius); padding:14px; text-align:center; }
.stat-box .num { font-size:26px; font-weight:700; color:var(--primary); }
.stat-box .lbl { font-size:12px; color:var(--text-light); margin-top:4px; }

/* Slot list */
.slot-item { display:flex; align-items:center; padding:14px; border-bottom:1px solid var(--border); }
.slot-item:last-child { border-bottom:none; }
.slot-icon { width:44px; height:44px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:22px; margin-right:12px; flex-shrink:0; }
.slot-body { flex:1; min-width:0; }
.slot-title { font-weight:600; font-size:15px; }
.slot-meta { font-size:12px; color:var(--text-light); margin-top:3px; }
.slot-actions { display:flex; gap:8px; }
.pill { display:inline-block; padding:3px 10px; border-radius:20px; font-size:11px; font-weight:600; }
.pill.warn { background:#FFF4E0; color:var(--warning); }
.pill.danger { background:#FDE8E8; color:var(--danger); }
.pill.ok { background:#E6F4EA; color:var(--success); }
.pill.blue { background:var(--primary-light); color:var(--primary); }

/* Plan card */
.plan-card { background:var(--card); border-radius:var(--radius); padding:14px; margin:10px 12px; box-shadow:0 1px 3px rgba(0,0,0,.04); }
.plan-top { display:flex; justify-content:space-between; align-items:start; }
.plan-title { font-weight:600; font-size:16px; }
.plan-type { font-size:11px; padding:2px 8px; border-radius:10px; background:var(--primary-light); color:var(--primary); }
.plan-meta { font-size:13px; color:var(--text-light); margin-top:6px; line-height:1.6; }
.plan-actions { margin-top:10px; display:flex; gap:8px; flex-wrap:wrap; }

/* Tabs */
.seg { display:flex; background:#EDEFF3; border-radius:10px; padding:3px; margin:12px; }
.seg button { flex:1; padding:9px; border:none; background:transparent; border-radius:8px; font-size:14px; cursor:pointer; color:var(--text-light); }
.seg button.on { background:#fff; color:var(--primary); font-weight:600; box-shadow:0 1px 2px rgba(0,0,0,.06); }

/* Tabbar */
.tabbar { position:fixed; bottom:0; left:50%; transform:translateX(-50%); width:100%; max-width:600px;
  background:#fff; border-top:1px solid var(--border); display:flex; height:var(--tabbar-h); }
.tabbar button { flex:1; border:none; background:none; display:flex; flex-direction:column; align-items:center; justify-content:center;
  font-size:11px; color:var(--text-light); cursor:pointer; gap:2px; }
.tabbar button.on { color:var(--primary); }
.tabbar .ico { font-size:22px; }

/* FAB */
.fab { position:fixed; bottom:calc(var(--tabbar-h) + 18px); right:20px; width:56px; height:56px; border-radius:50%;
  background:var(--primary); color:#fff; border:none; font-size:28px; box-shadow:0 4px 12px rgba(43,125,233,.4); cursor:pointer; z-index:50; }

/* Modal */
.mask { position:fixed; inset:0; background:rgba(0,0,0,.4); z-index:100; display:flex; align-items:flex-end; justify-content:center; }
.modal { background:#fff; width:100%; max-width:600px; border-radius:20px 20px 0 0; padding:20px; max-height:90vh; overflow-y:auto; }
.modal h3 { margin-bottom:16px; font-size:18px; }
.modal-actions { display:flex; gap:10px; margin-top:18px; }
.modal-actions .btn { flex:1; }
.row { display:flex; gap:10px; }
.row .field { flex:1; }

/* empty */
.empty { text-align:center; padding:50px 20px; color:var(--text-light); }
.empty .ico { font-size:48px; margin-bottom:10px; }

/* toast */
#toast { position:fixed; top:20px; left:50%; transform:translateX(-50%); background:rgba(0,0,0,.78); color:#fff;
  padding:10px 20px; border-radius:8px; font-size:14px; z-index:999; opacity:0; transition:opacity .3s; pointer-events:none; }
#toast.show { opacity:1; }
