/* ─── KTI Links — shared styles ─────────────────────── */
:root {
  --navy: #0B2249;
  --navy-soft: #163B73;
  --ink: #10213D;
  --muted: #55637E;
  --dim: #8A93A6;
  --line: #E2E7F1;
  --surface: #FFFFFF;
  --bg: #F3F6FC;
  --accent: var(--navy);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: linear-gradient(120deg, #FFFFFF, #F5F8FF, #ECF1FC, #DCE6FA, #ECF1FC, #F5F8FF, #FFFFFF);
  background-size: 300% 300%;
  animation: bg-shift 22s ease-in-out infinite;
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
}

@keyframes bg-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  body { animation: none; background-position: 0% 50%; }
}

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 64px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Avatar */
.avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--navy);
}
.avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--navy);
  font-size: 26px; font-weight: 900;
}

.name { margin-top: 20px; font-size: 26px; font-weight: 900; letter-spacing: -0.5px; color: var(--navy); }
.handle { margin-top: 4px; font-size: 14px; color: var(--muted); }
.bio { margin-top: 12px; font-size: 14px; color: var(--muted); text-align: center; }

/* Link cards */
.links { width: 100%; margin-top: 32px; display: flex; flex-direction: column; gap: 12px; }
.link-card {
  position: relative;
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 17px 20px;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(11, 34, 73, .06);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.link-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--navy);
}
.link-card:hover { transform: scale(1.03); border-color: var(--navy); box-shadow: 0 4px 12px rgba(11, 34, 73, .1); }
.empty { text-align: center; color: var(--muted); font-size: 14px; }

/* Location */
.contact-row { width: 100%; margin-top: 20px; display: flex; justify-content: center; gap: 12px; }
.icon-btn {
  width: 48px;
  height: 48px;
  background: var(--navy);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease;
}
.icon-btn:hover { transform: scale(1.08); background: var(--navy-soft); }

.location-dialog .dialog-body { padding: 0; display: block; }
.map-frame {
  width: 100%;
  height: 240px;
  border: 0;
  display: block;
}
.map-link {
  display: block;
  padding: 14px 16px;
  color: var(--navy);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  border-top: 1px solid var(--line);
  transition: background .15s ease;
}
.map-link:hover { background: rgba(11, 34, 73, .06); }

/* Showcase (achievements / partners / accreditation / awards) */
.showcase-row { width: 100%; margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; }
.showcase-btn {
  flex: 1 1 calc(50% - 10px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px 12px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 1px 3px rgba(11, 34, 73, .06);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.showcase-btn:hover { transform: scale(1.03); border-color: var(--navy); box-shadow: 0 4px 12px rgba(11, 34, 73, .1); }

dialog.showcase-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  border: none;
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  padding: 0;
  width: min(460px, 92vw);
  max-height: 80vh;
  opacity: 0;
  transform: scale(.9);
  box-shadow: 0 20px 60px rgba(11, 34, 73, .25);
  transition: opacity .2s ease, transform .2s ease;
}
dialog.showcase-dialog.is-open {
  opacity: 1;
  transform: scale(1);
}
dialog.showcase-dialog::backdrop {
  background: rgba(10, 20, 40, 0);
  transition: background .2s ease;
}
dialog.showcase-dialog.is-open::backdrop { background: rgba(10, 20, 40, .55); }

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.dialog-head h2 { font-size: 16px; font-weight: 800; color: var(--navy); }
.dialog-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  font-family: inherit;
}
.dialog-close:hover { color: var(--navy); }

.dialog-body {
  padding: 18px;
  overflow-y: auto;
  max-height: calc(80vh - 58px);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.logo-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  min-height: 96px;
  box-shadow: 0 1px 4px rgba(11, 34, 73, .06);
  transition: transform .15s ease, box-shadow .15s ease;
}
a.logo-card:hover { transform: scale(1.04); box-shadow: 0 4px 12px rgba(11, 34, 73, .12); }
.logo-card img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--line);
}
.logo-card span { font-size: 10.5px; color: var(--ink); text-align: center; font-weight: 700; line-height: 1.3; }
.logo-placeholder {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800;
  text-transform: uppercase;
}

.admin-entry {
  margin-top: 48px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--dim);
  text-decoration: none;
}
.admin-entry:hover { color: var(--navy); }

/* ─── Admin panel ──────────────────────────────────────────── */
.admin-page { max-width: 520px; margin: 0 auto; padding: 32px 20px 64px; }

.admin-header { display: flex; align-items: center; justify-content: space-between; }
.admin-header h1 { font-size: 20px; font-weight: 900; color: var(--navy); }

.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  color: var(--navy);
  background: var(--surface);
  border: 1px solid var(--line);
  font-family: inherit;
}
.btn-red { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-danger { background: #FDE8EA; border-color: #FBD5D9; color: #B42318; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { display: block; width: 100%; text-align: center; padding: 13px; border-radius: 12px; }
.btn:hover { opacity: .8; }

/* Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tab {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
}
.tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Cards & forms */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-top: 12px;
  box-shadow: 0 1px 3px rgba(11, 34, 73, .05);
}
.card.hidden-link { opacity: .5; }

.card-title { font-size: 14px; font-weight: 700; word-break: break-word; color: var(--ink); }
.card-url { font-size: 12px; color: var(--muted); word-break: break-all; margin-top: 2px; }
.card-meta { font-size: 12px; color: var(--dim); margin-top: 4px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.card-row { display: flex; justify-content: space-between; gap: 10px; }
.order-btns { display: flex; flex-direction: column; gap: 4px; }

label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 14px 0 5px; }

input[type=text], input[type=url], input[type=password], select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
input:focus, select:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(11, 34, 73, .12); }

.msg { margin-top: 14px; padding: 11px 14px; border-radius: 10px; font-size: 13px; font-weight: 600; }
.msg-ok { background: #E7F8ED; color: #1B7F3A; }
.msg-err { background: #FDE8EA; color: #B42318; }

.note { font-size: 12px; color: var(--dim); margin-top: 14px; line-height: 1.5; }

.login-box { max-width: 360px; margin: 96px auto 0; padding: 0 20px; text-align: center; }
.login-box h1 { font-size: 20px; font-weight: 900; color: var(--navy); }
.login-box form { margin-top: 20px; text-align: left; }
.mt { margin-top: 16px; }
