/* ============================================================
   HYPERCRUIT CANDIDATE PORTAL — LAYOUT
   hc-portal.css  |  Drop into /static/css/
   Import AFTER hc-tokens.css
   ============================================================ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--hc-font-ui);
  font-size: 14px;
  background: var(--hc-bg-page);
  color: var(--hc-text-primary);
  -webkit-font-smoothing: antialiased;
  transition: background var(--hc-transition), color var(--hc-transition);
}

/* ════════════════════════════════════════════════════════════
   PORTAL SHELL
   ════════════════════════════════════════════════════════════ */
.hc-portal {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ════════════════════════════════════════════════════════════
   SIDEBAR
   ════════════════════════════════════════════════════════════ */
.hc-sidebar {
  width: 220px;
  min-width: 220px;
  background: var(--hc-bg-sidebar);
  display: flex;
  flex-direction: column;
  border-right: 0.5px solid var(--hc-sidebar-divider);
  transition: background var(--hc-transition);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Logo lockup */
.hc-sidebar__logo {
  padding: 20px 18px 16px;
  border-bottom: 0.5px solid var(--hc-sidebar-divider);
  flex-shrink: 0;
}
.hc-sidebar__brand {
  font-family: var(--hc-font-display);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.01em;
}
.hc-sidebar__tagline {
  font-size: 10px;
  color: var(--hc-sidebar-label);
  margin-top: 3px;
  letter-spacing: 0.02em;
}

/* Verified identity chip */
.hc-verified-chip {
  margin: 14px 12px 0;
  background: var(--hc-verified-bg);
  border: 0.5px solid var(--hc-verified-border);
  border-radius: var(--hc-radius-md);
  padding: 10px 12px;
  transition: background var(--hc-transition), border-color var(--hc-transition);
}
.hc-verified-chip__label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hc-verified-text);
  margin-bottom: 7px;
}
.hc-verified-chip__row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--hc-verified-done);
  margin-bottom: 4px;
  transition: color var(--hc-transition);
}
.hc-verified-chip__row i { font-size: 12px; }
.hc-verified-chip__row--todo {
  color: var(--hc-verified-todo);
  cursor: pointer;
}
.hc-verified-chip__row--todo:hover {
  color: var(--hc-verified-text);
}

/* Nav sections */
.hc-sidebar__section {
  padding: 14px 10px 6px;
}
.hc-sidebar__section-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hc-sidebar-label);
  padding: 0 8px;
  margin-bottom: 6px;
}
.hc-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--hc-radius-md);
  color: var(--hc-sidebar-text);
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  margin-bottom: 2px;
  transition: background var(--hc-transition), color var(--hc-transition);
  white-space: nowrap;
}
.hc-nav-item:hover {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.85);
}
.hc-nav-item.active {
  background: var(--hc-sidebar-active-bg);
  color: var(--hc-sidebar-active-text);
}
.hc-nav-item i { font-size: 16px; flex-shrink: 0; }
.hc-nav-item__badge {
  margin-left: auto;
  background: var(--hc-accent);
  color: var(--hc-accent-text);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--hc-radius-pill);
  transition: background var(--hc-transition), color var(--hc-transition);
}

/* Sidebar footer (user chip) */
.hc-sidebar__footer {
  margin-top: auto;
  padding: 14px 12px;
  border-top: 0.5px solid var(--hc-sidebar-divider);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.hc-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--hc-accent);
  color: var(--hc-accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  transition: background var(--hc-transition), color var(--hc-transition);
}
.hc-sidebar__user-name {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
}
.hc-sidebar__user-loc {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
}
.hc-sidebar__signout {
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  cursor: pointer;
  margin-top: 2px;
  text-decoration: none;
  display: block;
}
.hc-sidebar__signout:hover { color: rgba(255,255,255,0.5); }

/* ════════════════════════════════════════════════════════════
   MAIN AREA
   ════════════════════════════════════════════════════════════ */
.hc-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--hc-bg-page);
  transition: background var(--hc-transition);
}

/* ── Topbar ── */
.hc-topbar {
  background: var(--hc-bg-surface);
  border-bottom: 0.5px solid var(--hc-border);
  padding: 0 28px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  transition: background var(--hc-transition), border-color var(--hc-transition);
}
.hc-topbar__greeting {
  font-family: var(--hc-font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--hc-text-primary);
  transition: color var(--hc-transition);
}
.hc-topbar__sub {
  font-size: 12px;
  color: var(--hc-text-secondary);
  margin-top: 1px;
  transition: color var(--hc-transition);
}
.hc-topbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Theme toggle */
.hc-theme-toggle {
  width: 44px;
  height: 24px;
  border-radius: var(--hc-radius-pill);
  background: var(--hc-toggle-track);
  border: none;
  cursor: pointer;
  padding: 3px;
  display: flex;
  align-items: center;
  transition: background var(--hc-transition);
  flex-shrink: 0;
}
.hc-theme-toggle__knob {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--hc-toggle-knob);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--hc-toggle-track);
  transition: transform var(--hc-transition), background var(--hc-transition);
}
[data-theme="dark"] .hc-theme-toggle__knob {
  transform: translateX(20px);
}

