:root {
  --orange: #f97316;
  --orange-dark: #c2410c;
  --orange-soft: #fff7ed;
  --black: #171717;
  --gray-900: #262626;
  --gray-700: #525252;
  --gray-500: #737373;
  --gray-300: #d4d4d4;
  --gray-200: #e5e5e5;
  --gray-100: #f5f5f5;
  --white: #ffffff;
  --green: #15803d;
  --green-soft: #f0fdf4;
  --red: #b91c1c;
  --red-soft: #fef2f2;
  --yellow-soft: #fffbeb;
  --shadow-sm: 0 4px 16px rgba(23, 23, 23, 0.08);
  --shadow-lg: 0 20px 55px rgba(23, 23, 23, 0.12);
  --radius: 22px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--orange-soft);
  color: var(--black);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.12), transparent 32rem),
    linear-gradient(180deg, #fff 0, var(--orange-soft) 45rem);
}

a {
  color: var(--orange-dark);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  padding: max(12px, env(safe-area-inset-top)) 18px 12px;
  border-bottom: 1px solid rgba(212, 212, 212, 0.7);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  width: min(1120px, 100%);
  margin: auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--black);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 14px;
  background: var(--orange);
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.28);
  color: var(--white);
  font-size: 1.35rem;
  font-weight: 900;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  transform: scale(1.95);
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.98rem;
}

.brand small {
  margin-top: 2px;
  color: var(--gray-500);
  font-size: 0.76rem;
}

.header-link {
  color: var(--gray-700);
  font-size: 0.85rem;
  text-decoration: none;
}

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

.guide-header-link {
  color: var(--orange-dark);
  font-weight: 800;
}

.main-shell {
  width: min(1060px, calc(100% - 28px));
  margin: 0 auto;
  padding: 34px 0 calc(70px + env(safe-area-inset-bottom));
}

.main-shell.narrow {
  width: min(680px, calc(100% - 28px));
}

.admin-shell {
  width: min(1180px, calc(100% - 28px));
}

.panel,
.hero-card,
.slot-card {
  border: 1px solid rgba(212, 212, 212, 0.75);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-sm);
}

.panel {
  padding: clamp(20px, 4vw, 30px);
}

.hero-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  padding: clamp(28px, 6vw, 48px);
  background:
    linear-gradient(135deg, rgba(23, 23, 23, 0.98), rgba(49, 28, 15, 0.98)),
    var(--black);
  box-shadow: var(--shadow-lg);
  color: var(--white);
}

.hero-card::after {
  position: absolute;
  right: -70px;
  bottom: -100px;
  width: 260px;
  height: 260px;
  border: 45px solid rgba(249, 115, 22, 0.72);
  border-radius: 50%;
  content: "";
}

