/* Trang đăng nhập / khu thành viên / quản trị — dùng lại token Soft Flow, ưu tiên điện thoại. */
body.app{background:var(--mist)}
.app-main{padding:28px 20px 60px;max-width:760px}
body.wide .app-main{max-width:1000px}
.app h1{font-size:28px;line-height:1.2}
.app h2{font-size:21px}
.app h3{font-size:16px;margin:18px 0 8px}
.muted{color:var(--grey-600);font-size:14.5px}
.card{background:var(--white);border-radius:24px;padding:22px;margin-bottom:14px}
.card.narrow{max-width:440px;margin:40px auto}
.card h1{margin-bottom:8px}
.app label{display:block;font-weight:700;font-size:13.5px;margin:12px 0 5px}
.app label small{font-weight:500;color:var(--grey-600)}
.app input,.app select,.app textarea{width:100%;min-height:44px;border-radius:12px;border:1.5px solid var(--grey-200);padding:8px 12px;font:inherit;font-size:16px;background:var(--white);color:var(--ink)}
.app textarea{resize:vertical;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:14.5px}
.app input:focus,.app select:focus,.app textarea:focus{outline:2px solid var(--brown-500);outline-offset:1px}
.app label.check{display:flex;gap:8px;align-items:center;font-weight:600}
.app label.check input{width:20px;min-height:20px}
.btn.block{width:100%;margin-top:16px}
.btn.sm{min-height:40px;padding:0 16px;font-size:14px}
.btn.danger{color:#A23B1E}
.btn:disabled{opacity:.6;cursor:wait}
.msg{margin-top:12px;font-size:14.5px;font-weight:600;min-height:1.2em}
.msg[data-kind="ok"]{color:#1f7a45}
.msg[data-kind="warn"]{color:#B4461A}
.msg[data-kind="wait"]{color:var(--brown-700)}
.page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:18px}
.foot-note{margin-top:20px}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:10px}

/* Trạng thái */
.pill{display:inline-block;font:700 12px "Nunito";padding:3px 10px;border-radius:99px;background:var(--grey-200);color:var(--grey-700);white-space:nowrap}
.pill.s-paid{background:#FFF1E8;color:#B4461A}
.pill.s-delivered{background:#E3F4EA;color:#1f7a45}
.pill.s-pending{background:var(--brown-100);color:var(--brown-700)}
.pill.s-refunded,.pill.s-cancelled,.pill.s-expired{background:var(--mist);color:var(--grey-600)}

/* Khu thành viên */
.order-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.order h3{margin:0 0 2px;font-size:18px}
.order .muted{display:block;margin-top:8px}
.order-top .muted{margin-top:0}
.deliver{margin-top:14px;background:var(--mist);border-radius:16px;padding:14px}
.deliver pre{white-space:pre-wrap;word-break:break-word;font:14.5px/1.55 ui-monospace,Menlo,Consolas,monospace;margin-top:6px;user-select:all}

/* Quản trị */
.tabs{display:flex;gap:6px;overflow-x:auto;margin:0 -20px 16px;padding:0 20px 4px;scrollbar-width:none}
.tabs a{flex:none;padding:9px 16px;border-radius:99px;background:var(--white);font-weight:700;font-size:14px;color:var(--grey-700)}
.tabs a[aria-current="page"]{background:var(--ink);color:#fff}
.tiles{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.tile{background:var(--white);border-radius:18px;padding:16px;display:flex;flex-direction:column;gap:4px}
.tile span{font-size:13px;color:var(--grey-600);font-weight:600}
.tile b{font:700 22px "Quicksand"}
.tile b small{display:block;font:600 12px "Nunito";color:var(--grey-600)}
.tile.hot{box-shadow:inset 0 0 0 2px var(--orange)}
a.tile:hover{box-shadow:inset 0 0 0 2px var(--brown-500)}
.filters{display:flex;gap:8px;margin-bottom:12px}
.filters select{max-width:220px}
.list{display:flex;flex-direction:column;gap:8px}
.row{display:flex;justify-content:space-between;gap:12px;align-items:center;width:100%;text-align:left;background:var(--white);border:0;border-radius:16px;padding:12px 14px;font:inherit;color:inherit;cursor:pointer}
.row.static{cursor:default}
button.row:hover{box-shadow:inset 0 0 0 1.5px var(--brown-300)}
.r-main{min-width:0;font-size:15px}
.r-main small,.r-side small{display:block;color:var(--grey-600);font-size:13px;margin-top:2px;overflow-wrap:anywhere}
.r-side{display:flex;flex-direction:column;align-items:flex-end;gap:4px;font-weight:700;white-space:nowrap;font-size:14.5px}
.assign{display:flex;gap:6px;flex:none}
.assign input{width:120px;min-height:40px;font-size:15px;text-transform:uppercase}
.form h2{margin-bottom:4px}
.sheet{border:0;border-radius:24px;padding:0;width:min(640px,100vw - 24px);max-height:calc(100vh - 40px);margin:auto;background:var(--white);color:var(--ink)}
.sheet::backdrop{background:rgba(20,17,16,.45)}
.sheet-head{display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;background:var(--white);padding:18px 20px 10px;z-index:1}
.sheet-head .x{width:40px;height:40px;border-radius:50%;border:0;background:var(--mist);font-size:22px;cursor:pointer}
#sheet-body{padding:0 20px 22px}
.kv{display:grid;grid-template-columns:auto 1fr;gap:6px 14px;font-size:14.5px;background:var(--mist);border-radius:16px;padding:14px}
.kv>span:nth-child(odd){color:var(--grey-600);font-weight:600}
.actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.mini-list{font-size:14px}
.mini-list li{padding:6px 0;border-bottom:1px dashed var(--grey-200)}
.mini-list small{display:block;color:var(--grey-600);overflow-wrap:anywhere}
@media (max-width:700px){
  .tiles{grid-template-columns:1fr 1fr}
  .app-main{padding-top:20px}
  .row{flex-wrap:wrap}
  .r-side{flex-direction:row;align-items:center}
  .assign{width:100%}.assign input{flex:1;width:auto}
  .sheet{width:100vw;max-width:100vw;max-height:92vh;margin:auto 0 0;border-radius:24px 24px 0 0}
  .row2{grid-template-columns:1fr}
}
.app section.tab{padding:0}
.page-head .btn{white-space:nowrap;flex:none}
