:root{--navy:#0c1d3d;--blue:#1769aa;--green:#69b82e;--ink:#1b2638;--muted:#667085;--line:#e3e8ef;--bg:#f5f7fb}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.55 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif}header{display:flex;align-items:center;justify-content:space-between;padding:16px max(22px,calc((100% - 1120px)/2));background:var(--navy);color:white;gap:22px;flex-wrap:wrap}.brand{display:flex;align-items:center;gap:10px}.brand b{display:block;font-size:24px;letter-spacing:2px;color:#7ac943;line-height:1.1}.brand small{display:block;letter-spacing:4px;font-size:10px;color:#fff} .mark{display:grid;place-items:center;border:2px solid #f47727;color:#7ac943;border-radius:50%;width:42px;height:42px;font-weight:800;font-size:24px}nav{display:flex;gap:18px;align-items:center;flex-wrap:wrap}nav a{color:#e9f0fb;text-decoration:none;font-size:14px}.nav-cta{background:#70bf35;color:#0b1c35;padding:8px 14px;border-radius:8px;font-weight:700}main{max-width:1000px;margin:36px auto;padding:0 20px;min-height:68vh}.hero{background:linear-gradient(135deg,#0c1d3d,#163f69);color:white;padding:48px;border-radius:20px;box-shadow:0 12px 32px #0c1d3d18}.hero h1{font-size:clamp(30px,5vw,48px);line-height:1.12;margin:0 0 18px}.hero p{font-size:18px;color:#e0eafa;max-width:660px}.button,button{display:inline-block;border:0;background:#1769aa;color:white;padding:11px 17px;border-radius:8px;text-decoration:none;font-weight:700;cursor:pointer;font-size:15px}.button.secondary{background:#e9eef6;color:#1b3557}.card{background:white;border:1px solid var(--line);border-radius:14px;padding:24px;margin:18px 0;box-shadow:0 4px 18px #10213d08}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}.field{margin:14px 0}.field label{display:block;font-weight:650;margin-bottom:6px}.field input{width:100%;padding:12px;border:1px solid #cbd5e1;border-radius:8px;font:inherit}.field input:focus{outline:2px solid #b9d9f6;border-color:#1769aa}.muted{color:var(--muted)}.notice{padding:12px 15px;border-radius:9px;background:#eaf3ff;border:1px solid #c9e0ff;margin:14px 0}.notice.success{background:#eaf8ed;border-color:#c5e8cd}.notice.error{background:#fff0ee;border-color:#f1c4bd}.pill{display:inline-block;border-radius:20px;background:#e8f5e8;color:#246a2b;padding:3px 10px;font-size:12px;font-weight:800}.pill.revoked,.pill.expired{background:#ffe8e7;color:#9d2520}table{border-collapse:collapse;width:100%;background:white}th,td{text-align:left;padding:12px;border-bottom:1px solid var(--line);font-size:14px;vertical-align:top}th{background:#f4f7fb}.key{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;overflow-wrap:anywhere;font-weight:700;color:#0b4b81}footer{text-align:center;padding:24px;color:#7b8798;font-size:13px}h1,h2,h3{line-height:1.2}h1{font-size:32px}h2{font-size:22px}.small{font-size:13px}.actions{display:flex;gap:8px;flex-wrap:wrap}.danger{background:#b42318}.stat{font-size:30px;font-weight:800;color:#164c80}.empty{padding:20px;color:#667085;text-align:center}@media(max-width:650px){header{padding:14px 18px}main{margin:20px auto}.hero{padding:28px 22px}.hero h1{font-size:32px}nav{gap:12px}}

/* Administrator tools */
.field textarea,.field select{width:100%;padding:12px;border:1px solid #cbd5e1;border-radius:8px;font:inherit;background:#fff;color:var(--ink)}.admin-filters{display:grid;grid-template-columns:minmax(220px,2fr) minmax(150px,1fr) minmax(150px,1fr) auto;gap:12px;align-items:end}.admin-filters .field{margin:6px 0}.filter-buttons{white-space:nowrap}.pagination{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px}.pagination a,.pagination strong{display:inline-block;padding:7px 11px;border:1px solid var(--line);border-radius:7px;text-decoration:none;color:var(--blue);background:white}.pagination strong{background:var(--navy);color:white;border-color:var(--navy)}@media(max-width:850px){.admin-filters{grid-template-columns:1fr 1fr}.filter-buttons{grid-column:1/-1}}@media(max-width:520px){.admin-filters{grid-template-columns:1fr}}


/* Admin users table: prevent action buttons and labels from being squeezed off-screen. */
.admin-users-table-wrap{width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;border-bottom:1px solid var(--line);-webkit-overflow-scrolling:touch;scrollbar-gutter:stable;outline-offset:3px}
table.admin-users-table{width:100%;min-width:1240px;table-layout:auto}
.admin-users-table th,.admin-users-table td{overflow-wrap:anywhere}
.admin-users-table th:nth-child(1),.admin-users-table td:nth-child(1){min-width:105px}
.admin-users-table th:nth-child(2),.admin-users-table td:nth-child(2){min-width:145px}
.admin-users-table th:nth-child(3),.admin-users-table td:nth-child(3){min-width:190px}
.admin-users-table th:nth-child(4),.admin-users-table td:nth-child(4){min-width:125px}
.admin-users-table th:nth-child(5),.admin-users-table td:nth-child(5){min-width:130px}
.admin-users-table th:nth-child(6),.admin-users-table td:nth-child(6){min-width:78px}
.admin-users-table th:nth-child(7),.admin-users-table td:nth-child(7){min-width:130px}
.admin-users-table th:nth-child(8),.admin-users-table td:nth-child(8){min-width:175px}
.admin-users-table th:last-child,.admin-users-table td:last-child{min-width:170px;width:170px}
.admin-users-table .actions{align-items:flex-start;flex-direction:column;gap:8px}
.admin-users-table .actions form{max-width:100%;margin:0}
.admin-users-table .actions .button,.admin-users-table .actions button{white-space:normal;min-width:125px;max-width:100%;text-align:center;line-height:1.25}
@media(min-width:1500px){table.admin-users-table{min-width:0}}

/* Admin users layout v3: use the available desktop width and switch to labeled cards on narrower screens. */
body:has(.admin-users-table) main{max-width:1500px}
@media(max-width:1400px){
  body:has(.admin-users-table) main{max-width:1000px}
  .admin-users-table-wrap{overflow:visible;border-bottom:0;scrollbar-gutter:auto}
  table.admin-users-table{display:block;width:100%;min-width:0;table-layout:auto;background:transparent}
  .admin-users-table thead{display:none}
  .admin-users-table tbody{display:grid;gap:14px}
  .admin-users-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:22px;border:1px solid var(--line);border-radius:10px;padding:8px 14px;background:#fff;min-width:0}
  .admin-users-table tbody tr td{display:grid;grid-template-columns:minmax(105px,.8fr) minmax(0,1.2fr);gap:8px;align-items:start;min-width:0;width:auto;padding:10px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
  .admin-users-table tbody tr td::before{font-weight:700;color:#475467;content:""}
  .admin-users-table tbody tr td:nth-child(1)::before{content:"Name"}
  .admin-users-table tbody tr td:nth-child(2)::before{content:"Church / organization"}
  .admin-users-table tbody tr td:nth-child(3)::before{content:"Email"}
  .admin-users-table tbody tr td:nth-child(4)::before{content:"Phone"}
  .admin-users-table tbody tr td:nth-child(5)::before{content:"Address"}
  .admin-users-table tbody tr td:nth-child(6)::before{content:"Verified"}
  .admin-users-table tbody tr td:nth-child(7)::before{content:"Registered"}
  .admin-users-table tbody tr td:nth-child(8)::before{content:"License"}
  .admin-users-table tbody tr td:nth-child(9)::before{content:"Actions"}
  .admin-users-table tbody tr td:nth-child(8),.admin-users-table tbody tr td:nth-child(9){grid-column:1/-1}
  .admin-users-table tbody tr td:last-child{border-bottom:0}
  .admin-users-table .actions{flex-direction:row;align-items:flex-start;flex-wrap:wrap}
  .admin-users-table .actions .button,.admin-users-table .actions button{min-width:0;width:auto;max-width:100%;white-space:normal}
}
@media(max-width:650px){
  .admin-users-table tbody tr{grid-template-columns:minmax(0,1fr);padding:8px 12px}
  .admin-users-table tbody tr td{grid-template-columns:minmax(105px,.75fr) minmax(0,1.25fr)}
  .admin-users-table tbody tr td:nth-child(8),.admin-users-table tbody tr td:nth-child(9){grid-column:auto}
}


/* Final admin users-table polish */
.admin-users-table-wrap { border:0; border-radius:10px; }
table.admin-users-table { width:100%; min-width:1120px; table-layout:fixed; }
.admin-users-table th,.admin-users-table td { padding:12px 10px; vertical-align:top; }
.admin-users-table th:nth-child(1),.admin-users-table td:nth-child(1){width:8%;min-width:0}
.admin-users-table th:nth-child(2),.admin-users-table td:nth-child(2){width:12%;min-width:0}
.admin-users-table th:nth-child(3),.admin-users-table td:nth-child(3){width:16%;min-width:0}
.admin-users-table th:nth-child(4),.admin-users-table td:nth-child(4){width:10%;min-width:0}
.admin-users-table th:nth-child(5),.admin-users-table td:nth-child(5){width:11%;min-width:0}
.admin-users-table th:nth-child(6),.admin-users-table td:nth-child(6){width:6%;min-width:0}
.admin-users-table th:nth-child(7),.admin-users-table td:nth-child(7){width:10%;min-width:0}
.admin-users-table th:nth-child(8),.admin-users-table td:nth-child(8){width:14%;min-width:0}
.admin-users-table th:nth-child(9),.admin-users-table td:nth-child(9){width:13%;min-width:0}
.admin-users-table td:nth-child(3){overflow-wrap:anywhere;word-break:normal}
.admin-users-table .key{display:inline-block;max-width:100%;font-size:13px;line-height:1.45;overflow-wrap:anywhere;word-break:normal}
.admin-users-table .actions{align-items:flex-start}
.admin-users-table .actions .button,.admin-users-table .actions button{max-width:100%;white-space:normal}
.admin-users-table form{margin:0}
@media(max-width:760px){
  .admin-users-table-wrap{overflow:visible}
  table.admin-users-table{display:block;width:100%;min-width:0;table-layout:auto;background:transparent}
  .admin-users-table thead{display:none}
  .admin-users-table tbody{display:grid;gap:14px}
  .admin-users-table tbody tr{display:block;background:#fff;border:1px solid var(--line);border-radius:12px;padding:8px 14px;box-shadow:0 3px 12px #10213d08}
  .admin-users-table tbody td{display:grid;grid-template-columns:minmax(105px,34%) minmax(0,1fr);gap:12px;width:auto!important;min-width:0!important;padding:10px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
  .admin-users-table tbody td:last-child{border-bottom:0}
  .admin-users-table tbody td[data-label]::before{content:attr(data-label);font-weight:700;color:#475467}
  .admin-users-table tbody td[colspan]{display:block;text-align:center}
  .admin-users-table tbody td[colspan]::before{content:none}
  .admin-users-table td .actions{gap:8px}
  .admin-users-table td .actions form,.admin-users-table td .actions .button,.admin-users-table td .actions button{max-width:100%}
  .admin-users-table td[data-label="License"]{grid-template-columns:minmax(105px,34%) minmax(0,1fr)}
  .admin-users-table td[data-label="License"] .actions{grid-column:2}
  .admin-users-table td[data-label="Actions"] .actions{flex-direction:column;align-items:stretch}
  .admin-users-table td[data-label="Actions"] .button,.admin-users-table td[data-label="Actions"] button{width:100%;text-align:center}
}
@media(min-width:761px) and (max-width:1250px){
  table.admin-users-table{min-width:1120px}
}
