/* ============================================================
   DGEN CONSTELLATION — UI v2
   Warm cream bg · rounded pills · constellation pattern
   ============================================================ */

:root {
  --ink: #1C2B3A;
  --ink-soft: #4A5568;
  --ink-faint: #8A9BB0;
  --ink-ghost: #C4CDD8;
  --bg: #F2EFE9;
  --bg-card: #FFFFFF;
  --bg-sidebar: #F2EFE9;
  --bg-hover: #EBE7E0;
  --bg-active: #FFFFFF;
  --orange: #E84E1B;
  --orange-light: #FDF0EB;
  --tag-bg: #FFFFFF;
  --tag-border: #CBD5E0;
  --tag-active-bg: #1C2B3A;
  --tag-active-text: #FFFFFF;
  --border: #E2DDD5;
  --border-strong: #B0A898;
  --border-focus: #1C2B3A;
  --success: #2a6b3c;
  --error: #c0392b;
  --navbar-h: 60px;
  --sidebar-w: 340px;
  --font-sans: 'Inter', 'DM Sans', system-ui, sans-serif;
  --font-mono: 'DM Mono', monospace;
  --radius-pill: 100px;
  --radius-card: 0px;
  --transition: 0.15s ease;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-sans); background: var(--bg); color: var(--ink); line-height: 1.55; min-height: 100vh; }
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }

/* ============================================================
   AVATAR
   ============================================================ */

