@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");

/* Base layout */

:root {
  --font-main: "Space Grotesk", "Codec Pro", "SF Pro Text", "Segoe UI", sans-serif;
}

@font-face {
  font-family: "Codec Pro";
  src: local("Codec Pro"), local("CodecPro");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #0b0f14;
  --bg-alt: #141821;
  --card-bg: rgba(18, 21, 28, 0.92);
  --card-border: rgba(255, 255, 255, 0.08);
  --accent: #c9f64a;
  --accent-soft: rgba(201, 246, 74, 0.18);
  --accent-secondary: #b3e93f;
  --text: #f4f6f8;
  --muted: #98a1ad;
  --error: #ff6b6b;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow-soft: 0 22px 50px rgba(0, 0, 0, 0.6);
  --card-pad-main: 1rem 1.2rem;
  --card-pad-nested: 1rem;
  --card-pad-sub: 0.85rem;
  --card-gap-main: 1.25rem;
  --card-gap-nested: 0.85rem;

  /* Global background + filter (design spec) */
  --pattern-bg: url("/images/grappleIQbackground.png");
  --page-filter: rgba(201, 246, 74, 0.6);
  --page-surface: rgba(12, 15, 20, 0.7);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font-main);
  color: var(--text);
  background-color: #ffffff;
  background-image: var(--pattern-bg);
  background-repeat: repeat;
  background-size: 420px auto;
  position: relative;
}

@media (min-width: 901px) {
  .app-shell {
    display: none;
  }

  body::after {
    content: "This experience is mobile-only. Please use a phone.";
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 2rem;
    color: var(--text);
    background: rgba(5, 8, 22, 0.9);
    z-index: 2;
  }
}

/* Ensure coach dashboard inherits the global landing background/filter */
body[data-page="coach-home"],
body[data-page="coach-auth"] {
  background-color: var(--bg);
  background-image: var(--pattern-bg);
  background-repeat: repeat;
  background-size: 420px auto;
}

/* App shell */

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 1.1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(20px);
  background: linear-gradient(180deg, rgba(16, 19, 26, 0.95), rgba(11, 14, 18, 0.88));
  border-bottom: 1px solid rgba(201, 246, 74, 0.12);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  transition: padding 0.18s ease, background-color 0.18s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  justify-content: center;
  text-align: center;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.upload-box {
  border: 1px dashed rgba(201, 246, 74, 0.35);
  border-radius: var(--radius-md);
  padding: 1rem;
  background: rgba(16, 19, 26, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: pointer;
}

.upload-box input[type="file"] {
  opacity: 0;
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.upload-box {
  position: relative;
  overflow: hidden;
}

.upload-text {
  pointer-events: none;
}

.profile-preview {
  margin-top: 0.6rem;
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.35);
  display: block;
}

.app-header h1 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  font-weight: 600;
}

.subtitle {
  margin: 0.1rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  justify-content: center;
  max-height: 120px;
  opacity: 1;
  transform: translateY(0);
  overflow: hidden;
  transition: max-height 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}


.nav-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  border: 2px solid #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.top-nav .btn.icon-stack {
  position: relative;
}

.app-header.is-collapsed {
  padding-top: 0.7rem;
  padding-bottom: 0.65rem;
}

.app-header.is-collapsed .subtitle {
  display: none;
}

