/* ============================================================
   Soest Centraal — Hoofdstijlblad
   Mobile-first, geen externe frameworks
   ============================================================ */

/* --- Lucide Icons ----------------------------------------- */
[data-lucide] { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.app-header [data-lucide] { width: 20px; height: 20px; color: #fff; stroke-width: 2; }
.app-header__back [data-lucide] { width: 20px; height: 20px; color: #fff; stroke-width: 2; }
.tab-bar [data-lucide] { width: 15px; height: 15px; vertical-align: -3px; margin-right: 3px; stroke-width: 2; }
.team-card__chevron [data-lucide] { width: 16px; height: 16px; color: var(--text-muted); transition: transform .2s; stroke-width: 2; }
.team-card.open .team-card__chevron [data-lucide] { transform: rotate(180deg); }
.empty-state__icon [data-lucide] { display: block; width: 48px; height: 48px; color: var(--border); stroke-width: 1.5; margin: 0 auto 12px; }
.login-card__logo-icon [data-lucide] { display: block; width: 36px; height: 36px; color: var(--green); stroke-width: 1.5; margin: 0 auto; }

/* --- Variabelen ------------------------------------------- */
:root {
  --green:       #0D6B3C;
  --green-dark:  #094d2b;
  --green-light: #e8f5ef;
  --orange:      #E05C1A;
  --blue:        #1B55AC;
  --blue-light:  #e8f0fb;
  --bg:          #F0F4F1;
  --surface:     #FFFFFF;
  --text:        #1A1A2E;
  --text-muted:  #5A6472;
  --border:      #DDE3E0;
  --radius:      14px;
  --radius-sm:   8px;
  --shadow:      0 2px 12px rgba(0,0,0,.08);
  --shadow-md:   0 4px 24px rgba(0,0,0,.12);
  --header-h:    60px;
  --font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* --- Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom, 16px);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* --- App-header ------------------------------------------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.app-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.app-header__logo {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.app-header__back {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 4px;
  opacity: .85;
}
.app-header__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.3px;
}
.app-header__sub {
  font-size: .7rem;
  color: rgba(255,255,255,.7);
  display: block;
  margin-top: -2px;
}

/* --- Home screen (iOS-stijl) ------------------------------ */
.home-body {
  background: #071f12;
  overflow-x: hidden;
}

.wallpaper {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(160deg, #0c4a22 0%, #145c2e 25%, #0a3d1c 55%, #071812 100%);
}
.wallpaper::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 15% 15%, rgba(52,199,89,.18) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 75%, rgba(10,132,255,.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 30% at 50% 50%, rgba(255,149,0,.06) 0%, transparent 60%);
}

.home-wrap {
  position: relative;
  z-index: 1;
  padding: 0 22px calc(env(safe-area-inset-bottom, 0px) + 32px);
  max-width: 430px;
  margin: 0 auto;
}

/* Topbar */
.home-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 44px) 0 28px;
}
.home-topbar__logo {
  width: 46px;
  height: 46px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.home-topbar__logo [data-lucide] { display: block; width: 22px; height: 22px; color: #fff; stroke-width: 2; }
.home-topbar__title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.5px;
  line-height: 1.1;
}
.home-topbar__sub {
  font-size: .72rem;
  color: rgba(255,255,255,.55);
  margin-top: 2px;
}

/* App grid */
.app-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 12px;
  margin-bottom: 28px;
}

.app-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  text-decoration: none;
}
.app-icon:active .app-icon__bg { transform: scale(.88); opacity: .8; }

