/* Trang quản trị — dùng chung màu, chữ với style.css */
body.admin { padding-bottom: 2rem; }
.adm { max-width: 760px; }
.logo-link { display: flex; }
.login { max-width: 480px; margin: 1rem auto; }
.fld { display: grid; gap: .3rem; font-weight: 700; }
.fld > span { font-size: .95rem; }
.req { color: var(--red-ink); font-style: normal; }
.hint { display: block; color: var(--muted); font-size: .84rem; margin-top: .3rem; }
.fgroup { padding-bottom: .2rem; }
.form textarea.input { min-height: 8rem; resize: vertical; line-height: 1.5; }
.chk { display: flex; gap: .6rem; align-items: flex-start; font-weight: 600; font-size: .95rem; cursor: pointer; }
.chk input { width: 24px; height: 24px; flex: none; margin-top: .1rem; accent-color: var(--red); }
.chk.big { padding: .7rem .8rem; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); }
.err { color: var(--red-ink); background: var(--red-soft); border-radius: 10px; padding: .6rem .8rem; font-weight: 600; }
.money-in { position: relative; }
.money-in .input { font-size: 1.4rem; font-weight: 800; padding-right: 4.5rem; font-variant-numeric: tabular-nums; }
.money-in b { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.actions { display: grid; gap: .5rem; position: sticky; bottom: 0; background: linear-gradient(180deg, transparent, var(--card) 30%); padding: .8rem 0 .2rem; z-index: 2; }
.btn-del { color: var(--red-ink); border-color: var(--red-soft); margin-top: .6rem; width: 100%; }

.bar { display: flex; align-items: center; gap: .6rem; margin: .2rem 0 .8rem; }
.bar .h2 { margin: 0; flex: 1; }

.quick-act { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; margin-bottom: 1rem; }
.qa { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; min-height: 92px; padding: .8rem .9rem; border-radius: 16px;
  text-decoration: none; color: #fff; font-weight: 700; background: linear-gradient(135deg, #A50D26, #C8102E); box-shadow: 0 3px 10px rgba(140, 10, 30, .25); }
.qa:nth-child(2) { background: linear-gradient(135deg, #1F6B2A, #2E7D32); }
.qa:nth-child(3) { background: linear-gradient(135deg, #7A4A00, #A86A00); }
.qa:nth-child(4) { background: linear-gradient(135deg, #12457F, #1557B0); }
.qa svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.tiles { display: grid; gap: .5rem; }
@media (min-width: 640px) { .tiles { grid-template-columns: 1fr 1fr; } }
.tile-adm { display: flex; align-items: center; gap: .75rem; padding: .75rem .9rem; min-height: 64px; border-radius: 14px; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.tile-adm svg { width: 30px; height: 30px; flex: none; fill: none; stroke: var(--red-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tile-adm span { flex: 1; display: grid; }
.tile-adm small { color: var(--muted); font-size: .8rem; }
.tile-adm em { font-style: normal; font-weight: 800; color: var(--muted); background: var(--bg); border-radius: 999px; padding: .1rem .6rem; font-size: .85rem; }

.adm-list { list-style: none; padding: 0; margin: .4rem 0; display: grid; gap: .45rem; }
.adm-list a { display: flex; align-items: center; gap: .7rem; padding: .65rem .8rem; min-height: 60px; border-radius: 12px; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); }
.adm-list img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex: none; background: var(--line); }
.adm-list .t { flex: 1; display: grid; min-width: 0; }
.adm-list .t b { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.adm-list .t small { color: var(--muted); font-size: .82rem; }
.adm-list .m { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }

.imgf { display: grid; gap: .5rem; }
.imgf-prev { min-height: 90px; border: 2px dashed var(--line); border-radius: 12px; display: grid; place-items: center; overflow: hidden; color: var(--muted); background: var(--bg); }
.imgf-prev img { width: 100%; max-height: 260px; object-fit: contain; display: block; }
.imgf .btn-row { margin: 0; }
.imgf label.btn { cursor: pointer; }

.repeat { display: grid; gap: .5rem; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3rem; }
.day { position: relative; }
.day input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.day span { display: grid; place-items: center; min-height: 46px; border-radius: 10px; border: 1.5px solid var(--line); font-weight: 700; background: var(--card); }
.day input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.day input:focus-visible + span { outline: 3px solid var(--focus); }

.busy { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.45); display: grid; place-items: center; }
.busy[hidden] { display: none; }
.busy-box { background: var(--card); color: var(--ink); padding: 1rem 1.3rem; border-radius: 14px; display: flex; gap: .8rem; align-items: center; font-weight: 700; max-width: 86vw; }
.spin { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--red); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast.bad { background: #8E0B20; }
body.admin .toast { bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
code { background: var(--bg); padding: 0 .3rem; border-radius: 4px; }
.icon-btn { text-decoration: none; }
body.admin .brand h1 { font-size: 1.05rem; }