.app-header.is-collapsed .top-nav {
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.app-main {
  flex: 1;
  padding: 1.5rem;
  max-width: 1200px;
  margin: 1.25rem auto;
  width: calc(100% - 2rem);
  background: var(--page-surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 26px;
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(18px);
}

.app-footer {
  padding: 0.9rem 1.5rem 1.4rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

@media (prefers-reduced-motion: reduce) {
  .app-header,
  .top-nav {
    transition: none;
  }
}

/* Views */

.view {
  display: none;
}

.view.active {
  display: block;
}

.app-main > .card + .card,
.app-main > .view > .card + .card {
  margin-top: var(--card-gap-main);
}

/* Card & layout utilities */

.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: var(--card-pad-main);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.card .card {
  padding: var(--card-pad-nested);
}

.card .card .card {
  padding: var(--card-pad-sub);
}

.card .card :is(
  .radar-panel,
  .skill-form-panel,
  .profile-form,
  .auth-block,
  .tech-edit-form-card,
  .coach-card,
  .student-widget,
  .role-card,
  .alert-card
) {
  padding: var(--card-pad-sub);
}

.tech-edit-form-card {
  padding: var(--card-pad-nested);
  border-radius: var(--radius-lg);
  background: rgba(18, 22, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.tech-section-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 1.1rem 0 0.45rem;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tech-section-title span:last-child {
  white-space: nowrap;
}

.tech-section-line {
  height: 2px;
  width: 100%;
  background: var(--muted);
  border-radius: 999px;
}

.tech-edit-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.dash-actions.compact {
  gap: 0.5rem;
}

.tech-search {
  margin: 0.75rem 0 1rem;
  position: relative;
}

.tech-search-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: rgba(18, 22, 30, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.tech-search-input .icon {
  width: 18px;
  height: 18px;
  stroke: var(--muted);
  opacity: 0.85;
}

.tech-search-input:focus-within {
  border-color: rgba(201, 246, 74, 0.65);
  box-shadow: 0 0 0 1px rgba(201, 246, 74, 0.35);
}

.tech-search-input input {
  border: 0;
  background: transparent;
  color: var(--text);
  width: 100%;
  font-size: 0.95rem;
  outline: none;
}

.coach-search .tech-search-input input {
  box-shadow: none;
}

.coach-search .tech-search-input input:focus {
  box-shadow: none;
}

.tech-search-results {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: rgba(16, 19, 26, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 0.85rem 0.75rem 0.6rem;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.4);
  z-index: 10;
}

.tech-search-close {
  position: absolute;
  top: 0.45rem;
  right: 0.55rem;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(18, 22, 30, 0.75);
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tech-search-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 240px;
  overflow-y: auto;
}

.tech-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(17, 20, 26, 0.9);
  color: var(--text);
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
}

.tech-search-item:hover {
  border-color: rgba(201, 246, 74, 0.6);
  box-shadow: 0 0 0 2px rgba(201, 246, 74, 0.15);
}

.tech-search-item span {
  font-size: 0.78rem;
  color: rgba(152, 161, 173, 0.85);
}

.tech-search-empty {
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  background: rgba(17, 20, 26, 0.8);
  color: rgba(152, 161, 173, 0.9);
  font-size: 0.9rem;
}

.add-attribute-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: -0.35rem 0 0.75rem;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.add-attribute-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
}

.add-attribute-row:hover .add-attribute-icon {
  border-color: rgba(201, 246, 74, 0.8);
  box-shadow: 0 0 0 2px rgba(201, 246, 74, 0.15);
}

.attribute-modal input {
  width: 100%;
}

/* Normalize container surfaces to the shared card styling */
.landing-card,
.role-card,
.profile-hero,
.profile-mobile-shell,
.profile-topline,
.profile-form-shell,
.dash-header,
.radar-panel,
.auth-block {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

body[data-page="student-home"] .dash-header,
body[data-page="student-auth"] .dash-header {
  background: none;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

body[data-page="tech-edit"] .dash-header,
body[data-page="coach-tech-edit"] .dash-header {
  background: none;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.card-title-row h3 {
  margin: 0;
}

.tight-title {
  margin-top: 0;
  margin-bottom: 0.2rem;
}

.tight-sub {
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.card-actions {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.stack-card {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap-nested);
}

body[data-page="coach-home"] .coach-home-shell {
  display: flex;
  flex-direction: column;
  gap: var(--card-pad-main);
}

.approval-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  background: rgba(18, 22, 30, 0.9);
}

.approval-card .approval-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.badge-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-weight: 700;
  border: 2px solid rgba(255, 255, 255, 0.08);
}

.admin-nav {
  display: flex;
  gap: 1.8rem;
  margin: 0 auto 1.25rem;
  padding: 0.3rem 0 1.9rem;
  justify-content: center;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(18, 22, 30, 0.9);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  transition: border-color 0.15s ease, background-color 0.15s ease,
    transform 0.15s ease;
}

.nav-btn:hover {
  border-color: rgba(201, 246, 74, 0.65);
}

.nav-btn:active {
  transform: translateY(1px);
}

.nav-btn.active {
  border-color: rgba(201, 246, 74, 0.75);
  background: rgba(201, 246, 74, 0.16);
}

.calendar-embed {
  margin-top: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(18, 22, 30, 0.85);
}

.calendar-embed iframe {
  width: 100%;
  min-height: 480px;
  border: 0;
  display: block;
}

.calendar-embed.dynamic {
  display: grid;
  place-items: stretch;
  min-height: 320px;
}

.calendar-embed.dynamic.hidden {
  display: none;
}

.calendar-embed.dynamic iframe {
  min-height: 420px;
}

.hero-card {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.5fr);
}

.hero-card.student-hero {
  position: relative;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
  align-items: start;
  overflow: hidden;
}

.hero-card.student-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(5, 8, 22, 0.7) 30%, rgba(5, 8, 22, 0.15) 60%),
    url("images/logIn.jpg") center/cover no-repeat;
  filter: saturate(1.1);
  z-index: 0;
}

.hero-card.student-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 8, 22, 0.25), rgba(5, 8, 22, 0.6));
  z-index: 1;
}

.hero-card.student-hero > * {
  position: relative;
  z-index: 2;
}

.hero-text h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.7rem;
}

.hero-list {
  margin: 0.8rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-auth {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--card-gap-nested);
}

.role-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: var(--card-pad-nested);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.role-card.student {
  border-color: rgba(201, 246, 74, 0.35);
}

.role-card.coach {
  border-color: rgba(201, 246, 74, 0.35);
}

.role-card:hover {
  border-color: rgba(201, 246, 74, 0.75);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.role-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.role-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(201, 246, 74, 0.6);
  background: rgba(201, 246, 74, 0.12);
}

.role-card.coach .role-icon {
  border-color: rgba(201, 246, 74, 0.6);
  background: rgba(201, 246, 74, 0.12);
}

.role-icon .icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

.role-card__body h3 {
  margin: 0 0 0.25rem;
}

.role-card__body p {
  margin: 0;
  color: var(--muted);
}

.role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.role-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--accent);
}

.role-card.coach .role-action {
  color: var(--accent);
}

.auth-columns {
  display: grid;
  gap: var(--card-gap-nested);
  grid-template-columns: minmax(0, 1fr);
}

