/* Hackathon Platform — business-grade UI */
:root {
  --hp-primary: #0d47a1;
  --hp-primary-dark: #0a3d8a;
  --hp-accent: #00bfa5;
  --hp-sidebar: #1e293b;
  --hp-sidebar-hover: #334155;
  --hp-body: #f1f5f9;
  --hp-card: #ffffff;
  --hp-text: #0f172a;
  --hp-muted: #64748b;
  --hp-border: #e2e8f0;
  --hp-radius: 12px;
  --hp-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
}

html { scroll-behavior: smooth; }

body.hp-body {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--hp-text);
  background: var(--hp-body);
  min-height: 100vh;
}

/* Public navbar */
.hp-navbar {
  background: linear-gradient(135deg, var(--hp-primary) 0%, var(--hp-primary-dark) 100%);
  box-shadow: var(--hp-shadow);
}
.hp-navbar .navbar-brand {
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hp-hero {
  background: linear-gradient(135deg, #0d47a1 0%, #1565c0 40%, #00838f 100%);
  color: #fff;
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 1;
}
.hp-hero .container { position: relative; z-index: 1; }
.hp-hero h1 {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.hp-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.hp-btn-light {
  background: #fff;
  color: var(--hp-primary);
  font-weight: 600;
  border: none;
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
}
.hp-btn-outline-light {
  border: 2px solid rgba(255,255,255,0.85);
  color: #fff;
  font-weight: 600;
  background: transparent;
  padding: 0.55rem 1.35rem;
  border-radius: 8px;
}
.hp-section-title {
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.hp-card-soft {
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius);
  box-shadow: var(--hp-shadow);
  background: var(--hp-card);
  transition: transform 0.2s, box-shadow 0.2s;
}
.hp-card-soft:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12);
}
.hp-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e3f2fd, #b2ebf2);
  color: var(--hp-primary);
  font-size: 1.25rem;
}
footer.hp-footer {
  background: var(--hp-text);
  color: #94a3b8;
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}
footer.hp-footer a { color: #cbd5e1; text-decoration: none; }
footer.hp-footer a:hover { color: #fff; }

/* Admin layout */
.hp-admin-wrapper { display: flex; min-height: 100vh; }
.hp-sidebar {
  width: 268px;
  flex-shrink: 0;
  background: var(--hp-sidebar);
  color: #e2e8f0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
}
.hp-sidebar-brand {
  padding: 1.25rem 1.25rem 1rem;
  font-weight: 700;
  font-size: 1.05rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: #fff;
}
.hp-sidebar-nav .nav-link {
  color: #cbd5e1;
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  margin: 2px 0.5rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.hp-sidebar-nav .nav-link:hover,
.hp-sidebar-nav .nav-link.active {
  background: var(--hp-sidebar-hover);
  color: #fff;
}
.hp-sidebar-nav .nav-section {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  padding: 1rem 1.25rem 0.35rem;
}
.hp-admin-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.hp-admin-topbar {
  background: #fff;
  border-bottom: 1px solid var(--hp-border);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.hp-admin-content {
  padding: 1.5rem;
  flex: 1;
}
.hp-kpi {
  border-radius: var(--hp-radius);
  border: 1px solid var(--hp-border);
  background: #fff;
  padding: 1.25rem;
  height: 100%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.hp-kpi .label { font-size: 0.8rem; color: var(--hp-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.hp-kpi .value { font-size: 1.75rem; font-weight: 700; color: var(--hp-text); }
.hp-table-wrap { background: #fff; border-radius: var(--hp-radius); border: 1px solid var(--hp-border); overflow: hidden; }
.table.hp-table thead { background: #f8fafc; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--hp-muted); }

@media (max-width: 991px) {
  .hp-sidebar {
    position: fixed;
    left: -280px;
    transition: left 0.25s;
  }
  .hp-sidebar.show { left: 0; }
}

/* Participant portal */
.hp-pt-wrapper { display: flex; min-height: 100vh; }
.hp-pt-sidebar {
  width: 272px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 55%, #172554 100%);
  color: #e2e8f0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.12);
}
.hp-pt-sidebar .hp-pt-brand {
  padding: 1.35rem 1.15rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.hp-pt-sidebar .hp-pt-brand .title {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: #fff;
}
.hp-pt-sidebar .hp-pt-brand .subtitle {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #64748b;
  margin-top: 0.25rem;
}
.hp-pt-nav .nav-link {
  color: #94a3b8;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  margin: 1px 0.65rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid transparent;
}
.hp-pt-nav .nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
}
.hp-pt-nav .nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(13, 71, 161, 0.45), rgba(0, 191, 165, 0.25));
  border-color: rgba(255,255,255,0.12);
}
.hp-pt-nav .nav-section {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #475569;
  padding: 1.1rem 1.25rem 0.4rem;
}
.hp-pt-user {
  margin: 1rem 0.75rem 0;
  padding: 0.85rem;
  border-radius: 12px;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.06);
}
.hp-pt-user .avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  flex-shrink: 0;
}
.hp-pt-user .name { font-size: 0.85rem; font-weight: 600; color: #fff; }
.hp-pt-user .email { font-size: 0.7rem; color: #64748b; word-break: break-all; }

.hp-pt-topbar {
  background: #fff;
  border-bottom: 1px solid var(--hp-border);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.hp-pt-topbar h1 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--hp-text);
}
.hp-pt-topbar .breadcrumb {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
}
.hp-pt-content {
  padding: 1.5rem;
  flex: 1;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  min-height: 0;
}

.hp-pt-stat {
  border-radius: 14px;
  border: 1px solid var(--hp-border);
  background: #fff;
  padding: 1.15rem 1.25rem;
  height: 100%;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.hp-pt-stat .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}
.hp-pt-stat .icon.blue { background: #eff6ff; color: #1d4ed8; }
.hp-pt-stat .icon.teal { background: #f0fdfa; color: #0d9488; }
.hp-pt-stat .icon.amber { background: #fffbeb; color: #b45309; }
.hp-pt-stat .icon.slate { background: #f1f5f9; color: #475569; }
.hp-pt-stat .label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--hp-muted); }
.hp-pt-stat .value { font-size: 1.5rem; font-weight: 700; color: var(--hp-text); }

.hp-pt-card {
  border-radius: 14px;
  border: 1px solid var(--hp-border);
  background: #fff;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}
.hp-pt-card .hp-pt-card-h {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--hp-border);
  background: #fafbfc;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.hp-pt-card .hp-pt-card-b { padding: 1.25rem; }

.hp-pt-empty {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--hp-muted);
}
.hp-pt-empty i { font-size: 2.5rem; opacity: 0.35; display: block; margin-bottom: 0.75rem; }

.hp-pt-progress {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.hp-pt-progress .bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
}

.hp-pt-timeline { position: relative; padding-left: 1.25rem; }
.hp-pt-timeline::before {
  content: '';
  position: absolute;
  left: 0.35rem;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 2px;
  background: #e2e8f0;
  border-radius: 1px;
}
.hp-pt-timeline .item {
  position: relative;
  padding-bottom: 1rem;
  font-size: 0.875rem;
}
.hp-pt-timeline .item::before {
  content: '';
  position: absolute;
  left: -1rem;
  top: 0.35rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #e2e8f0;
}

.hp-pt-badge-soft { font-weight: 600; font-size: 0.75rem; padding: 0.35em 0.65em; border-radius: 6px; }

@media (max-width: 991px) {
  .hp-pt-sidebar {
    position: fixed;
    left: -280px;
    transition: left 0.25s;
    z-index: 1040;
  }
  .hp-pt-sidebar.show { left: 0; }
}

/* Admin portal */
.hp-sidebar.hp-ad-sidebar {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 55%, #172554 100%);
  box-shadow: 4px 0 28px rgba(15, 23, 42, 0.12);
}
.hp-ad-brand {
  padding: 1.25rem 1.15rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.hp-ad-brand .title {
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  letter-spacing: -0.02em;
}
.hp-ad-brand .subtitle {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #64748b;
  margin-top: 0.35rem;
}
.hp-ad-nav .nav-link.active {
  background: linear-gradient(135deg, rgba(13, 71, 161, 0.45), rgba(0, 191, 165, 0.2)) !important;
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff !important;
}
.hp-ad-topbar {
  background: #fff;
  border-bottom: 1px solid var(--hp-border);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.hp-ad-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hp-text);
}
.hp-ad-content {
  padding: 1.5rem;
  flex: 1;
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
  min-height: 0;
}
.hp-ad-card {
  border-radius: 14px;
  border: 1px solid var(--hp-border);
  background: #fff;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.hp-ad-card .hp-ad-card-h {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--hp-border);
  background: linear-gradient(180deg, #fafbfc, #fff);
  font-weight: 600;
  font-size: 0.95rem;
}
.hp-ad-card .hp-ad-card-b { padding: 1.15rem 1.25rem; }
.hp-ad-stat {
  border-radius: 14px;
  border: 1px solid var(--hp-border);
  background: #fff;
  padding: 1.15rem 1.2rem;
  height: 100%;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.hp-ad-stat .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.65rem;
  font-size: 1.2rem;
}
.hp-ad-stat .icon.p { background: #eff6ff; color: #1d4ed8; }
.hp-ad-stat .icon.g { background: #f0fdf4; color: #15803d; }
.hp-ad-stat .icon.o { background: #fff7ed; color: #c2410c; }
.hp-ad-stat .icon.s { background: #f1f5f9; color: #475569; }
.hp-ad-stat .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hp-muted);
}
.hp-ad-stat .value { font-size: 1.55rem; font-weight: 700; color: var(--hp-text); }
