:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #1c2430;
  --muted: #6b7684;
  --line: #e3e7ec;
  --brand: #1f6feb;
  --brand-dark: #1557c0;
  --good: #1a7f37;
  --good-bg: #dcf3e2;
  --mid: #9a6700;
  --mid-bg: #fff3cd;
  --low: #b42318;
  --low-bg: #fde4e1;
  --top: #14202e;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 16px; }
h2 { font-size: 16px; margin: 0 0 12px; }
code, pre { font-family: Consolas, Menlo, monospace; font-size: 13px; background: #eef1f4; border-radius: 4px; padding: 2px 6px; }
pre { padding: 12px; overflow: auto; white-space: pre-wrap; }

/* Top bar */
.top { background: var(--top); color: #fff; display: flex; align-items: center; gap: 20px; padding: 0 20px; min-height: 56px; flex-wrap: wrap; }
.brand { font-weight: 700; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.brand small { font-weight: 400; opacity: .6; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #3fb950; display: inline-block; }
.top nav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
.top nav a { color: #c9d4e0; padding: 16px 10px; font-size: 14px; border-bottom: 2px solid transparent; }
.top nav a:hover { color: #fff; text-decoration: none; }
.top nav a.on { color: #fff; border-bottom-color: #58a6ff; }
.top .me { font-size: 13px; color: #c9d4e0; white-space: nowrap; }
.top .me a { color: #fff; }
.menu-btn { display: none; background: none; border: 0; color: #fff; font-size: 22px; cursor: pointer; margin-left: auto; }

main { max-width: 1200px; margin: 0 auto; padding: 24px 16px 60px; }
main.narrow { max-width: 460px; }
.login-brand { font-size: 20px; font-weight: 700; display: flex; gap: 10px; align-items: center; justify-content: center; margin: 40px 0 20px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; margin-bottom: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

/* Flash */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; background: var(--good-bg); color: #0f5323; }
.flash.err { background: var(--low-bg); color: #8a1c12; }

/* Forms */
input, select, button, textarea { font: inherit; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input:not([type]), select {
  border: 1px solid #cdd4dc; border-radius: 6px; padding: 7px 10px; background: #fff; color: var(--text); max-width: 100%;
}
input:focus, select:focus { outline: 2px solid #b6d3ff; border-color: var(--brand); }
.form label { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; font-size: 14px; color: #3a4552; }
.form label.check { flex-direction: row; align-items: flex-start; gap: 8px; }
.form label.check input { margin-top: 4px; }
.form h2 { margin-top: 8px; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); column-gap: 20px; }
.grid-form h2, .grid-form .row-actions, .grid-form label.check, .grid-form p { grid-column: 1 / -1; }
.inline-form, .filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.inline-form label { margin-bottom: 0; }
.filters { margin-bottom: 16px; }
.filters label { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); gap: 3px; }
.narrow-form { max-width: 420px; }

.btn { display: inline-block; border: 1px solid #cdd4dc; background: #fff; color: var(--text); padding: 7px 14px; border-radius: 6px; cursor: pointer; font-size: 14px; line-height: 1.4; text-decoration: none; }
.btn:hover { background: #f0f3f6; text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.link { background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; font-size: 13px; }
.link.danger { color: var(--low); }
.actions { white-space: nowrap; }
.actions form { display: inline; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; }
.stat span { display: block; color: var(--muted); font-size: 13px; }
.stat b { font-size: 26px; font-variant-numeric: tabular-nums; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; background: #fafbfc; }
td input { width: 100%; min-width: 120px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.hl { background: #eef5ff; }
tfoot td { border-top: 2px solid var(--line); border-bottom: 0; }
tr.archived td { color: var(--muted); }
.live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3fb950; margin-right: 6px; box-shadow: 0 0 0 3px #3fb95033; }

.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.mid { background: var(--mid-bg); color: var(--mid); }
.badge.low { background: var(--low-bg); color: var(--low); }

/* Screenshots */
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.shot { border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fbfcfd; }
.shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 5px; display: block; background: #e8ecf0; }
.noshot { aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; background: #eef1f4; border-radius: 5px; color: var(--muted); font-size: 13px; }
.shot .meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.shot .more { font-size: 12px; margin-top: 4px; }
.shot form { margin-top: 4px; }
.lightbox { position: fixed; inset: 0; background: rgba(10, 15, 20, .88); display: flex; align-items: center; justify-content: center; z-index: 50; cursor: zoom-out; padding: 20px; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 4px; }

/* Apps */
.apps details { border-bottom: 1px solid var(--line); }
.apps summary { display: grid; grid-template-columns: minmax(140px, 1.2fr) 2fr 70px 50px; gap: 12px; align-items: center; padding: 9px 4px; cursor: pointer; list-style: none; }
.apps summary::-webkit-details-marker { display: none; }
.app-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 8px; background: #eef1f4; border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand); }
table.sub { margin: 0 0 10px; font-size: 13px; }
table.sub td { padding: 5px 10px; color: #3a4552; }

.copy-row { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.copy-row code { font-size: 15px; padding: 6px 10px; }
ol, ul { padding-left: 22px; }

@media (max-width: 860px) {
  .menu-btn { display: block; }
  .top nav, .top .me { display: none; width: 100%; }
  body.nav-open .top nav { display: flex; flex-direction: column; }
  body.nav-open .top .me { display: block; padding-bottom: 12px; }
  .top nav a { padding: 10px 4px; border-bottom: 0; }
  .apps summary { grid-template-columns: 1fr 60px 40px; }
  .apps summary .bar { display: none; }
  .stat b { font-size: 22px; }
}


/* TeamTrack · Apple-inspired visual system (no Apple proprietary assets) */
:root { color-scheme:light; --bg:#f5f5f7; --card:#fff; --text:#1d1d1f; --muted:#86868b; --line:#e8e8ed; --brand:#007aff; --brand-dark:#0066d6; --good:#248a3d; --good-bg:#e4f7e8; --mid:#9a6800; --mid-bg:#fff4d7; --low:#d92d20; --low-bg:#fff0ee; --top:#fff; }
html {scroll-behavior:smooth}
body {font-family:-apple-system,BlinkMacSystemFont,'SF Pro Display','SF Pro Text','Segoe UI Variable','Segoe UI',sans-serif; background:var(--bg); color:var(--text); letter-spacing:-.012em; font-size:14px; line-height:1.55; -webkit-font-smoothing:antialiased}
body:not(.login-page) {padding-left:248px}
a {transition:color .2s ease}
h1 {font-size:34px; font-weight:730; line-height:1.12; letter-spacing:-.045em; margin:0}
h2 {font-size:18px; font-weight:700; letter-spacing:-.025em}
h3 {letter-spacing:-.018em}
.top {position:fixed; left:0; top:0; bottom:0; width:248px; padding:25px 13px 16px; background:rgba(255,255,255,.97); border-right:1px solid #e8e8ed; box-shadow:none; display:flex; flex-direction:column; align-items:stretch; gap:0; z-index:30; flex-wrap:nowrap; color:var(--text)}
.top .brand {display:flex; gap:12px; align-items:center; color:var(--text); font-size:17px; font-weight:700; padding:0 11px; height:54px; margin-bottom:34px; text-decoration:none}
.brand-copy {display:flex;flex-direction:column;line-height:1.25;overflow:hidden}.brand-copy strong{font-weight:750;letter-spacing:-.035em}.brand-copy small {font-size:11px; font-weight:500; color:var(--muted); margin-top:4px;overflow:hidden;text-overflow:ellipsis;max-width:150px}
.app-mark {width:40px;height:40px;display:grid;place-items:center;background:linear-gradient(145deg,#399cfa,#0062d9);border-radius:12px;color:white;font-size:25px;font-weight:600;box-shadow:0 4px 12px #007aff38}
.sidebar-label{font-size:10px;font-weight:750;letter-spacing:.13em;color:#a1a1a6;padding:0 15px;margin:0 0 9px}
.top nav {flex:1; display:flex; flex-direction:column; gap:4px; flex-wrap:nowrap; overflow:auto; min-height:0}
.top nav a {display:flex;align-items:center;gap:13px;color:#55555b;border:0;border-radius:10px;padding:11px 13px;font-weight:570;font-size:13px;transition:background .16s,color .16s}
.top nav a:hover {background:#f4f4f7;color:#1d1d1f}
.top nav a.on {background:#eaf3ff;color:#006ad4;font-weight:700;border:0}
.nav-icon {display:inline-flex;width:20px;justify-content:center;align-items:center;font-size:19px;line-height:1;color:inherit;font-family:'Segoe UI Symbol','Apple Symbols',sans-serif}
.top .me {border-top:1px solid var(--line);padding:16px 9px 0;display:flex;flex-direction:column;gap:14px;white-space:normal}
.top .me a {color:var(--text)}.top .me .signout {color:#86868b;font-size:12px;padding-left:2px}
.profile-link {display:flex;align-items:center;gap:10px;font-size:13px;font-weight:650;text-decoration:none}.profile-link small{display:block;color:var(--muted);font-weight:450;font-size:11px}
.avatar {width:36px;height:36px;border-radius:50%;background:#e8ebf0;color:#4c5f77;display:grid;place-items:center;font-weight:700;font-size:15px}
main {max-width:1580px;margin:0 auto;padding:42px clamp(20px,4vw,64px) 80px}
.page-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:29px}
.eyebrow{font-size:11px;letter-spacing:.13em;font-weight:750;color:#939399;margin:0 0 9px}
.heading-date{color:#86868b;font-size:13px;padding-bottom:6px;white-space:nowrap}
.card,.stat{background:white;border:1px solid #ececf0;border-radius:18px;box-shadow:0 2px 14px rgba(20,25,40,.025)}
.card{padding:24px 26px;margin-bottom:20px}.stat{padding:22px 24px;min-height:124px;display:flex;flex-direction:column;justify-content:center;gap:8px}
.stats{gap:16px;margin-bottom:20px;grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}.stat span{font-size:12px;color:#86868b;font-weight:550}.stat b{font-size:31px;line-height:1.1;font-weight:720;letter-spacing:-.045em}
.muted{color:var(--muted)}
button,input,select,textarea{font-family:inherit;accent-color:var(--brand)}
input[type=text],input[type=email],input[type=password],input[type=number],input[type=date],input:not([type]),select,textarea{border:1px solid #dcdce1;border-radius:10px;background:#fff;min-height:39px;padding:9px 12px;box-shadow:0 1px 2px #00000004;transition:box-shadow .18s,border-color .18s}
input:focus,select:focus,textarea:focus{outline:0;border-color:#007aff;box-shadow:0 0 0 4px #007aff1a}
.form label{font-size:13px;font-weight:570;color:#494951;gap:7px}.filters label{font-weight:550}
.btn {border:1px solid #e0e0e5;border-radius:10px;padding:9px 17px;background:#fff;color:#323238;font-weight:620;line-height:1.4;transition:transform .16s,background .16s,box-shadow .16s}
.btn:hover {background:#f5f5f7;box-shadow:0 3px 9px #00000009;transform:translateY(-1px)}.btn:active{transform:scale(.985)}
.btn.primary {background:#007aff;border-color:#007aff;box-shadow:0 3px 9px #007aff28}.btn.primary:hover{background:#0066d6}
.btn.small{border-radius:8px}
.table-wrap{border-radius:12px;overflow-x:auto}table{font-size:13px}th{font-size:11px;background:#f9f9fb;color:#8b8b92;letter-spacing:.055em;font-weight:700}th,td{padding:13px 14px}tbody tr{transition:background .15s}tbody tr:hover{background:#f9fbfe}td.hl{background:#eff6ff}
.badge {font-size:11px;border-radius:99px;padding:4px 9px;font-weight:680}
.shots{gap:17px}.shot{background:white;border-color:#e9e9ed;border-radius:14px;padding:10px;box-shadow:0 2px 10px #00000006}.shot img,.noshot{border-radius:9px}.shot:hover{border-color:#cbdff5;box-shadow:0 8px 25px #0000000c}
.apps details{border-color:#ededf0}.apps summary{padding:14px 6px}.bar{border-radius:999px;background:#e9f1fa}.bar i{background:linear-gradient(90deg,#48a4ff,#007aff);border-radius:999px}
.flash{border-radius:12px;padding:13px 17px}.copy-row code,code,pre{border-radius:8px;background:#f3f3f6}
.login-page{padding:0!important;min-height:100vh;background:radial-gradient(circle at 50% 0%,#e9f2ff 0,#f5f5f7 55%)}
.login-page main.narrow{max-width:448px;padding:clamp(30px,9vh,100px) 18px 50px}.login-page .card{padding:34px;border-radius:23px;box-shadow:0 18px 65px #0b2e6010}
.login-brand{font-size:24px;gap:12px;letter-spacing:-.04em;font-weight:740}.login-brand .dot{background:#007aff;width:15px;height:15px;box-shadow:0 0 0 5px #007aff18}
.login-page .form h2{font-size:28px;letter-spacing:-.04em;margin-bottom:23px}.login-page .btn.primary{width:100%;margin-top:10px;min-height:45px}
@media(max-width:1050px){body:not(.login-page){padding-left:210px}.top{width:210px}.heading-date{display:none}main{padding:30px 22px 65px}}
@media(max-width:760px){body:not(.login-page){padding-left:0}.top{position:sticky;top:0;width:100%;min-height:66px;height:auto;padding:8px 16px;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between;border-right:0;border-bottom:1px solid var(--line)}.top .brand{height:48px;margin:0;padding:0}.app-mark{width:36px;height:36px}.top .sidebar-label{display:none}.menu-btn{display:block;color:#1d1d1f;background:#f3f3f6;border-radius:9px;padding:6px 13px;font-size:19px;margin-left:auto}.top nav,.top .me{display:none;flex-basis:100%;width:100%;overflow:visible}.nav-open .top nav{display:flex;max-height:65vh;overflow:auto;margin-top:8px}.nav-open .top .me{display:flex;padding:12px 0}.top nav a{padding:10px 12px}.page-heading{margin-bottom:20px}h1{font-size:29px}main{padding:24px 16px 60px}.card{padding:19px 17px;border-radius:15px}.stat{padding:18px;min-height:110px}.stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.stat b{font-size:25px}}
@media(max-width:420px){.stats{grid-template-columns:1fr 1fr}.stat b{font-size:22px}.stat{min-width:0}.apps summary{gap:6px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