.hero-card h1,
.welcome-row h1,
.admin-topbar h1 {
  margin: 8px 0 8px;
  font-size: clamp(2rem, 6vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero-card p {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0;
  color: #e5e5e5;
  font-size: 1.05rem;
  line-height: 1.6;
}

.hero-guide-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin-top: 22px;
  border-radius: 999px;
  background: var(--orange);
  padding: 12px 17px;
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 850;
  text-decoration: none;
}

.eyebrow {
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.panel h1,
.panel h2,
.panel h3 {
  margin-top: 0;
}

.panel h2 {
  margin-bottom: 18px;
  font-size: 1.35rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.form-grid label {
  display: grid;
  gap: 7px;
  color: var(--gray-900);
  font-size: 0.9rem;
  font-weight: 700;
}

.form-grid label small {
  color: var(--gray-500);
  font-weight: 500;
}

.span-2 {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--gray-300);
  border-radius: 13px;
  outline: none;
  background: var(--white);
  color: var(--black);
  padding: 13px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.checkbox-label {
  display: flex !important;
  grid-template-columns: auto 1fr !important;
  align-items: flex-start;
  gap: 10px !important;
  color: var(--gray-700) !important;
  font-weight: 500 !important;
  line-height: 1.5;
}

.checkbox-label input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--orange);
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.text-button,
.answer-button {
  min-height: 45px;
  border: 0;
  border-radius: 13px;
  padding: 11px 17px;
  font-weight: 800;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.primary-button:hover:not(:disabled),
.secondary-button:hover:not(:disabled),
.answer-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.primary-button {
  background: var(--orange);
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.22);
  color: var(--white);
}

.primary-button:hover:not(:disabled) {
  background: var(--orange-dark);
}

.secondary-button {
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--black);
}

.ghost-button {
  background: var(--gray-100);
  color: var(--gray-700);
}

.danger-button {
  background: var(--red-soft);
  color: var(--red);
}

.text-button {
  min-height: auto;
  background: transparent;
  color: var(--orange-dark);
  padding: 4px;
}

.small-button {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 0.8rem;
}

.muted {
  color: var(--gray-500);
}

.small-text {
  font-size: 0.82rem;
}

.loading-screen,
.centered-panel,
.empty-state {
  display: grid;
  min-height: 220px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.loading-screen {
  min-height: 100vh;
  gap: 14px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.welcome-row,
.admin-topbar,
.section-heading,
.admin-slot-header,
.install-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.welcome-row {
  margin-bottom: 22px;
}

.welcome-row h1,
.admin-topbar h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
}

.welcome-row p,
.admin-topbar p,
.section-heading p {
  margin: 0;
  color: var(--gray-500);
}

.status-pill {
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  background: var(--white);
  padding: 9px 13px;
  color: var(--gray-700);
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-success {
  border-color: #bbf7d0;
  background: var(--green-soft);
  color: var(--green);
}

.status-warning {
  border-color: #fde68a;
  background: var(--yellow-soft);
  color: #92400e;
}

.status-danger {
  border-color: #fecaca;
  background: var(--red-soft);
  color: var(--red);
}

.install-panel {
  margin-bottom: 30px;
  border-color: rgba(249, 115, 22, 0.28);
}

.install-panel h2 {
  margin: 2px 0 4px;
}

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

.step-number {
  display: inline-grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
  color: var(--white);
  font-weight: 900;
}

.step-number.complete {
  background: var(--green);
}

.section-heading {
  margin: 28px 0 15px;
}

.section-heading.compact {
  margin: 0 0 20px;
}

.section-heading h2 {
  margin: 0 0 4px;
  font-size: 1.45rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  gap: 17px;
}

.slot-card {
  padding: 24px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.slot-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.slot-card.assigned-card {
  border-color: #86efac;
  background: var(--green-soft);
}

.slot-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.slot-status,
.slot-label,
.answer-chip,
.assigned-label {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.74rem;
  font-weight: 850;
}

.slot-status {
  background: var(--gray-100);
  color: var(--gray-700);
}

.status-open {
  background: var(--orange-soft);
  color: var(--orange-dark);
}

.status-assigned {
  background: var(--green-soft);
  color: var(--green);
}

.status-closed,
.status-cancelled {
  background: var(--gray-100);
  color: var(--gray-500);
}

.slot-label {
  background: var(--gray-100);
  color: var(--gray-700);
}

.slot-card h3,
.admin-slot h3 {
  margin: 0 0 8px;
  font-size: 1.45rem;
  text-transform: capitalize;
}

.slot-time {
  color: var(--black);
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.slot-time span {
  color: var(--orange);
}

.slot-note {
  margin: 14px 0 0;
  color: var(--gray-700);
  line-height: 1.55;
}

.answer-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 21px;
}

.answer-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--gray-700);
}

.answer-button.interested.selected,
.answer-button.interested:hover:not(:disabled) {
  border-color: #86efac;
  background: var(--green-soft);
  color: var(--green);
}

.answer-button.unavailable.selected,
.answer-button.unavailable:hover:not(:disabled) {
  border-color: #fecaca;
  background: var(--red-soft);
  color: var(--red);
}

.response-note {
  margin: 11px 0 0;
  color: var(--gray-500);
  font-size: 0.79rem;
  line-height: 1.45;
}

.confirmation-box {
  display: grid;
  gap: 4px;
  margin-top: 20px;
  border-radius: var(--radius-sm);
  background: var(--white);
  padding: 15px;
  color: var(--green);
}

.confirmation-box span {
  color: var(--gray-700);
  font-size: 0.85rem;
}

.highlight-card {
  animation: highlight 1.5s ease;
}

@keyframes highlight {
  0%,
  100% {
    box-shadow: var(--shadow-sm);
  }
  35% {
    box-shadow: 0 0 0 7px rgba(249, 115, 22, 0.2), var(--shadow-lg);
  }
}

.empty-icon {
  display: grid;
  width: 55px;
  height: 55px;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font-size: 1.6rem;
  font-weight: 900;
}

.help-panel {
  margin-top: 30px;
}

.help-panel p {
  margin-bottom: 8px;
}

.guide-help-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  margin: 0 0 20px;
  border: 1px solid rgba(249, 115, 22, 0.28);
  border-radius: var(--radius-sm);
  background: var(--orange-soft);
  padding: 15px;
  color: var(--black);
  text-decoration: none;
}

.guide-help-link strong,
.guide-help-link small {
  display: block;
}

.guide-help-link small {
  margin-top: 3px;
  color: var(--gray-500);
}

.guide-help-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--white);
  font-size: 1.25rem;
}

