/* ==================================================
   KTX XANH — STYLE CHUNG (bản thiết kế lại 11/2026)
   1. Biến màu & nền
   2. Thành phần dùng chung cho MỌI trang cũ (card, details, button...)
   3. Trang đăng nhập / form nhỏ (.login-box, .auth-*)
   4. Khung ứng dụng mới (.app, .side, .tabbar...) — trang học sinh
================================================== */

:root{
  --green:#047857;
  --green-dark:#065f46;
  --green-tint:#e3f4ec;
  --ink:#10231b;
  --muted:#4b5e55;
  --line:#dce4df;
  --line-soft:#e3eae6;
  --ground:#f3f6f4;
  --amber-bg:#fef3c7;
  --amber-ink:#92400e;
  --red:#b91c1c;
  --blue:#1d4ed8;
  --blue-tint:#e4eefb;
  --radius:18px;
  --shadow:0 6px 24px rgba(16,35,27,.10);
  /* Độ trong của lớp phủ trên ảnh nền: số càng nhỏ ảnh càng rõ */
  --veil-top:.50;
  --veil-bottom:.64;
}

*{box-sizing:border-box;margin:0;padding:0}
html{font-size:16px;-webkit-text-size-adjust:100%}

body{
  min-height:100vh;
  font-family:"Be Vietnam Pro","Segoe UI",system-ui,-apple-system,sans-serif;
  color:var(--ink);
  line-height:1.5;
  background:
    linear-gradient(rgba(240,247,243,var(--veil-top)),rgba(240,247,243,var(--veil-bottom))),
    url("images/background.jpg") center/cover no-repeat fixed;
  background-color:var(--ground);
  padding:20px 16px 40px;
}

a{color:var(--green);text-decoration:none}
a:hover{color:var(--green-dark)}
img{max-width:100%}
[hidden]{display:none!important}

/* ---------- 2. THÀNH PHẦN DÙNG CHUNG (các trang giáo viên/BQL/BCH...) ---------- */
body > *{width:100%;max-width:980px;margin-left:auto;margin-right:auto}

body > h1{
  font-size:28px;font-weight:700;color:var(--green-dark);
  text-align:center;margin:8px auto 18px;
  background:rgba(255,255,255,.88);
  border-radius:var(--radius);padding:14px 18px;box-shadow:var(--shadow);
}
body > h2, body > h3, body > p{
  background:rgba(255,255,255,.86);border-radius:14px;padding:10px 14px;margin:10px auto;
}
h2{font-size:20px;font-weight:700}
h3{font-size:17px;font-weight:700}

.card,.section,details,.bql-title,.overview-box{
  width:100%;
  background:rgba(255,255,255,.95);
  border:1px solid var(--line-soft);
  border-radius:var(--radius);
  padding:18px;
  margin:12px auto;
  box-shadow:var(--shadow);
}
.card h2,.section h2{margin-bottom:12px}
.card div,.section div,details div{line-height:1.7}
details > *:not(summary){width:100%}

summary,.role,h2[onclick]{
  display:flex;align-items:center;min-height:52px;
  background:#fff;border:1px solid var(--line);border-radius:14px;
  padding:12px 16px;margin:6px 0;cursor:pointer;
  font-size:16px;font-weight:700;list-style:none;
}
summary::-webkit-details-marker{display:none}
summary::after{content:"";margin-left:auto;width:9px;height:9px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);transition:transform .2s}
details[open] > summary::after{transform:rotate(-135deg)}
details{padding:10px 14px}
details[open]{padding-bottom:16px}

button{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:46px;padding:10px 18px;
  background:var(--green);color:#fff;border:none;border-radius:14px;
  font:inherit;font-weight:700;font-size:15px;cursor:pointer;
  transition:background .15s,transform .1s;
}
button:hover{background:var(--green-dark)}
button:active{transform:scale(.97)}
button:disabled{opacity:.6;cursor:default}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{
  outline:3px solid #34d399;outline-offset:2px
}

