:root {
  --control-bg: var(--surface2);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 0;
  background: none;
  object-fit: contain;
  filter: drop-shadow(0 0 10px #227cff40);
}

.auth-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.auth-top .brand { padding-left: 0; }

.theme-toggle {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 8px 10px;
  font-weight: 700;
  white-space: nowrap;
}

.theme-toggle:hover {
  border-color: var(--line2);
  color: var(--text);
  background: var(--surface2);
}

.sidebar-theme {
  width: 100%;
  text-align: left;
  margin-top: auto;
}

.sidebar-theme + .account-mini { margin-top: 10px; }

input[type="file"] {
  padding: 6px;
  min-height: 44px;
  line-height: 30px;
  color: var(--muted);
  overflow: hidden;
}

input[type="file"]::file-selector-button {
  height: 30px;
  margin: 0 12px 0 0;
  padding: 0 12px;
  border: 1px solid var(--line2);
  border-radius: 6px;
  background: var(--surface2);
  color: var(--text);
  font-weight: 750;
  cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--surface2) 82%, var(--blue));
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f6fa;
  --side: #ffffff;
  --surface: #ffffff;
  --surface2: #edf2f8;
  --line: #d7e0eb;
  --line2: #bdcbdc;
  --text: #142033;
  --muted: #5c6f87;
  --blue: #116dcc;
  --blue2: #075eb8;
  --cyan: #007f86;
  --green: #087c5b;
  --amber: #9a6500;
  --red: #be3148;
  --violet: #694cc8;
}

html[data-theme="light"] .nav button:hover { background: #edf4fc; color: #173c66; }
html[data-theme="light"] .nav button.active { background: #dcecff; color: #0d4f91; }
html[data-theme="light"] .metric { background: linear-gradient(145deg, #fff, #f4f7fb); }
html[data-theme="light"] .lane { background: #f5f8fc; border-color: #dce4ee; }
html[data-theme="light"] .lane-title { color: #42566f; }
html[data-theme="light"] .task,
html[data-theme="light"] .member { background: #fff; border-color: #d4dfeb; }
html[data-theme="light"] label { color: #344960; }
html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select { background: #fff; color: var(--text); }
html[data-theme="light"] .btn { color: #fff; }
html[data-theme="light"] .btn.secondary { background: #e4eef9; color: #163d66; }
html[data-theme="light"] .btn.ghost { color: #35506d; }
html[data-theme="light"] .empty { background: radial-gradient(circle at 50% 0, #dcecff 0, transparent 58%), var(--surface); }
html[data-theme="light"] .auth-wrap { background: radial-gradient(circle at 50% 0, #d9eaff 0, transparent 42%); }
html[data-theme="light"] .auth-card { background: #fff; }
html[data-theme="light"] .toast { background: #fff; border-color: #9abce1; }

@media (max-width: 820px) {
  .sidebar { position: relative; }
  .sidebar-theme {
    width: auto;
    position: absolute;
    top: 12px;
    right: 12px;
    margin: 0;
  }
  .sidebar-theme span { display: none; }
  .theme-toggle { padding: 7px 10px; }
  .brand { padding-right: 50px; }
}
