/* Marker Control — sleek, white, minimal. */
:root {
  --ink: #111;
  --muted: #8a8a8e;
  --line: #ececef;
  --bg: #fff;
  --soft: #f6f6f8;
  --accent: #111;
  --green: #1f9d55;
  --amber: #b7791f;
  --red: #c53030;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

header {
  display: flex; align-items: center; gap: 28px;
  padding: 18px 32px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px); z-index: 10;
}
.brand { font-weight: 700; letter-spacing: -0.02em; font-size: 17px; }
.brand span { color: var(--muted); font-weight: 500; }
.brand.big { font-size: 22px; margin-bottom: 22px; text-align: center; }
nav { display: flex; gap: 4px; flex: 1; }
nav a {
  color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 7px 12px; border-radius: 8px;
}
nav a:hover { color: var(--ink); background: var(--soft); }
nav a.active { color: var(--ink); background: var(--soft); }
.logout button {
  background: none; border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 12px; font-size: 13px; color: var(--muted); cursor: pointer;
}
.logout button:hover { color: var(--ink); border-color: #ccc; }

main { max-width: 1060px; margin: 0 auto; padding: 36px 32px 80px; }
h1 { font-size: 26px; letter-spacing: -0.02em; margin: 0 0 24px; }
h2 { font-size: 17px; margin: 36px 0 12px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; }
.error { color: var(--red); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.tile {
  border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px;
  text-decoration: none; color: var(--ink); background: var(--bg);
  transition: border-color .15s;
}
.tile:hover { border-color: #ccc; }
.tile b { display: block; font-size: 28px; letter-spacing: -0.03em; }
.tile span { color: var(--muted); font-size: 13px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12.5px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.log td { padding: 5px 10px; font-size: 12.5px; }
table.log tr.error td { color: var(--red); }
table.log tr.warn td { color: var(--amber); }
.actions { white-space: nowrap; }
.actions a, .actions button { margin-right: 10px; }
.actions form { display: inline; }

.pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--soft); color: var(--muted);
}
.pill.green { background: #e7f6ec; color: var(--green); }
.pill.amber { background: #fbf0dd; color: var(--amber); }
.pill.red { background: #fdeaea; color: var(--red); }

.banner {
  background: #fbf0dd; color: var(--amber); border-radius: 10px;
  padding: 12px 16px; margin-bottom: 20px; font-size: 14px; font-weight: 500;
}

button, .button {
  font: inherit; font-size: 14px; font-weight: 600;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  border-radius: 10px; padding: 9px 16px; cursor: pointer; text-decoration: none;
}
button:hover, .button:hover { border-color: #ccc; }
.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.primary:hover { opacity: .85; border-color: var(--accent); }
.danger.link { border: none; background: none; color: var(--red); padding: 0; font-weight: 500; }
.danger.link:hover { text-decoration: underline; }

.split { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.grid-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.grid-form .wide { grid-column: 1 / -1; }
.grid-form input, .grid-form select, .grid-form textarea, .login-card input {
  font: inherit; font-size: 14px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: var(--bg);
}
.grid-form input:focus, .grid-form select:focus, .grid-form textarea:focus, .login-card input:focus {
  outline: none; border-color: #bbb;
}
.grid-form textarea { resize: vertical; font-family: inherit; }
.grid-form .check { flex-direction: row; align-items: center; grid-column: 1 / -1; }
.grid-form button { justify-self: start; }

/* Post editor */
.md-toolbar { display: flex; gap: 4px; margin-bottom: 6px; }
.md-toolbar button { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
textarea.drag, .dropzone.drag { outline: 2px dashed #999; outline-offset: 2px; }
.dropzone {
  border: 1.5px dashed var(--line); border-radius: 12px; padding: 18px;
  text-align: center; color: var(--muted); font-size: 13px; cursor: pointer;
  display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.dropzone img { max-width: 240px; max-height: 140px; border-radius: 8px; object-fit: cover; }
fieldset.box { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
fieldset.box legend { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0 6px; }
.check.slim { flex-direction: row; align-items: center; gap: 6px; }
.row.wrap { flex-wrap: wrap; justify-content: flex-start; gap: 10px 16px; }
details summary { cursor: pointer; margin: 4px 0; }
details textarea { width: 100%; margin-top: 8px; }

/* Monitor timeline */
.chart { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; margin: 6px 0 18px; }
.ranges { display: flex; gap: 4px; }
.range { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 8px; }
.range.active, .range:hover { color: var(--ink); background: var(--soft); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 4px; margin-right: 3px; }

/* Login */
.login-page { display: grid; place-items: center; min-height: 100vh; background: var(--soft); }
.login-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: 18px;
  padding: 40px 36px; width: 340px; box-shadow: 0 20px 60px rgba(0,0,0,.06);
}
.login-card form { display: flex; flex-direction: column; gap: 12px; }

/* iPhone previews */
.preview-pane { position: sticky; top: 90px; }
.iphone {
  border: 1px solid var(--line); border-radius: 34px; padding: 46px 14px;
  background: linear-gradient(160deg, #fafafa, #f0f0f3);
  min-height: 300px;
}
.iphone.dark { background: linear-gradient(160deg, #3a3f4d, #191c24); }
.news-card {
  background: #fff; border-radius: 14px; padding: 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,.07);
  display: flex; gap: 10px; font-size: 13px;
}
.news-card p { margin: 3px 0; color: var(--muted); }
.news-dot { width: 8px; height: 8px; border-radius: 4px; background: #e0362c; margin-top: 5px; flex: none; }
.push-card {
  background: rgba(250,250,250,.92); border-radius: 16px; padding: 12px 14px;
  display: flex; gap: 10px; font-size: 13px; color: #111;
  box-shadow: 0 8px 28px rgba(0,0,0,.25);
}
.push-icon { width: 34px; height: 34px; border-radius: 8px; background: #111; flex: none; }
.push-head { display: flex; justify-content: space-between; gap: 8px; }
.push-head span { color: #8a8a8e; font-size: 12px; }
.push-card p { margin: 2px 0 0; color: #333; }
