@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;600;700&display=swap');

:root {
  --red-900: #7f0a12;
  --red-700: #b30d18;
  --red-500: #d21b2a;
  --gray-950: #0f1116;
  --gray-900: #171922;
  --gray-700: #3a3d46;
  --gray-500: #6b6f7b;
  --gray-300: #cfd2d8;
  --gray-100: #f4f5f7;
  --white: #ffffff;
  --glass: rgba(255, 255, 255, 0.75);
  --shadow: 0 18px 40px rgba(13, 13, 20, 0.18);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Sora", Arial, sans-serif;
  color: var(--gray-900);
  background: radial-gradient(1200px 700px at 10% 10%, rgba(210, 27, 42, 0.2), transparent 60%),
              radial-gradient(900px 600px at 90% 15%, rgba(179, 13, 24, 0.12), transparent 60%),
              linear-gradient(180deg, #f9fafb 0%, #eef0f4 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(17, 18, 23, 0.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(17, 18, 23, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.app {
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--red-700), var(--red-900));
  color: var(--white);
  box-shadow: 0 10px 30px rgba(127, 10, 18, 0.3);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
}

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

.user-chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.role-chip {
  background: rgba(255, 255, 255, 0.85);
  color: var(--red-700);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--red-500), var(--red-700));
  color: var(--white);
  box-shadow: 0 14px 24px rgba(210, 27, 42, 0.25);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.92);
  color: var(--red-700);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(12, 12, 16, 0.2);
}

.panel {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 60px;
  transition: filter 0.3s ease, transform 0.3s ease;
}

.panel.blurred {
  filter: blur(10px);
  transform: scale(0.98);
  pointer-events: none;
}

.hero {
  margin-bottom: 26px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 32px;
}

.hero p {
  margin: 0;
  color: var(--gray-500);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.menu-card {
  background: var(--glass);
  backdrop-filter: blur(14px);
  border-radius: 18px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.menu-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px rgba(12, 12, 16, 0.22);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(210, 27, 42, 0.2), rgba(179, 13, 24, 0.32));
  display: grid;
  place-items: center;
  color: var(--red-700);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.menu-card h3 {
  margin: 0 0 6px;
}

.menu-card p {
  margin: 0;
  color: var(--gray-500);
  font-size: 14px;
}

.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 20;
  transition: opacity 0.3s ease;
}

.overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 18, 0.55);
  backdrop-filter: blur(6px);
}

.auth-card {
  position: relative;
  width: min(92vw, 420px);
  background: var(--white);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 28px 60px rgba(6, 7, 12, 0.35);
  animation: fadeDown 0.35s ease;
  border: 1px solid rgba(179, 13, 24, 0.2);
  z-index: 1;
}

.auth-card.exit {
  animation: liftOut 0.35s ease forwards;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.tab {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--gray-300);
  background: var(--gray-100);
  font-weight: 600;
  cursor: pointer;
}

.tab.active {
  background: linear-gradient(135deg, var(--red-500), var(--red-700));
  color: var(--white);
  border-color: transparent;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form label {
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--gray-500);
}

.auth-form input {
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(107, 111, 123, 0.3);
  background: rgba(255, 255, 255, 0.95);
}

.auth-form select {
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(107, 111, 123, 0.3);
  background: rgba(255, 255, 255, 0.95);
}

.recaptcha-wrap {
  display: flex;
  justify-content: center;
  margin: 6px 0 4px;
  min-height: 78px;
}

.recaptcha-error {
  font-size: 12px;
  color: var(--red-700);
  min-height: 16px;
  text-align: center;
}

.auth-msg {
  margin-top: 12px;
  font-size: 13px;
  color: var(--red-700);
  min-height: 18px;
}

.access-card {
  margin-top: 28px;
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.access-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.access-head h3 {
  margin: 0;
  color: var(--red-700);
}

.access-head p {
  margin: 4px 0 0;
  color: var(--gray-500);
  font-size: 13px;
}

.access-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.access-list {
  display: grid;
  gap: 12px;
}

.access-item {
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.access-title {
  font-weight: 700;
  color: var(--gray-900);
}

.access-sub {
  color: var(--gray-500);
  font-size: 13px;
}

.access-secret {
  display: flex;
  gap: 8px;
  align-items: center;
}

.access-secret input {
  border: 1px solid var(--gray-300);
  border-radius: 10px;
  padding: 8px 10px;
  min-width: 200px;
}

.access-empty {
  color: var(--gray-500);
  font-size: 13px;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 12, 18, 0.55);
  backdrop-filter: blur(3px);
}

.modal-card {
  position: relative;
  width: min(92vw, 520px);
  background: var(--white);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 20px 40px rgba(9, 10, 14, 0.25);
  border: 1px solid rgba(179, 13, 24, 0.2);
  z-index: 1;
}

.modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(210, 27, 42, 0.12), rgba(179, 13, 24, 0.22));
  color: var(--red-700);
  font-size: 26px;
  font-weight: 700;
}

.auth-close {
  margin-top: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(107, 111, 123, 0.3);
  background: #f6f6f8;
  font-weight: 600;
  cursor: pointer;
}

.hidden { display: none; }

@keyframes fadeDown {
  from { transform: translateY(-12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes liftOut {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(-16px); opacity: 0; }
}

@media (max-width: 900px) {
  .menu-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .topbar { padding: 14px 16px; }
  .hero h1 { font-size: 24px; }
}
