/* The team's app: header with sections, sign-in, families, team, activity log. Colours come from theme.js tokens. */
.ap-head{position:sticky;top:0;z-index:5;display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;padding:10px 18px;background:var(--card);border-bottom:2px solid var(--line)}
.ap-brand{display:flex;align-items:center;gap:8px;text-decoration:none;color:var(--brand-text);font-size:17px}
.ap-brand img{height:34px;max-width:90px;object-fit:contain}
.ap-nav{display:flex;flex-wrap:wrap;gap:6px;flex:1}
.ap-nav a.chip{display:inline-flex;align-items:center;text-decoration:none}
.ap-me{display:flex;align-items:center;gap:8px;margin-inline-start:auto}
.ap-me span{color:var(--muted);max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.ap-signin{max-width:420px;margin:7vh auto 0;display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center}
.ap-signin img{max-height:90px;max-width:200px;object-fit:contain}
.ap-signin h1{color:var(--brand-text)}
.ap-col{display:flex;flex-direction:column;gap:10px;width:100%;text-align:start}
.ap-or{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:13px;margin:4px 0}
.ap-or::before,.ap-or::after{content:"";flex:1;border-top:1px solid var(--line)}
#googleBox{width:100%;display:flex;flex-direction:column}
.ap-err{background:#fee2e2;color:#991b1b;border-radius:14px;padding:8px 12px;font-weight:800;margin:0;width:100%}

.ap-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.ap-bar h1{margin:0}
.ap-bar input{max-width:320px}
.ap-filters{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}
.ap-filters .chip b{margin-inline-start:6px;font-weight:900}
.ap-filters .chip.review{border-color:var(--brand)}
.ap-hint{background:var(--brand-soft);border-radius:14px;padding:8px 12px;margin:0 0 12px}

.ap-list{display:flex;flex-direction:column;gap:8px}
.ap-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;background:var(--card);border:2px solid var(--line);border-radius:18px;padding:10px 14px;text-align:start;font:inherit;color:inherit;width:100%}
button.ap-row{cursor:pointer}
button.ap-row:hover{border-color:var(--accent)}
.ap-row .nm{font-weight:900;flex:1 1 200px;min-width:0}
.ap-row .nm small{display:block;font-weight:500;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ap-row .ph{direction:ltr;color:var(--muted);font-size:14px}
.st-review{background:var(--brand-soft);color:var(--brand-text)}
.st-active{background:#dcfce7;color:#166534}
.st-left{background:#f1f5f9;color:#475569}
:root[data-theme="dark"] .st-active{background:#14532d;color:#dcfce7}
:root[data-theme="dark"] .st-left{background:#334155;color:#e2e8f0}
.ap-empty{color:var(--muted);text-align:center;padding:24px}

.ap-dlg{border:2px solid var(--line);border-radius:var(--r-l);padding:18px;width:min(640px,calc(100vw - 24px));max-height:calc(100vh - 40px);background:var(--card);color:var(--ink);box-shadow:0 8px 22px var(--shadow)}
.ap-dlg::backdrop{background:rgba(20,10,30,.45)}
.ap-x{position:sticky;top:0;display:flex;justify-content:flex-end;margin:-6px -6px 0 0;float:inline-end}
.ap-dlg h2{margin-top:0}
.ap-dlg h3{margin-top:14px}
.ap-kv{display:flex;flex-wrap:wrap;gap:4px 16px;color:var(--muted);font-size:14px;margin-bottom:6px}
.ap-kv b{color:var(--ink)}
.ap-st{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0 10px}
.ap-dlg ul{margin:0;padding-inline-start:20px}
.ap-dlg li{margin:2px 0}
.ap-hist{font-size:13px;color:var(--muted)}
.ap-check span{display:flex;align-items:center;gap:8px;min-height:42px}
#permBox label{display:inline-flex;align-items:center;gap:6px;margin-inline-end:14px;font-weight:700}
.row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.small{font-size:13px}
#permBox{border:0;padding:0;margin:0}
#permBox legend{font-weight:800;font-size:14px;padding:0;margin-bottom:6px}
#permBox label{min-height:36px}
@media (max-width:760px){
  .ap-head{padding:8px 12px;gap:8px}
  .ap-nav{order:3;flex:0 0 100%;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
  .ap-nav::-webkit-scrollbar{display:none}
  .ap-nav .chip{flex:0 0 auto}
  .ap-me span{display:none}
}