.guide-shell {
  width: min(960px, calc(100% - 28px));
}

.guide-hero {
  display: grid;
  grid-template-columns: 1fr minmax(230px, 0.42fr);
  align-items: center;
  gap: clamp(28px, 6vw, 70px);
  overflow: hidden;
  margin-bottom: 22px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 75% 20%, rgba(249, 115, 22, 0.3), transparent 18rem),
    var(--black);
  box-shadow: var(--shadow-lg);
  padding: clamp(28px, 6vw, 58px);
  color: var(--white);
}

.guide-hero h1 {
  max-width: 630px;
  margin: 9px 0 14px;
  font-size: clamp(2.15rem, 7vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.guide-hero p {
  max-width: 600px;
  margin: 0;
  color: #e5e5e5;
  font-size: 1.06rem;
  line-height: 1.6;
}

.guide-phone-art {
  position: relative;
  display: grid;
  min-height: 265px;
  align-content: center;
  justify-items: start;
  gap: 12px;
  transform: rotate(4deg);
  border: 9px solid #3f3f46;
  border-radius: 32px;
  background: var(--white);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.38);
  padding: 30px 22px;
  color: var(--black);
}

.guide-phone-art::before {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 42px;
  height: 6px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #3f3f46;
  content: "";
}

.guide-phone-art > span {
  font-size: 2.4rem;
}

.guide-phone-art strong {
  font-size: 1.2rem;
  line-height: 1.15;
}

.guide-phone-art small {
  color: var(--orange-dark);
  font-weight: 800;
}

.guide-device-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 22px;
}

.guide-device-panel h2 {
  margin: 5px 0 4px;
}

.guide-device-panel p {
  margin: 0;
}

.device-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px;
  border-radius: 17px;
  background: var(--gray-100);
  padding: 6px;
}

.device-button {
  min-height: 49px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--gray-700);
  padding: 10px 15px;
  font-weight: 850;
}

.device-button.active {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  color: var(--orange-dark);
}

.device-guide {
  margin-bottom: 22px;
  border: 1px solid rgba(212, 212, 212, 0.75);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  padding: clamp(22px, 5vw, 40px);
}

.device-guide[hidden] {
  display: none;
}

.guide-steps {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-steps li {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 17px;
  border: 1px solid var(--gray-200);
  border-radius: 17px;
  background: linear-gradient(135deg, var(--white), var(--orange-soft));
  padding: 19px;
}

.guide-steps h3 {
  margin: 1px 0 5px;
  font-size: 1.04rem;
}

.guide-steps p {
  margin: 0;
  color: var(--gray-700);
  line-height: 1.55;
}

.guide-step-number {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--orange);
  box-shadow: 0 7px 15px rgba(249, 115, 22, 0.22);
  color: var(--white);
  font-weight: 900;
}

.gesture-demo {
  position: absolute;
  top: 50%;
  right: 22px;
  display: grid;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  place-items: center;
  border-radius: 15px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  color: var(--orange-dark);
  font-size: 1.55rem;
  font-weight: 900;
}

.gesture-demo span {
  position: absolute;
  top: 2px;
  font-size: 1rem;
}

.dots-demo {
  font-size: 2rem;
}

.guide-ready-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 22px;
  border-radius: var(--radius);
  background: var(--orange);
  box-shadow: 0 18px 45px rgba(249, 115, 22, 0.28);
  padding: clamp(24px, 5vw, 42px);
  color: var(--white);
}

.guide-ready-card .eyebrow {
  color: #ffedd5;
}

.guide-ready-card h2 {
  margin: 5px 0 7px;
}

.guide-ready-card p {
  max-width: 610px;
  margin: 0;
  color: #fff7ed;
  line-height: 1.55;
}