.auth-block {
  background: rgba(18, 22, 30, 0.85);
  border-radius: 16px;
  padding: var(--card-pad-nested);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.auth-block h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
}

.skill-form-panel,
.profile-form,
body[data-page="settings"] .card .section-split {
  background: rgba(18, 22, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: var(--card-pad-nested);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body[data-page="coach-settings"] .card .section-split {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

body[data-page="coach-settings"] .card > .card + .card {
  margin-top: var(--card-gap-nested);
}

body[data-page="settings"] .card h2,
body[data-page="settings"] .card h4 {
  margin-top: 0;
}

body[data-page="skill-edit"] .card h2,
body[data-page="skill-edit"] .card h3,
body[data-page="skill-edit"] .card h4 {
  margin-top: 0;
}

body[data-page="profile"] .card h2,
body[data-page="profile"] .card h3,
body[data-page="profile"] .card h4 {
  margin-top: 0;
}

body[data-page^="coach-"] .card h2,
body[data-page^="coach-"] .card h3,
body[data-page^="coach-"] .card h4 {
  margin-top: 0;
}

body[data-page="students"] .students-widget-header h3 {
  margin-top: 0;
}

body[data-page="students"] .students-widget-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

body[data-page="students"] .student-widget {
  padding: 0.85rem 0.75rem;
  gap: 0.55rem;
}

body[data-page="students"] .student-widget-name {
  font-size: 0.9rem;
}

body[data-page="students"] .student-widget-sub {
  font-size: 0.76rem;
}

body[data-page="students"] #coachTechniqueList .technique-items {
  gap: 0.35rem;
}

body[data-page="students"] #coachTechniqueList .technique-item {
  padding: 0.5rem 0.6rem;
  border-radius: 14px;
  background: rgba(10, 13, 18, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body[data-page="students"] #coachTechniqueList .technique-item .technique-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.6rem;
}

body[data-page="students"] #coachTechniqueList .technique-title strong {
  font-weight: 600;
  font-size: 0.92rem;
}

body[data-page="students"] #coachTechniqueList .pill.subtle {
  font-size: 0.72rem;
}

body[data-page="students"] #coachTechniqueList .technique-actions {
  gap: 0.3rem;
}

body[data-page="students"] #coachTechniqueList .technique-actions .btn.ghost.small {
  width: 32px;
  height: 32px;
}

body[data-page="students"] #coachTechniqueList .technique-actions .btn.ghost.small .icon {
  width: 14px;
  height: 14px;
}

body[data-page="skill-edit"] #techniqueList .technique-items {
  gap: 0.35rem;
}

body[data-page="skill-edit"] #techniqueList .technique-item {
  padding: 0.5rem 0.6rem;
  border-radius: 14px;
  background: rgba(10, 13, 18, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body[data-page="skill-edit"] #techniqueList .technique-item .technique-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.6rem;
}

body[data-page="skill-edit"] #techniqueList .technique-title {
  font-size: 0.92rem;
  font-weight: 600;
}

body[data-page="skill-edit"] #techniqueList .pill.subtle {
  font-size: 0.72rem;
}

body[data-page="skill-edit"] #techniqueList .technique-actions {
  gap: 0.3rem;
}

body[data-page="skill-edit"] #techniqueList .technique-actions .btn.ghost.small {
  width: 32px;
  height: 32px;
}

body[data-page="skill-edit"] #techniqueList .technique-actions .btn.ghost.small .icon {
  width: 14px;
  height: 14px;
}

/* Auth containers — match shared card styling */
body[data-page="student-auth"] #view-auth .hero-card,
body[data-page="coach-auth"] #view-auth .hero-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

body[data-page="student-auth"] #view-auth .auth-block,
body[data-page="coach-auth"] #view-auth .auth-block {
  background: rgba(18, 22, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: none;
}

body[data-page="student-auth"] #view-auth .hero-card.student-hero::before,
body[data-page="student-auth"] #view-auth .hero-card.student-hero::after {
  content: none;
}

/* Grid helpers */

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

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

.approved-grid {
  align-items: start;
}

.approved-grid .simple-list {
  max-height: 520px;
}

.students-widget-wrap {
  margin-bottom: 1.2rem;
}

.students-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.students-widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--card-gap-nested);
}

.student-widget {
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: var(--card-pad-nested);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  width: 100%;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.student-widget:hover {
  border-color: rgba(201, 246, 74, 0.55);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}

.student-widget.is-active {
  border-color: rgba(201, 246, 74, 0.75);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35);
}

.student-widget-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid rgba(201, 246, 74, 0.7);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.student-widget-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.student-widget-name {
  font-weight: 600;
  font-size: 0.92rem;
}

.student-widget-sub {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.2rem;
}

.student-detail {
  margin-top: 1rem;
}

body[data-page="students"] .student-detail {
  margin-top: 0;
}

.student-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.45rem;
}

.student-back-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(12, 16, 24, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.student-back-btn .icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

.student-back-btn:hover {
  border-color: rgba(201, 246, 74, 0.7);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.student-detail-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0.25rem 0 0.45rem;
}

.student-tabs {
  flex-wrap: nowrap;
  justify-content: center;
  margin-bottom: 0.45rem;
}

.student-tabs .radar-tab {
  flex: 0 0 auto;
  text-align: center;
  white-space: nowrap;
  font-size: 0.85rem;
  padding: 0.3rem 0.6rem;
  border-radius: 14px;
}

body[data-page="students"] #toggleCoachAttributeEditBtn {
  border-radius: 999px;
}

