/* SMK YPIA Portal v1.2.0 */
:root {
  --bg: #f4f7fb;
  --surface: rgba(255,255,255,.78);
  --surface-strong: rgba(255,255,255,.94);
  --text: #111827;
  --muted: #6b7280;
  --line: rgba(255,255,255,.9);
  --shadow: 0 18px 46px rgba(15,23,42,.12);
}

[data-theme="dark"] {
  --bg: #070b12;
  --surface: rgba(22,28,42,.76);
  --surface-strong: rgba(28,36,54,.94);
  --text: #f8fafc;
  --muted: #aab4c5;
  --line: rgba(255,255,255,.12);
  --shadow: 0 22px 58px rgba(0,0,0,.38);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100svh;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(10,132,255,.22), transparent 280px),
    radial-gradient(circle at top right, rgba(94,92,230,.18), transparent 270px),
    radial-gradient(circle at 50% 100%, rgba(52,199,89,.10), transparent 280px),
    var(--bg);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.page {
  width: min(760px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 28px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo-wrap {
  width: 56px;
  height: 56px;
  border-radius: 19px;
  background: linear-gradient(145deg, #0a84ff, #5e5ce6);
  box-shadow: 0 12px 28px rgba(10,132,255,.28);
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: white;
  font-weight: 900;
  font-size: 23px;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(255,255,255,.94);
  padding: 7px;
  display: block;
}

.logo-fallback { display: none; }

.brand h1 {
  margin: 0;
  font-size: clamp(18px, 4vw, 24px);
  line-height: 1.05;
  letter-spacing: -.03em;
}

.brand p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.theme {
  border: 1px solid var(--line);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
  cursor: pointer;
  font-size: 18px;
  flex: 0 0 auto;
}

.hero,
.account-card,
.recommend,
.search,
.stat,
.proof,
.major {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
}

.hero {
  border-radius: 32px;
  padding: 18px;
  margin-bottom: 14px;
}

.eyebrow {
  display: inline-flex;
  color: #0a84ff;
  background: rgba(10,132,255,.10);
  border: 1px solid rgba(10,132,255,.18);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 850;
  margin-bottom: 12px;
}

.hero h2 {
  margin: 0;
  font-size: clamp(25px, 7vw, 42px);
  line-height: .98;
  letter-spacing: -.06em;
}

.hero p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 15px;
}

.quick,
.account-btn {
  min-height: 46px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 850;
  font-size: 14px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.quick.primary,
.account-btn.primary {
  color: white;
  border: 0;
  background: linear-gradient(145deg, #0a84ff, #5e5ce6);
  box-shadow: 0 12px 28px rgba(10,132,255,.24);
}

.account-card {
  border-radius: 28px;
  padding: 14px 15px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.account-card strong {
  display: block;
  font-size: 15px;
}

.account-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}

.account-actions { flex: 0 0 auto; }
.account-btn { min-height: 40px; padding: 0 15px; }

.roles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-bottom: 14px;
}

.role {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 8px;
  box-shadow: 0 8px 20px rgba(15,23,42,.08);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 850;
}

.role.active {
  color: white;
  border-color: transparent;
  background: linear-gradient(145deg, #0a84ff, #5e5ce6);
}

.recommend {
  border-radius: 28px;
  padding: 15px;
  margin: 0 0 14px;
}

.recommend-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.recommend-head strong {
  display: block;
  font-size: 15px;
  letter-spacing: -.02em;
}

.recommend-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}

.recommend-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 850;
  white-space: nowrap;
}

.recommend-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.recommend-link {
  min-height: 42px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(15,23,42,.07);
}

.privacy-note {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
  text-align: center;
}

.search {
  margin-bottom: 18px;
  border-radius: 999px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}

.search input::placeholder { color: var(--muted); }

.section-title {
  margin: 22px 2px 14px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
}

.section-title h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -.02em;
}

.section-title span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 12px;
}

.app {
  text-align: center;
  min-width: 0;
}

.icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 8px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-size: 31px;
  color: white;
  box-shadow: 0 14px 26px rgba(15,23,42,.17);
  transition: transform .16s ease, filter .16s ease;
  position: relative;
  overflow: hidden;
}

.icon::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.38), transparent 46%);
  pointer-events: none;
}

.app:active .icon { transform: scale(.94); }
.app:hover .icon { transform: translateY(-2px); filter: brightness(1.05); }

.app span {
  display: block;
  font-size: 12.5px;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 2px;
}

.blue { background: linear-gradient(145deg, #0a84ff, #0066d6); }
.purple { background: linear-gradient(145deg, #7c5cff, #5e5ce6); }
.green { background: linear-gradient(145deg, #34c759, #1f9d45); }
.orange { background: linear-gradient(145deg, #ff9f0a, #ff6b00); }
.pink { background: linear-gradient(145deg, #ff375f, #bf2a70); }
.cyan { background: linear-gradient(145deg, #32ade6, #007aff); }
.teal { background: linear-gradient(145deg, #00c7be, #008f8c); }
.indigo { background: linear-gradient(145deg, #5856d6, #2f2f9e); }
.red { background: linear-gradient(145deg, #ff453a, #c81e1e); }
.yellow { background: linear-gradient(145deg, #ffd60a, #ff9f0a); }
.gray { background: linear-gradient(145deg, #8e8e93, #48484a); }
.dark { background: linear-gradient(145deg, #344054, #101828); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.stat {
  border-radius: 22px;
  padding: 13px 10px;
  text-align: center;
  min-height: 92px;
  display: grid;
  align-content: center;
}

.stat strong {
  display: block;
  font-size: 22px;
  letter-spacing: -.04em;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.25;
}

.proofs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.proof {
  border-radius: 24px;
  padding: 15px;
  min-height: 110px;
}

.proof b {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 7px;
}

.proof p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.majors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.major {
  border-radius: 24px;
  padding: 15px;
}

.major strong {
  display: block;
  font-size: 18px;
  letter-spacing: -.03em;
}

.major span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.35;
}

.footer {
  margin-top: 28px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.footer-links a {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--text);
  box-shadow: 0 8px 18px rgba(15,23,42,.08);
}

.hidden { display: none; }

@media (max-width: 520px) {
  .page { width: min(100% - 22px, 760px); }
  .grid { gap: 16px 8px; }
  .icon { width: 63px; height: 63px; border-radius: 21px; font-size: 28px; }
  .app span { font-size: 12px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .proofs, .majors, .recommend-links { grid-template-columns: 1fr; }
  .hero { padding: 16px; }
  .roles { grid-template-columns: repeat(2, 1fr); }
  .account-card, .recommend-head { flex-direction: column; align-items: stretch; }
  .account-actions { width: 100%; }
}

@media (min-width: 700px) {
  .page { padding-top: 34px; }
  .grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 24px 18px;
  }
  .icon { width: 78px; height: 78px; border-radius: 27px; }
}