.avatar {
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #D8D0C8;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.avatar-placeholder svg { width: 55%; height: 55%; opacity: 0.5; }
.avatar-sm  { width: 56px;  height: 56px;  }
.avatar-md  { width: 56px;  height: 56px;  }
.avatar-lg  { width: 80px;  height: 80px;  }
.avatar-xl  { width: 120px; height: 120px; }

/* ============================================================
   NAVBAR
   ============================================================ */

.navbar {
  height: var(--navbar-h);
  background: var(--bg-card);
  border-bottom: 3px solid var(--orange);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-star { font-size: 16px; color: var(--orange); line-height: 1; }
.brand-name { font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.brand-sub  { font-size: 15px; color: var(--ink-faint); font-weight: 400; }

.navbar-search { flex: 1; max-width: 400px; margin: 0 auto; }
.search-wrap { position: relative; display: flex; align-items: center; }
.search-icon { position: absolute; left: 14px; font-size: 13px; color: var(--ink-faint); pointer-events: none; }

.navbar-search #searchInput {
  width: 100%;
  padding: 9px 32px 9px 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 14px;
  background: var(--bg);
  color: var(--ink);
  outline: none;
  transition: border-color var(--transition);
}
.navbar-search #searchInput::placeholder { color: var(--ink-ghost); }
.navbar-search #searchInput:focus { border-color: var(--border-strong); background: var(--bg-card); }

.search-clear {
  position: absolute; right: 12px; background: none; border: none;
  cursor: pointer; font-size: 16px; color: var(--ink-faint); line-height: 1; padding: 2px;
}
.search-clear:hover { color: var(--ink); }

.navbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.btn-nav {
  font-size: 13px; color: var(--ink-soft); text-decoration: none;
  padding: 6px 16px; border: 1.5px solid var(--border);
  border-radius: var(--radius-pill); transition: var(--transition);
}
.btn-nav:hover { border-color: var(--border-strong); color: var(--ink); text-decoration: none; }

/* User menu */
.user-menu { position: relative; }
.user-menu-btn {
  display: flex; align-items: center; gap: 10px;
  background: none; border: none; cursor: pointer;
  padding: 6px 10px; border-radius: var(--radius-pill);
  transition: var(--transition); font-family: var(--font-sans);
}
.user-menu-btn:hover { background: var(--bg-hover); }

.user-avatar-img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.user-avatar-placeholder {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-hover); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: var(--ink-soft); flex-shrink: 0;
}
.user-name { font-size: 14px; font-weight: 500; color: var(--ink); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chevron { font-size: 10px; color: var(--ink-ghost); transition: transform var(--transition); }
.user-menu.open .chevron { transform: rotate(180deg); }

.user-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: 12px; min-width: 180px; z-index: 2000;
  overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}
.user-dropdown.show { display: block; }
.user-dropdown a {
  display: block; padding: 10px 16px; font-size: 14px;
  color: var(--ink-soft); text-decoration: none; transition: var(--transition);
  border-bottom: 1px solid var(--border);
}
.user-dropdown a:last-child { border-bottom: none; }
.user-dropdown a:hover { background: var(--bg-hover); color: var(--ink); }
.dropdown-divider { height: 1px; background: var(--border); }
.dropdown-logout { color: var(--error) !important; }

/* ============================================================
   TOASTS
   ============================================================ */
.toast {
  position: fixed; top: calc(var(--navbar-h) + 12px); right: 20px;
  z-index: 9999; padding: 11px 18px; border-radius: 8px;
  font-size: 13px; color: #fff;
  display: flex; align-items: center; gap: 8px;
  animation: toastIn 0.2s ease, toastOut 0.2s ease 3.8s forwards; max-width: 340px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.toast-success { background: var(--success); }
.toast-error   { background: var(--error); }
.toast-info    { background: var(--ink); }
@keyframes toastIn  { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }

/* ============================================================
   HOME LAYOUT
   ============================================================ */

.home-page { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

.filters-bar { background: var(--bg-card); border-bottom: 1px solid var(--border); padding: 8px 20px; }
.filters-inner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filters-label { font-size: 12px; color: var(--ink-faint); white-space: nowrap; }
.active-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.match-count { font-size: 12px; color: var(--ink-faint); margin-left: auto; white-space: nowrap; }
.clear-filters { font-size: 12px; color: var(--ink-faint); text-decoration: none; border-left: 1px solid var(--border); padding-left: 10px; }
.clear-filters:hover { color: var(--error); text-decoration: none; }

.browse-layout { display: flex; flex: 1; overflow: hidden; }

/* ============================================================
   SIDEBAR
   ============================================================ */

.profile-sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden; flex-shrink: 0;
}

.profile-list { flex: 1; overflow-y: auto; }

.profile-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  transition: background var(--transition), border-color var(--transition);
  background: var(--bg-sidebar);
}
.profile-card:hover { background: var(--bg-hover); }
.profile-card.active {
  background: var(--bg-card);
  border-left-color: var(--orange);
}

.card-info { flex: 1; min-width: 0; }
.card-name { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.3; margin-bottom: 1px; }
.card-org  { font-size: 13px; color: var(--ink-faint); margin-bottom: 8px; }

.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* ============================================================
   TAG PILLS — rounded, bordered, varied
   ============================================================ */

.tag-lozenge {
  display: inline-flex; align-items: center;
  padding: 4px 13px;
  background: var(--tag-bg);
  color: var(--ink);
  border: 1.5px solid var(--tag-border);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 400;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  line-height: 1.4; white-space: nowrap;
}
.tag-lozenge:hover { background: var(--bg-hover); border-color: var(--ink); }
.tag-lozenge.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.tag-lozenge.tag-ib1 { border-color: var(--orange); color: var(--orange); font-weight: 500; }
.tag-lozenge.tag-ib1:hover { background: var(--orange); color: #fff; border-color: var(--orange); }
.tag-lozenge.tag-ib1.active { background: var(--orange); color: #fff; border-color: var(--orange); }

.tag-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 14px;
  background: var(--tag-bg);
  color: var(--ink);
  border: 1.5px solid var(--tag-border);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 400;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  line-height: 1.4;
}
.tag-badge:hover { background: var(--bg-hover); border-color: var(--ink); }
.tag-badge.tag-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.tag-badge.tag-selected { background: var(--ink); color: #fff; border-color: var(--ink); }
.tag-badge.tag-ib1 { border-color: var(--orange); color: var(--orange); font-weight: 500; }
.tag-badge.tag-ib1:hover { background: var(--orange); color: #fff; }
.tag-badge.tag-active.tag-ib1 { background: var(--orange); border-color: var(--orange); color: #fff; }
.tag-remove { opacity: 0.6; }
.filter-remove-btn { cursor: pointer; }
.tag-remove-btn { background: none; border: none; cursor: pointer; font-size: 13px; color: rgba(255,255,255,0.75); padding: 0; line-height: 1; margin-left: 2px; }
.tag-remove-btn:hover { color: #fff; }

.empty-state-small { text-align: center; padding: 40px 16px; }
.empty-state-small .empty-icon { font-size: 24px; margin-bottom: 8px; opacity: 0.3; }
.empty-state-small p { color: var(--ink-faint); font-size: 13px; margin-bottom: 10px; }

/* ============================================================
   PROFILE MAIN — with constellation bg pattern
   ============================================================ */

.profile-main {
  flex: 1; overflow-y: auto;
  background: var(--bg);
  position: relative;
}

/* Constellation dot-network SVG background */
.profile-main::before {
  content: '';
  position: fixed;
  top: var(--navbar-h);
  right: 0;
  width: calc(100% - var(--sidebar-w));
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='600'%3E%3Cg opacity='0.18'%3E%3Ccircle cx='120' cy='80'  r='2.5' fill='%23B0A898'/%3E%3Ccircle cx='340' cy='140' r='2'   fill='%23B0A898'/%3E%3Ccircle cx='580' cy='60'  r='3'   fill='%23B0A898'/%3E%3Ccircle cx='720' cy='200' r='2'   fill='%23B0A898'/%3E%3Ccircle cx='200' cy='260' r='2.5' fill='%23B0A898'/%3E%3Ccircle cx='460' cy='300' r='2'   fill='%23B0A898'/%3E%3Ccircle cx='650' cy='380' r='3'   fill='%23B0A898'/%3E%3Ccircle cx='80'  cy='420' r='2'   fill='%23B0A898'/%3E%3Ccircle cx='310' cy='460' r='2.5' fill='%23B0A898'/%3E%3Ccircle cx='560' cy='500' r='2'   fill='%23B0A898'/%3E%3Ccircle cx='740' cy='520' r='2.5' fill='%23B0A898'/%3E%3Ccircle cx='420' cy='180' r='1.5' fill='%23B0A898'/%3E%3Ccircle cx='160' cy='350' r='1.5' fill='%23B0A898'/%3E%3Ccircle cx='680' cy='140' r='1.5' fill='%23B0A898'/%3E%3Cline x1='120' y1='80'  x2='340' y2='140' stroke='%23B0A898' stroke-width='0.8'/%3E%3Cline x1='340' y1='140' x2='580' y2='60'  stroke='%23B0A898' stroke-width='0.8'/%3E%3Cline x1='580' y1='60'  x2='720' y2='200' stroke='%23B0A898' stroke-width='0.8'/%3E%3Cline x1='340' y1='140' x2='460' y2='300' stroke='%23B0A898' stroke-width='0.8'/%3E%3Cline x1='200' y1='260' x2='460' y2='300' stroke='%23B0A898' stroke-width='0.8'/%3E%3Cline x1='460' y1='300' x2='650' y2='380' stroke='%23B0A898' stroke-width='0.8'/%3E%3Cline x1='200' y1='260' x2='80'  y2='420' stroke='%23B0A898' stroke-width='0.8'/%3E%3Cline x1='310' y1='460' x2='560' y2='500' stroke='%23B0A898' stroke-width='0.8'/%3E%3Cline x1='650' y1='380' x2='740' y2='520' stroke='%23B0A898' stroke-width='0.8'/%3E%3Cline x1='120' y1='80'  x2='200' y2='260' stroke='%23B0A898' stroke-width='0.6'/%3E%3Cline x1='80'  y1='420' x2='310' y2='460' stroke='%23B0A898' stroke-width='0.6'/%3E%3Cline x1='560' y1='500' x2='740' y2='520' stroke='%23B0A898' stroke-width='0.6'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: cover;
  pointer-events: none;
  z-index: 0;
}

.profile-detail-inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
  padding: 40px 48px 80px;
}

.empty-state-center {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  height: 100%; min-height: 300px; text-align: center; padding: 40px;
}
.empty-big-icon { font-size: 24px; color: var(--ink-ghost); margin-bottom: 14px; letter-spacing: 0.3em; }
.empty-state-center h2 { font-size: 18px; font-weight: 500; color: var(--ink-soft); margin-bottom: 6px; }
.empty-state-center p { color: var(--ink-faint); font-size: 14px; }

/* ============================================================
   PROFILE DETAIL CONTENT
   ============================================================ */

.profile-header {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.profile-header-info { flex: 1; padding-top: 4px; }

.profile-name {
  font-size: 32px; font-weight: 600;
  color: var(--ink); line-height: 1.15;
  margin-bottom: 6px; letter-spacing: -0.02em;
}

.profile-org  { font-size: 15px; color: var(--ink-soft); margin-bottom: 4px; }
.profile-location { font-size: 14px; color: var(--ink-faint); margin-bottom: 4px; display: flex; align-items: center; gap: 4px; }
.profile-location::before { content: '⊙'; font-size: 11px; opacity: 0.6; }
.profile-website { font-size: 13px; color: var(--ink-faint); font-family: var(--font-mono); }
.profile-website a { color: var(--ink-faint); }
.profile-website a:hover { color: var(--ink); text-decoration: underline; }

.profile-social-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.social-link { font-size: 13px; color: var(--ink-faint); text-decoration: none; }
.social-link:hover { color: var(--orange); text-decoration: underline; }

.profile-actions { margin-top: 14px; }

/* Bio section */
.profile-bio { margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }

.section-heading {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 14px;
}

.bio-content { font-size: 15px; line-height: 1.75; color: var(--ink-soft); }
.bio-content h2, .bio-content h3 { font-size: 15px; font-weight: 600; color: var(--ink); margin: 16px 0 6px; }
.bio-content p { margin-bottom: 10px; }
.bio-content a { color: var(--orange); text-decoration: underline; }
.bio-content ul, .bio-content ol { padding-left: 20px; margin-bottom: 10px; }
.bio-content strong { color: var(--ink); }
.bio-content code { font-family: var(--font-mono); font-size: 12px; background: var(--bg); padding: 1px 5px; border-radius: 3px; }

/* Tags section */
.profile-tags { margin-bottom: 24px; }
.tag-group { margin-bottom: 20px; }
.tag-group-name { font-size: 11px; font-weight: 600; color: var(--ink-faint); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.08em; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-hint { font-size: 11px; color: var(--ink-ghost); margin-top: 14px; font-style: italic; }

/* ============================================================
   STANDALONE PROFILE
   ============================================================ */
.standalone-profile { max-width: 800px; margin: 0 auto; padding: 32px 28px 80px; }
.standalone-back { margin-bottom: 20px; }
.back-link { font-size: 13px; color: var(--ink-faint); text-decoration: none; }
.back-link:hover { color: var(--ink); text-decoration: underline; }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-page { background: var(--bg); display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-container { width: 100%; max-width: 380px; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.auth-brand { display: flex; align-items: center; gap: 6px; text-decoration: none; }
.brand-name-lg { font-size: 20px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.auth-card { width: 100%; background: var(--bg-card); border: 1.5px solid var(--border); border-radius: 16px; padding: 32px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 4px 24px rgba(0,0,0,0.07); }
.auth-title { font-size: 20px; font-weight: 600; color: var(--ink); text-align: center; }
.auth-subtitle { font-size: 14px; color: var(--ink-faint); text-align: center; margin-top: -8px; }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 18px; background: var(--bg-card); border: 1.5px solid var(--border); border-radius: var(--radius-pill); font-family: var(--font-sans); font-size: 14px; color: var(--ink-soft); text-decoration: none; transition: border-color var(--transition), color var(--transition); cursor: pointer; }
.btn-google:hover { border-color: var(--border-strong); color: var(--ink); text-decoration: none; }
.google-icon { width: 18px; height: 18px; flex-shrink: 0; }
.auth-divider { display: flex; align-items: center; gap: 10px; color: var(--ink-ghost); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-switch { text-align: center; font-size: 13px; color: var(--ink-faint); }
.auth-switch a { color: var(--ink-soft); text-decoration: underline; }
.auth-note { text-align: center; font-size: 12px; color: var(--ink-ghost); line-height: 1.5; }
.alert { padding: 10px 14px; border-radius: 8px; font-size: 13px; border: 1px solid transparent; }
.alert-error { background: #fdf0f0; color: var(--error); border-color: #f5cccc; }
.alert-info { background: var(--bg); color: var(--ink-soft); border-color: var(--border); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary { display: inline-block; padding: 9px 20px; background: var(--ink); color: #fff; border: 1.5px solid var(--ink); border-radius: var(--radius-pill); font-family: var(--font-sans); font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: none; transition: opacity var(--transition); line-height: 1.4; }
.btn-primary:hover { opacity: 0.82; text-decoration: none; }
.btn-secondary { display: inline-block; padding: 9px 20px; background: var(--bg-card); color: var(--ink-soft); border: 1.5px solid var(--border); border-radius: var(--radius-pill); font-family: var(--font-sans); font-size: 13px; font-weight: 400; cursor: pointer; text-decoration: none; transition: border-color var(--transition), color var(--transition); line-height: 1.4; }
.btn-secondary:hover { border-color: var(--border-strong); color: var(--ink); text-decoration: none; }
.btn-text { background: none; border: none; color: var(--ink-faint); cursor: pointer; font-size: 12px; text-decoration: none; padding: 0; font-family: var(--font-sans); }
.btn-text:hover { color: var(--ink); text-decoration: underline; }
.btn-admin { background: #FFEC00 !important; border-color: #FFEC00 !important; color: #1C2B3A !important; font-weight: 600 !important; }
.btn-admin:hover { background: #ffe000 !important; opacity: 1 !important; }

/* ============================================================
   EDIT PROFILE (inherits ef-* from below)
   ============================================================ */
.edit-body { background: var(--bg); }

/* ============================================================
   THEME SWITCHER
   ============================================================ */
.theme-switcher { position: fixed; bottom: 16px; right: 16px; z-index: 500; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.theme-switcher-toggle { background: var(--bg-card); border: 1.5px solid var(--border); border-radius: var(--radius-pill); padding: 5px 14px; font-family: var(--font-sans); font-size: 11px; color: var(--ink-faint); cursor: pointer; letter-spacing: 0.05em; text-transform: uppercase; transition: border-color var(--transition), color var(--transition); }
.theme-switcher-toggle:hover { color: var(--ink); border-color: var(--border-strong); }
.theme-options { display: none; background: var(--bg-card); border: 1.5px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,0.10); }
.theme-options.open { display: block; }
.theme-option { display: flex; align-items: center; gap: 10px; padding: 9px 16px; font-size: 13px; font-family: var(--font-sans); color: var(--ink-soft); cursor: pointer; border-bottom: 1px solid var(--border); border: none; background: none; width: 100%; text-align: left; transition: background var(--transition); }
.theme-option:last-child { border-bottom: none; }
.theme-option:hover { background: var(--bg-hover); color: var(--ink); }
.theme-option.active { font-weight: 600; color: var(--ink); }
.theme-swatch { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--border); flex-shrink: 0; }

/* ============================================================
   IB1 THEME
   ============================================================ */
[data-theme="ib1"] {
  --ink: #0D1C22;
  --ink-soft: #1A3844;
  --ink-faint: #5A7084;
  --ink-ghost: #91A9BD;
  --bg: #ECF0F1;
  --bg-card: #ffffff;
  --bg-sidebar: #ECF0F1;
  --bg-hover: #C5E04A;
  --bg-active: #ffffff;
  --orange: #FF4D11;
  --tag-bg: #ffffff;
  --tag-border: #91A9BD;
  --tag-active-bg: #1A3844;
  --border: #C8D4DE;
  --border-strong: #91A9BD;
  --border-focus: #1A3844;
}
[data-theme="ib1"] body { font-family: 'Open Sans', system-ui, sans-serif; }
[data-theme="ib1"] .navbar { background: #1A3844; border-bottom: 3px solid #FF4D11; }
[data-theme="ib1"] .navbar-brand, [data-theme="ib1"] .brand-name { color: #fff; }
[data-theme="ib1"] .brand-sub { color: #91A9BD; }
[data-theme="ib1"] .brand-star { color: #FFEC00; }
[data-theme="ib1"] .navbar-search #searchInput { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.2); color: #fff; }
[data-theme="ib1"] .navbar-search #searchInput::placeholder { color: rgba(255,255,255,0.4); }
[data-theme="ib1"] .navbar-search #searchInput:focus { background: rgba(255,255,255,0.2); border-color: #FFEC00; }
[data-theme="ib1"] .search-icon { color: rgba(255,255,255,0.5); }
[data-theme="ib1"] .search-clear { color: rgba(255,255,255,0.5); }
[data-theme="ib1"] .user-menu-btn:hover { background: rgba(255,255,255,0.1); }
[data-theme="ib1"] .user-name { color: rgba(255,255,255,0.9); }
[data-theme="ib1"] .chevron { color: rgba(255,255,255,0.35); }
[data-theme="ib1"] .user-avatar-placeholder { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.25); color: #fff; }
[data-theme="ib1"] .user-avatar-img { border-color: rgba(255,255,255,0.3); }
[data-theme="ib1"] .btn-nav { color: rgba(255,255,255,0.85); border-color: rgba(255,255,255,0.25); }
[data-theme="ib1"] .btn-nav:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: #FFEC00; }
[data-theme="ib1"] .profile-card:hover { background: #C5E04A; }
[data-theme="ib1"] .profile-card:hover .card-name { color: #0D1C22; }
[data-theme="ib1"] .profile-card.active { background: #fff; border-left-color: #FF4D11; }
[data-theme="ib1"] .user-dropdown a:hover { background: #C5E04A; color: #0D1C22; }
[data-theme="ib1"] .btn-secondary:hover { background: #C5E04A; border-color: #1A3844; color: #0D1C22; }
[data-theme="ib1"] .theme-switcher-toggle { background: #fff; border-color: #C8D4DE; }
[data-theme="ib1"] .theme-switcher-toggle:hover { border-color: #FF4D11; color: #0D1C22; }

/* ============================================================
   EDIT PROFILE — two-column layout
   ============================================================ */
.edit-body { background: var(--bg); }
.edit-form-layout { display: flex; gap: 24px; min-height: calc(100vh - var(--navbar-h)); max-width: 1100px; margin: 0 auto; padding: 28px 20px 60px; align-items: flex-start; }
.edit-sidebar { width: 160px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.edit-avatar-wrap { margin-bottom: 4px; }
.edit-avatar-wrap .avatar-xl { width: 120px; height: 120px; background: #D0CAC0; border: none; }
.edit-avatar-wrap .avatar-placeholder svg { opacity: 0.55; }
.edit-main { flex: 1; display: flex; flex-direction: column; gap: 0; min-width: 0; }
.ef-action-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.ef-action-bar-bottom { margin-top: 20px; margin-bottom: 0; }
.ef-btn-right { margin-left: auto; }
.ef-fields { display: flex; flex-direction: column; gap: 8px; }
.ef-input { width: 100%; padding: 12px 16px; border: 1.5px dashed #b0bec5; border-radius: 12px; font-family: var(--font-sans); font-size: 14px; color: var(--ink); background: #fff; outline: none; transition: border-color 0.15s ease, background 0.15s ease; resize: vertical; }
.ef-input::placeholder { color: var(--ink-ghost); }
.ef-input:focus { border-style: solid; border-color: var(--border-focus); background: #fff; }
.ef-input-filled { background: #C8D4DE; border-style: solid; border-color: #C8D4DE; color: var(--ink); }
.ef-input-filled:focus { background: #fff; border-color: var(--border-focus); }
.ef-textarea { min-height: 140px; }
.ef-char-count { font-size: 11px; color: var(--ink-ghost); text-align: right; margin-top: -4px; }
.ef-social-row { display: flex; gap: 8px; }
.ef-input-social-name { flex: 0 0 130px; }
.ef-input-social-url { flex: 1; }
.ef-tags-section { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.ef-tags-label { font-size: 12px; color: var(--ink-faint); font-weight: 400; letter-spacing: 0.02em; }
.ef-tag-search-wrap { position: relative; }
.ef-selected-tags { display: flex; flex-wrap: wrap; gap: 6px; min-height: 36px; padding: 8px; border: 1.5px dashed #b0bec5; border-radius: 12px; background: #fff; }
.ef-btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 22px; border-radius: var(--radius-pill); font-family: var(--font-sans); font-size: 13px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; cursor: pointer; border: 2px solid transparent; text-decoration: none; transition: filter 0.12s ease, transform 0.1s ease; white-space: nowrap; }
.ef-btn:hover { filter: brightness(0.92); transform: translateY(-1px); text-decoration: none; }
.ef-btn:active { transform: none; }
.ef-btn-yellow { background: #FFEC00; border-color: #FFEC00; color: #0D1C22; }
.ef-btn-orange { background: #FF4D11; border-color: #FF4D11; color: #fff; }
.ef-btn-grey { background: var(--bg); border-color: var(--border); color: var(--ink-soft); }
.ef-btn-grey:hover { background: var(--bg-hover); filter: none; }
.ef-btn-block { width: 100%; }
.ef-btn-delete { margin-top: 8px; }
.ef-visibility-box { border: 1.5px solid var(--border); border-radius: 12px; padding: 10px 12px; text-align: center; cursor: pointer; width: 100%; transition: border-color 0.12s ease; background: var(--bg-card); }
.ef-visibility-box:hover { border-color: var(--border-strong); }
.ef-visibility-label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; }
.ef-visible { color: var(--ink-soft); }
.ef-invisible { color: var(--ink-ghost); }
.ef-visibility-hint { font-size: 11px; color: var(--ink-ghost); line-height: 1.4; }
.tag-suggestion-item { padding: 8px 12px; cursor: pointer; font-size: 13px; transition: background var(--transition); border-bottom: 1px solid var(--border); }
.tag-suggestion-item:last-child { border-bottom: none; }
.tag-suggestion-item:hover { background: var(--bg-hover); }
.tag-suggestions { position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-card); border: 1.5px solid var(--border-strong); border-top: none; border-radius: 0 0 8px 8px; z-index: 100; max-height: 160px; overflow-y: auto; }
.all-tags-scroll { max-height: 180px; overflow-y: auto; border: 1.5px solid var(--border); border-radius: 8px; padding: 10px; background: var(--bg); }
.all-tags-label { font-size: 11px; color: var(--ink-ghost); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.06em; }
.tag-group-mini { margin-bottom: 10px; }
.tag-group-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-ghost); display: block; margin-bottom: 5px; }
.all-tags-list .tag-badge { margin-bottom: 4px; }
.tag-selected-mini { background: var(--tag-active-bg) !important; color: var(--tag-active-text) !important; border-color: var(--tag-active-bg) !important; }
.tag-empty-hint { color: var(--ink-ghost); font-size: 12px; }
.toggle-label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; color: var(--ink-soft); }
.toggle-label input[type="checkbox"] { width: 14px; height: 14px; cursor: pointer; }
.form-section { border-bottom: 1px solid var(--border); padding: 20px 0; }
.form-section:last-of-type { border-bottom: none; }
.form-section-title { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 14px; }
.form-group { margin-bottom: 14px; }
.form-group:last-child { margin-bottom: 0; }
.form-group label { display: block; font-size: 12px; color: var(--ink-soft); margin-bottom: 4px; }
.form-group input[type="text"], .form-group input[type="email"], .form-group input[type="url"], .form-group textarea { width: 100%; padding: 8px 12px; border: 1.5px solid var(--border); border-radius: 8px; font-family: var(--font-sans); font-size: 13px; color: var(--ink); background: var(--bg); transition: border-color var(--transition); outline: none; resize: vertical; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--border-focus); background: var(--bg-card); }
.form-hint { font-size: 11px; color: var(--ink-ghost); margin-top: 3px; }
.form-hint-row { display: flex; justify-content: space-between; margin-top: 3px; }
.char-count { font-size: 11px; color: var(--ink-ghost); font-family: var(--font-mono); }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.edit-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.edit-header h1 { font-size: 18px; font-weight: 600; color: var(--ink); }
.edit-page { padding: 28px 24px 60px; }
.edit-container { max-width: 620px; margin: 0 auto; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 767px) {
  :root { --sidebar-w: 100%; }
  .browse-layout { flex-direction: column; overflow: visible; height: auto; }
  .home-page { height: auto; overflow: auto; }
  .profile-sidebar { width: 100%; height: auto; overflow: visible; border-right: none; border-bottom: 1px solid var(--border); }
  .profile-main { height: auto; overflow: visible; }
  .profile-main::before { display: none; }
  .profile-list { max-height: 45vh; overflow-y: auto; }
  .profile-detail-inner { padding: 20px 16px; }
  .profile-header { flex-direction: column; gap: 14px; }
  .profile-name { font-size: 24px; }
  .edit-form-layout { flex-direction: column; padding: 16px; }
  .edit-sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
  .edit-avatar-wrap { width: 100%; display: flex; justify-content: center; }
  .ef-social-row { flex-direction: column; }
  .ef-input-social-name { flex: none; width: 100%; }
  .user-name { display: none; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  :root { --sidebar-w: 260px; }
}

/* ============================================================
   IB1 BRAND LOGO
   ============================================================ */

.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.brand-logo-lg {
  width: 48px;
  height: 48px;
}

/* In IB1 theme the logo shows on dark bg — add subtle ring */
[data-theme="ib1"] .brand-logo {
  box-shadow: 0 0 0 2px rgba(255,255,255,0.2);
}

/* ============================================================
   FLAT TAG GRID — edit form (replaces scroll box)
   ============================================================ */

.ef-tags-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ef-tags-group {}

.ef-tags-group-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

.ef-tags-group-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Make selected tags in the grid visually distinct */
.ef-tags-group-pills .tag-selected-mini {
  background: var(--ink) !important;
  color: #fff !important;
  border-color: var(--ink) !important;
}

[data-theme="ib1"] .ef-tags-group-pills .tag-selected-mini {
  background: #1A3844 !important;
  border-color: #1A3844 !important;
}

/* Smaller tags on edit form */
.ef-tags-grid .tag-badge,
.ef-selected-tags .tag-badge {
  font-size: 11px;
  padding: 3px 10px;
}

/* Create new tag suggestion */
.tag-suggestion-create {
  color: var(--ink-soft);
  border-top: 1px solid var(--border);
}
.tag-suggestion-create:hover { background: var(--orange-light); color: var(--orange); }
.tag-create-icon { font-size: 13px; margin-right: 2px; }
[data-theme="ib1"] .tag-suggestion-create:hover { background: #fff3ee; color: #FF4D11; }

/* Edit form section divider */
.ef-section-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

/* Unified tag cluster */
.ef-unified-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  min-height: 48px;
}

.ef-unified-tags .tag-badge {
  font-size: 11px;
  padding: 3px 10px;
  cursor: pointer;
}

[data-theme="ib1"] .ef-unified-tags {
  border-color: #C8D4DE;
  background: #ECF0F1;
}

/* ============================================================
   CONSTELLATION CANVAS — sits behind all content
   ============================================================ */
html { background: #F2EFE9; }
body { background: transparent; }
[data-theme="ib1"] html { background: #ECF0F1; }

/* Make panels slightly translucent so canvas glows through */
.profile-sidebar  { background: rgba(242,239,233,0.75); }
.profile-main     { background: rgba(255,255,255,0.72); }
.navbar           { background: rgba(255,255,255,0.82); backdrop-filter: blur(8px); }
.filters-bar      { background: rgba(255,255,255,0.78); }

[data-theme="ib1"] .profile-sidebar { background: rgba(236,240,241,0.75); }
[data-theme="ib1"] .profile-main    { background: rgba(255,255,255,0.72); }
[data-theme="ib1"] .navbar          { background: rgba(26,56,68,0.88); backdrop-filter: blur(8px); }

/* Remove the old static SVG bg on profile-main */
.profile-main::before { display: none; }

/* Auth and edit pages */
.auth-page  { background: transparent; }
.edit-body  { background: transparent; }
.auth-card  { background: rgba(255,255,255,0.95); }
.edit-form-layout .edit-main .ef-fields { background: transparent; }

/* ============================================================
   PROFILE DETAIL CARD — solid bg lozenge over canvas
   ============================================================ */

.profile-detail-card {
  margin: 24px;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 16px;
  border: 1px solid var(--border);
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 24px rgba(28, 43, 58, 0.07);
  overflow: hidden;
}

[data-theme="ib1"] .profile-detail-card {
  background: rgba(255, 255, 255, 0.82);
  border-color: #C8D4DE;
}

/* Profile main pane: fully transparent — let card provide bg */
.profile-main {
  background: transparent;
  overflow-y: auto;
}

/* Sidebar: readable semi-opaque over canvas */
.profile-sidebar {
  background: rgba(242, 239, 233, 0.94);
  backdrop-filter: blur(6px);
}

[data-theme="ib1"] .profile-sidebar {
  background: rgba(236, 240, 241, 0.94);
}

/* Home page: sidebar cards also need bg */
.profile-card {
  background: rgba(255,255,255,0.7);
}
.profile-card:hover {
  background: rgba(235, 231, 224, 0.95);
}
.profile-card.active {
  background: rgba(255, 255, 255, 0.98);
}

[data-theme="ib1"] .profile-card { background: rgba(255,255,255,0.65); }
[data-theme="ib1"] .profile-card:hover { background: rgba(197, 224, 74, 0.88); }
[data-theme="ib1"] .profile-card.active { background: rgba(255,255,255,0.98); }

/* Edit page: fully opaque so canvas doesn't distract from form */
.edit-body .edit-form-layout {
  position: relative;
  z-index: 1;
}
.edit-body .edit-main {
  background: rgba(255,255,255,0.96);
  border-radius: 12px;
  padding: 20px;
}
.edit-body .edit-sidebar {
  /* keep transparent on edit — sidebar is just avatar/buttons */
}

/* ============================================================
   DIRECT PROFILE LINK
   ============================================================ */

.profile-direct-link {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
}

.profile-link-label {
  color: var(--ink-faint);
  white-space: nowrap;
}

.profile-link-url {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  text-decoration: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  transition: color var(--transition), border-color var(--transition);
}
.profile-link-url:hover {
  color: var(--ink);
  border-color: var(--border-strong);
  text-decoration: none;
}

.profile-link-copy {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 12px;
  cursor: pointer;
  color: var(--ink-faint);
  line-height: 1.4;
  transition: color var(--transition), border-color var(--transition);
}
.profile-link-copy:hover {
  color: var(--ink);
  border-color: var(--border-strong);
}

[data-theme="ib1"] .profile-link-url { background: #ECF0F1; border-color: #C8D4DE; }
[data-theme="ib1"] .profile-link-copy { border-color: #C8D4DE; }

/* Profile link pill — hover reveals "Copy" */
.profile-direct-link { margin-top: 10px; }

.profile-link-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill, 100px);
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-faint);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  position: relative;
  overflow: hidden;
}

.profile-link-pill .pill-default,
.profile-link-pill .pill-hover {
  transition: opacity 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}

.profile-link-pill .pill-hover {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) translateY(6px);
  opacity: 0;
}

.profile-link-pill:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
  color: var(--ink);
}

.profile-link-pill:hover .pill-default {
  opacity: 0;
  transform: translateY(-6px);
}

.profile-link-pill:hover .pill-hover {
  opacity: 1;
  transform: translate(-50%, -50%) translateY(0);
}

/* Copied state */
.profile-link-pill.copied {
  background: var(--success, #2a6b3c);
  border-color: var(--success, #2a6b3c);
  color: #fff;
}
.profile-link-pill.copied .pill-default { opacity: 0; }
.profile-link-pill.copied .pill-hover { opacity: 0; }

[data-theme="ib1"] .profile-link-pill { background: #ECF0F1; border-color: #C8D4DE; }
[data-theme="ib1"] .profile-link-pill:hover { background: #C5E04A; border-color: #1A3844; color: #0D1C22; }

/* ============================================================
   AVATAR RING + PROFILE HEADER AVATAR COLUMN
   ============================================================ */

/* Dark blue 1px ring on all profile images */
.avatar-ringed {
  border: 1.5px solid #1A3844 !important;
  box-shadow: 0 0 0 2px rgba(26,56,68,0.08);
}
[data-theme="ib1"] .avatar-ringed {
  border-color: #1A3844 !important;
}

/* Sidebar card avatars also get the ring */
.profile-card .avatar {
  border: 1.5px solid #1A3844;
}
[data-theme="ib1"] .profile-card .avatar {
  border-color: #1A3844;
}

/* Avatar column in profile header: avatar + link stacked & centred */
.profile-header-avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Profile link pill sits nicely under the avatar */
.profile-header-avatar-col .profile-direct-link {
  margin-top: 0;
  text-align: center;
}

/* ============================================================
   EDIT SIDEBAR — photo overlay, visibility toggle, delete link
   ============================================================ */

/* Photo: full label is clickable, overlay appears on hover */
.edit-photo-label {
  position: relative;
  display: block;
  cursor: pointer;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  flex-shrink: 0;
}

.edit-photo-avatar {
  width: 120px !important;
  height: 120px !important;
  pointer-events: none;
}

.edit-photo-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(26, 56, 68, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.edit-photo-overlay span {
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1.3;
  padding: 0 8px;
}

.edit-photo-label:hover .edit-photo-overlay { opacity: 1; }

/* ---- Visibility toggle switch ---- */
.ef-visibility-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  width: 100%;
  padding: 4px 0;
  user-select: none;
}

.ef-visibility-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

.ef-vis-track {
  position: relative;
  width: 36px;
  height: 20px;
  background: var(--ink-ghost);
  border-radius: 100px;
  flex-shrink: 0;
  transition: background 0.18s ease;
}

.ef-visibility-toggle input:checked + .ef-vis-track {
  background: #1A3844;
}

[data-theme="ib1"] .ef-visibility-toggle input:checked + .ef-vis-track {
  background: #1A3844;
}

.ef-vis-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.18s ease;
}

.ef-visibility-toggle input:checked + .ef-vis-track .ef-vis-thumb {
  transform: translateX(16px);
}

.ef-vis-label { font-size: 12px; line-height: 1.3; }

.ef-vis-on  { display: none; color: #1A3844; font-weight: 500; }
.ef-vis-off { display: block; color: var(--ink-ghost); }

.ef-visibility-toggle input:checked ~ .ef-vis-label .ef-vis-on  { display: block; }
.ef-visibility-toggle input:checked ~ .ef-vis-label .ef-vis-off { display: none; }

/* ---- Delete — subtle text link ---- */
.ef-delete-link {
  background: none;
  border: none;
  padding: 4px 0;
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--ink-ghost);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
  width: 100%;
  text-align: center;
  margin-top: 4px;
}
.ef-delete-link:hover { color: var(--error); }

/* ============================================================
   WELCOME PANEL
   ============================================================ */

.welcome-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 400px;
  padding: 40px 32px;
  position: relative;
  z-index: 1;
}

.welcome-inner {
  max-width: 420px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,0.78);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 32px rgba(28,43,58,0.08);
}

.welcome-logo img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
}

.welcome-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 0;
}

.welcome-tagline {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0;
}

.welcome-hints {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  text-align: left;
  margin: 4px 0;
}

.welcome-hint {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.45;
}

.hint-icon {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
  opacity: 0.7;
}

.welcome-cta {
  display: inline-block;
  margin-top: 4px;
  padding: 9px 24px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-pill, 100px);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.welcome-cta:hover { opacity: 0.82; text-decoration: none; }

[data-theme="ib1"] .welcome-inner {
  background: rgba(255,255,255,0.92);
  border-color: #C8D4DE;
}
[data-theme="ib1"] .welcome-cta {
  background: #1A3844;
}
[data-theme="ib1"] .welcome-cta:hover {
  background: #FF4D11;
  opacity: 1;
}

/* Brand: logo only, no text */
.navbar-brand .brand-sub {
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 400;
}
[data-theme="ib1"] .navbar-brand .brand-sub { color: #91A9BD; }

/* ============================================================
   OTP LOGIN
   ============================================================ */

.otp-request-form { width: 100%; }

.otp-email-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.otp-email-row .ef-input { flex: 1; font-size: 14px; }
.otp-send-btn { flex-shrink: 0; white-space: nowrap; border-radius: var(--radius-pill) !important; }

/* 6-digit code boxes */
.otp-verify-form { width: 100%; display: flex; flex-direction: column; gap: 16px; }

.otp-inputs {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.otp-digit {
  width: 46px;
  height: 54px;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
  caret-color: transparent;
  font-family: var(--font-sans);
}
.otp-digit:focus {
  border-color: var(--border-focus);
  background: var(--bg-card);
}
.otp-digit:not(:placeholder-shown) {
  background: var(--bg-card);
  border-color: var(--border-strong);
}

[data-theme="ib1"] .otp-digit:focus { border-color: #1A3844; }
[data-theme="ib1"] .otp-digit:not(:placeholder-shown) { border-color: #1A3844; background: #fff; }






/* ============================================================
   PROFILE DETAIL CARD — narrower on right panel
   ============================================================ */
.profile-detail-card {
  max-width: 560px;
}

/* ── Lock navbar to IB1 dark teal ── */
.navbar {
  background: #1A3844 !important;
  border-bottom: 3px solid #FF4D11 !important;
}
.navbar-brand, .brand-sub { color: #fff !important; }
.navbar-search #searchInput {
  background: rgba(255,255,255,0.12) !important;
  border-color: rgba(255,255,255,0.2) !important;
  color: #fff !important;
}
.navbar-search #searchInput::placeholder { color: rgba(255,255,255,0.4) !important; }
.user-name { color: #fff !important; }
.chevron { color: rgba(255,255,255,0.7) !important; }
.user-menu-btn { color: #fff !important; }
.btn-nav { color: #fff !important; border-color: rgba(255,255,255,0.3) !important; }

/* ── Welcome panel — top-left aligned like profile card ── */
.welcome-panel {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
}
.welcome-inner {
  margin: 24px !important;
  max-width: 560px !important;
  text-align: left !important;
  align-items: flex-start !important;
  border-radius: 16px !important;
  padding: 32px 36px !important;
}
.welcome-hints { align-items: flex-start; }