input,select,textarea{
  width:100%;min-height:46px;padding:11px 13px;
  border:1px solid var(--line);border-radius:12px;background:#fbfdfc;
  font:inherit;font-size:16px;color:var(--ink);
}
textarea{min-height:90px;resize:vertical}
input:focus,select:focus,textarea:focus{border-color:var(--green);outline:none;box-shadow:0 0 0 3px rgba(4,120,87,.15)}
label{font-size:14px;color:var(--muted)}
hr{border:none;border-top:1px solid var(--line-soft);margin:14px 0}

table{width:100%;border-collapse:collapse;font-size:14px}
th,td{padding:8px 10px;border-bottom:1px solid var(--line-soft);text-align:left}
th{color:var(--muted);font-weight:600}

.report-card{border-top:4px solid var(--green)}
.info-card{border-top:4px solid #0e7490}

.bql-page{max-width:1000px;margin:0 auto}
.bql-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.bql-grid .card,.bql-grid details,.bql-grid h2[onclick]{width:100%;margin:0}
.overview-box{line-height:2}

.list-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid var(--line-soft)}
.tag{display:inline-block;padding:3px 10px;border-radius:999px;background:var(--green-tint);color:var(--green-dark);font-size:12px;font-weight:700}

/* ---------- 3. ĐĂNG NHẬP / FORM NHỎ ---------- */
body.auth{display:flex;align-items:center;justify-content:center;padding:24px 16px}
.login-box{
  width:100%;max-width:420px;margin:24px auto;
  background:rgba(255,255,255,.96);
  border-radius:24px;padding:28px 24px;
  box-shadow:0 18px 50px rgba(16,35,27,.22);
  display:flex;flex-direction:column;gap:14px;text-align:left;
}
.login-brand{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;margin-bottom:6px}
.school-logo{width:96px;height:96px;object-fit:contain;display:block}
.login-brand .brand-name{font-size:24px;font-weight:700;color:var(--green-dark);line-height:1.2}
.login-brand .brand-school{font-size:13px;color:var(--muted)}
.login-box h2{font-size:20px;text-align:center}
.login-box .hint{font-size:13px;color:var(--muted);text-align:center}
.login-box button{width:100%;min-height:50px;font-size:16px}
.field{display:flex;flex-direction:column;gap:6px}
.form-msg{border-radius:12px;padding:10px 12px;font-size:14px;font-weight:600}
.form-msg.error{background:#fee2e2;color:#991b1b}
.form-msg.ok{background:var(--green-tint);color:var(--green-dark)}
.form-msg.warn{background:var(--amber-bg);color:var(--amber-ink)}
.cf-turnstile{min-height:65px;display:flex;justify-content:center}
.login-foot{font-size:12px;color:var(--muted);text-align:center}

/* ---------- 4. KHUNG ỨNG DỤNG MỚI (trang học sinh) ---------- */
body.app-body{padding:0;display:block}
body.app-body > *{max-width:none}
.app{display:flex;min-height:100vh}
.side{
  width:264px;flex-shrink:0;position:sticky;top:0;height:100vh;
  background:rgba(255,255,255,.95);border-right:1px solid var(--line-soft);
  padding:22px 14px;display:flex;flex-direction:column;gap:4px;
}
.brand{display:flex;align-items:center;gap:12px;padding:0 6px 18px}
.brand img{width:52px;height:52px;border-radius:50%;background:#fff;object-fit:contain;flex-shrink:0}
.brand-name{font-size:18px;font-weight:700;color:var(--green)}
.brand-school{font-size:12px;color:var(--muted);line-height:1.35}
.side-label{font-size:11px;font-weight:700;color:#5d6e66;letter-spacing:.06em;padding:8px 14px 4px}
.nav{display:flex;align-items:center;gap:12px;min-height:46px;padding:0 14px;border-radius:12px;color:var(--muted);font-weight:500;font-size:15px}
.nav:hover{background:#eef5f1;color:var(--ink)}
.nav.on{background:var(--green-tint);color:var(--green);font-weight:700}
.side-user{margin-top:auto;border-top:1px solid var(--line-soft);padding:14px 6px 0;display:flex;align-items:center;gap:10px}
.avatar{width:40px;height:40px;border-radius:50%;background:var(--green);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:14px;flex-shrink:0}
.avatar.lg{width:58px;height:58px;font-size:20px}
.icon-btn{width:42px;height:42px;min-height:42px;padding:0;border-radius:12px;background:#fff;border:1px solid var(--line);color:var(--muted)}
.icon-btn:hover{background:#f3f6f4;color:var(--ink)}

.main{flex:1;min-width:0;display:flex;flex-direction:column}
.top{display:none;align-items:center;gap:10px;padding:12px 16px;background:var(--green);color:#fff;position:sticky;top:0;z-index:5}
.top img{width:40px;height:40px;border-radius:50%;background:#fff;object-fit:contain}
.top .t-name{font-size:16px;font-weight:700}
.top .t-sub{font-size:12px;color:#d1fae5}
.top .back{width:40px;height:40px;display:flex;align-items:center;justify-content:center;color:#fff;margin-left:-8px}

.wrap{width:100%;max-width:1080px;margin:0 auto;padding:32px 40px 48px;display:flex;flex-direction:column;gap:22px;flex:1}
.page-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px}
.page-head{text-shadow:0 0 6px rgba(255,255,255,.9),0 0 2px rgba(255,255,255,.9)}
.page-head .kicker,.page-head .muted{font-size:14px;color:#24352d;font-weight:600}
.page-head h1{font-size:28px;font-weight:700;margin-top:2px;background:none;box-shadow:none;padding:0;text-align:left;color:var(--ink)}
.back-link{font-size:14px;font-weight:600}
.chips{display:flex;gap:8px;flex-wrap:wrap}
.chip{padding:6px 12px;border-radius:999px;background:#fff;border:1px solid var(--line);font-size:13px;font-weight:500}

.cols{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:20px;align-items:start}
.stack{display:flex;flex-direction:column;gap:16px}
.panel{background:#fff;border:1px solid var(--line-soft);border-radius:20px;padding:22px;box-shadow:var(--shadow)}
.panel.flush{padding:0;overflow:hidden}
.panel-title{font-size:15px;font-weight:700}
.panel-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;padding:18px 20px 8px}
.muted{color:var(--muted)}
.small{font-size:13px}
.section-title{font-size:16px;font-weight:700}

.hero{background:var(--green);color:#fff;border-radius:20px;padding:24px;display:flex;flex-direction:column;gap:14px;box-shadow:var(--shadow)}
.hero .h-title{font-size:22px;font-weight:700;line-height:1.3}
.hero .h-sub{font-size:14px;color:#d1fae5}
.hero .btn-light{align-self:flex-start;background:#fff;color:var(--green-dark)}
.hero .btn-light:hover{background:#ecfdf5}
.hero.done{background:var(--green-dark)}

.badge{display:inline-block;align-self:flex-start;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:700}
.badge.amber{background:var(--amber-bg);color:var(--amber-ink)}
.badge.green{background:#dcfce7;color:#166534}
.badge.gray{background:#eef2ef;color:var(--muted)}

.tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.tile{background:#fff;border:1px solid var(--line-soft);border-radius:16px;padding:16px 10px;display:flex;flex-direction:column;align-items:center;gap:10px;color:var(--ink);font-weight:600;font-size:14px;text-align:center;box-shadow:var(--shadow)}
.tile:hover{border-color:#9db5a8;color:var(--ink)}
.tile .ic{width:48px;height:48px;border-radius:14px;display:flex;align-items:center;justify-content:center}
.ic.g{background:var(--green-tint);color:var(--green)}
.ic.a{background:#fdf3e1;color:#8a5a12}
.ic.b{background:var(--blue-tint);color:var(--blue)}

.row-card{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid var(--line-soft);border-radius:16px;padding:14px 16px;box-shadow:var(--shadow)}
.row-card .ic{width:40px;height:40px;border-radius:10px;flex-shrink:0}
.grow{flex:1;min-width:0}
.stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.stat{background:var(--ground);border-radius:12px;padding:12px}
.stat .v{font-size:26px;font-weight:700;line-height:1.2}
.stat .l{font-size:12px;color:var(--muted)}
.stat .n{font-size:12px;font-weight:700;color:var(--green)}

.list .item{display:flex;align-items:center;gap:12px;padding:12px 20px;border-top:1px solid #eef2ef}
.list .item .t{font-size:14px;font-weight:600}
.list .item .s{font-size:12px;color:var(--muted)}
.list .item.me{background:var(--green-tint)}
.list .empty{padding:16px 20px;font-size:14px;color:var(--muted);border-top:1px solid #eef2ef}

.counter{display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--ground);border-radius:16px;padding:12px}
.counter button{width:54px;height:54px;min-height:54px;padding:0;font-size:26px;background:#fff;color:var(--ink);border:1px solid var(--line)}
.counter button:hover{background:#eef5f1}
.counter .num{text-align:center;font-size:40px;font-weight:700;line-height:1}
.counter .lbl{font-size:13px;color:var(--muted);font-weight:600;margin-top:4px}
.counters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.status-line{font-size:14px;font-weight:700}
.status-line.ok{color:#166534}
.status-line.warn{color:#b45309}

.pills{display:flex;flex-wrap:wrap;gap:8px}
.pill{min-height:42px;padding:8px 16px;border-radius:999px;background:#fff;color:var(--ink);border:1.5px solid var(--line);font-weight:600;font-size:14px}
.pill:hover{background:#f3f6f4}
.pill[aria-pressed="true"]{background:var(--green-tint);border-color:var(--green);color:var(--green-dark)}
.pick-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.pick-grid .pill{border-radius:12px;min-height:50px}

.shots{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.shot{position:relative;aspect-ratio:1;border-radius:12px;overflow:hidden;background:#cfe3d8}
.shot img{width:100%;height:100%;object-fit:cover;display:block}
.shot .x{position:absolute;top:4px;right:4px;width:28px;height:28px;min-height:28px;padding:0;border-radius:50%;background:rgba(16,35,27,.75);font-size:16px}
.add-shot{aspect-ratio:1;border-radius:12px;border:1.5px dashed #9db5a8;background:#fafcfb;color:var(--green);display:flex;flex-direction:column;gap:4px;font-size:12px;min-height:0}
.add-shot:hover{background:var(--green-tint)}
.wide-btn{width:100%;min-height:54px;font-size:16px;border-radius:16px}
.dash-btn{width:100%;min-height:50px;background:#fafcfb;color:var(--green);border:1.5px dashed #9db5a8}
.dash-btn:hover{background:var(--green-tint)}
.ghost-danger{width:100%;background:#fff;color:var(--red);border:1.5px solid #f2c9c9}
.ghost-danger:hover{background:#fef2f2}

.slots .slot{display:flex;align-items:center;gap:12px;padding:10px 0}
.slots .slot.now{background:var(--green-tint);border-radius:14px;padding:12px;margin:0 -12px}
.dot{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-weight:700}
.dot.done{background:#dcfce7;color:#166534}
.dot.miss{background:#f1f3f2;color:#6b7c74}
.dot.now{background:var(--green);color:#fff}
.dot.wait{background:#fff;border:1.5px solid var(--line);color:var(--muted)}
.cam-btn{width:100%;min-height:110px;border-radius:20px;flex-direction:column;font-size:16px}

.week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;text-align:center}
.week .d{display:flex;flex-direction:column;align-items:center;gap:6px;font-size:11px;font-weight:600;color:var(--muted)}
.week .b{width:34px;height:34px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;color:var(--ink);background:#dceae2}
.week .b.l2{background:#7fc4a3}
.week .b.l3{background:var(--green);color:#fff}

.tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));background:#e3eae6;border-radius:14px;padding:4px;gap:4px;width:100%;max-width:380px}
.tabs button{min-height:40px;background:transparent;color:var(--muted);border-radius:10px;font-size:14px}
.tabs button:hover{background:rgba(255,255,255,.6)}
.tabs button[aria-selected="true"]{background:#fff;color:var(--green)}
.big-num{font-size:48px;font-weight:700;line-height:1}
.bars{display:flex;align-items:flex-end;gap:12px;height:180px}
.bars .bar{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:6px;height:100%;font-size:12px;color:var(--muted);font-weight:600}
.bars .fill{width:100%;border-radius:6px 6px 0 0;background:#a7d7c0}
.bars .fill.cur{background:var(--green)}
.viol-photo{display:block;margin-top:8px;max-width:220px;border-radius:10px}

.menu-list a{display:flex;align-items:center;gap:12px;padding:15px 20px;color:var(--ink);border-top:1px solid #eef2ef;min-height:52px}
.menu-list a:first-child{border-top:none}
.menu-list a:hover{background:#f6faf8}
.chev{margin-left:auto;color:#6b7c74}

.empty-state{display:flex;flex-direction:column;align-items:center;text-align:center;gap:14px;padding:40px 20px;max-width:520px;margin:0 auto}
.empty-state .big-ic{width:96px;height:96px;border-radius:28px;background:var(--amber-bg);color:#b45309;display:flex;align-items:center;justify-content:center}

.tabbar{display:none;grid-template-columns:repeat(3,minmax(0,1fr));background:#fff;border-top:1px solid var(--line);padding:6px 8px calc(10px + env(safe-area-inset-bottom));position:sticky;bottom:0;z-index:5}
.tabbar a{display:flex;flex-direction:column;align-items:center;gap:3px;padding:6px;color:var(--muted);font-size:12px;font-weight:600}
.tabbar a.on{color:var(--green);font-weight:700}

.toast{position:fixed;left:50%;bottom:90px;transform:translateX(-50%);background:var(--ink);color:#fff;padding:12px 18px;border-radius:12px;font-size:14px;font-weight:600;z-index:50;max-width:90vw;box-shadow:var(--shadow)}
.toast.err{background:#991b1b}

.view{display:none}
.view.on{display:flex}

/* ---------- RESPONSIVE ---------- */
@media (max-width:860px){
  body{padding:12px 10px 32px;background-attachment:scroll}
  body > h1{font-size:23px}
  .bql-grid{grid-template-columns:minmax(0,1fr)}
  button{min-height:46px}

  .side{display:none}
  .top{display:flex}
  .tabbar{display:grid}
  .wrap{padding:16px 16px 24px;gap:16px}
  .cols{grid-template-columns:minmax(0,1fr)}
  .desk-only{display:none!important}
  .page-head h1{font-size:23px}
  .shots{grid-template-columns:repeat(3,minmax(0,1fr))}
  .toast{bottom:84px}
}
@media (min-width:861px){
  .mob-only{display:none!important}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

/* ==================================================
   5. TRANG CÁN BỘ (khung dựng bởi app-shell.js)
================================================== */
.secnav{display:none;gap:8px;overflow-x:auto;padding:10px 16px;background:rgba(255,255,255,.92);border-bottom:1px solid var(--line-soft);position:sticky;top:64px;z-index:4;scrollbar-width:none}
.secnav::-webkit-scrollbar{display:none}
.secnav a{flex-shrink:0;padding:8px 14px;border-radius:999px;background:#fff;border:1px solid var(--line);color:var(--muted);font-size:13px;font-weight:600;white-space:nowrap}
.secnav a.on{background:var(--green);border-color:var(--green);color:#fff}
.side-sep{height:1px;background:var(--line-soft);margin:10px 6px}
.side-role{margin:0 6px 6px;padding:8px 12px;border-radius:12px;background:var(--green-tint);color:var(--green-dark);font-size:13px;font-weight:700}
.top .icon-btn{margin-left:auto;background:rgba(255,255,255,.15);border:none;color:#fff}
.top .icon-btn:hover{background:rgba(255,255,255,.25)}

.staff .wrap > .page-head{margin-bottom:-4px}
.staff section.view{flex-direction:column;gap:16px}
.staff section.view > .panel > h2:first-child,.staff .panel-h{font-size:18px;font-weight:700;margin-bottom:14px;display:flex;align-items:center;gap:10px}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.form-grid .full{grid-column:1/-1}
.actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.btn-ghost{background:#fff;color:var(--green);border:1.5px solid var(--green)}
.btn-ghost:hover{background:var(--green-tint);color:var(--green-dark)}
.hint-box{font-size:13px;color:var(--muted);background:var(--ground);border-radius:12px;padding:10px 12px;line-height:1.6}
.preview-img{max-width:260px;border-radius:12px;border:1px solid var(--line)}

/* nội dung do script cũ sinh ra bên trong panel */
.panel .card,.panel details{box-shadow:none;margin:10px 0;background:#fbfdfc}
.panel .overview-box{line-height:1.6;box-shadow:none}
.panel table{display:block;overflow-x:auto;white-space:nowrap}
@media (min-width:700px){.panel table{display:table;white-space:normal}}
.panel img{max-width:100%;height:auto;border-radius:10px}
.panel button{min-height:42px}

/* ---------- luồng chọn chức vụ / nhập mã / email ---------- */
.auth-wide{max-width:560px}
.role-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}
.role-tile{display:flex;align-items:center;gap:12px;min-height:64px;padding:14px 16px;border-radius:16px;background:#fff;border:1.5px solid var(--line);color:var(--ink);font-weight:700;font-size:15px;text-align:left;cursor:pointer;width:100%;justify-content:flex-start}
.role-tile:hover{border-color:var(--green);background:var(--green-tint);color:var(--ink)}
.role-tile .ic{width:40px;height:40px;border-radius:12px;background:var(--green-tint);color:var(--green);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.role-tile .chev{margin-left:auto}
.role-check{position:relative}
.role-check input{position:absolute;opacity:0;width:1px;height:1px}
.role-check .role-tile{font-weight:600}
.role-check input:checked + .role-tile{border-color:var(--green);background:var(--green-tint)}
.role-check input:checked + .role-tile .box{background:var(--green);border-color:var(--green);color:#fff}
.role-check input:focus-visible + .role-tile{outline:3px solid #34d399;outline-offset:2px}
.box{width:24px;height:24px;border-radius:7px;border:2px solid var(--line);margin-left:auto;display:flex;align-items:center;justify-content:center;font-size:14px;color:transparent;flex-shrink:0}
.code-row{display:flex;flex-direction:column;gap:6px;padding:12px 14px;border-radius:14px;background:var(--ground)}
.code-row label{font-weight:700;color:var(--ink);font-size:15px}
.steps{display:flex;gap:6px;justify-content:center}
.steps span{width:28px;height:6px;border-radius:3px;background:var(--line)}
.steps span.on{background:var(--green)}
.text-link{display:inline-flex;align-items:center;justify-content:center;background:none;border:none;color:var(--green);font-weight:700;font-size:15px;min-height:40px;padding:6px}
.text-link:hover{background:none;color:var(--green-dark);text-decoration:underline}
.btn-row{display:flex;gap:10px;flex-wrap:wrap}
.btn-row > *{flex:1}

@media (max-width:860px){
  .secnav{display:flex}
  .form-grid{grid-template-columns:minmax(0,1fr)}
}
