:root {
  color-scheme: light;
  --bg: #f4f4f6;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --brand: #714b67;
  --border: #e5e7eb;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.25rem;
  text-align: center;
}

.site-header .logo {
  display: block;
  margin: 0 auto;
  max-width: min(420px, 92vw);
  height: auto;
}

.wrap {
  max-width: 940px;
  margin: 1.5rem auto 2rem;
  padding: 0 1rem;
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

h1, h2 { margin: 0 0 0.5rem; }
.muted { color: var(--muted); margin: 0.4rem 0 0.8rem; }

.login-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

label span {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.7rem;
}

button,
.btn-primary {
  display: inline-block;
  border: 0;
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
}

.ghost {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
}

.apps-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.apps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.app-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.app-card-main {
  display: block;
  padding: 0.85rem 2.5rem 0.85rem 0.85rem;
  text-decoration: none;
  color: inherit;
}

.app-card-main h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.app-card-new-window {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--brand);
  cursor: pointer;
}

.app-card-new-window:hover {
  background: #f9fafb;
  border-color: var(--brand);
}

.app-card-new-window:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.note {
  min-height: 1.2rem;
  color: var(--muted);
}

.hidden {
  display: none;
}

.admin-tools h2 {
  margin: 0 0 0.35rem;
}
