:root { --bg:#0b0c10; --card:#15171c; --text:#e6e6e6; --muted:#99a0aa; --accent:#5da9e9; }
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-decoration: none; }
.container { max-width: 100%; margin: 2rem auto; padding: 0 1rem; }
.help h3 { color: var(--accent); }
.site-header { display:flex; align-items:center; justify-content:space-between; padding: 1rem; background: #0f1116; border-bottom: 1px solid #23262e; position: relative; }
.site-header h1 { margin: 0; font-size: 1.25rem; }
.primary-nav { display:flex; align-items:center; gap: 1rem; }
.primary-nav a { margin: 0; }
.menu-toggle { display: none; }
.user { color: var(--muted); margin-right: 1rem; }
.card { background: var(--card); padding: 1rem; border-radius: 12px; border: 1px solid #23262e; }
label { display:block; margin-top: 0.75rem; color: var(--muted); }
.user-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.user-info-line {
  gap: 1.5rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.user-row label {
  margin-top: 0;
}
.user-row-fields {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 auto;
}
.user-row-fields input[readonly] {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}
.user-label {
  font-weight: 600;
  color: var(--text);
}
.user-name {
  color: var(--text);
}
.user-email {
  font-size: 0.95rem;
  color: var(--muted);
  word-break: break-all;
  margin-left: auto;
  text-align: right;
}
input[type="text"], input[type="password"], input[readonly], input[type="file"] {
  width: 100%; padding: 0.6rem; margin-top: 0.25rem; border-radius: 8px; border: 1px solid #2a2f38; background: #0f1116; color: var(--text);
}
/* Make comments (and any textarea) full width and comfy */
textarea {
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.25rem;
  border-radius: 8px;
  border: 1px solid #2a2f38;
  background: #0f1116;
  color: var(--text);
  min-height: 8rem;     /* tweak height as you like */
  line-height: 1.4;
  resize: vertical;     /* allow dragging taller, not wider */
  display: block;       /* avoids odd inline spacing in some browsers */
}

/* (Optional) apply same style to selects, too */
select {
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.25rem;
  border-radius: 8px;
  border: 1px solid #2a2f38;
  background: #0f1116;
  color: var(--text);
}

button { margin-top: 1rem; padding: 0.6rem 1rem; border: 0; border-radius: 8px; background: var(--accent); color: #06121e; font-weight: 600; cursor: pointer; }
.button-link {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--accent);
  color: #06121e;
  font-weight: 600;
  cursor: pointer;
}
.button-link:hover {
  background: #7ab8ed;
}
.button-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.button-row button {
  margin-top: 0;
}
.button-row .button-link {
  margin-top: 0;
}
.strava-button {
  background: #a5d6a7;
  color: #1b5e20;
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
}
.strava-button:hover {
  background: #81c784;
}
.flash-container { padding: 1rem; }
.flash { padding: 0.5rem 0.75rem; margin: 0.25rem 0; border-radius: 8px; }
.flash.success { background: #1c7a2b; }
.flash.warning { background: #7a6a1c; }
.flash.danger  { background: #7a1c1c; }
.flash.info    { background: #1c4f7a; }
.list { list-style: none; padding-left: 0; }
.list li { padding: 0.35rem 0; border-bottom: 1px dotted #2a2f38; }
.map-frame { margin-top: 1rem; border: 1px solid #23262e; border-radius: 12px; overflow: hidden; }
.map-frame iframe {
  width: 100% !important;
  max-width: 100vw;
  height: 90vh;
}
.actions { display:flex; gap: 0.5rem; margin-top: 1rem; }

/* Override width just for password input */
input[type="password"] {
  width: 300px;  /* or any size like 250px */
  max-width: 100%;
}

.chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 1100px) {
  .chart-grid { grid-template-columns: 1fr 1fr; }
}

/* Grid helpers for form rows */
.form-grid {
  display: grid;
  gap: 0.75rem 1rem;
  align-items: end; /* aligns inputs nicely on a row */
  margin-top: 0.5rem;
}

.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-grid-4 { grid-template-columns: repeat(4, 1fr); }

.field { display: flex; flex-direction: column; }

/* Responsive collapse */
@media (max-width: 900px) {
  .form-grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .form-grid-2,
  .form-grid-4 { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .site-header { align-items: flex-start; }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #2a2f38;
    background: transparent;
    color: var(--text);
    font-size: 0.95rem;
    cursor: pointer;
    margin-left: auto;
  }
  .primary-nav {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 1rem;
    flex-direction: column;
    align-items: flex-start;
    background: #0f1116;
    border: 1px solid #23262e;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    min-width: 200px;
    display: none;
    z-index: 10;
  }
  .primary-nav.open {
    display: flex;
  }
  .primary-nav a,
  .primary-nav .user {
    margin: 0;
    width: 100%;
  }
  .primary-nav a {
    padding: 0.35rem 0;
  }
  .user {
    margin-right: 0;
    margin-bottom: 0.35rem;
  }
}

/* Ensure textarea looks like your inputs */
textarea {
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.25rem;
  border-radius: 8px;
  border: 1px solid #2a2f38;
  background: #0f1116;
  color: var(--text);
  min-height: 8rem;
  line-height: 1.4;
  resize: vertical;
  display: block;
}

/* Session notes grid (map_view) */
.notes-grid {
  display: grid;
  gap: 0.75rem 1rem;
  align-items: start;
}
.notes-grid.two  { grid-template-columns: 1fr 1fr; }
.notes-grid.four { grid-template-columns: repeat(4, 1fr); }

.notes-field { display: flex; flex-direction: column; }
.notes-field label { color: var(--muted); margin-bottom: 0.25rem; }

.value {
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid #2a2f38;
  background: #0f1116;
  color: var(--text);
  min-height: 2.25rem;
}

/* Responsive collapse */
@media (max-width: 1000px) {
  .notes-grid.four { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .notes-grid.two,
  .notes-grid.four { grid-template-columns: 1fr; }
}

/* Responsive map embed */
.map-embed {
  width: 100%;
  height: 62vh;       /* nice default height */
  border: 0;
}
@media (max-width: 640px) {
  .map-embed { height: 72vh; }  /* a bit taller on phones */
}

/* Fullscreen modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal.open { display: flex; }

.modal-card {
  width: 96vw;
  height: 92vh;
  background: var(--card);
  border: 1px solid #23262e;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.modal-card iframe { width: 100%; height: 100%; border: 0; }

.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: .35rem .6rem;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #06121e;
  font-weight: 600;
  cursor: pointer;
}

/* tiny action row under the embedded map */
.map-actions {
  display: flex;
  gap: .5rem;
  margin: .5rem 0 0 0;
  flex-wrap: wrap;
}


.course-pill {
    display:inline-block; padding:.20rem .4rem; margin:.2rem .2rem;
    border:1px solid #ccc; border-radius:999px; text-decoration:none; font-size:.7rem;
    background:#f8f8f8; color:#333;
  }
  .course-pill.selected {
    background:#268bd2; color:#fff; border-color:#268bd2;
}


