:root {
  --bg: #070926;
  --bg-gradient: radial-gradient(circle at 50% 0%, #1c0e48 0%, #0c0d30 50%, #06081e 100%);
  --surface: #0e143d;
  --glass: rgba(16, 21, 62, 0.72);
  --glass-border: rgba(168, 85, 247, 0.22);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f8fafc;
  --muted: #94a3b8;
  --subtle: #64748b;
  --crimson: #b22833;
  --crimson-hover: #c92c3a;
  --crimson-glow: rgba(178, 40, 51, 0.45);
  --purple-deep: #2f0d6b;
  --purple-mid: #680d85;
  --purple-bright: #9b1778;
  --gold: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.35);
  --ok: #10b981;
  --warn: #f59e0b;
  --bad: #ef4444;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  background-image: var(--bg-gradient);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Ambient background effects */
.bg-mesh {
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(104, 13, 133, 0.18) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(178, 40, 51, 0.14) 0%, transparent 45%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.42;
  z-index: 0;
  pointer-events: none;
  animation: floatOrb 18s ease-in-out infinite;
}
.orb1 { width: 520px; height: 520px; background: #680d85; top: -140px; left: -100px; }
.orb2 { width: 480px; height: 480px; background: #0a1768; bottom: -120px; right: -80px; animation-delay: -6s; }
.orb3 { width: 360px; height: 360px; background: #b22833; top: 40%; left: 60%; opacity: 0.22; animation-delay: -11s; }

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(35px, 25px) scale(1.08); }
}

/* Topbar & Branding */
.topbar {
  position: relative;
  z-index: 10;
  padding: 16px 28px;
  background: rgba(7, 9, 38, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.2s ease;
}
.brand-link:hover { transform: scale(1.02); }

.logo-main-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 6px 12px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.logo-main-wrap:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.logo-main {
  height: 52px;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand-center {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.conf-tag {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #fbbf24;
}

.conf-sub {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 600;
  color: #f1f5f9;
  letter-spacing: 0.2px;
}

.conf-motto {
  font-size: 0.78rem;
  color: #c4b5fd;
  font-style: italic;
  letter-spacing: 0.4px;
}

.isa-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 8px 14px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.isa-logo-wrap:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.logo-isa {
  height: 46px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Main Container */
.wrap {
  position: relative;
  z-index: 2;
  width: min(960px, 92vw);
  margin: 0 auto;
  flex: 1;
  padding-bottom: 40px;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 42px 0 26px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: linear-gradient(135deg, rgba(104, 13, 133, 0.35), rgba(178, 40, 51, 0.35));
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #fce7f3;
  margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(104, 13, 133, 0.25);
}

.hero h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
  margin: 0 0 12px;
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.highlight-script {
  font-family: 'Oleo Script', cursive;
  font-size: 1.18em;
  font-weight: 700;
  background: linear-gradient(135deg, #ffd166 0%, #fbbf24 45%, #f472b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  filter: drop-shadow(0 2px 10px rgba(251, 191, 36, 0.3));
}

/* Diamond Divider (From ISACON Conference Theme) */
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 14px auto 20px;
  max-width: 280px;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.6), transparent);
}

.diamond {
  width: 9px;
  height: 9px;
  background: linear-gradient(135deg, #f43f5e, #a855f7);
  transform: rotate(45deg);
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.7);
}

.hero p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 auto 28px;
  max-width: 580px;
}

.hero p strong {
  color: #f1f5f9;
}

/* Glass Card */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px rgba(3, 5, 22, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Lookup Form */
.lookup {
  display: flex;
  gap: 12px;
  padding: 12px;
  max-width: 640px;
  margin: 0 auto;
  transition: all 0.25s ease;
}

.lookup:focus-within {
  border-color: rgba(244, 63, 94, 0.6);
  box-shadow: 0 0 0 3px rgba(178, 40, 51, 0.35), 0 20px 50px rgba(0, 0, 0, 0.45);
}

.lookup input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: #ffffff;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 600;
  padding: 12px 18px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.lookup input::placeholder {
  color: #717ca3;
  text-transform: none;
  font-weight: 400;
  letter-spacing: 0;
}

button { font: inherit; cursor: pointer; }

.lookup button {
  border: 0;
  border-radius: 14px;
  padding: 0 28px;
  font-weight: 700;
  font-size: 1rem;
  color: #ffffff;
  background: linear-gradient(135deg, var(--crimson) 0%, #c92c3a 100%);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 18px var(--crimson-glow);
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.lookup button:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 6px 24px rgba(178, 40, 51, 0.6);
}

.lookup button:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-msg {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 10px 18px;
  border-radius: 12px;
  margin: 16px auto 0;
  font-weight: 500;
  max-width: 540px;
}

/* Result Section */
.result {
  display: grid;
  gap: 22px;
  grid-template-columns: 1.25fr 1fr;
  padding-bottom: 20px;
  animation: rise 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.card { padding: 28px; }

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.chip {
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: rgba(147, 51, 234, 0.22);
  color: #e9d5ff;
  border: 1px solid rgba(168, 85, 247, 0.45);
}

.chip.award {
  background: rgba(245, 158, 11, 0.2);
  color: #fde047;
  border-color: rgba(245, 158, 11, 0.55);
}

.abs-no {
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 1.2px;
}

.hello { margin: 0; color: var(--muted); font-size: 0.95rem; }

.details h2 {
  margin: 4px 0 10px;
  font-size: 1.75rem;
  color: #ffffff;
  font-weight: 700;
}

.title {
  color: #cbd5e1;
  line-height: 1.55;
  margin: 0 0 20px;
  font-size: 1rem;
}

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

.grid div {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
}

.grid dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #94a3b8;
  margin-bottom: 4px;
}

.grid dd {
  margin: 0;
  font-weight: 600;
  color: #f8fafc;
  word-break: break-word;
}

.confirm-note {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
}
.confirm-note a {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 500;
}
.confirm-note a:hover { text-decoration: underline; }

/* Upload Card */
.upload h3 {
  margin: 0 0 14px;
  font-size: 1.3rem;
  color: #ffffff;
  font-weight: 700;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.3px;
}
.badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.badge.none { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; }
.badge.pending { background: rgba(245, 158, 11, 0.2); color: #fde047; }
.badge.accepted { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
.badge.rejected, .badge.blocked { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }

.meta {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 12px 0 0;
  line-height: 1.6;
  word-break: break-word;
}

.note-box {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fecaca;
  font-size: 0.92rem;
}

/* Upload Form Controls */
.btn-primary, .btn-ghost {
  border-radius: 14px;
  padding: 13px 22px;
  font-weight: 700;
  border: 0;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--crimson) 0%, #c92c3a 100%);
  width: 100%;
  margin-top: 16px;
  box-shadow: 0 4px 18px var(--crimson-glow);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 6px 24px rgba(178, 40, 51, 0.65);
}
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  margin-top: 14px;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

.uform { margin-top: 16px; }

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 30px 18px;
  border: 2px dashed rgba(168, 85, 247, 0.35);
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(104, 13, 133, 0.06);
}
.dropzone:hover, .dropzone.over {
  border-color: #f43f5e;
  background: rgba(178, 40, 51, 0.12);
  transform: scale(1.01);
}
.dropzone input { display: none; }

.dz-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: #ffffff;
  word-break: break-all;
}
.dz-sub { color: #cbd5e1; font-size: 0.88rem; }

.warn { color: var(--muted); font-size: 0.85rem; margin: 12px 0 0; }
.warn.strong { color: #fde047; font-weight: 600; }

.uform textarea {
  width: 100%;
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text);
  font: inherit;
  padding: 12px 14px;
  resize: vertical;
  outline: 0;
}
.uform textarea:focus {
  border-color: #a855f7;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.3);
}

.progress {
  position: relative;
  height: 28px;
  margin-top: 16px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #680d85 0%, #b22833 100%);
  transition: width 0.15s ease;
}
.pct {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.deadline { margin: 0 0 8px; color: #fde047; font-weight: 600; }

.flash { animation: flash 1.2s ease; }
@keyframes flash {
  30% { background: rgba(16, 185, 129, 0.22); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.22); border-radius: 14px; }
}

/* Dialog */
.dlg {
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  background: #0f143a;
  color: var(--text);
  padding: 28px;
  max-width: 420px;
  width: 90vw;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}
.dlg::backdrop {
  background: rgba(4, 6, 22, 0.75);
  backdrop-filter: blur(6px);
}
.dlg h3 { margin: 0 0 10px; font-size: 1.3rem; color: #ffffff; }
.dlg p { color: var(--muted); margin: 0 0 8px; line-height: 1.5; }
.dlg-actions { display: flex; gap: 12px; }
.dlg-actions button { flex: 1; margin-top: 14px; width: auto; }

/* Footer */
.foot {
  position: relative;
  z-index: 10;
  padding: 34px 20px 28px;
  border-top: 1px solid var(--glass-border);
  background: rgba(5, 7, 28, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: center;
}

.foot-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.foot-logos {
  display: flex;
  align-items: center;
  gap: 22px;
}

.foot-logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.foot-main-box,
.foot-isa-box {
  background: #ffffff;
  padding: 4px 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.foot-main-box .foot-logo-img,
.foot-isa-box .foot-logo-img { height: 36px; }

.foot-text {
  margin: 0;
  font-size: 0.95rem;
  color: #e2e8f0;
}
.foot-text strong { color: #fbbf24; }

.foot-sub {
  margin: 0;
  font-size: 0.84rem;
  color: #94a3b8;
}

.foot-copy {
  margin: 0;
  font-size: 0.76rem;
  color: #64748b;
}

/* Responsive */
@media (max-width: 840px) {
  .topbar-inner {
    flex-direction: column;
    text-align: center;
    gap: 14px;
  }
  .brand-center { order: 2; }
  .isa-logo-wrap { order: 3; }
  .result { grid-template-columns: 1fr; }
  .lookup { flex-direction: column; }
  .lookup button { padding: 14px; justify-content: center; }
  .grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .logo-main { height: 60px; }
  .logo-isa { height: 38px; }
  .grid { grid-template-columns: 1fr; }
  .card { padding: 20px; }
}

[hidden] { display: none !important; }