body[data-page="students"] .student-detail .technique-list {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}

body[data-page="students"] .student-detail .nested-card {
  padding: var(--card-pad-nested);
}

#coachStudentName {
  margin-bottom: 0.15rem;
}

#coachStudentMeta {
  margin-top: 0;
  margin-bottom: 0;
}

@media (max-width: 520px) {
  .student-tabs {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .student-tabs .radar-tab {
    flex: 0 1 auto;
  }
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}

body[data-page="students"] .dash-header h2 {
  margin-top: 0;
}

body[data-page="coach-home"] .dash-header {
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
}


.dash-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.student-identity {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.student-identity h2 {
  margin: 0;
  line-height: 1.15;
}

.student-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.coach-hero {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.coach-hero h2 {
  margin: 0;
}
.coach-hero .subtitle {
  margin: 0.08rem 0 0 0;
  display: block;
}

.coach-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: var(--card-pad-nested);
  background: rgba(18, 22, 30, 0.85);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.alert-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 8, 12, 0.78);
  backdrop-filter: blur(6px);
  z-index: 9999;
}

.alert-backdrop.hidden {
  display: none;
}

.alert-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: var(--card-pad-nested);
  min-width: 260px;
  text-align: center;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.alert-card h3 {
  margin: 0 0 1rem 0;
  color: var(--text);
}

.alert-text {
  color: var(--muted);
  margin: 0.25rem 0 0.75rem 0;
}

.alert-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}

.alert-actions .btn {
  flex: 1;
  min-width: 120px;
}

.coach-hero .avatar-lg {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

/* Forms */

label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  margin-bottom: 0.7rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 22, 30, 0.9);
  padding: 0.45rem 0.75rem;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    background-color 0.15s ease;
}

textarea {
  border-radius: 14px;
  resize: vertical;
  min-height: 70px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(201, 246, 74, 0.45);
}

input[type="number"] {
  max-width: 80px;
}

/* Buttons */

.oauth-button {
  width: 56px !important;
  height: 56px !important;
  display: flex !important;
  justify-content: center;
  align-items: center;
  margin: 0.4rem auto;
  border-radius: 50%;
}

.oauth-hint {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.15rem;
}

.btn {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  transition: transform 0.08s ease, box-shadow 0.12s ease,
    background-color 0.12s ease, color 0.12s ease;
}

.btn.primary {
  background: linear-gradient(135deg, #d4ff56, #b6f03a);
  color: #101414;
  box-shadow: 0 14px 34px rgba(201, 246, 74, 0.35);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 44px rgba(201, 246, 74, 0.5);
}

.btn.secondary {
  background: rgba(18, 22, 30, 0.95);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.btn.secondary:hover {
  background: rgba(22, 26, 34, 1);
  color: var(--accent);
  border-color: rgba(201, 246, 74, 0.55);
  box-shadow: 0 14px 32px rgba(201, 246, 74, 0.25);
}

.btn.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--muted);
}

.btn.ghost:hover {
  border-color: rgba(201, 246, 74, 0.6);
  color: var(--accent);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.55);
}

.btn.danger {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.6);
  color: #fecaca;
}

.btn.danger:hover {
  background: rgba(239, 68, 68, 0.28);
  box-shadow: 0 12px 26px rgba(239, 68, 68, 0.35);
}

.btn.full {
  width: 100%;
}

.btn.small {
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
}

.btn.icon-only {
  padding: 0.35rem;
  width: 2.6rem;
  height: 2.6rem;
}

.icon-stack {
  position: relative;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.btn .icon {
  width: 1.1rem;
  height: 1.1rem;
  stroke: var(--muted);
  fill: none;
  stroke-width: 1.6;
}

.btn .icon * {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn:hover .icon,
.btn:focus-visible .icon,
.btn:active .icon {
  stroke: var(--accent);
}

.icon-label {
  position: absolute;
  bottom: -1.1rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.1;
  white-space: nowrap;
}


.btn:active {
  transform: translateY(1px);
  box-shadow: none;
}

/* Skill layout */

.skill-form-panel .skills-grid label input {
  width: 100%;
}

.skill-form-panel textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 22, 30, 0.9);
  color: var(--text);
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  resize: vertical;
  min-height: 120px;
}

.form-actions {
  margin-top: 1rem;
}

.technique-list {
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
}

.attribute-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.attribute-header-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.attribute-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

body[data-page="skill-edit"] .skills-technique-list {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

.attribute-edit-mode .tech-accordion {
  position: relative;
  padding-left: 2.4rem;
}

.attr-delete-btn {
  position: absolute;
  left: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 2px solid #ffffff;
  background: #ef4444;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
}

.attr-delete-btn .icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}

.attribute-edit-mode .attr-delete-btn {
  opacity: 1;
  pointer-events: auto;
}
.tech-accordion-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tech-accordion {
  list-style: none;
  margin: 0 0 0.75rem 0;
  padding: 0.6rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  background: rgba(17, 20, 26, 0.85);
  transition: border-color 0.15s ease, background-color 0.2s ease;
}

