/* Reset & Base */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f4f6f9;
  color: #333;
}

/* ===== App Header ===== */
.app-header {
  background: linear-gradient(135deg, #4e73df, #1cc88a);
  padding: 2.25rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
  margin-bottom: 1rem;
}
.app-title {
  color: #fff;
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-shadow: 0 0 10px rgba(0,0,0,0.25);
  margin: 0;
}

/* Auth Section */
#auth-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: linear-gradient(135deg, #4e73df, #1cc88a);
}

/* Pledge styling */
.pledge-box { text-align: left; margin-top: 1rem; font-size: 0.9rem; color: #444; }
.pledge-box label { display: flex; align-items: center; gap: 0.4rem; font-weight: 600; margin-bottom: 0.5rem; }
.pledge-text { margin: 0.5rem 0 0 1.8rem; padding: 0; list-style-type: disc; font-size: 0.85rem; color: #555; }

/* Auth Title */
.auth-title {
  font-size: 2.5rem; font-weight: 700; color: #fff;
  text-shadow: 0 0 10px rgba(0,0,0,0.3); margin-bottom: 2rem; text-align: center;
}

.auth-card {
  background: #fff; padding: 2rem; border-radius: 1rem; box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  width: 100%; max-width: 400px; text-align: center;
}
.auth-card h2 { margin-bottom: 1.5rem; font-size: 1.8rem; color: #333; }
.auth-card input[type="email"], .auth-card input[type="password"] {
  width: calc(100% - 2rem); padding: 0.9rem; margin: 0.5rem auto; border: 1px solid #ccc; border-radius: 0.7rem; font-size: 1rem; display: block; box-sizing: border-box;
}
.auth-card button {
  width: calc(100% - 2rem); padding: 0.9rem; margin: 1rem auto 0 auto; display: block; background: #4e73df; color: #fff; border: none; border-radius: 0.7rem; font-size: 1rem; font-weight: 600; cursor: pointer; transition: 0.3s;
}
.auth-card button:hover { background: #375ac3; }
.auth-card p { margin-top: 1rem; font-size: 0.95rem; color: #555; }
.auth-card a { color: #1cc88a; text-decoration: none; font-weight: 600; }
.auth-card a:hover { text-decoration: underline; }

/* Checkbox alignment */
.auth-card label, .card label {
  display: flex; align-items: center; gap: 0.5rem; margin: 0.5rem auto; width: calc(100% - 2rem); font-size: 1rem; color: #444; box-sizing: border-box;
}
.auth-card input[type="checkbox"], .card input[type="checkbox"] { margin: 0; transform: scale(1.1); flex: 0 0 auto; }

/* Navbar */
.navbar {
  display: flex; justify-content: center; gap: 1rem; padding: 1rem; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.navbar button {
  background: #1cc88a; color: #fff; border: none; padding: 0.7rem 1.2rem; border-radius: 0.6rem; cursor: pointer; font-size: 1rem; transition: 0.3s; position: relative;
}
.navbar button.active { outline: 3px solid #3ba0ff; }
.navbar .badge {
  position: absolute;
  top: -6px;
  right: -8px;
}

/* Cards & Forms */
.card {
  background: #fff; border-radius: 1rem; padding: 1.5rem; margin: 1rem auto; max-width: 600px; box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.card input:not([type="checkbox"]), .card select, .card textarea {
  width: calc(100% - 2rem); padding: 0.8rem; margin: 0.5rem auto; border-radius: 0.5rem; border: 1px solid #ccc; font-size: 1rem; display: block; box-sizing: border-box;
}
.card textarea { resize: vertical; min-height: 80px; }
.card button {
  width: calc(100% - 2rem); padding: 0.9rem; margin: 1rem auto 0 auto; display: block; background: #4e73df; color: white; border: none; border-radius: 0.6rem; font-size: 1rem; font-weight: 600; cursor: pointer; transition: 0.3s;
}
.card button:hover { background: #375ac3; }

/* Titles */
.page-title, .section-title, .tab-content h2, .tab-content h3.section-title {
  text-align: center; margin: 1rem 0; font-weight: 700; color: #333;
}

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filters select { flex: 1; min-width: 120px; }

/* Subtle badge */
.badge {
  display: inline-block; min-width: 18px; padding: 0 6px; height: 18px; line-height: 18px;
  font-size: 12px; color: #fff; background: #e53935; border-radius: 999px; vertical-align: middle; margin-left: 6px;
}

/* Buttons row (Edit/Delete, Save/Cancel) */
.row { display: flex; justify-content: center; gap: 0.25rem; flex-wrap: wrap; margin-top: 0.5rem; }
.row button { flex: 1 1 auto; min-width: 100px; max-width: 140px; padding: 0.6rem; font-size: 0.9rem; }
.gap-sm { gap: 0.25rem; }

/* Danger buttons */
.card button.danger { background: #e53935; }
.card button.danger:hover { background: #c62828; }

/* Modal */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 40;
}
.modal .modal-content { max-width: 520px; width: 100%; }

/* Toasts */
#toast-root {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}
.toast {
  background: #111;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
  animation: slideIn .25s ease-out;
  max-width: 320px;
  line-height: 1.35;
  font-weight: 600;
}
.toast.success { background: #1f8f5f; }
.toast.error { background: #c62828; }
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Highlight newly created team */
.card.highlight {
  outline: 3px solid rgba(76, 175, 80, 0.45);
  animation: flash 1.4s ease-in-out 1;
}
@keyframes flash {
  0% { box-shadow: 0 0 0 rgba(76,175,80,0.0); }
  50% { box-shadow: 0 0 16px rgba(76,175,80,0.6); }
  100% { box-shadow: 0 0 0 rgba(76,175,80,0.0); }
}

/* Search meta row */
.search-meta {
  max-width: 600px;
  margin: 0 auto 0.25rem auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.summary-chip {
  color: #27348b;
  font-weight: 700;
  font-size: .9rem;
}

/* Responsive */
@media (max-width: 600px) {
  .auth-card { width: 80%; margin: 1rem; padding: 1.5rem; }
  .navbar { flex-direction: column; gap: 0.5rem; }
  .filters { flex-direction: column; }
  .search-meta { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 400px) {
  .row { flex-direction: column; align-items: stretch; }
  .row button { max-width: none; width: 100%; }
  .app-title { font-size: 1.9rem; }
}

/* Auth Logo */
.auth-logo {
  margin-top: 1rem;
  margin-bottom: 2rem;
  text-align: center;
}
.auth-logo img {
  max-width: 240px;
  width: 80%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* App Header Logo */
.app-logo img {
  max-width: 200px;
  width: 80%;
  height: auto;
  display: block;
   
  margin-top: 80px;
    margin-right: auto;
    margin-bottom: 20px;
    margin-left: auto;
    };

/* ===== Logout modal (scoped to #logout-modal only) ===== */

/* overlay */
#logout-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(2px);
  z-index: 9999;
}

/* modal container */
#logout-modal .logout-modal-card {
  width: min(92vw, 440px);
  background: #fff;
  color: #083344;
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(0,0,0,.25);
  padding: 22px 20px 18px;
  border: 3px solid rgba(16, 185, 129, .12);
}

/* header */
#logout-modal .logout-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
#logout-modal .logout-modal-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .2px;
}

/* close (×) button */
#logout-modal .logout-icon-btn {
  border: none;
  background: #ecfdf5;
  color: #065f46;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  line-height: 1;
  font-size: 1.2rem;
  cursor: pointer;
}
#logout-modal .logout-icon-btn:hover { background: #d1fae5; }

/* body copy */
#logout-modal .logout-modal-body {
  margin: 8px 2px 16px;
  line-height: 1.45;
}

/* actions row */
#logout-modal .logout-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* base pill */
#logout-modal .logout-modal-actions button {
  border: 0;
  border-radius: 10px;
  padding: 12px 22px;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
}

/* primary action */
#logout-modal #logout-confirm-btn {
  background: #1cc88a;
  color: #fff;
}
#logout-modal #logout-confirm-btn:hover  { filter: brightness(0.96); }
#logout-modal #logout-confirm-btn:active { transform: translateY(1px); }

/* secondary action */
#logout-modal .btn-secondary {
  background: #b5ffdc;
  color: #1cc88a;
}
#logout-modal .btn-secondary:hover  { filter: brightness(0.98); }
#logout-modal .btn-secondary:active { transform: translateY(1px); }

/* ensure global .danger doesn’t override inside this modal */
#logout-modal .danger { background: #22c55e !important; color:#fff !important; }

/* --- Info page helpers --- */
.muted { color: #6b7280; }
.info-list { margin: 0.5rem 0 0.25rem 1.25rem; }
.info-list li { margin: 0.25rem 0; }

/* --- Info page layout (public) --- */
.info-container { max-width: 1000px; margin: 0 auto; padding: 1rem; }
.hero {     margin-top: 1rem; text-align: center; padding: 0.5rem 0 1.25rem; }
.tagline { color: #eafbf3; margin: 0.35rem 0 0.9rem; font-weight: 600; }

/* Call-to-action button */
.btn-cta {
  display: inline-block;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: #1cc88a;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(0,0,0,.12);
  transition: transform .08s ease, filter .15s ease;
}
.btn-cta:hover { filter: brightness(0.98); }
.btn-cta:active { transform: translateY(1px); }

/* Card grid */
.cards-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem; margin: 1rem 0 2rem; }
.cards-grid .card { grid-column: span 12; }
@media (min-width: 860px) { .cards-grid .card.half { grid-column: span 6; } }

/* Typographic helpers */
.text-muted { color: #6b7280; }
.info-list { margin: .5rem 0 .25rem 1.25rem; }
.info-list li { margin: .25rem 0; }
.kicker {
  font-size: .9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #3b82f6;
  margin: .25rem 0 .5rem;
}

.row .button {
  display: inline-block;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  text-decoration: none;
}

/* ---------- Legal / Pledge rows tidy (APPENDED) ---------- */

/* Make pledge + terms rows a neat two-column layout */
.pledge-box label {
  display: grid;                  /* override earlier flex for this block */
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: .6rem;
  margin: 0 0 .5rem;
  font-weight: 700;
  color: #333;
}

/* Checkbox sizing & alignment */
.pledge-box input[type="checkbox"] {
  margin: .2rem 0 0 0;
  transform: scale(1.08);
}

/* Indented bullets/notes under pledge/terms */
.pledge-text {
  margin: .5rem 0 0 calc(22px + .6rem);
  padding-left: 1rem;
  list-style: disc;
  font-size: .92rem;
  color: #555;
}

/* Special styling for the Terms/Privacy block */
.legal-box .agree-copy {
  line-height: 1.45;
  font-weight: 700;
  color: #333;
  word-break: normal;
  hyphens: auto;
}

/* Brand link treatment */
.legal-box .agree-copy a {
  color: #1cc88a;
  font-weight: 700;
  text-decoration: none;
}
.legal-box .agree-copy a:hover { text-decoration: underline; }

/* Muted note under the terms row */
.legal-box .legal-note {
  margin: .55rem 0 0 calc(22px + .6rem);
  font-size: .9rem;
  color: #555;
}

/* Keep things tight on small screens */
@media (max-width: 400px) {
  .pledge-text, .legal-box .legal-note {
    margin-left: calc(22px + .6rem);
    font-size: .88rem;
  }
}
