/* GLOBAL RESET + BASE */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

/* LANDING PAGE */
.landing-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top, #FFFFFF0F, transparent 40%),
        #0f1624;
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-hero {
    text-align: center;
    max-width: 520px;
    padding: 2.5rem;
}

.landing-logo {
    width: 220px;
    margin-bottom: 1.6rem;
    filter: drop-shadow(0 10px 30px #00000099);
}

.landing-hero h1 {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
}

.landing-subtext {
    color: #b6c0ce;
    font-size: 1.05rem;
    line-height: 1.5;
    margin-bottom: 2rem;
}

.landing-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Optional outline button */
.btn-outline {
    background: transparent;
    border: 1px solid #2f3d55;
    color: #cfd6e1;
}

.btn-outline:hover {
    background: #FFFFFF0C;
}

.app-logo {
    position: fixed;
    top: 14px;
    left: 16px;
    z-index: 1000;
    pointer-events: none;
}

.app-logo img {
    height: 60px;
    width: auto;
    opacity: 0.95;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #0e1624;
    color: #e6eaf0;
    line-height: 1.45;
}

h1, h2, h3, h4 {
    font-weight: 600;
    margin: 0;
}

p {
    margin: 0.35rem 0;
    opacity: 0.9;
}

/* BUTTONS */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.1rem;
    border-radius: 10px;
    background: #108ff1;
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.1s ease;
}

.btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-logout,
.btn-delete {
    background-color: #b00020;
}

.drawer-logout {
  background: #b00020;
  color: #ffffff;
  text-decoration: none;
  border: none;
}

/* override all anchor states */
.drawer-logout:visited,
.drawer-logout:hover,
.drawer-logout:active,
.drawer-logout:focus {
  color: #ffffff;
  text-decoration: none;
}

/* FLASH ALERTS */

