/* SamZ Tracker — Web (Stage 1). Dark navy premium look, matching the app. */

:root {
  --page-top: #191c38;
  --page-bottom: #0d0d21;
  --card: #21264a;
  --card-line: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --text-dim: #9aa0c2;
  --accent: #5b7cfa;
  --gold: #d9b64e;
  --red: #ff5a5a;
  --green: #34c759;
  --orange: #ff9f0a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "Segoe UI", system-ui, sans-serif;
  background: linear-gradient(180deg, var(--page-top), var(--page-bottom)) fixed;
}

.hidden { display: none !important; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  position: sticky;
  top: 0;
  backdrop-filter: blur(12px);
  background: rgba(13, 13, 33, 0.72);
  border-bottom: 1px solid var(--card-line);
  z-index: 10;
}

.brand { font-size: 20px; font-weight: 800; letter-spacing: 0.3px; }
.brand-samz { color: #fff; }
.brand-ms { background: linear-gradient(180deg, #f2d67c, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.auth { display: flex; gap: 10px; align-items: center; }
/* CloudKit injects its own buttons; give them room to breathe. */
#apple-sign-in-button, #apple-sign-out-button { min-height: 32px; }

main { max-width: 1100px; margin: 0 auto; padding: 20px; }

.center {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
}

.lock-card {
  max-width: 460px;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 22px;
  padding: 34px 28px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.lock-emoji { font-size: 40px; }
.lock-card h1 { margin: 10px 0 8px; font-size: 24px; }
.lock-card p { color: var(--text-dim); line-height: 1.5; margin: 8px 0; }
.lock-card .hint { font-size: 14px; }

.spinner {
  width: 34px; height: 34px;
  border: 3px solid rgba(255,255,255,0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.section { margin-bottom: 34px; }
.section-head {
  display: flex; align-items: center; gap: 10px;
  margin: 6px 4px 14px;
}
.section-head h2 { font-size: 18px; margin: 0; }
.section-count {
  margin-left: auto; color: var(--text-dim); font-weight: 600;
  background: rgba(255,255,255,0.06); padding: 2px 10px; border-radius: 999px;
}

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

.card {
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.card h3 { margin: 0 0 2px; font-size: 17px; }
.card .subtitle { color: var(--text-dim); font-size: 14px; margin: 0 0 10px; }

.fields { display: grid; grid-template-columns: 1fr; gap: 6px; }
.field { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.field .k { color: var(--text-dim); }
.field .v { text-align: right; word-break: break-word; }

.pill {
  display: inline-block; font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; color: #fff;
  background: var(--accent);
}

.empty { color: var(--text-dim); font-style: italic; padding: 8px 4px; }

footer.note { color: var(--text-dim); font-size: 12px; text-align: center; padding: 24px; }