.tech-accordion.open {
  border-color: rgba(201, 246, 74, 0.55);
  background: rgba(17, 20, 26, 0.95);
}

.tech-accordion__header {
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0;
}

.tech-accordion__title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}

.tech-accordion__title .count {
  color: var(--muted);
  font-size: 0.78rem;
}

.tech-accordion .chevron {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.tech-accordion.open .chevron {
  transform: rotate(-135deg);
  border-right-color: var(--accent);
  border-bottom-color: var(--accent);
}

.tech-accordion__body {
  margin-top: 0.65rem;
  display: none;
}

.tech-accordion.open .tech-accordion__body {
  display: block;
}

.technique-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.technique-item .technique-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.technique-title {
  word-break: break-word;
  flex: 1 1 0;
}

.technique-item .technique-actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
  align-items: center;
}

.proficiency-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.35rem;
  min-width: 42px;
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(201, 246, 74, 0.12);
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.1;
}

.proficiency-toggle input {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}

.proficiency-toggle.inline-toggle {
  flex-direction: row;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
}

.revision-toggle {
  background: rgba(201, 246, 74, 0.16);
}

.technique-actions .btn.ghost.small {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.technique-actions .btn.ghost.small .icon {
  width: 16px;
  height: 16px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 12, 0.78);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 50;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.55);
  width: min(500px, 100%);
  padding: 1.1rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.modal-header h4 {
  margin: 0;
}