.guide-cta {
  flex: 0 0 auto;
  background: var(--white);
  box-shadow: none;
  color: var(--orange-dark);
  text-decoration: none;
}

.guide-cta:hover {
  background: var(--black);
  color: var(--white);
}

.guide-help-card {
  text-align: center;
}

.guide-help-card h2 {
  margin-bottom: 8px;
}

.guide-help-card p {
  margin: 0;
  color: var(--gray-700);
}

.privacy-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 16px;
}

.danger-text {
  color: var(--red);
}

.toast-region {
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  display: grid;
  width: min(390px, calc(100% - 36px));
  gap: 10px;
}

.toast {
  border: 1px solid var(--gray-300);
  border-radius: 15px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  padding: 14px 16px;
  color: var(--gray-900);
  font-weight: 700;
}

.toast-success {
  border-color: #86efac;
  background: var(--green-soft);
  color: var(--green);
}

.toast-error {
  border-color: #fecaca;
  background: var(--red-soft);
  color: var(--red);
}

.admin-topbar {
  margin-bottom: 24px;
}

.create-slot-panel {
  border-color: rgba(249, 115, 22, 0.25);
}

.admin-slots-list {
  display: grid;
  gap: 18px;
}

.admin-slot-header {
  align-items: flex-start;
}

.admin-slot-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.response-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 23px 0 14px;
  border-top: 1px solid var(--gray-200);
  padding-top: 18px;
}

.summary-stat {
  border-radius: 999px;
  background: var(--gray-100);
  padding: 7px 11px;
  color: var(--gray-700);
  font-size: 0.81rem;
}

.interested-stat {
  background: var(--green-soft);
  color: var(--green);
}

.table-wrap {
  overflow-x: auto;
}

.responses-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.responses-table th,
.responses-table td {
  border-bottom: 1px solid var(--gray-200);
  padding: 12px 9px;
  text-align: left;
  white-space: nowrap;
}

.responses-table th {
  color: var(--gray-500);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.answer-chip.interested {
  background: var(--green-soft);
  color: var(--green);
}

.answer-chip.unavailable {
  background: var(--red-soft);
  color: var(--red);
}

.assigned-label {
  background: var(--green-soft);
  color: var(--green);
}

.configuration-panel code {
  border-radius: 7px;
  background: var(--gray-100);
  padding: 2px 6px;
  font-size: 0.88em;
}

.configuration-panel li {
  margin: 10px 0;
}

.error-text,
.error-panel {
  color: var(--red);
}

@media (max-width: 720px) {
  .app-header {
    padding-inline: 12px;
  }

  .header-actions {
    gap: 10px;
  }

  .header-link {
    font-size: 0.78rem;
  }

  .admin-header-link {
    display: none;
  }

  .main-shell,
  .main-shell.narrow,
  .admin-shell {
    width: min(100% - 20px, 100%);
    padding-top: 22px;
  }

  .brand strong {
    font-size: 0.88rem;
  }

  .brand small {
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .welcome-row,
  .admin-topbar,
  .section-heading,
  .install-panel,
  .admin-slot-header {
    align-items: stretch;
    flex-direction: column;
  }

  .status-pill {
    width: fit-content;
  }

  .install-panel button,
  .admin-topbar button,
  .section-heading button {
    width: 100%;
  }

  .answer-buttons {
    grid-template-columns: 1fr;
  }

  .slot-card {
    padding: 20px;
  }

  .admin-slot-actions {
    justify-content: stretch;
  }

  .admin-slot-actions button {
    flex: 1 1 150px;
  }

  .responses-table {
    min-width: 730px;
  }

  .guide-hero {
    grid-template-columns: 1fr;
  }

  .guide-phone-art {
    display: none;
  }

  .guide-device-panel,
  .guide-ready-card {
    align-items: stretch;
    flex-direction: column;
  }

  .device-switch {
    width: 100%;
  }

  .guide-cta {
    text-align: center;
  }

  .gesture-demo {
    display: none;
  }
}

@media (max-width: 420px) {
  .guide-header-link {
    max-width: 95px;
    text-align: right;
  }

  .guide-steps li {
    grid-template-columns: 34px 1fr;
    gap: 12px;
    padding: 16px;
  }

  .guide-step-number {
    width: 34px;
    height: 34px;
  }
}

/* Expérience V8 — pilotage, élèves et récupération */
.dashboard-tabs,
.registration-tabs,
.slot-view-switch {
  display: flex;
  gap: 7px;
  margin: 22px 0;
  border-radius: 17px;
  background: var(--gray-100);
  padding: 6px;
}

.dashboard-tab,
.registration-tabs button,
.slot-view-switch button {
  flex: 1;
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--gray-700);
  padding: 9px 14px;
  font-weight: 850;
}

.dashboard-tab.active,
.registration-tabs button.active,
.slot-view-switch button.active {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  color: var(--orange-dark);
}

.slot-view-switch {
  width: min(440px, 100%);
}

.slot-view-switch span {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  margin-left: 5px;
  place-items: center;
  border-radius: 999px;
  background: var(--orange-soft);
  font-size: 0.75rem;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
}

.stat-card {
  display: grid;
  gap: 3px;
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  padding: 18px;
}

.stat-card span {
  font-size: 1.8rem;
  font-weight: 950;
}

.stat-card small {
  color: var(--gray-500);
  font-weight: 700;
}

.stat-card.orange {
  border-color: #fed7aa;
  background: var(--orange-soft);
}

.stat-card.green {
  border-color: #bbf7d0;
  background: var(--green-soft);
}

.quick-templates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.quick-templates button {
  min-height: 38px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: var(--orange-soft);
  color: var(--orange-dark);
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 800;
}

.inline-select {
  display: inline-block;
  width: auto;
  min-width: 130px;
  margin-left: 4px;
  padding: 7px 9px;
}

.priority-slot {
  border-left: 5px solid var(--orange);
}

.delivery-line,
.assigned-to {
  margin: 13px 0 0;
  color: var(--gray-500);
  font-size: 0.8rem;
}

.response-cards {
  display: grid;
  gap: 9px;
}

.response-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--gray-200);
  border-radius: 15px;
  background: var(--white);
  padding: 12px;
}

