/* ===========================
   ClubSite — main.css (full)
   =========================== */

:root{
  --bg: #4e4f4f;          /* club theme background, configurable */
  --panel: #F7F7F7;
  --header: #2E2E2E;
  --header-alt: #252525;
  --text: #111;
  --muted: #888;
  --accent: #06FF8B;
  --navtext: #fff;        /* club theme nav text color, configurable */
  --radius: 16px;
  --shadow: 0 6px 20px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

.container{ width: min(1100px, 92vw); margin: 0 auto; padding: 0 12px; }

/* ---------------------------
   Header + Navigation
   --------------------------- */
.site-header{ background: var(--header); color: white; position: sticky; top: 0; z-index: 10; box-shadow: var(--shadow); }
.header-top{ display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }

.brand{ display: inline-flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: .3px; }
.logo-wrap {
  display:flex; align-items:center; justify-content:center;
  width:36px; height:36px; flex-shrink:0;
}
/* Default circle shown when no logo is uploaded */
.logo-wrap.logo-default {
  border-radius: 999px;
  background: linear-gradient(135deg, #999, #555);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.25);
}
/* Uploaded logo — natural shape, no forced crop */
.logo-wrap.logo-img {
  width: auto; max-width: 120px; height: 36px;
  border-radius: 6px; overflow: hidden; background: transparent;
}
.logo-wrap img { display:block; max-width:100%; max-height:36px; width:auto; height:auto; object-fit:contain; }
.club-name{ font-size: 1.15rem; }

.header-clock{ margin-left: auto; display: inline-flex; align-items: center; gap: 10px; }
#clock-text{ font-variant-numeric: tabular-nums; white-space: nowrap; color: #eaeaea; }

.header-nav{ background: var(--header-alt); border-top: 1px solid rgba(255,255,255,.06); border-bottom: 1px solid rgba(0,0,0,.35); }
.nav-inner{ padding: 8px 0; }
.nav{ display: flex; flex-wrap: wrap; gap: 10px; }
.nav a{ color: var(--navtext); text-decoration: none; padding: 8px 12px; border-radius: 10px; opacity: .9; }
.nav a:hover{ opacity: 1; }
.nav a.active{ background: rgba(255,255,255,.14); }

/* ---------------------------
   Layout + Footer
   --------------------------- */
.site-main{ padding: clamp(20px, 3.5vw, 36px) 0; min-height: calc(100vh - 160px); }
.site-footer{ background: var(--header); color: #ddd; padding: 16px 0; margin-top: 24px; }

/* ---------------------------
   Cards / Forms / Buttons
   --------------------------- */
.auth-card, .page-card{
  margin: 0 auto; background: var(--panel); padding: clamp(18px, 3vw, 28px);
  border-radius: var(--radius); box-shadow: var(--shadow); width: min(960px, 96vw);
}
.page-card h1, .auth-card h1{ margin: 0 0 12px; font-size: clamp(1.25rem, 1.1rem + 1vw, 1.6rem); }

.form{ display: grid; gap: 14px; }
.field{ display: grid; gap: 8px; }
label{ font-weight: 600; color: #666; }
input[type="text"], input[type="password"], input[type="email"], input[type="date"], input[type="datetime-local"],
select{
  width: 100%; padding: 12px 14px; border: 1px solid #D0D4D9; border-radius: 12px; background: white;
  outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus{ border-color: #A6ACB2; box-shadow: 0 0 0 3px rgba(6,255,139,.2); }

.btn{
  display: inline-block; padding: 10px 14px; border: none; border-radius: 12px;
  background: var(--accent); color: #000; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 14px rgba(6,255,139,.25);
  transition: transform .05s ease, filter .15s ease; text-decoration: none; text-align: center;
}
.btn:hover{ filter: brightness(0.95); }
.btn:active{ transform: translateY(1px); }
.btn-small{ padding: 6px 10px; border-radius: 10px; font-size: .9rem; box-shadow: 0 4px 10px rgba(6,255,139,.25); }

/* ---------------------------
   Tables
   --------------------------- */
.table{ width: 100%; border-collapse: collapse; }
.table th, .table td{ text-align:left; padding: 10px; border-bottom: 1px solid #dfe3e8; vertical-align: top; }
.table th{ background: #f1f3f5; }

/* ---------------------------
   Sub-navigation (Admin tabs)
   --------------------------- */
.subnav{ display:flex; flex-wrap:wrap; gap:8px; margin:8px 0 16px; }
.subnav a{ display:inline-block; padding:8px 12px; border-radius:10px; background:#e5e7ea; color:#111; text-decoration:none; }
.subnav a.active{ background:#d2d6db; font-weight:700; }

/* ---------------------------
   Badges (Roster)
   --------------------------- */
.badge{ display:inline-block; padding: 2px 8px; font-size: .8rem; border-radius: 999px; background:#e5e7ea; margin-left:8px; }
.badge.sys{ background:#ffd699; }
.badge.ca{ background:#b6ffcc; }
.badge.mem{ background:#dfe7ff; }
.badge.gst{ background:#eee; }

/* ---------------------------
   Flash messages
   --------------------------- */
.flash{ padding: 10px 12px; border-radius: 10px; margin: 8px 0; }
.flash.error{ background:#ffe6e6; border:1px solid #ffb3b3; }
.flash.success{ background:#e8ffe8; border:1px solid #b7f3b7; }
.flash.info{ background:#eef5ff; border:1px solid #c7dcff; }

/* ---------------------------
   Calendar (SCOPED)
   Only affects markup inside .calendar-card
   --------------------------- */
.calendar-card .cal-header{
  display:flex; align-items:center; justify-content:space-between; margin-bottom:12px;
}
.calendar-card .cal-grid{
  display:grid; grid-template-columns: repeat(7, 1fr); gap:8px;
}
.calendar-card .cal-cell{
  background:#fff; border:1px solid #e1e5ea; border-radius:12px; padding:8px; min-height:110px; position:relative;
}
.calendar-card .cal-head{
  background:#f1f3f5; border-color:#dfe3e8; font-weight:700; text-align:center; min-height:auto;
}
.calendar-card .cal-empty{ background:transparent; border:none; }
.calendar-card .cal-day-num{ position:absolute; top:6px; right:10px; font-weight:700; color:#666; }
.calendar-card .cal-event{ margin-top:20px; padding:6px 8px; background:#f7f9fb; border:1px solid #e5e9ef; border-radius:10px; }
.calendar-card .cal-event-title{ font-weight:700; }
.calendar-card .cal-event-time, .calendar-card .cal-event-loc{ font-size:.85rem; color:#666; }
.calendar-card .cal-today{ box-shadow: 0 0 0 3px rgba(6,255,139,.25); border-color:#bdeed4; }

/* ---------------------------
   Utility
   --------------------------- */
.actions{ display:flex; gap:8px; align-items:center; }

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

/* ---------------------------
   Mobile tweaks
   --------------------------- */
@media (max-width: 720px){
  .nav{ gap: 6px; }
  .nav a{ padding: 6px 8px; }

  .calendar-card .cal-grid{
    gap:6px;
  }
  .calendar-card .cal-cell{
    min-height: 90px;
  }
}


.auth-wrapper {
    display: flex;
    gap: 10px; /* space between login & register */
    justify-content: center;
    flex-wrap: wrap; /* stack vertically on small screens */
    margin-top: 20px;
}

    .auth-wrapper .auth-card {
        flex: 1 1 420px; /* minimum width per card */
        max-width: 520px; /* optional max */
    }