/* Bell icon button */
.hc-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--hc-radius-md);
  background: var(--hc-bg-page);
  border: 0.5px solid var(--hc-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--hc-text-secondary);
  transition: background var(--hc-transition), border-color var(--hc-transition);
}
.hc-icon-btn:hover {
  background: var(--hc-border);
}
.hc-icon-btn i { font-size: 17px; }

/* Primary CTA button */
.hc-btn-primary {
  background: var(--hc-accent);
  color: var(--hc-accent-text);
  border: none;
  padding: 8px 16px;
  border-radius: var(--hc-radius-md);
  font-family: var(--hc-font-ui);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--hc-transition), color var(--hc-transition);
  white-space: nowrap;
}
.hc-btn-primary:hover { background: var(--hc-accent-hover); }

/* Language selector */
.hc-lang-select {
  background: var(--hc-bg-page);
  border: 0.5px solid var(--hc-border);
  border-radius: var(--hc-radius-md);
  padding: 6px 10px;
  font-family: var(--hc-font-ui);
  font-size: 12px;
  color: var(--hc-text-secondary);
  cursor: pointer;
  transition: background var(--hc-transition);
}

/* ── Scrollable content ── */
.hc-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px 40px;
}
.hc-content::-webkit-scrollbar { width: 6px; }
.hc-content::-webkit-scrollbar-track { background: transparent; }
.hc-content::-webkit-scrollbar-thumb {
  background: var(--hc-border);
  border-radius: 3px;
}

/* ════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE — 375px target (iPhone)
   ════════════════════════════════════════════════════════════ */
.hc-menu-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: none;
  border: 1px solid var(--hc-border);
  border-radius: var(--hc-radius-md);
  cursor: pointer;
  color: var(--hc-text-secondary);
  font-size: 1.1rem; flex-shrink: 0;
}
.hc-menu-toggle:hover { background: var(--hc-border); }

.hc-sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 199;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.hc-sidebar-overlay.active { display: block; }

.hc-topbar__title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 768px) {
  .hc-menu-toggle { display: flex; }
  .hc-sidebar {
    position: fixed; left: -280px; top: 0; bottom: 0;
    width: 280px !important; min-width: 280px !important; z-index: 200;
    transition: left 0.25s ease;
    box-shadow: none;
    overflow-y: auto;
    background: #0d1526 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: rgba(255,255,255,0.75) !important;
  }
  .hc-sidebar .hc-nav-item {
    color: rgba(255,255,255,0.75) !important;
  }
  .hc-sidebar .hc-nav-item.active {
    color: #93c5fd !important;
    background: rgba(37,99,235,0.12) !important;
  }
  .hc-sidebar .hc-sidebar__section-label {
    color: rgba(255,255,255,0.35) !important;
  }
  .hc-sidebar .hc-sidebar__user-name {
    color: rgba(255,255,255,0.8) !important;
  }
  .hc-sidebar .hc-sidebar__signout {
    color: rgba(255,255,255,0.35) !important;
  }
  .hc-sidebar.open {
    left: 0 !important;
    box-shadow: 4px 0 24px rgba(0,0,0,0.5);
  }
  .hc-main { width: 100%; }
  .hc-topbar { padding: 0 12px; gap: 0.5rem; }
  .hc-topbar__sub { display: none; }
  .hc-content { padding: 12px 12px 40px; }
  .hc-mfield input, .hc-mfield select, .hc-mfield textarea { font-size: 16px; }
  .hc-modal { width: 95vw !important; max-width: 95vw !important; max-height: 90vh; overflow-y: auto; }
  .hc-cand-modal { width: 100vw !important; max-width: 100vw !important; border-radius: 12px 12px 0 0; }
  .hc-btn-primary { display: none; }
  .hc-theme-toggle { display: none; }
  .hc-topbar__right { flex-shrink: 0; overflow: hidden; }
  .hc-nav-item { color: var(--hc-text-primary) !important; }
  .hc-nav-item__icon { color: var(--hc-text-secondary) !important; }
  .hc-sidebar__section-label { color: var(--hc-sidebar-label) !important; }
}
@media (max-width: 480px) {
  .hc-topbar__greeting { font-size: 0.88rem; }
  .hc-topbar__right { gap: 0.4rem; }
}