:root {
  --bg: #f6f5f2;
  --card: #ffffff;
  --ink: #1d1d1f;
  --muted: #6b6b70;
  --line: #e6e4df;
  --accent: #1d1d1f;
  --green: #1f7a5a;
  --amber: #a86400;
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.5; }
a { color: inherit; }
h1 { font-size: 28px; margin: 0 0 4px; letter-spacing: -0.02em; }
h2 { font-size: 17px; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

/* top bar */
.topbar { display: flex; align-items: center; gap: 16px; padding: 12px 28px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 700; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand-mark { color: #6a3fc4; }
.brand-mark.big { font-size: 40px; line-height: 1; }
.dev-badge { background: #fff1d6; color: var(--amber); font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 99px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.nav > a { text-decoration: none; color: var(--muted); font-weight: 500; }
.nav > a:hover, .nav > a.on { color: var(--ink); }
.count { background: #d93025; color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 7px; margin-left: 2px; font-weight: 600; }
.me { display: flex; align-items: center; gap: 8px; }
.av { width: 32px; height: 32px; border-radius: 50%; background: #e8e3f7; color: #6a3fc4; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; object-fit: cover; }
.me-text { display: flex; flex-direction: column; line-height: 1.2; }
.me-text small { color: var(--muted); font-size: 12px; }
.logout { font-size: 14px; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 32px 28px 60px; }
.page-head { margin-bottom: 18px; }
.section { margin: 28px 0 12px; }

/* tiles */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.grid.compact { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; transition: transform .12s, box-shadow .12s, border-color .12s; }
.tile.open:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.07); border-color: #cfcac0; }
.tile.locked .tile-icon, .tile.soon .tile-icon { filter: grayscale(1); opacity: .45; }
.tile.locked h2, .tile.soon h2 { color: #55555a; }
.tile.soon { border-style: dashed; background: transparent; }
.tile.mini { flex-direction: row; align-items: center; gap: 12px; padding: 14px; }
.tile.mini .tile-icon { width: 38px; height: 38px; font-size: 18px; }
.tile.mini h2 { font-size: 15px; }
.tile-head { display: flex; gap: 12px; align-items: center; }
.tile-icon { width: 44px; height: 44px; border-radius: 11px; color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 700; flex-shrink: 0; }
.owner { margin: 0; color: var(--muted); font-size: 13px; }
.desc { margin: 0; color: #3d3d42; flex-grow: 1; }
.tile-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.go { font-weight: 600; }

.pill { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: #eeece7; color: var(--muted); white-space: nowrap; display: inline-block; }
.pill.green { background: #e3f2ec; color: var(--green); }
.pill.amber { background: #fff1d6; color: var(--amber); }

/* buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { opacity: .9; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn-secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-google { background: #fff; color: #1f1f1f; border: 1px solid #dadce0; width: 100%; padding: 12px; }
.btn.block { display: flex; width: 100%; margin-top: 8px; }
input, select, textarea { font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: #fff; color: var(--ink); }
select.has { border-color: #9fd0bd; background: #f2faf6; }
textarea { resize: vertical; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; }

.req summary, .add summary { list-style: none; }
.req summary::-webkit-details-marker, .add summary::-webkit-details-marker { display: none; }
.req summary { width: 100%; }
.req[open] summary { display: none; }
.req form { display: flex; flex-direction: column; gap: 10px; }
.req label { font-size: 13px; font-weight: 600; display: flex; flex-direction: column; gap: 6px; }

.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-weight: 500; }
.flash.ok { background: #e3f2ec; color: var(--green); }
.flash.info { background: #eef1f8; color: #34507a; }
.flash.warn { background: #fdecea; color: #a52714; }

.card-center { max-width: 400px; margin: 8vh auto; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 36px; text-align: center; display: flex; flex-direction: column; gap: 14px; }
.dev-users { text-align: left; }

/* admin */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs a { text-decoration: none; padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--ink); border-color: var(--ink); }
.toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.search { display: flex; gap: 8px; }
.search input { width: 260px; }
.add { text-align: right; }
.add form { display: flex; gap: 8px; margin-top: 10px; }
.add p { margin: 6px 0 0; }

.table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
form.inline { display: inline; }
.actions { white-space: nowrap; }
.approve { display: inline-flex; gap: 6px; align-items: center; }
.person { display: flex; gap: 10px; align-items: center; line-height: 1.35; }

@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; padding: 12px 16px; }
  .me-text { display: none; }
  .wrap { padding: 20px 16px; }
  .search input { width: 100%; }
}