.response-card.interested {
  border-color: #bbf7d0;
  background: linear-gradient(90deg, var(--green-soft), var(--white) 45%);
}

.response-rank {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 0.82rem;
  font-weight: 900;
}

.response-card.interested .response-rank {
  background: var(--green);
  color: var(--white);
}

.response-person {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 9px;
}

.response-person strong {
  min-width: 140px;
}

.response-person small {
  width: 100%;
  color: var(--gray-500);
}

.response-actions,
.push-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.call-button,
.call-support-button,
.link-button {
  display: inline-flex;
  min-height: 39px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gray-300);
  border-radius: 12px;
  background: var(--white);
  padding: 8px 12px;
  color: var(--black);
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
}

.call-support-button {
  width: 100%;
  min-height: 50px;
  border-color: #bbf7d0;
  background: var(--green-soft);
  color: var(--green);
}

.undo-toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pilotage-grid,
.student-support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.compact-form,
.admin-invite-create {
  margin-top: 18px;
}

.admin-invite-create summary {
  cursor: pointer;
  color: var(--orange-dark);
  font-weight: 750;
}

.simple-list {
  display: grid;
  gap: 7px;
  margin-top: 22px;
  border-top: 1px solid var(--gray-200);
  padding-top: 16px;
}

.health-state {
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 16px;
  padding: 18px;
}

.health-state > span {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  font-size: 1.4rem;
  font-weight: 900;
}

.health-state p {
  margin: 3px 0 0;
  line-height: 1.45;
}

.health-state.healthy {
  background: var(--green-soft);
  color: var(--green);
}

.health-state.healthy > span {
  background: var(--green);
}

.health-state.warning {
  background: var(--yellow-soft);
  color: #92400e;
}

.health-state.warning > span {
  background: #d97706;
}

.audit-panel {
  margin-top: 18px;
}

.audit-list {
  display: grid;
  gap: 0;
}

.audit-entry {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  border-bottom: 1px solid var(--gray-200);
  padding: 11px 0;
}

.audit-entry small {
  display: block;
  margin-top: 3px;
  color: var(--gray-500);
}

.audit-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--orange);
}

.student-search {
  display: grid;
  gap: 6px;
  margin-bottom: 17px;
  font-size: 0.86rem;
  font-weight: 800;
}

.students-list {
  display: grid;
  gap: 9px;
}

.student-card {
  display: grid;
  grid-template-columns: 48px minmax(190px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  padding: 12px;
}

.student-card.inactive {
  opacity: 0.65;
  background: var(--gray-100);
}

.student-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  background: var(--orange);
  color: var(--white);
  font-weight: 900;
}

