:root{color-scheme:dark;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;background:#050908;color:#e7f0e7}*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at top,#102519,#050908 50%);min-height:100vh}.wrap{width:min(1180px,calc(100% - 32px));margin:auto}header{background:#09100d;border-bottom:1px solid #25432d}.bar{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:15px 0;flex-wrap:wrap}strong span,.eyebrow{color:#91eda5}nav{display:flex;gap:12px;align-items:center;flex-wrap:wrap}a{color:#9effae;text-decoration:none}a:hover{text-decoration:underline}nav .current{border-bottom:2px solid #9effae}nav form,td form{display:inline}main{padding:38px 0 80px}h1{font-size:clamp(28px,4vw,44px);margin:0 0 12px}h2{margin-top:38px}.sub{color:#91a697}.panel{background:#0c1610;border:1px solid #31543c;border-radius:8px;padding:22px;margin:18px 0}.login{max-width:430px;margin:10vh auto}.tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px}.tile{display:flex;flex-direction:column}.tile strong{font-size:38px}.tile span{color:#9baaa0}form label{display:block;margin:14px 0;color:#a8b8ab}input,select,textarea{display:block;width:100%;border:1px solid #42614a;border-radius:4px;background:#09110c;color:#fff;padding:11px;font:inherit;margin-top:7px}input[type=checkbox]{display:inline;width:auto;margin-right:8px}button{border:1px solid #8fe99f;border-radius:4px;background:#a2f6ae;color:#0a1b0e;padding:10px 16px;cursor:pointer;font:inherit;font-weight:bold}button:hover{filter:brightness(1.12)}button.danger{background:#3c1719;color:#ffb5ba;border-color:#925056}.alert{padding:14px;background:#173521;border:1px solid #427d4e}.alert.error{background:#351617;border-color:#a7424b}.scroll{overflow-x:auto;border:1px solid #2b4632;border-radius:6px;margin:18px 0}table{width:100%;border-collapse:collapse;min-width:720px}th,td{text-align:left;padding:12px;border-bottom:1px solid #24412e;vertical-align:top;word-break:break-word}th{color:#97e8a6;background:#102116}.search{display:flex;gap:12px;max-width:600px}.search input{margin:0}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:0 18px}.grid .wide{grid-column:1/-1}.grid .check{align-self:center}summary{cursor:pointer;font-size:18px}pre{overflow:auto;background:#101c14;padding:15px;border:1px solid #28432f}textarea{width:100%;resize:vertical}ul{max-height:250px;overflow:auto}

/* Compact admin tables. Public website styles are not changed. */
.wrap{width:min(1680px,calc(100% - 40px))}
main{padding-top:24px}
.bar{padding:12px 0;gap:12px}
nav{gap:14px;font-size:14px}
h1{font-size:32px}
h2{font-size:21px;margin-top:24px}
.sub{font-size:13px;line-height:1.5}
.panel{padding:16px;margin:14px 0}
.alert{padding:10px 14px;font-size:13px}
.scroll{margin:14px 0;max-width:100%;overscroll-behavior-x:contain}
table{width:100%;min-width:900px;font-size:13px;line-height:1.45;table-layout:auto}
th,td{padding:9px 12px;word-break:normal;overflow-wrap:normal;white-space:nowrap;vertical-align:top}
th{font-size:12px}
tbody tr:hover{background:rgba(158,255,174,.035)}
td p{margin:0 0 6px}
td button,nav button{padding:6px 10px;font-size:12px;line-height:1.4;white-space:nowrap}
td form{display:inline-block;vertical-align:middle;margin:0 4px 0 0}
td a{display:inline-block;margin-right:8px}
td summary{font-size:12px;color:#9effae;white-space:nowrap}
.row-tools{margin-top:5px}
.tool-panel{padding:10px 0 2px;display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.tool-panel p{margin:0}
.tool-panel details p{margin-top:6px}
.store-access-form{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.store-access-form label{display:flex;align-items:center;gap:6px;margin:0;font-size:12px}
.store-access-form input[type=number]{width:88px;margin:0;padding:6px 8px;font-size:12px}
.tab-users table{min-width:1050px}
.tab-stores table{min-width:1150px}
.tab-users td:first-child{min-width:190px}
.tab-users .role-cell{min-width:140px}
.tab-users .points-cell{min-width:120px}
.tab-users .remote-cell{min-width:200px}
.tab-users .status-cell{width:1%;min-width:80px}
.tab-users .tool-panel{max-width:320px;white-space:normal;overflow-wrap:anywhere}
.tab-users .tool-panel form{max-width:100%}
.tab-users td:nth-child(3),.tab-users td:nth-child(5),.tab-stores td:nth-child(3),.tab-stores td:nth-child(4){width:1%}
.tab-reports td:nth-child(3),.tab-comments td:nth-child(3){white-space:normal;min-width:320px;max-width:650px;overflow-wrap:anywhere}
.tab-reports td:nth-child(3) small{font-size:11px}
.tab-reports td:nth-child(3) details{margin-top:7px}
.search{max-width:680px;align-items:center;gap:8px}
.search input{padding:8px 10px;font-size:13px;min-width:0}
.search button{padding:8px 12px;font-size:13px;white-space:nowrap}
@media(max-width:700px){.wrap{width:calc(100% - 24px)}.bar{align-items:flex-start}nav{gap:10px;font-size:12px}main{padding-top:18px}h1{font-size:28px}.scroll{scrollbar-width:thin}}

.tab-chat td.chat-body{white-space:normal;min-width:320px;max-width:650px;overflow-wrap:anywhere}

/* Stores: reserve space for actions, abbreviate long cells without wrapping. */
.tab-stores table{table-layout:fixed;min-width:1080px}
.tab-stores th:nth-child(1){width:30%}
.tab-stores th:nth-child(3){width:82px}
.tab-stores th:nth-child(4){width:56px}
.tab-stores th:nth-child(5){width:120px}
.tab-stores th:nth-child(6){width:126px}
.tab-stores td.store-name,.tab-stores td.store-address{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tab-stores td:nth-child(3),.tab-stores td:nth-child(4){width:auto}
.tab-stores td:last-child .tool-panel{gap:4px}
.tab-stores .grid>*{min-width:0}

.verification-resend{display:block;margin:6px 0!important}
.mail-status{display:block;white-space:normal;max-width:270px;font-size:11px;line-height:1.45;color:#a8b8ab}
.tab-mail td{white-space:normal;overflow-wrap:anywhere;min-width:140px}
.tab-mail td:nth-child(4){min-width:280px;max-width:440px}
.tab-mail dt{color:#a8b8ab;margin-top:10px}.tab-mail dd{margin:3px 0 0}

.account-editor h2{margin-top:0}.account-edit-form{max-width:650px}
.account-edit-form label{margin:12px 0}.account-edit-form .sub{white-space:normal}
.delete-user-panel{margin-top:22px;border-top:1px solid #925056;padding-top:14px}
.delete-user-panel summary{color:#ffb5ba;font-size:14px}
.delete-user-panel p{max-width:800px;font-size:13px;line-height:1.5}

/* Following: one searchable page for users -> stores and stores -> users. */
.following-switch{display:inline-flex;gap:4px;background:#0c1610;border:1px solid #31543c;border-radius:8px;padding:4px;margin:4px 0 18px}
.following-switch a{padding:9px 18px;border-radius:4px;min-height:40px;display:flex;align-items:center}
.following-switch a[aria-current=page]{background:#a2f6ae;color:#0a1b0e;font-weight:bold}
.following-summary{display:flex;justify-content:space-between;align-items:center;gap:24px}
.following-summary>div:first-child{min-width:0;overflow-wrap:anywhere}
.following-summary .eyebrow{font-size:12px;margin:0 0 8px}
.following-summary h2{margin:0;font-size:22px}
.following-summary p{line-height:1.5}
.following-count{flex:none;min-width:130px;text-align:center;display:flex;flex-direction:column;gap:4px}
.following-count strong{font-size:36px;color:#9effae}
.following-count span{font-size:13px;color:#a8b8ab}
.following-search{display:flex;align-items:flex-end;gap:10px;max-width:850px;flex-wrap:wrap}
.following-search label{flex:1 1 280px;margin:0;font-size:13px}
.following-search input{font-size:14px}
.following-search>a{padding:11px 0;font-size:13px}
.following-table{min-width:640px;table-layout:fixed}
.following-table th:first-child{width:30%}
.following-table th:nth-child(3){width:140px}
.following-table th:last-child{width:150px}
.following-table td{white-space:normal;overflow-wrap:anywhere}
.following-table td:last-child{white-space:nowrap}
.following-name{font-weight:bold;line-height:1.6}
/* Inline link text lets the cell truncate at the end instead of hiding a whole name. */
.tab-stores td.store-name a{display:inline;margin-right:0}
.following-id{display:block;margin-top:4px;color:#91a697}
.following-table .following-empty{padding:26px 14px;color:#a8b8ab;white-space:normal}
.following-pagination{justify-content:space-between;gap:18px;margin:16px 0}
.following-pagination a{padding:8px 0}
.tab-following :focus-visible{outline:2px solid #9effae;outline-offset:3px}
@media(max-width:700px){.following-summary{align-items:flex-start;gap:12px;flex-wrap:wrap}.following-count{text-align:left;min-width:0}.following-search label{flex-basis:100%}.following-pagination{justify-content:flex-start}.following-table{font-size:12px}}

/* Users: three compact point leaderboards, with a single-column mobile layout. */
.points-leaders{margin:22px 0 26px}
.points-leaders-heading h2{margin:0 0 6px}
.points-leaders-heading .sub{margin:0 0 14px}
.points-leaders-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.points-leader-card{background:#0c1610;border:1px solid #31543c;border-radius:8px;padding:16px;min-width:0}
.points-leader-card h3{margin:0;font-size:16px;color:#e7f0e7}
.points-period{margin:5px 0 15px;font-size:12px;color:#91a697}
.points-ranking{list-style:none;padding:0;margin:0}
.points-ranking li{display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px 0;border-top:1px solid #24412e}
.points-rank{display:grid;place-items:center;width:25px;height:25px;border:1px solid #31543c;border-radius:50%;font-size:12px;color:#a8b8ab}
.points-ranking li:first-child .points-rank{border-color:#9effae;color:#9effae}
.points-leader-name{min-width:0;font-size:14px;overflow-wrap:anywhere}
.points-leader-name small{display:block;color:#a8b8ab;font-size:11px;margin-top:3px}
.points-score{font-size:18px;white-space:nowrap;font-variant-numeric:tabular-nums;color:#9effae}
.points-score span{font-size:11px;font-weight:normal;color:#91a697;margin-left:5px}
.points-empty{font-size:13px;color:#91a697;margin:18px 0 4px}
.tab-users :focus-visible{outline:2px solid #9effae;outline-offset:3px}
@media(max-width:780px){.points-leaders-grid{grid-template-columns:1fr}.points-leader-card{padding:14px}}

/* Users: keep verification and timestamps compact; contain narrow-screen scrolling. */
.tab-users .users-table{table-layout:fixed;width:100%;min-width:1080px;font-size:12px}
.users-table .col-user{width:14%}
.users-table .col-verified{width:68px}
.users-table .col-created{width:104px}
.users-table .col-role{width:80px}
.users-table .col-points{width:70px}
.users-table .col-remote{width:112px}
.users-table .col-status{width:70px}
.tab-users .users-table th,.tab-users .users-table td{padding:9px 8px;min-width:0;width:auto;white-space:normal;overflow-wrap:anywhere}
.tab-users .users-table th{font-size:11px;white-space:nowrap}
.users-table td a{max-width:100%;margin-right:0}
.users-table td summary{font-size:11px;white-space:normal;overflow-wrap:anywhere}
.users-table .email-cell{overflow-wrap:anywhere}
.users-table .created-cell time{display:block;font-size:11px;line-height:1.55;white-space:nowrap}
.users-table .created-cell time span{display:block;color:#a8b8ab}
.users-table .verification-state{font-size:12px}
.users-table .verification-resend{margin:5px 0!important}
.users-table .verification-resend button{padding:4px 8px;font-size:11px;line-height:1.45;min-height:26px}
.users-table .verification-details{margin-top:3px}
.users-table .verification-details summary{font-size:10px;color:#a8b8ab}
.users-table .verification-details .mail-status{font-size:10px;line-height:1.5;margin-top:5px;max-width:100%;overflow-wrap:anywhere}
.users-table .tool-panel{width:100%;max-width:100%;font-size:11px;gap:8px}
.users-table .tool-panel form{display:block;width:100%;min-width:0;margin-right:0}
.users-table .tool-panel label{margin:8px 0;font-size:11px}
.users-table .tool-panel input,.users-table .tool-panel select{max-width:100%;padding:6px;font-size:11px}
.users-table .tool-panel button{max-width:100%;white-space:normal;overflow-wrap:anywhere;padding:6px;font-size:11px}
.users-table .store-access-form label{flex-wrap:wrap}
.users-table .status-cell button{padding:5px 8px;font-size:11px;min-height:28px}
.users-scroll{scrollbar-width:thin}

.users-table button:disabled{opacity:.45;cursor:not-allowed}

/* Stores: persistent checkbox filter, server-side search and complete pagination. */
.stores-filter{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin:22px 0 12px}
.stores-chain-picker{position:relative;flex:0 1 260px;min-width:210px}
.stores-chain-picker>summary{display:flex;align-items:center;justify-content:space-between;gap:18px;list-style:none;padding:12px 14px;background:#11251a;border:1px solid #41674c;border-radius:6px;cursor:pointer;min-height:44px;box-sizing:border-box}
.stores-chain-picker>summary::-webkit-details-marker{display:none}
.stores-chain-menu{position:absolute;top:calc(100% + 6px);left:0;width:340px;max-width:calc(100vw - 48px);z-index:10;background:#0c1610;border:1px solid #41674c;border-radius:8px;padding:14px;box-shadow:0 10px 30px #0008;box-sizing:border-box}
.stores-chain-menu fieldset{margin:0;padding:0;border:0;min-width:0}
.stores-chain-menu legend{font-size:12px;color:#a8b8ab;padding:0 0 10px}
.stores-chain-options{max-height:320px;overflow-y:auto;overscroll-behavior:contain}
.stores-chain-option{display:flex;gap:10px;align-items:center;min-height:38px;margin:0;padding:4px 2px;cursor:pointer;box-sizing:border-box}
.stores-chain-option input{width:18px;height:18px;margin:0;flex:none;accent-color:#9effae}
.stores-chain-option span{flex:1;min-width:0;overflow-wrap:anywhere;font-size:13px}
.stores-chain-option small{color:#91a697;font-variant-numeric:tabular-nums}
.stores-filter-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px;border-top:1px solid #31543c;padding-top:12px}
.stores-filter-actions button{font-size:12px;padding:8px 10px}
.stores-filter-actions button.secondary{background:#163321;color:#c5d9ca;border:1px solid #41674c}
.stores-search{flex:1;min-width:210px;margin:0;max-width:420px}
.stores-search span{display:block;font-size:12px;color:#a8b8ab;margin-bottom:6px}
.stores-search input{margin:0;width:100%;min-height:44px;box-sizing:border-box}
.stores-filter>button{min-height:44px}
.stores-results-meta{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;color:#a8b8ab;font-size:12px}
.stores-results-meta p{margin:4px 0 12px}
.stores-pagination{display:flex;justify-content:space-between;align-items:center;gap:15px;flex-wrap:wrap;margin:16px 0;font-size:13px}
.stores-pagination div{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.stores-pagination a{padding:8px 0}
.stores-empty{padding:20px 14px;border:1px solid #31543c;border-radius:6px;color:#a8b8ab}
.tab-stores :focus-visible{outline:2px solid #9effae;outline-offset:3px}
@media(max-width:600px){.stores-chain-picker{flex-basis:100%}.stores-chain-menu{width:100%;max-width:100%}.stores-search{flex-basis:calc(100% - 90px);min-width:0}.stores-pagination{align-items:flex-start}}

.users-table .col-last-seen{width:100px}
.users-table .col-admin{width:72px}
.users-table .admin-switch{display:flex;align-items:center;gap:5px;padding:5px 2px;background:transparent;color:inherit;border:0;font-size:11px;min-height:32px}
.admin-switch .switch-track{display:inline-block;width:25px;height:15px;border-radius:12px;background:#63716b;position:relative;flex-shrink:0}
.admin-switch .switch-track::after{content:"";position:absolute;left:2px;top:2px;width:11px;height:11px;background:white;border-radius:50%}
.admin-switch[aria-checked="true"] .switch-track{background:#228d56}
.admin-switch[aria-checked="true"] .switch-track::after{left:12px}
.admin-switch:focus-visible{outline:2px solid #8df5ac;outline-offset:2px}

/* Store Active edits stay pending until either Apply changes button is used. */
.stores-bulk-toolbar{position:sticky;top:0;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:12px 14px;background:#102116;border:1px solid #42614a;border-radius:6px;box-shadow:0 4px 14px #0005}
.stores-bulk-toolbar strong{font-size:13px}.stores-bulk-toolbar p{margin:4px 0;font-size:12px;color:#d2e5d6}
.stores-bulk-toolbar small{font-size:11px;color:#a8b8ab}.stores-bulk-toolbar button,.stores-bulk-footer button{font-size:13px;padding:9px 12px}
.stores-bulk-footer{display:flex;justify-content:flex-end;margin:12px 0}
.tab-stores th:nth-child(4){width:72px}.tab-stores td.store-active-cell{padding:0 12px}
.store-active-toggle{position:relative;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;cursor:pointer}
.store-active-toggle input[type=checkbox]{position:absolute;inset:0;margin:0;width:44px;height:44px;opacity:0;cursor:pointer}
.store-active-box{display:grid;place-items:center;width:22px;height:22px;border:1px solid #7b9983;border-radius:4px;background:#09110c;color:#081c0f;pointer-events:none}
.store-active-toggle input:checked+.store-active-box{background:#a2f6ae;border-color:#a2f6ae}
.store-active-toggle input:checked+.store-active-box::after{content:"×";font-size:23px;font-weight:bold;line-height:1}
.store-active-toggle input:focus-visible+.store-active-box{outline:2px solid #9effae;outline-offset:3px}
@media(forced-colors:active){.store-active-box{forced-color-adjust:none;background:Canvas;border-color:CanvasText}.store-active-toggle input:checked+.store-active-box{background:Highlight;border-color:Highlight;color:HighlightText}}

/* Arrival evidence: map and table share a bounded page of records. */
.arrival-filter{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:18px 0}
.arrival-filter label{flex:1;min-width:180px}.arrival-filter input,.arrival-filter select{width:100%}
#arrival-map{height:440px;min-height:280px;max-height:65vh;border:1px solid #334155;border-radius:12px;background:#172637;color:#132b39;isolation:isolate}
#arrival-map .leaflet-popup-content{color:#122335;line-height:1.6;min-width:180px}
#arrival-map .leaflet-control a{color:#142e39}
.arrival-pager{display:flex;align-items:center;justify-content:center;gap:16px;margin:20px 0}
.arrival-table td{vertical-align:top}.arrival-table button{white-space:nowrap}
@media(max-width:650px){#arrival-map{height:320px}.arrival-filter button{flex:1}.arrival-filter label{min-width:100%}}
