* { box-sizing: border-box; }

:root {
  --bg: #f4f5f7;
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --muted: #888888;
  --label: #444444;
  --border: #d8d8dc;
  --row-border: #eeeeee;
  --status-bg: #eeeeee;
  --primary: #1a73e8;
  --primary-hover: #1558b0;
  --success: #1a8a3e;
  --error: #d32f2f;
  --shadow: rgba(0, 0, 0, 0.08);
}

html[data-theme="dark"] {
  --bg: #15161a;
  --card-bg: #1e2025;
  --text: #eaeaee;
  --muted: #9a9aa2;
  --label: #b6b6bd;
  --border: #35363c;
  --row-border: #2c2d33;
  --status-bg: #2c2d33;
  --primary: #4b9dff;
  --primary-hover: #6fb0ff;
  --success: #3ecf6c;
  --error: #ff6b6b;
  --shadow: rgba(0, 0, 0, 0.4);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease;
}
.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}
.card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px var(--shadow);
}
h1 { font-size: 1.4rem; margin: 8px 0 20px; }
h2 { font-size: 1.05rem; margin: 0 0 12px; }
label { display: block; font-size: 0.9rem; margin: 12px 0 4px; color: var(--label); }
input[type=text], input[type=email], input[type=password], textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--card-bg);
  color: var(--text);
}
textarea { min-height: 100px; resize: vertical; }
.platforms { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin-top: 8px; }
.platforms label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 0.95rem; }
button, .btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 11px 18px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 14px;
}
button:hover { background: var(--primary-hover); }
.muted { color: var(--muted); font-size: 0.85rem; }
.error { color: var(--error); font-size: 0.9rem; margin-top: 8px; }
.success { color: var(--success); font-size: 0.9rem; margin-bottom: 12px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.topbar-actions { display: flex; align-items: center; gap: 4px; }
.topbar form { margin: 0; }
.topbar button { background: none; color: var(--muted); padding: 4px 8px; margin: 0; font-size: 0.85rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
td, th { padding: 6px 4px; text-align: left; border-bottom: 1px solid var(--row-border); }
.status { font-size: 0.8rem; padding: 2px 8px; border-radius: 10px; background: var(--status-bg); }

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.theme-toggle:hover { background: var(--status-bg); }