.alert {
    padding: 12px 16px;
    margin: 1rem auto;
    max-width: 650px;
    border-radius: 10px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-success {
    background: #123b2a;
    color: #4ade80;
}

.alert-danger {
    background: #3a1e1e;
    color: #f87171;
}

.alert-warning {
    background: #3a331e;
    color: #facc15;
}

.alert-info {
    background: #1e2e3a;
    color: #38bdf8;
}

.landing-page .flash-wrap {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: min(420px, calc(100% - 32px));
}

.landing-page .flash-wrap .alert {
  margin: 0;
}

/* AUTH / LOGIN / SIGNUP */

body.login-page {
    min-height: 100vh;
    background-image: url('../static/images/BoxCutBackground2.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.auth-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-panel {
    width: 100%;
    max-width: 420px;
    background: rgba(17, 24, 39, 0.95);
    border-radius: 18px;
    padding: 2.5rem 2.25rem;
    box-shadow: 0 40px 80px #00000099;
    text-align: center;
    animation: authFade 0.6s ease forwards;
}

@keyframes authFade {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-logo {
    width: 160px;
    margin-bottom: 1.5rem;
}

.auth-panel h1 {
    font-size: 1.4rem;
}

.auth-subtext {
    font-size: 0.9rem;
    opacity: 0.75;
    margin: 0.5rem 0 2rem;
}

/* Auth inputs */

.auth-form .input-group {
    margin-bottom: 1.1rem;
}

.auth-form input {
    width: 100%;
    padding: 0.8rem 0.9rem;
    border-radius: 12px;
    border: 1px solid #1f2937;
    background: #020617;
    color: #e5e7eb;
    font-size: 0.95rem;
}

.auth-form input::placeholder {
    color: #6b7280;
}

.auth-form input:focus {
    outline: none;
    border-color: #108ff1;
}

/* Auth button */
.auth-submit {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.85rem;
    border-radius: 12px;
    background: #108ff1;
    border: none;
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.auth-submit:hover {
    opacity: 0.9;
}

/* Auth footer */
.auth-footer {
    margin-top: 1.75rem;
    font-size: 0.85rem;
    opacity: 0.85;
}

.auth-footer a {
    color: #93c5fd;
    text-decoration: none;
    margin-left: 0.25rem;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-error {
    margin-top: 1rem;
    color: #f87171;
    font-size: 0.85rem;
}

/* ROLE SELECTION PILLS */

.role-label {
    text-align: left;
    font-size: 0.8rem;
    opacity: 0.75;
    margin-bottom: 0.4rem;
}

.role-toggle {
    display: flex;
    gap: 0.5rem;
}

.role-toggle input {
    display: none;
}

.role-toggle label {
    flex: 1;
    text-align: center;
    padding: 0.55rem 0;
    border-radius: 999px;
    background: #020617;
    border: 1px solid #1f2937;
    color: #aab3c2;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.role-toggle label:hover {
    border-color: #108ff1;
    color: #fff;
}

.role-toggle input:checked + label {
    background: #108ff1;
    border-color: #108ff1;
    color: #fff;
    box-shadow: 0 0 0 3px #0092E13F;
}

/* SAFETY BANNER */
.banner {
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    border: 1.5px solid transparent;
}

.banner-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.35rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* SAFE – green */
.banner-safe {
    background: #4CAF5014;
    border-color: #4CAF50A5;
}

/* MODERATE – orange */
.banner-moderate {
    background: #FF980014;
    border-color: #FF9800A5;
}

/* UNSAFE – red */
.banner-unsafe {
    background: #F4433614;
    border-color: #F44336A5;
}

.banner-safe .status-dot {
    background: #4caf50;
}

.banner-moderate .status-dot {
    background: #ff9800;
}

.banner-unsafe .status-dot {
    background: #f44336;
}


/* CARD BASE (DASHBOARD) */
.card-box {
    background: #182233;
    border-radius: 14px;
    padding: 1.25rem;
    box-shadow: 0 10px 30px #0000003F;
}

/* DASHBOARD LAYOUT */
.page-container {
    max-width: 1050px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.dashboard-header-left h2 {
    margin: 0 0 4px 0;
}

.header-subtext {
    margin: 0;
    opacity: 0.7;
    font-size: 14px;
}

/* TOGGLE NAV (Calculator / Dashboard) */

.toggle-wrapper {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

.toggle-nav {
    background: #141d2b;
    border-radius: 999px;
    padding: 0.25rem;
    display: flex;
    gap: 0.25rem;
}

.toggle-btn {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    border-radius: 999px;
    color: #aab3c2;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.toggle-btn.active {
    background: #108ff1;
    color: #fff;
}

.toggle-btn:hover {
    color: #fff;
}

/* SUMMARY CARDS (SMALL, SIDE BY SIDE) */
.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.summary-card h4 {
    font-size: 0.85rem;
    opacity: 0.85;
}

.summary-value {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0.5rem 0 0.75rem;
}

/*WIDE PRIORITY SECTIONS */
.wide-card {
    margin-bottom: 2rem;
}

.wide-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

/* NUTRITION BREAKDOWN */

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

.macro-card {
    background: #212c3f;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.macro-card h4 {
    font-size: 0.85rem;
    opacity: 0.85;
}

.macro-value {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0.4rem 0;
}

.macro-card small {
    opacity: 0.7;
}

.nutrition-notes {
    background: #1f2a3d;
    border-radius: 12px;
    padding: 1rem;
    font-size: 0.9rem;
}

/* EMPTY STATE */

.empty-state {
    text-align: center;
    padding: 2.5rem 2rem;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
}

.empty-state p {
    max-width: 520px;
    margin: 0.5rem auto 1.25rem;
    opacity: 0.85;
}

.button-container {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.history-card {
    background: #182233;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 6px 20px #0000003F;
}

.muted {
    opacity: 0.75;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Top-right logout button used on multiple templates */
.logout-top {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 50;
}

/* Slightly smaller button variant for card actions */
.btn-small {
    padding: 0.42rem 0.85rem;
    border-radius: 10px;
    font-size: 0.82rem;
}

/* COACH DASHBOARD */

.coach-boxer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.coach-boxer-card {
    background: #212c3f;
    border: 1px solid #FFFFFF0F;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.coach-boxer-email {
    font-weight: 600;
    margin: 0;
    word-break: break-word;
}

.coach-boxer-actions {
    flex-shrink: 0;
}

/* TABLES (FOR WEIGHT LOGS) */

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.75rem;
    background: #141d2b;
    border-radius: 12px;
    overflow: hidden;
}

th, td {
    text-align: left;
    padding: 0.85rem 0.9rem;
    border-bottom: 1px solid #FFFFFF0F;
    font-size: 0.9rem;
}

th {
    color: #cbd5e1;
    font-weight: 600;
    background: #101827;
}

tr:last-child td {
    border-bottom: none;
}

.auth-form--compact input {
    height: 44px;
    width: 250px;
    padding: 0.45rem 0.75rem;
    font-size: 0.95rem;
}

.insight-card {
  border-radius: 14px;
  padding: 1rem 1.1rem;
  margin: 1rem 0;
  border: 1px solid #FFFFFF14;
  background: #FFFFFF07;
}

.insight-info {
  border-color: #3BF67659;
}

.insight-warning {
  border-color: #F59E0B59
}

.insight-danger {
  border-color: #EF444459;
}

/* Saved Cuts (simple + clean) */
.cuts-wrap {
  max-width: 820px;
  margin: 0 auto;
}

.cuts-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.cuts-title {
  margin: 0;
  font-size: 1.8rem;
}

.cuts-subtitle {
  margin: 0.35rem 0 0;
  opacity: 0.75;
}

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

.cut-item {
  border: 1px solid #0000001E;
  border-radius: 14px;
  background: #212c3f;
  overflow: hidden;
}

.cut-item-active {
  border: 2px solid #000000D8;
}

.cut-top {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #00000014;
  background: #00000005;
}

.cut-top-left {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.cut-date {
  font-weight: 700;
}

.cut-badge {
  font-size: 0.78rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid #00000026;
  background: #fff;
}

.cut-badge-active {
  background: #2563EB1E;
  border-color: #2560E3FF;
  color: #ffffff;
}

.cut-badge-completed {
  background: #10B98123;
  border-color: #05EF9FC6;
  color: #ffffff;
}


.cut-body {
  padding: 1rem;
}

.cut-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.cut-field {
  border: 1px solid #FFFFFF14;
  border-radius: 14px;
  padding: 0.9rem 1rem;
  background: #FFFFFF07;
}

.cut-label {
  font-size: 0.8rem;
  opacity: 0.75;
  margin-bottom: 0.25rem;
}

.cut-value {
  font-size: 1.25rem;
  font-weight: 800;
}


.cut-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.25rem;
}

.cuts-empty {
  border: 1px dashed #0000003F;
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
  background: #00000005;
}

.cut-action-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.macro-insight{
  border-radius: 16px;
  padding: 1rem 1.1rem;
  margin: 0 0 1rem 0;
  background: #FFFFFF0A;
  border: 1px solid #FFFFFF14;
  position: relative;
}

.macro-insight:before{
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 10px;
  background: #FFFFFF33;
}

.macro-insight-title{
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.macro-insight-subtitle{
  font-weight: 500;
  font-size: 0.9rem;
  color: #FFFFFFA5;
  margin-top: 0.25rem;
  margin-bottom: 0.6rem;
  letter-spacing: 0.2px;
}

.macro-insight-text{
  color: #FFFFFFBF;
  line-height: 1.35;
}

/* tone variants */
.macro-insight-slow:before{ background: #2ECC71E5; }
.macro-insight-moderate:before{ background: #F1C40FF2; }
.macro-insight-aggressive:before{ background: #E74C3CF2; }
.macro-insight-neutral:before{ background: #3498DBF2; }

.card-title{
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.card-icon{
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #FFFFFF0C;
  border: 1px solid #FFFFFF14;
}

.card-icon svg{
  width: 18px;
  height: 18px;
}

.card-icon-calories{
  color: #ff8c42;
  background: #FF8C421E;
  border-color: #FF8C423F;
}


/* Training */
.card-icon-training{
  color: #56a6ff;
  background: #56A6FF1E;
  border-color: #56A6FF3F;
}

/* Recovery */
.card-icon-recovery{
  color: #2ecc71;
  background: #2ECC711E;
  border-color: #2ECC713F;
}

/* Nutrition */
.card-icon-nutrition{
  color: #d42828;
  background: #F312121E;
  border-color: #F312123F;
}

/* Progress */
.card-icon-progress{
  color: #9b59b6;
  background: #9B59B61E;
  border-color: #9B59B63F;
}

/* Latest Cut */
.card-icon-cut{
  background: rgba(59,130,246,0.15);
  border-color: rgba(59,130,246,0.25);
  color: #3b82f6;
}

/* Weekly Rate */
.card-icon-rate{
  background: rgba(168,85,247,0.15);
  border-color: rgba(168,85,247,0.25);
  color: #a855f7;
}

/* Adjustments */
.card-icon-adjust{
  background: rgba(249,115,22,0.15);
  border-color: rgba(249,115,22,0.25);
  color: #f97316;
}

/* Logs */
.card-icon-logs{
  background: rgba(20,184,166,0.15);
  border-color: rgba(20,184,166,0.25);
  color: #14b8a6;
}

/* AI CHAT */
.page-container.ai-coach-page {
  max-width: none !important;
  width: 100% !important;
  padding-left: 90px;
  padding-top: 20px;
}

.page-container.ai-coach-page .dashboard-header {
  max-width: none !important;
  width: 100% !important;
}

.page-container.ai-coach-page .ai-coach-shell {
  height: calc(100vh - 140px); /* adjust if needed */
  width: 100%;
  margin: 0;
}

.ai-coach-shell {
  height: calc(100vh - 170px); /* tweak if needed */
  display: flex;
  flex-direction: column;
  border: 1px solid #2a3447;
  border-radius: 16px;
  overflow: hidden;
  background: #0f1624;
}

/* Top info bar */
.ai-chat-top {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid #2a3447;
  background: #182233;
}

/* Layout */
.ai-chat-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 300px 1fr;
}

/* Sidebar */
.ai-chat-sidebar {
  border-right: 1px solid #2a3447;
  background: #141d2b;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.ai-chat-sidebar-top {
  padding: 12px 14px;
  border-bottom: 1px solid #2a3447;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ai-newchat-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #2a3447;
  background: transparent;
  color: #e6eaf0;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-newchat-btn:hover {
  background: #FFFFFF0C;
  color: #fff;
}

/* Chat list */
.ai-chat-list {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  min-height: 0;
}

.ai-chat-item {
  width: 100%;
  text-align: left;
  border: 1px solid #2a3447;
  border-radius: 14px;
  padding: 10px 10px;
  background: #182233;
  color: #e6eaf0;
  cursor: pointer;
}

.ai-chat-item:hover {
  background: #1c2a40;
}

.ai-chat-item.active {
  border-color: #108ff1;
  box-shadow: 0 0 0 2px rgba(16, 143, 241, 0.18) inset;
}

.ai-chat-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px 0;
}

.ai-chat-preview {
  font-size: 12px;
  opacity: 0.75;
  margin: 0;
}

/* Main panel */
.ai-chat-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #0f1624;
}

/* IMPORTANT: no fixed height here, it must flex */
.ai-chat-window {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem;
  background: #0f1624;
}

/* Messages */
.ai-msg {
  display: flex;
  margin: 0.55rem 0;
}

.ai-msg.user {
  justify-content: flex-end;
}

.ai-msg.ai {
  justify-content: flex-start;
}

.ai-bubble {
  max-width: 78%;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  line-height: 1.35rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  border: 1px solid #2a3447;
  background: #182233;
  color: #e6eaf0;
}

.ai-msg.user .ai-bubble {
  background: #108ff1;
  border-color: #108ff1;
  color: #fff;
  border-top-right-radius: 8px;
}

.ai-msg.ai .ai-bubble {
  border-top-left-radius: 8px;
}

.ai-bubble.ai-typing {
  opacity: 0.85;
}

/* Chips + input pinned below the chat window */
.ai-chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid #2a3447;
  background: #141d2b;
}

.ai-chip {
  border: 1px solid #2a3447;
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  background: transparent;
  color: #cfd6e1;
  cursor: pointer;
}

.ai-chip:hover {
  background: #FFFFFF0C;
  color: #fff;
}

.ai-chat-input {
  display: flex;
  gap: 0.6rem;
  align-items: flex-end;
  padding: 0.85rem 1rem 1rem;
  border-top: 1px solid #2a3447;
  background: #182233;
}

.ai-chat-input textarea {
  width: 100%;
  resize: none;
  border-radius: 12px;
  padding: 0.7rem 0.75rem;
  border: 1px solid #2a3447;
  background: #141d2b;
  color: #e6eaf0;
  outline: none;
  font-size: 1rem;
  line-height: 1.35rem;
  min-height: 44px;
  max-height: 140px;
}

.ai-chat-meta {
  font-size: 12px;
  margin: 0 0 6px 0;
  opacity: 0.7;
}

/* Top-left logo */
.app-logo {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1100;
}

.app-logo img {
  height: 42px;
  width: auto;
  display: block;
}

/* Hamburger (Top Right) */
.hamburger-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1203;

  border: 1px solid #2a3447;
  background: #0f1624;
  color: #e6eaf0;
  border-radius: 12px;
  width: 44px;
  height: 44px;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  font-size: 18px;
}

/* Overlay */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
  z-index: 1200;              /* was 999 */
}

/* RIGHT drawer */
.side-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 320px;
  max-width: 88vw;

  background: #0f1624;
  border-left: 1px solid #2a3447;

  transform: translateX(102%);
  transition: transform 180ms ease;
  z-index: 1202;              /* was 1000 (drawer should be above overlay) */

  display: flex;
  flex-direction: column;
}

.side-drawer.open {
  transform: translateX(0);
}

.side-drawer-header {
  position: relative;
  padding: 14px 14px;
  border-bottom: 1px solid #2a3447;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto
}

.side-drawer-header .hamburger-btn {
  position: absolute;
  top: -12px;
  right: 14px;
  z-index: 2;
  box-shadow: 0 6px 18px #00000066;
}


.side-drawer-title {
  font-weight: 700;
  color: #e6eaf0;
}

.drawer-close {
  border: 1px solid #2a3447;
  background: transparent;
  color: #e6eaf0;
  border-radius: 10px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 18px;
}

.drawer-close:hover {
  background: #182233;
}

/* Drawer nav */
.side-drawer-nav {
  padding: 12px;
  overflow: auto;
  min-height: 0;
  flex: 1 1 auto
}

.side-link {
  display: block;
  padding: 10px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: #e6eaf0;
  border: 1px solid transparent;
}

.side-link:hover {
  background: #182233;
  border-color: #2a3447;
}

.side-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #2a3447;
}

.side-section-title {
  margin: 0 0 8px 2px;
  font-size: 12px;
  opacity: 0.7;
  color: #cfd6e1;
}

.muted-link {
  opacity: 0.9;
}

.drawer-account {
  margin: 12px;
  padding: 12px;
  border: 1px solid #2a3447;
  border-radius: 14px;
  background: #182233;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;

  transition: all 160ms ease;
  cursor: pointer;
}

/* Hover state */
.drawer-account:hover {
  background: #1f2c42; /* slightly lighter */
  border-color: #355070; /* subtle blue tint */
  transform: translateY(-2px); /* micro lift */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.drawer-account-link {
  text-decoration: none;
  color: inherit;
  flex: 1;
  min-width: 0;
}

.drawer-account-name {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-account-role {
  font-size: 12px;
  opacity: 0.75;
  margin-top: 2px;
}

/* Landing page layout */
.landing-page {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Background video */
.bg-video {
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%) scale(0.5);
    object-fit: cover;
    z-index: -2;
}

/* Dark overlay for readability */
.video-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: -1;
}

/* Make sure hero content stays centered */
.landing-hero {
    position: relative;
    z-index: 2;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}

/* Makes footer sit at bottom without overlaying content */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-main {
  flex: 1;
}

/* Footer styling */
.site-footer {
  border-top: 1px solid rgba(0,0,0,0.08);
  padding: 18px 0;
  margin-top: 30px;
}

.site-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 14px;
  opacity: 0.85;
}

.site-footer-inner.centered-footer {
  display: flex;
  justify-content: center;
  align-items: center;
}

.site-footer-links a {
  text-decoration: none;
  margin-left: 14px;
}

.site-footer-links a:hover {
  text-decoration: underline;
}

.highlight {
  position: relative;
  background: #1f2a3d;

  border: 1px solid rgba(255, 255, 255, 0.08); /* light full border */
  border-radius: 10px;

  padding: 16px 16px 16px 20px; /* extra left padding for bar */
  margin-bottom: 16px;

  overflow: hidden; /* keeps radius clean */
}

/* Blue accent bar */
.highlight::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;

  background: #2d8cff;
  border-radius: 4px;
}

/* Science Page Styling */

.science-page {
  max-width: 900px;
  margin: 0 auto;
}

.science-hero {
  margin-bottom: 40px;
}

.science-hero h1 {
  margin-bottom: 12px;
}

.science-section {
  margin-bottom: 50px;
}

.science-section h2 {
  margin-bottom: 16px;
}

.science-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.science-card {
  background: #121c2d;
  border: 1px solid #2a3447;
  padding: 18px;
  border-radius: 14px;
}

.science-card h3 {
  margin-bottom: 6px;
}

.science-highlight {
  background: #162235;
  border-left: 4px solid #2d8cff;
  padding: 16px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.science-warning {
  background: #2a1515;
  border-left: 4px solid #e10600;
  padding: 16px;
  border-radius: 10px;
  font-weight: 500;
}

.science-list {
  padding-left: 18px;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .science-split {
    grid-template-columns: 1fr;
  }
}

/* Weight classes - table layout */
.classes-grid-tight {
  display: grid;
  grid-template-columns: 420px 420px; /* keeps them smaller */
  gap: 28px;
  justify-content: center;
}

.classes-card-tight h2 {
  margin: 0 0 14px 0;
  font-size: 18px;
}

.classes-table {
  border: 1px solid #2a3447;
  border-radius: 14px;
  overflow: hidden;
  background: #0f1624;
}

.classes-head {
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #cfd6e1;
  opacity: 0.75;
  background: #121c2d;
  border-bottom: 1px solid #2a3447;
}

.classes-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #1f2a3d;
  transition: background 160ms ease;
}

.classes-row:last-child {
  border-bottom: none;
}

.classes-row span:first-child {
  font-weight: 700;
  color: #e6eaf0;
}

.classes-row span:last-child {
  color: #cfd6e1;
  opacity: 0.9;
}

.classes-row:hover {
  background: #182233;
}

@media (max-width: 940px) {
  .classes-grid-tight {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin: 0 auto;
  }
}

/* Senior division notice banner */
.division-notice {
  max-width: 820px;
  margin: 24px auto 36px auto;
  padding: 16px 20px;
  border-radius: 14px;
  background: #FFC40014;
  border: 1px solid #FFC4003F;
  color: #f5d36a;
  font-size: 14px;
  line-height: 1.5;
}

.recommendation-headline{
  margin: 6px 0 10px 0;
  font-weight: 700;
  color: #e6eaf0;
}

.recommendation-lines p{
  margin: 6px 0;
}

.recommendation-note{
  margin-top: 10px;
  opacity: 0.85;
  font-size: 13px;
}

.recommendation-warning{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;

  background: #1a2436;
  border: 1px solid #2a3447;

  color: #d6deea;
  font-size: 13px;
  line-height: 1.45;

  position: relative;
  overflow: hidden;
}

/* subtle left accent line */
.recommendation-warning::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(
    to bottom,
    #5ea8ff,
    #3d7ecb
  );
  border-radius: 12px 0 0 12px;
}

/* ============================
   MOBILE RESPONSIVENESS
   ============================ */

/* Prevent any stray wide element from creating horizontal scroll */
html, body {
  overflow-x: hidden;
}

@media (max-width: 900px) {
  .page-container.ai-coach-page {
    padding-left: 1rem;
  }
}

@media (max-width: 760px) {
  .ai-chat-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .ai-chat-sidebar {
    border-right: none;
    border-bottom: 1px solid #2a3447;
    max-height: 160px;
  }

  .ai-chat-list {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .ai-chat-item {
    width: 220px;
    flex: 0 0 auto;
  }

  .ai-coach-shell,
  .page-container.ai-coach-page .ai-coach-shell {
    height: calc(100vh - 120px);
  }

  .ai-bubble {
    max-width: 88%;
  }
}

@media (max-width: 680px) {
  .page-container {
    padding: 1rem 0.85rem 2.5rem;
  }

  .app-logo img {
    height: 42px;
  }

  .dashboard-header {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .dashboard-header > .btn {
    width: 100%;
    text-align: center;
  }

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

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

  .coach-boxer-card {
    flex-wrap: wrap;
  }

  .coach-boxer-meta {
    min-width: 0;
  }

  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  .link-boxer-form,
  .auth-form--compact {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .link-boxer-form input,
  .auth-form--compact input {
    width: 100%;
  }

  .cuts-header {
    flex-wrap: wrap;
  }

  .classes-row {
    font-size: 0.9rem;
  }
}

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

  .cut-row {
    grid-template-columns: 1fr;
  }

  .toggle-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
  }

  .auth-panel {
    padding: 2rem 1.5rem;
  }

  .landing-hero h1 {
    font-size: 1.6rem;
  }

  .landing-logo {
    width: 160px;
  }

  .cuts-title {
    font-size: 1.5rem;
  }

  .empty-state {
    padding: 2rem 1rem;
  }
}