.app-icon__bg {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 22.5%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .12s ease, opacity .12s ease;
  box-shadow: 0 6px 20px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.25);
}
.app-icon__bg [data-lucide] { display: block; width: 44%; height: 44%; stroke-width: 1.8; color: #fff; }
.app-icon__label {
  font-size: .65rem;
  color: #fff;
  font-weight: 500;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
}

.app-icon--green  .app-icon__bg { background: linear-gradient(145deg, #3dd37a 0%, #1a8a3e 100%); }
.app-icon--blue   .app-icon__bg { background: linear-gradient(145deg, #3b9eff 0%, #0055cc 100%); }
.app-icon--insta  .app-icon__bg { background: linear-gradient(145deg, #f58529 0%, #dd2a7b 50%, #8134af 100%); }
.app-icon--orange .app-icon__bg { background: linear-gradient(145deg, #ffb340 0%, #d07000 100%); }
.app-icon--teal   .app-icon__bg { background: linear-gradient(145deg, #5ee7df 0%, #00897b 100%); }
.app-icon--red    .app-icon__bg { background: linear-gradient(145deg, #ff6b6b 0%, #c0175b 100%); }

/* Widgets (frosted glass) */
.widget {
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 22px;
  padding: 16px 18px;
  margin-bottom: 16px;
  color: #fff;
}

.widget__header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: rgba(255,255,255,.55);
}
.widget__header [data-lucide] { display: inline-block; width: 13px; height: 13px; stroke-width: 2.5; vertical-align: middle; }
.widget__more {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1px;
  color: rgba(255,255,255,.4);
  font-size: .72rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}
.widget__more [data-lucide] { display: inline-block; width: 12px; height: 12px; stroke-width: 2.5; vertical-align: middle; }

/* Widget: standings tabel */
.widget .standings-mini { color: #fff; }
.widget .standings-mini th {
  color: rgba(255,255,255,.4);
  border-bottom-color: rgba(255,255,255,.1);
}
.widget .standings-mini td { border-bottom-color: rgba(255,255,255,.07); }
.widget .standings-mini tr:last-child td { border-bottom: none; }
.widget .pos-badge { background: rgba(255,255,255,.15); color: #fff; }

/* Widget: nieuws */
.widget__news-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: #fff;
  -webkit-tap-highlight-color: transparent;
}
.widget__news-item:last-child { border-bottom: none; padding-bottom: 2px; }
.widget__news-item:active { opacity: .7; }
.widget__news-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255,255,255,.1);
}
.widget__news-body { flex: 1; min-width: 0; }
.widget__news-title {
  font-size: .86rem;
  font-weight: 500;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.widget__news-meta {
  font-size: .7rem;
  color: rgba(255,255,255,.42);
  margin-top: 3px;
}

/* --- Tile stijlen (voetbal/nieuws pagina's) --------------- */
/* Voetbal-preview: mini stand */
.tile__standings-preview {
  padding: 0 16px 14px;
}
.standings-mini {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}
.standings-mini th {
  color: var(--text-muted);
  font-weight: 600;
  text-align: left;
  padding: 4px 4px 4px 0;
  border-bottom: 1px solid var(--border);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.standings-mini th:not(:first-child),
.standings-mini td:not(:first-child) {
  text-align: center;
}
.standings-mini td {
  padding: 5px 4px 5px 0;
  border-bottom: 1px solid var(--border);
}
.standings-mini tr:last-child td { border-bottom: none; }
.pos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: .72rem;
  font-weight: 700;
  background: var(--green-light);
  color: var(--green-dark);
}
.tile__more-link {
  display: block;
  text-align: center;
  padding: 8px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--green);
  border-top: 1px solid var(--border);
}
.tile--nieuws .tile__more-link { color: var(--blue); }

/* Nieuws-preview */
.news-preview {
  padding: 0 16px 4px;
}
.news-item-mini {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.news-item-mini:last-child { border-bottom: none; }
.news-item-mini__title {
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-item-mini__meta {
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* --- Instagram-strip -------------------------------------- */
.insta-section {
  padding: 8px 16px 20px;
  max-width: 640px;
  margin: 0 auto;
}
.insta-section__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.insta-section__title {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.insta-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.insta-strip::-webkit-scrollbar { display: none; }
.insta-thumb {
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.5);
  font-size: 28px;
}
.insta-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.insta-placeholder {
  font-size: .75rem;
  color: var(--text-muted);
  text-align: center;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  width: 100%;
}

/* --- Volledige pagina's ------------------------------------ */
.page-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-header__back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  font-size: 18px;
  color: var(--text);
}
.page-header__title {
  font-size: 1.05rem;
  font-weight: 700;
}

.page-content {
  padding: 16px;
  max-width: 640px;
  margin: 0 auto;
}

/* --- Tab-balk (Veld / Zaal) -------------------------------- */
.tab-bar {
  display: flex;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--header-h);
  z-index: 50;
}
.tab-bar a {
  flex: 1;
  text-align: center;
  padding: 12px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  transition: color .15s, border-color .15s;
}
.tab-bar a.active {
  color: var(--green);
  border-bottom-color: var(--green);
}

/* --- Team-kaart ------------------------------------------- */
.team-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  overflow: hidden;
}
.team-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  cursor: pointer;
}
.team-card__name {
  font-weight: 700;
  font-size: .95rem;
}
.team-card__pos {
  font-size: .75rem;
  color: var(--text-muted);
  background: var(--green-light);
  color: var(--green-dark);
  border-radius: 20px;
  padding: 2px 10px;
  font-weight: 600;
}
.team-card__body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--border);
  display: none;
}
.team-card__body.open { display: block; }

/* --- Nieuws-pagina ---------------------------------------- */
.news-list { display: flex; flex-direction: column; gap: 10px; }
.news-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.news-card:active { transform: scale(.99); }
.news-card__thumb {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg);
}
.news-card__body { flex: 1; min-width: 0; }
.news-card__title {
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card__meta {
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: 5px;
  display: flex;
  gap: 6px;
}
.news-card__meta span::before { content: '·'; margin-right: 4px; }
.news-card__meta span:first-child::before { display: none; }

/* --- Lege staat ------------------------------------------- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state__icon { margin-bottom: 12px; }
.empty-state__text { font-size: .9rem; line-height: 1.5; }

/* --- Offline-pagina --------------------------------------- */
.offline-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80dvh;
  padding: 40px 20px;
  text-align: center;
}

/* === BEHEERPANEEL ========================================= */
.admin-body {
  background: #f4f6f9;
  font-family: var(--font);
  color: var(--text);
  min-height: 100vh;
}
.admin-topbar {
  background: var(--green-dark);
  color: #fff;
  padding: 0 20px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .9rem;
  font-weight: 700;
}
.admin-topbar a { color: rgba(255,255,255,.75); font-size: .8rem; font-weight: 400; }
.admin-topbar a:hover { color: #fff; }
.admin-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}
.admin-nav a {
  padding: 12px 18px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.admin-nav a.active, .admin-nav a:hover { color: var(--green); border-bottom-color: var(--green); }

.admin-content {
  max-width: 900px;
  margin: 24px auto;
  padding: 0 16px;
}
.admin-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}
.admin-card h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.admin-card h3 {
  font-size: .9rem;
  font-weight: 700;
  margin: 16px 0 8px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  font-size: .75rem;
}

/* --- Formulieren ------------------------------------------ */
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  transition: border-color .15s;
}
.form-control:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(13,107,60,.12);
}
select.form-control { cursor: pointer; }

.standings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
}

/* --- Knoppen ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter .15s, transform .1s;
  font-family: var(--font);
  text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: #dc3545; color: #fff; }
.btn-sm { padding: 5px 12px; font-size: .8rem; }

/* --- Tabellen --------------------------------------------- */
.data-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.data-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
}
.data-table td { padding: 10px 10px; border-bottom: 1px solid var(--border); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg); }
.badge {
  padding: 2px 8px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
}
.badge-veld { background: var(--green-light); color: var(--green-dark); }
.badge-zaal { background: var(--blue-light);  color: var(--blue); }

/* --- Meldingen -------------------------------------------- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-size: .88rem;
  font-weight: 500;
}
.alert-success { background: #d1fae5; color: #065f46; }
.alert-error   { background: #fee2e2; color: #991b1b; }
.alert-info    { background: var(--blue-light); color: var(--blue); }

/* --- Upload-zone ------------------------------------------ */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--green);
  background: var(--green-light);
}
.upload-zone__icon { font-size: 36px; margin-bottom: 8px; }
.upload-zone__text { font-size: .85rem; color: var(--text-muted); }
.upload-zone__hint { font-size: .75rem; color: var(--text-muted); margin-top: 4px; }

/* --- Login-pagina ----------------------------------------- */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 100%);
  padding: 20px;
}
.login-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 32px 28px;
  width: 100%;
  max-width: 360px;
}
.login-card__logo {
  text-align: center;
  margin-bottom: 24px;
}
.login-card__logo-icon {
  font-size: 40px;
  background: var(--green-light);
  width: 72px;
  height: 72px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.login-card__title {
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
}
.login-card__sub {
  font-size: .8rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 2px;
}

/* --- Stats op dashboard ----------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  text-align: center;
}
.stat-card__num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--green);
  line-height: 1;
}
.stat-card__label {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}
