:root{
  --bg: #f6f7fb;
  --card: #ffffff;
  --muted: #6b7280;
  --text: #0f172a;
  --accent: #10b981;
  --border: #e5e7eb;
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, "Noto Sans";
  color: var(--text);
  background: linear-gradient(#fff, var(--bg));
}

.topbar{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:12px 16px; border-bottom:1px solid var(--border); background:#fff;
  position:sticky; top:0; z-index:10;
}
.brand{ font-weight:700; }
.actions{ display:flex; gap:8px; flex-wrap: wrap; }

.container{ max-width: 960px; margin: 20px auto; padding: 0 12px; }

.panel{
  background: var(--card); border:1px solid var(--border); border-radius:16px; padding:16px;
  box-shadow: 0 10px 16px rgba(15, 23, 42, 0.04);
}

.panel-head{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px;
}

.controls{ display:flex; align-items:center; justify-content:flex-end; margin: 10px 0 14px; }

.grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap:10px; }

.tile{
  display:block; padding:14px; min-height:90px; border:1px solid var(--border); border-radius:14px; background:#fff;
  box-shadow: 0 3px 8px rgba(15,23,42,0.05); text-align:left; transition: transform .04s ease, box-shadow .15s ease, border-color .15s ease;
  word-wrap: break-word;
}
.tile:hover{ border-color:#d1d5db; }
.tile:active{ transform: scale(.99); }
.tile.checked{ outline: 3px solid var(--accent); border-color: var(--accent); }
.tile-title{ font-weight:600; line-height:1.2; }
.tile-sub{ margin-top:6px; font-size:.9rem; color: var(--muted); white-space: pre-wrap; }

.status-row{ display:flex; align-items:center; justify-content:space-between; margin-top:12px; }

.btn{
  border:1px solid var(--border); background:#fff; color:var(--text);
  padding:8px 12px; border-radius:10px; cursor:pointer; font-weight:600;
}
.btn:hover{ border-color:#d1d5db; }
.btn:disabled{ opacity:.5; cursor:not-allowed; }
.btn-outline{ background:transparent; }

.switch{ display:flex; align-items:center; gap:8px; font-size:.95rem; color:var(--muted); }
.switch input{ width:18px; height:18px; }

.muted{ color:var(--muted); }
.small{ font-size:.875rem; }

footer.footer{ text-align:center; padding:30px 16px 50px; }

/* dialogs */
dialog{ border:none; padding:0; border-radius:12px; width:min(480px, 92vw); box-shadow: 0 20px 40px rgba(15,23,42,0.3); }
.dialog-form{ padding:16px; }
.dialog-actions{ display:flex; justify-content:flex-end; gap:8px; margin-top:12px; }
.label{ display:block; margin:6px 0; font-weight:600; }
.input{ width:100%; padding:10px 12px; border:1px solid var(--border); border-radius:10px; }

/* mobile */
@media (max-width: 480px){
  .tile{ min-height:84px; padding:12px; }
  .tile-sub{ font-size:.85rem; }
}