.student-identity {
  display: grid;
  gap: 2px;
}

.student-identity a {
  color: var(--gray-700);
  text-decoration: none;
}

.student-identity small {
  color: var(--gray-500);
}

.student-badges,
.student-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.warning-badge,
.success-badge,
.neutral-badge,
.duration-badge,
.countdown {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.72rem;
  font-weight: 850;
}

.warning-badge {
  background: var(--yellow-soft);
  color: #92400e;
}

.success-badge {
  background: var(--green-soft);
  color: var(--green);
}

.neutral-badge {
  background: var(--gray-100);
  color: var(--gray-500);
}

.registration-panel {
  margin-bottom: 16px;
}

.registration-tabs {
  margin-top: 0;
}

.qr-panel {
  display: flex;
  align-items: center;
  gap: 18px;
}

.qr-panel img {
  width: 112px;
  height: 112px;
  border-radius: 13px;
  background: var(--white);
}

.qr-panel p {
  margin: 5px 0 0;
  color: var(--gray-500);
  line-height: 1.45;
}

.recovery-code-card {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
  border-color: #fde68a;
  background: var(--yellow-soft);
}

.recovery-code-card h2 {
  margin: 5px 0;
}

.recovery-code-card p {
  margin: 0;
  color: #78350f;
}

.recovery-code-value {
  border: 2px dashed #d97706;
  border-radius: 13px;
  background: var(--white);
  padding: 13px;
  color: #92400e;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.countdown {
  margin-left: auto;
  background: var(--gray-100);
  color: var(--gray-700);
}

.countdown.urgent {
  background: var(--red-soft);
  color: var(--red);
}

.duration-badge {
  margin-top: 10px;
  background: var(--orange-soft);
  color: var(--orange-dark);
}

.celebration-card {
  position: relative;
  overflow: hidden;
}

.celebration-card::after {
  position: absolute;
  top: -22px;
  right: -18px;
  content: "🎉";
  font-size: 5rem;
  opacity: 0.13;
  transform: rotate(12deg);
}

.history-panel {
  margin-top: 30px;
}

.history-list {
  display: grid;
  gap: 8px;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 12px 14px;
}

.history-item small {
  display: block;
  margin-top: 3px;
  color: var(--gray-500);
}

.history-item > span {
  border-radius: 999px;
  background: var(--gray-100);
  padding: 5px 9px;
  font-size: 0.75rem;
  font-weight: 800;
}

.history-item.won {
  border-color: #86efac;
  background: var(--green-soft);
}

.history-item.won > span {
  background: var(--green);
  color: var(--white);
}

.student-support-grid {
  margin-top: 18px;
}

.student-support-grid .help-panel {
  margin-top: 0;
}

.privacy-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-block: 18px;
}

@media (max-width: 850px) {
  .admin-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .student-card {
    grid-template-columns: 48px 1fr;
  }

  .student-badges,
  .student-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .recovery-code-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .dashboard-tabs {
    position: sticky;
    z-index: 12;
    top: 75px;
  }

  .dashboard-tab {
    padding-inline: 7px;
    font-size: 0.82rem;
  }

  .pilotage-grid,
  .student-support-grid {
    grid-template-columns: 1fr;
  }

  .response-card {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .response-actions {
    grid-column: 1 / -1;
  }

  .response-actions > * {
    flex: 1;
  }

  .admin-slot-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-slot-actions button {
    width: 100%;
  }

  .qr-panel {
    align-items: flex-start;
  }

  .home-qr img {
    width: 94px;
    height: 94px;
  }

  .push-actions {
    width: 100%;
  }

  .push-actions button {
    flex: 1;
  }

  .undo-toast {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .admin-stats {
    gap: 8px;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-card span {
    font-size: 1.45rem;
  }

  .quick-templates {
    display: grid;
    grid-template-columns: 1fr;
  }

  .slot-view-switch {
    position: sticky;
    z-index: 10;
    top: 134px;
  }

  .student-card {
    grid-template-columns: 42px 1fr;
    padding: 10px;
  }

  .student-avatar {
    width: 40px;
    height: 40px;
  }

  .student-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .response-person strong {
    min-width: 100%;
  }

  .countdown {
    width: 100%;
    margin-left: 0;
  }

  .qr-panel {
    flex-direction: column;
  }

  .qr-panel img {
    width: 132px;
    height: 132px;
  }
}