.modal-body label {
  margin-bottom: 0.8rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

.modal-crop {
  width: min(620px, 100%);
}

.profile-cropper {
  width: 100%;
  height: 320px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(18, 22, 30, 0.65);
}

.profile-cropper img {
  width: 100%;
  max-width: 100%;
  display: block;
}

/* Misc */

.hint {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.hint.small {
  font-size: 0.78rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  background: rgba(18, 22, 30, 0.9);
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.message {
  margin-top: 0.7rem;
  min-height: 1.2rem;
  font-size: 0.86rem;
}

.message.error {
  color: var(--error);
}

.message.success {
  color: var(--accent);
}

.inline-link {
  color: var(--accent);
  text-decoration: none;
}

.inline-link:hover {
  text-decoration: underline;
}

.simple-list {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  max-height: 290px;
  overflow-y: auto;
}

.simple-list li {
  padding: 0.4rem 0.45rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 22, 30, 0.9);
  margin-bottom: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.simple-list li .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.simple-list li .row .tag {
  margin-left: auto;
}

.simple-list li .row.actions {
  align-items: center;
  gap: 0.5rem;
}

.simple-list li .label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.simple-list li .value {
  font-size: 0.9rem;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--muted);
}

.tag.pending {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.tag.approved {
  border-color: var(--accent);
  color: var(--accent);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.78rem;
  color: var(--text);
  background: rgba(18, 22, 30, 0.9);
}

.pill.subtle {
  color: var(--muted);
}

.mt {
  margin-top: 1rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 0.9rem;
}

.radar-section {
  margin-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.4rem;
}

.radar-comparison {
  display: grid;
  gap: var(--card-gap-nested);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
}

.radar-tabs {
  display: inline-flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.radar-tab {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(18, 22, 30, 0.9);
  color: var(--muted);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.radar-tab.is-active {
  background: rgba(201, 246, 74, 0.16);
  border-color: rgba(201, 246, 74, 0.65);
  color: var(--text);
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.radar-panel {
  border-radius: var(--radius-lg);
  padding: var(--card-pad-nested);
  background: rgba(18, 22, 30, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

#liveSkillsSection h3 {
  margin-top: 0;
  margin-bottom: 0.35rem;
}

#liveSkillsSection .radar-section {
  margin-top: 0.5rem;
  padding-top: 0.9rem;
}

.radar-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  text-align: center;
}

.radar-title {
  margin: 0;
}

.radar-chart {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1;
  padding-top: 0px; /* extra headroom for badges */
}

.radar-chart svg {
  width: 100%;
  height: 100%;
}

.radar-chart .grid polygon {
  fill: none;
  stroke: rgba(148, 163, 184, 0.25);
  stroke-width: 1;
}

.radar-chart .axes line {
  stroke: rgba(148, 163, 184, 0.25);
  stroke-width: 1;
}

.radar-chart .axes text {
  font-size: 10px;
  text-anchor: middle;
  dominant-baseline: middle;
}

/* Prevent revision badges from inheriting axis label size */
.revision-badge text {
  font-size: 6px !important;
  font-weight: 700;
}

.radar-chart .data {
  fill: rgba(201, 246, 74, 0.15);
  stroke: var(--accent);
  stroke-width: 2;
}

.radar-chart .points circle {
  fill: var(--accent);
  stroke: #0f172a;
  stroke-width: 2;
}

.radar-distribution {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  min-height: 38px;
  margin-bottom: 1.25rem;
}

.radar-distribution__legend {
  margin: 0.5rem 0 1rem;
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
  background: transparent;
}

.radar-distribution__segment {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.6rem;
  font-weight: 700;
  font-size: 0.64rem;
  color: #0f172a;
  white-space: nowrap;
}

.radar-distribution__empty {
  width: 100%;
  text-align: center;
  padding: 0.4rem 0.6rem;
  color: var(--muted);
  font-weight: 600;
}

/* Revision inputs */
.revision-row {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.revision-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.revision-time-group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.revision-time-group select,
.revision-inputs select {
  min-width: 110px;
}

.revision-time-value {
  width: 80px;
}

.section-split {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1rem;
  margin-top: 1rem;
}

body[data-page="coach-settings"] .section-split {
  border-top: 0;
  margin-top: 0.6rem;
  padding-top: 0;
}

.video-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

.video-row-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.video-row-controls .tech-edit-video-input {
  flex: 1;
}

.video-list + .dash-actions {
  margin-top: 0.6rem;
}

.video-comments {
  margin-top: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.video-comments-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.video-comment {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.45rem 0.6rem;
  border-radius: 12px;
  background: rgba(18, 22, 30, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.92rem;
}

.video-comment strong {
  font-size: 0.85rem;
  color: var(--muted);
}

.video-comment-controls {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.video-comment-input {
  min-height: 64px;
  resize: vertical;
}

.feedback-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.feedback-item {
  background: rgba(18, 22, 30, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.feedback-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.feedback-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.feedback-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.feedback-date {
  font-size: 0.8rem;
  color: var(--muted);
}

.feedback-message {
  margin: 0;
  color: var(--text);
}

.feedback-replies {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.feedback-reply {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.45rem 0.6rem;
  border-radius: 12px;
  background: rgba(18, 22, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.9rem;
}

.feedback-reply strong {
  font-size: 0.8rem;
  color: var(--muted);
}

.feedback-admin-controls {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.feedback-reply-input {
  min-height: 64px;
  resize: vertical;
}

.video-preview iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: var(--radius-md);
  margin-top: 0.5rem;
  display: block;
}

#skillRadarLive .data {
  fill: rgba(201, 246, 74, 0.12);
  stroke: rgba(201, 246, 74, 0.85);
}

#skillRadarLive .points circle {
  fill: rgba(201, 246, 74, 0.85);
}

/* Visibility helpers */

.hidden {
  display: none !important;
}

.mobile-skill-divider {
  display: none;
}

/* Hide mobile divider on student page (unwanted line) */
body[data-page="student-home"] .mobile-skill-divider {
  display: none !important;
}


/* Responsive */

@media (max-width: 960px) {
  .hero-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-card.student-hero {
    min-height: auto;
  }

  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-main {
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  .app-header {
    flex-wrap: wrap;
    gap: 0.6rem;
  }

  body[data-page="student-home"] .brand .subtitle,
  body[data-page="student-auth"] .brand .subtitle {
    display: none;
  }

  .top-nav {
    width: 100%;
    justify-content: center;
    gap: 1.4rem;
  }

  .dash-header,
  .dash-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .card {
    padding: 1rem;
  }

  .hero-card.student-hero {
    min-height: auto;
    padding: 1rem;
  }

  .hero-card.student-hero::before {
    background:
      linear-gradient(145deg, rgba(8, 10, 14, 0.85), rgba(8, 10, 14, 0.35)),
      url("images/logIn.jpg") center/cover no-repeat;
  }

  .auth-block {
    background: rgba(18, 22, 30, 0.85);
  }

  .admin-nav {
    overflow-x: auto;
    padding-bottom: 1.8rem;
    justify-content: center;
    gap: 1.4rem;
  }

  .nav-btn {
    white-space: nowrap;
    padding: 0.5rem 0.85rem;
  }

  .calendar-embed iframe {
    min-height: 360px;
  }

  .mobile-skill-divider {
    display: block;
    height: 2px;
    margin: 1.2rem 0;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
    border-radius: 999px;
  }

  /* Center and narrow skill form controls on mobile */
  #skillsForm {
    max-width: 360px;
    margin: 0 auto;
  }

  #skillsForm label {
    align-items: flex-start;
    text-align: left;
  }

  #skillsForm label input,
  #skillsForm label select,
  #skillsForm textarea {
    width: 100%;
  }

  #skillsForm .form-actions {
    align-items: center;
    justify-content: center;
  }

  #skillsForm .form-actions .btn {
    width: 100%;
    max-width: 100%;
    align-self: stretch;
  }

  /* Center and narrow profile form controls on mobile */
  .profile-form {
    max-width: 360px;
    margin: 0 auto;
  }

  .profile-form .upload-box {
    width: 80px;
    height: 24px;
    padding: 0.2rem 0.4rem;
    margin: 0 auto;
    align-self: center;
    border-radius: 10px;
  }

  .profile-form .profile-preview {
    margin: 0.6rem auto 0;
    align-self: center;
  }

  .profile-form .grid-2 {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
    justify-items: center;
  }

  .profile-form .profile-top-row {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
  }

  .profile-form .profile-name-stack {
    width: 100%;
  }

  body[data-page="profile"] .dash-header {
    align-items: center;
    text-align: center;
  }

  .profile-form label {
    width: 100%;
    align-items: center;
    text-align: center;
  }

  .profile-form input,
  .profile-form select {
    width: 100%;
  }

  .profile-form input:not([type="file"]),
  .profile-form select {
    width: 60%;
    max-width: 60%;
    margin-left: auto;
    margin-right: auto;
  }

  .profile-form .btn#saveProfileBtn {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .profile-cropper {
    height: 260px;
  }
}

@media (max-width: 640px) {
  .auth-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .dash-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  input[type="number"] {
    max-width: 100%;
  }

  .brand-logo {
    width: 32px;
    height: 32px;
  }

  .app-main {
    padding: 0.8rem;
  }

  .card {
    padding: 0.85rem 0.9rem;
  }

  .radar-section {
    margin-top: 0.6rem;
    padding-top: 0.9rem;
  }

  .radar-distribution {
    min-height: 30px;
    margin-bottom: 0.45rem;
    border-width: 2px;
  }

  .radar-distribution__legend {
    margin: 0.2rem 0 0.5rem;
  }

  .dash-header {
    margin-bottom: 0.75rem;
  }
}

@media (max-width: 768px) {
  .hero-card.student-hero {
    grid-template-columns: minmax(0, 1fr);
    align-items: flex-start;
    padding: 1rem;
  }

  .hero-card.student-hero::before {
    background:
      linear-gradient(160deg, rgba(5, 8, 22, 0.85), rgba(5, 8, 22, 0.45)),
      url("images/logIn.jpg") center/cover no-repeat;
  }

  .hero-text,
  .hero-auth {
    width: 100%;
  }

  .auth-columns {
    width: 100%;
  }

  .auth-block {
    width: 100%;
  }

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

  .coach-hero {
    flex-direction: row;
  }

.coach-hero .avatar-lg {
  width: 46px;
  height: 46px;
}
}

/* Coach list */
.coach-list-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
}

.coach-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.coach-list-header {
  text-align: center;
  margin-bottom: 1rem;
}

.coach-card-compact {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  padding: 1rem 3.5rem 1rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  align-items: center;
  position: relative;
}

.coach-card-compact .avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.coach-card-compact .coach-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.coach-card-compact .coach-name {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.coach-card-compact .coach-subtext {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.coach-card-compact .coach-highlight {
  margin: 0.25rem 0 0;
  width: 88px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #d4ff56, #a8e835);
}

.coach-card-compact .coach-add-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: linear-gradient(145deg, #d4ff56, #b6f03a);
  color: #0f1410;
  font-size: 1.35rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  transition: transform 120ms ease, box-shadow 120ms ease;
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
}

.coach-card-compact .coach-add-btn:hover {
  transform: translateY(-50%) translateY(-1px) scale(1.02);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45);
}

.coach-card-compact .coach-add-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: translateY(-50%);
}

body[data-page="coach-profile"] .profile-hero,
body[data-page="profile"] .profile-hero {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  margin: -0.4rem -0.4rem 0.75rem;
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

body[data-page="coach-profile"] .profile-hero h2,
body[data-page="profile"] .profile-hero h2 {
  margin: 0.1rem 0;
}

body[data-page="coach-profile"] .profile-hero__chips,
body[data-page="profile"] .profile-hero__chips {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  align-items: center;
}

.pill.soft {
  background: rgba(18, 22, 30, 0.85);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

body[data-page="coach-profile"] .profile-mobile-shell,
body[data-page="profile"] .profile-mobile-shell {
  position: relative;
  z-index: 1;
  margin-top: 0.4rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

body[data-page="coach-profile"] .profile-topline,
body[data-page="profile"] .profile-topline {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.65rem;
  margin-bottom: 0.6rem;
  border-radius: 12px;
  background: rgba(18, 22, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(201, 246, 74, 0.55);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.45);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(74, 222, 128, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
  }
}

body[data-page="coach-profile"] .profile-form,
body[data-page="profile"] .profile-form {
  max-width: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}



body[data-page="coach-profile"] .profile-form .profile-top-row,
body[data-page="profile"] .profile-form .profile-top-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

body[data-page="coach-profile"] .profile-form .profile-name-stack,
body[data-page="profile"] .profile-form .profile-name-stack {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

body[data-page="coach-profile"] .profile-form label,
body[data-page="profile"] .profile-form label {
  width: 100%;
  text-align: left;
  align-items: flex-start;
  gap: 0.35rem;
}

body[data-page="coach-profile"] .profile-form .upload-box,
body[data-page="profile"] .profile-form .upload-box {
  width: 80px;
  height: 24px;
  border-radius: 10px;
  background: rgba(18, 22, 30, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
}

body[data-page="coach-profile"] .profile-form .upload-text,
body[data-page="profile"] .profile-form .upload-text {
  font-size: 0.7rem;
  letter-spacing: 0.01em;
}

body[data-page="coach-profile"] .profile-form .profile-preview,
body[data-page="profile"] .profile-form .profile-preview {
  width: 96px;
  height: 96px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

body[data-page="coach-profile"] .profile-form .photo-upload,
body[data-page="profile"] .profile-form .photo-upload {
  align-items: center;
  text-align: center;
}

body[data-page="coach-profile"] .profile-form .photo-upload .profile-preview,
body[data-page="profile"] .profile-form .photo-upload .profile-preview {
  order: 1;
  margin-top: 0.4rem;
}

body[data-page="coach-profile"] .profile-form .photo-upload .upload-box,
body[data-page="profile"] .profile-form .photo-upload .upload-box {
  order: 2;
  margin-top: 0.4rem;
}

body[data-page="coach-profile"] .profile-form .grid-2,
body[data-page="profile"] .profile-form .grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
}

body[data-page="coach-profile"] .profile-form input,
body[data-page="coach-profile"] .profile-form select,
body[data-page="profile"] .profile-form input,
body[data-page="profile"] .profile-form select {
  width: 100%;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f7fbff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body[data-page="coach-profile"] .profile-form input:focus,
body[data-page="coach-profile"] .profile-form select:focus,
body[data-page="profile"] .profile-form input:focus,
body[data-page="profile"] .profile-form select:focus {
  border-color: #5bc8ff;
  box-shadow: 0 0 0 3px rgba(91, 200, 255, 0.2);
}

body[data-page="coach-profile"] .profile-form input:not([type="file"]),
body[data-page="coach-profile"] .profile-form select,
body[data-page="profile"] .profile-form input:not([type="file"]),
body[data-page="profile"] .profile-form select {
  margin: 0;
}

body[data-page="coach-profile"] .profile-form input[type="date"],
body[data-page="profile"] .profile-form input[type="date"] {
  display: block;
  min-width: 0;
  padding: 0.7rem 1rem;
  border-radius: 16px;
  -webkit-appearance: none;
  appearance: none;
  text-align: left;
}

body[data-page="coach-profile"] .profile-form input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
}

body[data-page="coach-profile"] .profile-form-shell,
body[data-page="profile"] .profile-form-shell {
  background: rgba(5, 8, 22, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: var(--card-pad-nested);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.35);
}

body[data-page="coach-profile"] .profile-form .btn#saveProfileBtn,
body[data-page="profile"] .profile-form .btn#saveProfileBtn {
  width: 100%;
  max-width: 100%;
  margin-top: 0.4rem;
  background: linear-gradient(90deg, #d4ff56, #b6f03a);
  color: #0f1410;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.45);
}


@media (max-width: 768px) {
  body[data-page="coach-profile"] .profile-hero,
  body[data-page="profile"] .profile-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 0 0 0.85rem;
  }
}

/* Coach suite — reuse profile glass theme on mobile */
@media (max-width: 900px) {
  body[data-page="coach-home"] .app-main,
  body[data-page="coach-auth"] .app-main,
  body[data-page="students"] .app-main,
  body[data-page="coach-settings"] .app-main,
  body[data-page="admin"] .app-main,
  body[data-page="approvals"] .app-main {
    padding: 1.1rem;
  }

  body[data-page="coach-home"] .card,
  body[data-page="coach-auth"] .card,
  body[data-page="students"] .card,
  body[data-page="coach-settings"] .card,
  body[data-page="admin"] .card,
  body[data-page="approvals"] .card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
  }

body[data-page="coach-home"] .dash-header,
body[data-page="coach-auth"] .dash-header,
body[data-page="students"] .dash-header,
body[data-page="coach-settings"] .dash-header,
body[data-page="admin"] .dash-header,
body[data-page="approvals"] .dash-header {
  margin-bottom: 0.4rem;
  border-radius: var(--radius-lg);
  background: rgba(18, 22, 30, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-soft);
  padding: 1rem 1.1rem;
}

  body[data-page="coach-home"] .grid-2,
  body[data-page="coach-auth"] .grid-2,
  body[data-page="students"] .grid-2,
  body[data-page="admin"] .grid-2,
  body[data-page="approvals"] .grid-2 {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  body[data-page="students"] .radar-panel,
  body[data-page="coach-home"] .radar-panel,
  body[data-page="coach-auth"] .radar-panel,
  body[data-page="admin"] .radar-panel,
  body[data-page="approvals"] .radar-panel {
    background: rgba(18, 22, 30, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  }

  body[data-page="coach-home"] .hero-card,
  body[data-page="coach-auth"] .hero-card,
  body[data-page="coach-home"] .auth-block,
  body[data-page="coach-auth"] .auth-block,
  body[data-page="admin"] .hero-card,
  body[data-page="admin"] .auth-block,
  body[data-page="approvals"] .hero-card,
  body[data-page="approvals"] .auth-block {
    background: rgba(18, 22, 30, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02), 0 15px 45px rgba(0, 0, 0, 0.35);
    border-radius: var(--radius-lg);
  }

  body[data-page="coach-settings"] .pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e9eefc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
}

/* Student surfaces — inherit glass gradient theme on mobile */
@media (max-width: 900px) {
  body[data-page="student-home"] .app-main,
  body[data-page="student-auth"] .app-main,
  body[data-page="skill-edit"] .app-main,
  body[data-page="profile"] .app-main,
  body[data-page="settings"] .app-main {
    padding: 1.1rem;
  }

  body[data-page="student-home"] .card,
  body[data-page="student-auth"] .card,
  body[data-page="skill-edit"] .card,
  body[data-page="profile"] .card,
  body[data-page="settings"] .card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
  }

  body[data-page="student-home"] .dash-header,
  body[data-page="student-auth"] .dash-header {
    margin-bottom: 0.4rem;
  }

  body[data-page="student-home"] .grid-2,
  body[data-page="student-auth"] .grid-2 {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  body[data-page="student-home"] .hero-card,
  body[data-page="student-auth"] .hero-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 15px 45px rgba(0, 0, 0, 0.35);
  }

  body[data-page="student-home"] .auth-block,
  body[data-page="student-auth"] .auth-block {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  body[data-page="skill-edit"] .skill-form-panel,
  body[data-page="profile"] .profile-form,
  body[data-page="settings"] .card .section-split {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: var(--card-pad-nested);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  body[data-page="settings"] .pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e9eefc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
}
