:root {
  --bg: #0f1115;
  --text: #e8e8ea;
  --text-muted: #8b8f99;
  --border: #23262d;
  --tile-border: #2a2d35;
  --tile-bg: #171a20;
  --tile-hover: #1f232b;
  --accent: #6ea8fe;
  --accent-text: #0f1115;
  --error: #ff6b6b;
}

[data-theme="light"] {
  --bg: #f5f5f7;
  --text: #1a1a1e;
  --text-muted: #6b6f76;
  --border: #dcdce0;
  --tile-border: #d7d7dc;
  --tile-bg: #ffffff;
  --tile-hover: #eceef2;
  --accent: #2f6fed;
  --accent-text: #ffffff;
  --error: #cf2f2b;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  transition: background 0.2s ease, color 0.2s ease;
}

.theme-toggle {
  padding: 8px 12px;
  font-size: 16px;
  border-radius: 999px;
  line-height: 1;
}

.centered-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  gap: 14px;
  padding: 0 24px;
  text-align: center;
}

.centered-screen h1 {
  font-size: 34px;
  margin: 0;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--text-muted);
  margin: 0 0 8px;
  font-size: 15px;
  max-width: 420px;
}

#sign-in-btn {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
  font-weight: 600;
  padding: 12px 22px;
}

#sign-in-btn:hover {
  filter: brightness(1.08);
}

.centered-screen .theme-toggle {
  margin-top: 8px;
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}

#brand {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  background: transparent;
}

.greeting {
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 36px 24px 8px;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 200px));
  justify-content: center;
  gap: 20px;
  padding: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 20px 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--tile-border);
  background: var(--tile-bg);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.tile:hover {
  background: var(--tile-hover);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.tile-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  pointer-events: none;
}

.tile-label {
  pointer-events: none;
}

.tile-desc {
  pointer-events: none;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.3;
}

button {
  cursor: pointer;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--tile-border);
  background: var(--tile-bg);
  color: var(--text);
  font-size: 15px;
}

button:hover {
  background: var(--tile-hover);
}

.error {
  color: var(--error);
  text-align: center;
  min-height: 1.2em;
  margin: 8px 0 0;
}

.admin-body {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.admin-body h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-empty {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 400;
}

.request-row,
.access-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--tile-border);
  background: var(--tile-bg);
}

.row-identity {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 600;
  min-width: 180px;
}

.row-identity small {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 12.5px;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.app-checkboxes {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 400;
}

.app-checkboxes label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}

.badge-approved {
  background: rgba(46, 160, 67, 0.16);
  color: #2ea043;
}

.badge-pending {
  background: rgba(230, 168, 23, 0.18);
  color: #c98f0e;
}

.badge-denied {
  background: rgba(207, 47, 43, 0.15);
  color: var(--error);
}

.btn-approve {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
  font-weight: 600;
  padding: 8px 14px;
  font-size: 14px;
}

.btn-deny,
.btn-save {
  padding: 8px 14px;
  font-size: 14px;
}
