:root {
  color-scheme: only light;
  --accent: #a6192e;
  --accent-dark: #8d1628;
  --accent-soft: rgba(166, 25, 46, 0.12);
  --text-primary: #202124;
  --text-muted: #5f6368;
  --surface: #ffffff;
  --surface-alt: #f4f6f9;
  --border: #dfe1e5;
  --shadow: 0 16px 30px rgba(32, 33, 36, 0.12);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

a {
  color: var(--accent);
}

.hub-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.hub-header__brand {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-transform: uppercase;
}

.hub-header__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.role-badge {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.user-menu {
  position: relative;
}

.user-menu__button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  transition: background 0.2s ease;
  font-size: 0.95rem;
}

.user-menu__button:hover {
  background: rgba(32, 33, 36, 0.06);
}

.user-menu__dropdown {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  min-width: 200px;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0.5rem 0;
  box-shadow: var(--shadow);
  display: none;
}

.user-menu__dropdown.open {
  display: block;
}

.user-menu__item {
  padding: 0.65rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
}

.user-menu__item:hover {
  background: rgba(32, 33, 36, 0.08);
}

.app-tile {
  background: var(--surface);
  border-radius: 14px;
  padding: 1.5rem;
  border: 1px solid transparent;
  box-shadow: 0 18px 35px rgba(32, 33, 36, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-tile--disabled {
  pointer-events: none;
  filter: grayscale(0.6);
  opacity: 0.65;
}

.app-tile__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
}

.app-tile__name {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}

.app-tile__desc {
  margin: 0;
  color: var(--text-muted);
}

.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  min-width: 240px;
  background: #202124;
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(32, 33, 36, 0.25);
  opacity: 0;
  transform: translateY(12px);
  animation: toast-in 0.25s ease forwards;
}

@keyframes toast-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-panel {
  background: var(--surface);
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  padding: 1.75rem;
  box-shadow: var(--shadow);
  max-height: 90vh;
  overflow-y: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  padding: 0.65rem 1.35rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s ease;
}

.btn-small {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-danger {
  background: #c62828;
  color: #fff;
}
.btn-danger:hover {
  background: #a31e1e;
}


.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-muted {
  background: rgba(32, 33, 36, 0.08);
  color: var(--text-primary);
}

.btn-muted:hover {
  background: rgba(32, 33, 36, 0.12);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 600px) {
  .hub-header {
    padding: 0 1rem;
  }

  .toast {
    left: 1rem;
    right: 1rem;
  }
}
