:root {
  --navy:#071d35;
  --deep:#0b2b49;
  --blue:#126d9b;
  --aqua:#43d5cf;
  --cyan:#a5eee9;
  --paper:#f3f8fa;
  --white:#ffffff;
  --text:#142e43;
  --muted:#78909f;
  --line:#e6eef2;
}
* { box-sizing:border-box; }
body {
  margin:0;
  background:var(--paper);
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC",
    "Microsoft YaHei",sans-serif;
  font-size:15px;
  padding-bottom:90px;
}
a { color:inherit;text-decoration:none; }
.topbar {
  height:66px;padding:0 19px;background:var(--navy);
  display:flex;align-items:center;justify-content:space-between;
  color:white;
}
.brand { display:flex;align-items:center;gap:10px;font-size:20px;font-weight:850; }
.brand-icon { color:var(--aqua);font-size:35px; }
.brand small { display:block;font-size:10px;font-weight:400;color:#a9c5d4; }
.avatar {
  width:36px;height:36px;border-radius:50%;display:grid;place-items:center;
  background:var(--aqua);color:var(--navy);font-weight:800;
}
.top-login { border:1px solid #66869c;padding:7px 15px;border-radius:20px; }
.page { max-width:620px;margin:auto;padding:18px 16px 30px; }
.ocean-hero {
  position:relative;overflow:hidden;border-radius:25px;padding:27px 23px 20px;
  color:white;background:
  radial-gradient(ellipse at 90% 5%,#287c9b 0,transparent 42%),
  linear-gradient(145deg,#071d35,#0d4566 70%,#087d91);
  box-shadow:0 12px 28px #123d5522;
}
.ocean-hero:after {
  content:"";position:absolute;width:360px;height:130px;right:-90px;bottom:70px;
  border:1px solid #8ce9e644;border-radius:50%;transform:rotate(-13deg);
  box-shadow:0 12px 0 #8ce9e622,0 24px 0 #8ce9e611;
}
.hero-label,.eyebrow { font-size:10px;letter-spacing:2px;font-weight:800;color:var(--aqua); }
.ocean-hero h1 { font-size:31px;line-height:1.35;margin:17px 0 9px;letter-spacing:1px; }
.ocean-hero p { color:#c4dce6;font-size:13px; }
.hero-wave { color:#6de2db;font-size:23px;letter-spacing:4px;margin:16px 0; }
.hero-bottom {
  display:grid;grid-template-columns:repeat(3,1fr);gap:8px;
  border-top:1px solid #ffffff25;padding-top:17px;margin-top:12px;
  position:relative;z-index:1;
}
.hero-bottom strong { display:block;font-size:22px;color:white; }
.hero-bottom small { display:block;color:#b6d3df;font-size:11px;margin-top:4px; }
.section-heading {
  display:flex;align-items:end;justify-content:space-between;margin:27px 2px 13px;
}
.section-heading h2 { font-size:18px;margin:5px 0 0; }
.section-heading>a { color:var(--blue);font-size:12px; }
.upload-banner {
  background:linear-gradient(115deg,#0c496b,#137f99);
  color:white;border-radius:19px;padding:19px;display:flex;
  justify-content:space-between;align-items:center;
}
.upload-banner strong,.upload-banner small { display:block; }
.upload-banner strong { font-size:21px;margin:5px 0; }
.upload-banner small { color:#c5e9ed;font-size:11px; }
.upload-circle {
  width:49px;height:49px;display:grid;place-items:center;border-radius:50%;
  background:var(--aqua);color:var(--navy);font-size:30px;
}
.activity-row {
  display:flex;align-items:center;gap:12px;background:white;
  border:1px solid var(--line);padding:13px;border-radius:15px;margin-bottom:9px;
}
.activity-icon { width:42px;height:42px;border-radius:13px;background:#e7f7f7;
  display:grid;place-items:center;font-size:21px; }
.activity-info { flex:1;min-width:0; }
.activity-info strong,.activity-info small { display:block; }
.activity-info small { color:var(--muted);font-size:11px;margin-top:5px; }
.activity-distance { color:#087e99;font-size:14px; }
.empty-state { padding:30px 15px;text-align:center;color:var(--muted);background:white;border-radius:15px; }
.bottom-nav {
  position:fixed;z-index:10;bottom:0;left:0;right:0;height:72px;
  padding:7px 5px max(7px,env(safe-area-inset-bottom));
  background:#ffffffed;backdrop-filter:blur(16px);
  border-top:1px solid var(--line);display:flex;justify-content:space-around;
}
.bottom-nav a {
  flex:1;display:flex;flex-direction:column;align-items:center;
  justify-content:center;gap:3px;color:#8a9ba6;font-size:10px;
}
.bottom-nav a span { font-size:21px;line-height:22px; }
.bottom-nav a.active { color:#087e99;font-weight:800; }
.bottom-nav .nav-upload { color:#087e99;font-weight:800; }
.nav-upload span {
  width:34px;height:34px;background:var(--navy);color:white;
  border-radius:12px;display:grid;place-items:center;font-size:25px;
}
.auth-wrap { max-width:430px;margin:30px auto;text-align:center; }
.auth-logo { font-size:55px;color:#0d8ba2; }
.auth-wrap h1,.page-title h1 { font-size:27px;margin:10px 0; }
.muted,.page-title p { color:var(--muted);font-size:13px; }
.tiny { font-size:11px; }
.form-card {
  margin-top:20px;padding:21px;background:white;border:1px solid var(--line);
  border-radius:20px;box-shadow:0 8px 24px #163e5510;text-align:left;
}
.form-card>label { display:block;font-size:13px;font-weight:750;margin:15px 0 8px; }
.form-card input:not([type=radio]):not([type=file]),.form-card select {
  width:100%;height:48px;border:1px solid #dce7ed;border-radius:11px;
  padding:0 13px;font-size:14px;background:#fbfdfe;outline:none;
}
.form-card input:focus { border-color:#31b9b8; }
.primary-button {
  width:100%;border:0;border-radius:12px;padding:15px;margin-top:20px;
  background:linear-gradient(110deg,#087a9b,#12aaa9);
  color:white;font-size:15px;font-weight:800;cursor:pointer;
}
.auth-switch { margin:22px 0 13px;font-size:13px; }
.auth-switch a { color:#07879d;font-weight:800; }
.page-title { margin:8px 2px 20px; }
.type-options { display:grid;grid-template-columns:1fr 1fr;gap:12px; }
.type-option { margin:0!important;cursor:pointer; }
.type-option input { position:absolute;opacity:0; }
.type-card {
  min-height:112px;border:2px solid var(--line);border-radius:15px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:5px;font-size:25px;background:#f8fbfc;
}
.type-card strong { font-size:16px; }
.type-card small { font-size:11px;color:var(--muted); }
.type-option input:checked+.type-card { border-color:#0e9eaa;background:#e8fafa; }
.file-drop {
  margin-top:10px;padding:25px 12px;border:2px dashed #a8d6dc;
  background:#f3fbfc;border-radius:16px;text-align:center;cursor:pointer;
}
.file-drop input { display:none; }
.file-drop span,.file-drop strong,.file-drop small { display:block; }
.file-icon { font-size:30px;color:#078ca0; }
.file-drop strong { margin:8px; }
.file-drop small { color:var(--muted);font-size:11px; }
.file-name { margin-top:12px;color:#078ca0;font-size:12px; }
.privacy-note {
  background:#fff8e8;border-radius:10px;padding:12px;margin-top:15px;
  color:#86652b;font-size:11px;line-height:1.7;
}
.notice { padding:12px 14px;border-radius:11px;margin:5px 0 13px;font-size:13px; }
.notice.success { background:#e3f8ee;color:#176e48; }
.notice.danger { background:#fff0ed;color:#b94b36; }
.notice.warning { background:#fff7df;color:#896c27; }

.tabs {
  display:flex;
  gap:8px;
  overflow-x:auto;
  margin:14px 0;
}
.tab {
  padding:10px 17px;
  background:white;
  border:1px solid var(--line);
  border-radius:22px;
  white-space:nowrap;
  font-size:12px;
}
.tab.selected {
  color:white;
  background:var(--deep);
  border-color:var(--deep);
}
.leader-list { margin-top:16px; }
.leader-row {
  display:flex;
  align-items:center;
  gap:11px;
  padding:14px 10px;
  background:white;
  border-bottom:1px solid var(--line);
}
.rank-no { width:28px;text-align:center;font-weight:800;font-size:16px; }
.leader-avatar,.profile-avatar {
  display:grid;
  place-items:center;
  border-radius:50%;
  background:linear-gradient(135deg,#087c9a,#51d4c8);
  color:white;
  font-weight:800;
}
.leader-avatar { width:40px;height:40px; }
.rank-top { font-size:20px; }
.leader-info { flex:1; }
.leader-info strong,.leader-info small { display:block; }
.leader-info small { color:var(--muted);font-size:11px;margin-top:4px; }
.leader-distance { color:#087e99;font-size:13px; }
.stats-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin:15px 0;
}
.stat-card {
  background:white;
  padding:17px;
  border-radius:15px;
  border:1px solid var(--line);
}
.stat-card small,.stat-card strong,.stat-card span { display:block; }
.stat-card small { color:var(--muted);font-size:11px; }
.stat-card strong { font-size:23px;margin-top:9px;color:var(--deep); }
.stat-card span { font-size:11px;color:var(--muted);margin-top:4px; }
.stat-card.featured {
  background:linear-gradient(135deg,#0a3554,#087d98);
  color:white;
}
.stat-card.featured strong,.stat-card.featured small,.stat-card.featured span {
  color:white;
}
.profile-hero {
  padding:28px 15px;
  text-align:center;
  color:white;
  background:linear-gradient(145deg,#092743,#087c98);
  border-radius:20px;
}
.profile-avatar {
  width:70px;height:70px;margin:auto;
  background:#43d5cf;color:#07304b;font-size:27px;
}
.profile-hero h1 { margin:13px 0 5px;font-size:22px; }
.profile-hero p { margin:0;color:#c3e4ed;font-size:12px; }
.record-card {
  background:white;
  padding:18px;
  border-radius:19px;
  border:1px solid var(--line);
}
.record-distance { text-align:center;padding:15px; }
.record-distance strong { font-size:43px;color:#087e99; }
.record-distance span { color:var(--muted); }
.record-image { width:100%;height:auto;border-radius:14px;margin-top:10px; }
.record-notes { background:#f3f8fa;padding:12px;border-radius:10px; }
.record-type { color:#07879d;font-weight:800;margin-bottom:12px; }
.profile-link { display:block;margin-top:20px;color:#087e99;font-weight:700; }
.form-card textarea {
  width:100%;min-height:85px;padding:12px;
  border:1px solid #dce7ed;border-radius:11px;
  resize:vertical;font:inherit;
}
@media(min-width:700px) {
  .page { padding-top:28px; }
  .ocean-hero { padding:35px; }
}


/* Langlangtuan avatar and admin identity */
.avatar-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.leader-avatar,
.profile-avatar,
.record-author-avatar,
.avatar {
  overflow: hidden;
}

.admin-label {
  display: inline-block;
  margin-left: 4px;
  color: #48a9bd;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.4;
  vertical-align: middle;
  white-space: nowrap;
}

.avatar-edit-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 8px 15px;
  border: 1px solid rgba(72,169,189,.4);
  border-radius: 20px;
  color: #48a9bd;
  font-size: 13px;
  text-decoration: none;
}

.record-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.record-author-avatar {
  display: flex;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #d9efef;
  color: #087e99;
  text-decoration: none;
}

.record-author small {
  display: block;
  margin-top: 3px;
  color: #8a9aaa;
  font-size: 12px;
}
