/* ── Dashboard Page ───────────────────────────────────────────────────────── */

body {
  margin: 0;
  background: #111827;
  font-family: 'Segoe UI', Tahoma, sans-serif;
}

.dashboard-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
  min-height: 100vh;
  color: #fff;
}

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

.dashboard-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: #fff;
}

.dashboard-sub {
  color: #aaa;
  font-size: 0.95rem;
  margin: 0;
}

.dashboard-new-btn {
  white-space: nowrap;
  align-self: center;
  text-decoration: none;
}

.dashboard-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
}

.dashboard-modal.hidden {
  display: none;
}

.dashboard-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
}

.dashboard-modal-panel {
  position: relative;
  width: min(1100px, 92vw);
  height: min(88vh, 900px);
  margin: 4vh auto 0;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.dashboard-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.dashboard-modal-close:hover {
  background: rgba(255, 255, 255, 0.24);
}

.dashboard-plan-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #111827;
}

/* ── Plan cards grid ─────────────────────────────────────────────────────── */

.plan-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.plan-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 240px;
  gap: 1rem;
  /* NEW SHADOW */
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);

  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.plan-card-content {
  flex-grow: 1;
}

.plan-card:hover {
  border-color: rgba(80,150,211,0.45);
  .plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}
}

.plan-card-marathon {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #5096d3;
  margin-bottom: 0.15rem;
}

.plan-card-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.plan-card-meta {
  font-size: 0.85rem;
  color: #aaa;
  line-height: 1.6;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.plan-card-date {
  font-size: 0.78rem;
  color: #666;
  margin-top: 0.25rem;
}

.plan-card-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
  flex-wrap: nowrap;
  align-items: stretch;
}

.plan-card-actions button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
  box-sizing: border-box;
}
.plan-card-actions button:hover {
  opacity: 0.85;
}

.btn-view {
  background: #5096d3;
  color: #fff;
}

.btn-download {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2) !important;
}

.btn-delete {
  background: #c94b4b;
  color: #fff;
  border: none !important;
}

.btn-delete:hover {
  background: #b63f3f !important;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */

.dashboard-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: #888;
}
.dashboard-empty p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}
.dashboard-empty a {
  text-decoration: none;
}

.hidden {
  display: none !important;
}

/* ── Reuse cta-button from landing styles ────────────────────────────────── */
.cta-button {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background: #5096d3;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}
.cta-button:hover {
  background: #3d7dbf;
}
.cta-button.secondary {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
}
.cta-button.secondary:hover {
  background: rgba(255,255,255,0.18);
}

@media (max-width: 600px) {
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .dashboard-page {
    padding: 5rem 1.25rem 3rem;
  }
}
/* ─── Settings page ─────────────────────────────────────────────────────────── */

.settings-sections {
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.settings-section {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 1.5rem 2rem;
}

.settings-section h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

.settings-hint {
  margin: -0.5rem 0 1rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.4rem 0;
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
}

.settings-row label {
  width: 60px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
}

.settings-value {
  color: #fff;
}

.settings-signout-btn {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  text-decoration: underline;
  cursor: pointer;
  margin-top: 0.5rem;
}

.settings-signout-btn:hover {
  color: #fff;
}

.settings-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0;
  cursor: pointer;
  color: rgba(255,255,255,0.9);
  font-size: 0.95rem;
}

.settings-checkbox-row input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: #5a9fd4;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.settings-checkbox-row span {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.settings-checkbox-desc {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  font-weight: 400;
}

.settings-save-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.settings-save-msg {
  font-size: 0.875rem;
}

.settings-save-ok  { color: #7ecb8f; }
.settings-save-err { color: #f08080; }
.hidden { display: none; }

.settings-row-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.75rem 0;
}

.settings-row-stack label {
  width: auto;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
}

.settings-row-stack select {
  min-height: 44px;
  min-width: 220px;
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: white;
}


@media (max-width: 700px) {
  .dashboard-profile-grid {
    grid-template-columns: 1fr;
  }
}