/* =========================================================
   HEA Link — Logged-in App Shell (Website Dark Theme)
   Matches the website aesthetic:
   - Deep Midnight: #060b18
   - Glass Cards: #0d172e / rgba(13, 23, 46, 0.85)
   - Borders: rgba(255, 255, 255, 0.08) / rgba(0, 180, 255, 0.25)
   - Accents: #38bdf8 (Cyan/Sky), #0066ff (Neon Blue), #10b981 (Green)
   - Text: #ffffff (Headings), #94a3b8 (Muted body)
   ========================================================= */

/* Body in App Mode */
body.app-mode {
  background-color: #060b18 !important;
  background-image: none !important;
  color: #f8fafc !important;
  overflow-x: hidden;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

body.app-mode > header.nav,
body.app-mode > footer,
body.app-mode > .slider-section,
body.app-mode > .bg-glow-curves,
body.app-mode > #webgl-bg,
body.app-mode .a11y,
body.app-mode main > section[data-page="home"],
body.app-mode section[data-page="home"] {
  display: none !important;
}

section[data-page="app"],
section[data-page="auth"] {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  background: transparent !important;
}

/* ---------------- 1. AUTH SPLIT SCREEN VIEW ---------------- */
.auth-split-wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
  background: #060b18;
}
.auth-left-col {
  padding: 60px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 540px;
  margin: 0 auto;
  width: 100%;
  background: #060b18;
}
.auth-brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 32px;
  text-decoration: none;
}
.auth-brand-logo img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.auth-title {
  font-size: 32px;
  font-weight: 800;
  color: #ffffff !important;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.auth-sub {
  color: #94a3b8;
  font-size: 14px;
  margin-bottom: 24px;
}
.auth-sub a {
  color: #38bdf8;
  font-weight: 600;
  text-decoration: underline;
}

/* SSO Button */
.sso-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.sso-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.sso-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
}
#ssoAppleBtn {
  display: none !important;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 16px 0 22px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.auth-divider span {
  padding: 0 14px;
}

.auth-form-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-form-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 600;
}
.auth-form-card input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 12px 14px;
  color: #ffffff;
  font-size: 14px;
  transition: border-color 0.15s;
}
.auth-form-card input:focus {
  border-color: #0066ff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.2);
}
.auth-submit-btn {
  background: linear-gradient(135deg, #0066ff, #00d2ff) !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  padding: 13px 20px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  border: 0 !important;
  cursor: pointer !important;
  margin-top: 8px;
  box-shadow: 0 4px 18px rgba(0, 102, 255, 0.35);
  transition: opacity 0.15s;
}
.auth-submit-btn:hover {
  opacity: 0.95;
}
.auth-terms {
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 18px;
}

/* Right Illustration Column */
.auth-right-col {
  background: radial-gradient(circle at 60% 40%, rgba(0, 102, 255, 0.15) 0%, #080f22 70%);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px;
  text-align: center;
}
.auth-illus-card {
  max-width: 460px;
}
.auth-illus-mockup {
  background: #0d172e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 24px;
  margin: 0 auto 32px;
  box-shadow: 0 16px 36px rgba(0,0,0,0.4);
  position: relative;
  width: 320px;
}
.auth-illus-url-bar {
  background: linear-gradient(90deg, #ff5000, #ff7a00);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-illus-qr-box {
  width: 140px;
  height: 140px;
  margin: 0 auto;
  border: 2px solid #ffffff;
  border-radius: 12px;
  padding: 10px;
  background: #ffffff;
  display: grid;
  place-items: center;
}
.auth-illus-card h3 {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff !important;
  margin-bottom: 12px;
}
.auth-illus-card p {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
}

/* ---------------- 2. MAIN APP SHELL (Dark Theme) ---------------- */
#appShell {
  display: none !important;
  min-height: 100vh;
  width: 100%;
  background: #060b18;
  color: #f8fafc;
}

body.app-mode #appShell {
  display: flex !important;
}

body:not(.app-mode) #appShell,
#appShell[hidden],
section[data-page="app"][hidden] {
  display: none !important;
}

/* Sidebar */
.app-sidebar {
  width: 230px;
  background: #090f22;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 50;
  transition: width 0.2s ease;
}
.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  text-decoration: none;
}
.sidebar-logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.sidebar-collapse-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 12px;
}
.sidebar-collapse-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* "Create new" button */
.sidebar-create-btn {
  background: linear-gradient(135deg, #0066ff, #00d2ff);
  color: #ffffff;
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 16px;
  margin: 4px 14px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0, 102, 255, 0.35);
  transition: opacity 0.15s;
}
.sidebar-create-btn:hover {
  opacity: 0.92;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  border-left: 3px solid transparent;
}
.sidebar-nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}
.sidebar-nav-item.active {
  background: rgba(0, 102, 255, 0.15);
  color: #38bdf8;
  font-weight: 700;
  border-left-color: #38bdf8;
}
.sidebar-nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  color: inherit;
}

.sidebar-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 14px;
  margin-top: auto;
}

/* Body wrap */
.app-body-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 100vh;
}

/* Topbar */
.app-topbar {
  height: 60px;
  background: #090f22;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar-search-box {
  position: relative;
  width: 360px;
}
.topbar-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 14px;
}
.topbar-search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 12px 8px 36px;
  color: #ffffff;
  font-size: 13px;
  transition: all 0.15s;
}
.topbar-search-input:focus {
  border-color: #38bdf8;
  outline: none;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar-icon-btn {
  background: none;
  border: 0;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
}
.topbar-icon-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}
.topbar-upgrade-btn {
  background: #007a5a;
  color: #ffffff;
  padding: 7px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
}
.topbar-upgrade-btn:hover {
  background: #006046;
}
.topbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0066ff;
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Main pane & Right drawer */
.app-content-row {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 60px);
}
.app-main-pane {
  flex: 1;
  padding: 28px 36px;
  overflow-y: auto;
  min-width: 0;
}

/* Right Bitly Assist Drawer */
.app-assist-drawer {
  width: 350px;
  background: #090f22;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: calc(100vh - 60px);
  position: sticky;
  top: 60px;
}
.app-assist-drawer[hidden] {
  display: none !important;
}
.drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #38bdf8;
}
.drawer-close {
  background: none;
  border: 0;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
}
.drawer-body {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  text-align: center;
}
.drawer-illus-box {
  width: 100px;
  height: 100px;
  margin-top: 10px;
  display: grid;
  place-items: center;
  font-size: 54px;
}
.drawer-heading {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}
.drawer-subtext {
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}
.drawer-input-card {
  width: 100%;
  margin-top: auto;
  background: #0d172e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.drawer-textarea {
  width: 100%;
  border: 0;
  outline: none;
  resize: none;
  font-size: 13px;
  color: #ffffff;
  background: transparent;
  font-family: inherit;
  height: 48px;
}
.drawer-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.drawer-send-btn {
  background: #0066ff;
  color: #ffffff;
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

/* ---------------- 3. DASHBOARD VIEWS & CARDS (Dark Website Theme) ---------------- */
.view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.view-header h2 {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff !important;
  margin: 0;
  letter-spacing: -0.02em;
}

/* Cards */
.dash-white-card,
.home-create-card,
.create-link-card,
.qr-card-item,
.page-row-card,
.campaigns-hero-wrap,
.settings-main-panel,
.integration-card-white {
  background: #0d172e !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px;
  color: #f8fafc !important;
}

/* "What do you want to create?" Card (Screenshot 12.02.37 AM) */
.home-create-card {
  padding: 32px;
  margin-bottom: 24px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.home-create-card h3 {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 20px;
}
.home-type-tabs {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 24px;
}
.home-type-tab {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
}
.home-type-tab:hover {
  color: #ffffff;
}
.home-type-tab.active {
  border-color: #38bdf8;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
}

.home-shorten-box {
  max-width: 680px;
  margin: 0 auto 16px;
  background: #0f1b36;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 6px 8px 6px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.home-shorten-box:focus-within {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}
.home-shorten-input {
  flex: 1;
  border: 0;
  outline: none;
  font-size: 14px;
  color: #ffffff;
  background: none;
}
.home-domain-select {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #090f22;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #38bdf8;
  cursor: pointer;
}
.home-shorten-btn {
  background: #0066ff;
  color: #ffffff;
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 18px;
  transition: background 0.15s;
}
.home-shorten-btn:hover {
  background: #0052cc;
}

.home-cyan-banner {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #38bdf8;
  margin-top: 8px;
}
.home-cyan-banner a {
  color: #38bdf8;
  text-decoration: underline;
}

/* Two-column dash cards */
.dash-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}
.dash-white-card {
  padding: 24px;
}
.dash-white-card h4 {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px;
}
.dash-white-card p {
  color: #94a3b8;
  font-size: 13px;
  margin: 0 0 16px;
}

/* ---------------- 4. "CREATE A NEW LINK" PAGE (Screenshot 12.02.38 AM) ---------------- */
.create-link-wrap {
  max-width: 820px;
  margin: 0 auto;
}
.create-link-card {
  padding: 28px;
  margin-bottom: 20px;
}
.create-link-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px;
}
.create-link-sub {
  color: #94a3b8;
  font-size: 13px;
  margin: 0 0 20px;
}
.create-link-sub a {
  color: #38bdf8;
  text-decoration: underline;
}
.create-link-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.create-link-field label {
  font-size: 14px;
  font-weight: 700;
  color: #e2e8f0;
}
.create-link-field input, .create-link-field select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: #ffffff;
}
.create-link-field input:focus, .create-link-field select:focus {
  border-color: #38bdf8;
  outline: none;
}

/* Dynamic routing alert */
.dynamic-routing-alert {
  background: rgba(0, 102, 255, 0.12);
  border: 1px solid rgba(0, 102, 255, 0.25);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 13px;
  color: #93c5fd;
}

/* Sticky action bar */
.sticky-bottom-actions {
  position: sticky;
  bottom: 0;
  background: #090f22;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ---------------- 5. QR CODES VIEW (Screenshot 12.02.39 AM) ---------------- */
.qr-filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  align-items: center;
}
.qr-card-item {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.qr-card-left {
  display: flex;
  align-items: center;
  gap: 20px;
}
.qr-framed-thumbnail {
  border: 2px solid #ffffff;
  border-radius: 10px;
  padding: 8px 8px 4px;
  background: #ffffff;
  text-align: center;
  width: 90px;
}
.qr-framed-thumbnail canvas {
  width: 72px !important;
  height: 72px !important;
}
.qr-thumb-label {
  font-size: 10px;
  font-weight: 800;
  color: #111827;
  letter-spacing: 0.05em;
  margin-top: 2px;
}
.qr-details h4 {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin: 6px 0 4px;
}
.qr-dest-text {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 6px;
  max-width: 500px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qr-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: #64748b;
}

/* ---------------- 6. PAGES VIEW (Screenshot 12.02.40 AM) ---------------- */
.page-row-card {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.page-wireframe-thumb {
  width: 70px;
  height: 90px;
  background: #090f22;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.page-wireframe-thumb span {
  font-size: 8px;
  font-weight: 700;
  color: #38bdf8;
  text-align: center;
}
.wireframe-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

/* ---------------- 7. CAMPAIGNS VIEW (Screenshot 12.02.41 AM 1) ---------------- */
.campaigns-hero-wrap {
  padding: 60px 20px;
  text-align: center;
  max-width: 800px;
  margin: 20px auto;
}
.campaigns-laptop-illus {
  width: 280px;
  height: 180px;
  margin: 0 auto 28px;
  background: #090f22;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}
.campaigns-hero-wrap h3 {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 12px;
}
.campaigns-hero-wrap p {
  color: #94a3b8;
  font-size: 15px;
  max-width: 520px;
  margin: 0 auto 24px;
  line-height: 1.5;
}

/* ---------------- 8. CUSTOM DOMAINS VIEW (Screenshot 12.02.41 AM 2) ---------------- */
.domains-cyan-card {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 14px;
  padding: 24px 28px;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 24px;
  align-items: center;
}
.domains-pill-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.domain-ai-textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  height: 80px;
  resize: none;
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

/* ---------------- 9. INTEGRATIONS VIEW (Screenshot 12.02.42 AM) ---------------- */
.shopify-cream-banner {
  background: #0f1c3a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}
.integration-card-white {
  padding: 20px;
  transition: all 0.15s;
}
.integration-card-white:hover {
  border-color: #38bdf8 !important;
  transform: translateY(-2px);
}

/* ---------------- 10. SETTINGS VIEW (Screenshots 12.02.42 AM 2 & 12.02.43 AM) ---------------- */
.settings-2col-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
}
.settings-subsidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.settings-subsidebar-group h5 {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 8px;
}
.settings-subsidebar-link {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  color: #94a3b8;
  text-decoration: none;
  cursor: pointer;
}
.settings-subsidebar-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}
.settings-subsidebar-link.active {
  background: rgba(0, 102, 255, 0.15);
  color: #38bdf8;
  font-weight: 700;
}

.settings-main-panel {
  padding: 32px;
}
.settings-section-divider {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin: 32px 0;
}

/* ---------------- 11. "WHAT DO YOU WANT TO CREATE?" MODAL (Screenshot 12.02.37 AM 1) ---------------- */
.create-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 20, 0.7);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  z-index: 200;
  padding: 20px;
}
.create-modal-overlay[hidden] {
  display: none !important;
}
.create-modal-card {
  width: 100%;
  max-width: 640px;
  background: #0a1329;
  border: 1px solid rgba(0, 180, 255, 0.3);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.7);
}
.create-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.create-modal-header h3 {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff !important;
  margin: 0;
}
.create-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.create-option-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 20px 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.create-option-card:hover {
  border-color: #38bdf8;
  background: rgba(0, 102, 255, 0.15);
  transform: translateY(-2px);
}
.create-option-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #38bdf8;
}

/* ---------------- 12. ADVANCED BITLY FLOW COMPONENTS (Website Theme) ---------------- */

/* Custom Dark Toggle Switch */
.app-toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.app-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.app-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.14);
  transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.app-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: #ffffff;
  transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.app-toggle-switch input:checked + .app-toggle-slider {
  background-color: #0066ff;
  border-color: #38bdf8;
}
.app-toggle-switch input:checked + .app-toggle-slider:before {
  transform: translateX(20px);
}

/* Collapsible Sidebar (Screenshot 12.02.42 AM 1) */
.sidebar-collapse-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: all 0.15s ease;
}
.sidebar-collapse-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}
.app-sidebar.collapsed {
  width: 68px !important;
}
.app-sidebar.collapsed .sidebar-logo span,
.app-sidebar.collapsed .sidebar-create-text,
.app-sidebar.collapsed .sidebar-nav-item span:not(.sidebar-nav-icon),
.app-sidebar.collapsed .sidebar-bottom {
  display: none !important;
}
.app-sidebar.collapsed .sidebar-create-btn {
  padding: 10px 0;
  width: 44px;
  height: 44px;
  margin: 6px auto 16px;
  border-radius: 10px;
}
.app-sidebar.collapsed .sidebar-nav-item {
  padding: 12px 0;
  justify-content: center;
}
.app-sidebar.collapsed .sidebar-nav-icon {
  margin: 0;
}

/* HEA Assist Drawer (Website Dark Cyber Look) */
.drawer-hero-illus {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 14px;
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 12px;
  width: 100%;
}
.drawer-hero-illus span {
  font-size: 32px;
}
.drawer-hero-illus b {
  color: #ffffff;
  font-size: 15px;
}
.drawer-hero-illus p {
  color: #94a3b8;
  font-size: 12px;
  margin: 0;
  line-height: 1.4;
}
.drawer-chips {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.drawer-chip-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}
.drawer-chip-btn:hover {
  background: rgba(0, 102, 255, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}
.drawer-chat-log {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 10px;
}
.drawer-chat-bubble {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
  max-width: 90%;
  animation: fadeIn 0.2s ease;
}
.drawer-chat-bubble.ai {
  background: #0d172e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  align-self: flex-start;
}
.drawer-chat-bubble.user {
  background: linear-gradient(135deg, #0066ff, #0099ff);
  color: #ffffff;
  align-self: flex-end;
}
.drawer-input-row {
  display: flex;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #090f22;
}
.drawer-input-row input {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
}
.drawer-input-row input:focus {
  border-color: #38bdf8;
}
.drawer-input-row button {
  background: #0066ff;
  color: #ffffff;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.15s;
}
.drawer-input-row button:hover {
  background: #0052cc;
}

/* Settings Email Addresses Table (Screenshot 12.02.42 AM 3) */
.settings-email-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}
.settings-email-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.settings-email-table td {
  padding: 14px;
  font-size: 14px;
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* QR Code Studio & Details (Screenshots 12.02.39 AM 1, 2, 3) */
.qr-detail-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.qr-preview-box {
  background: #0d172e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.qr-chart-card {
  background: #0d172e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 24px;
  margin-top: 24px;
}
.qr-wave-container {
  height: 180px;
  width: 100%;
  margin-top: 16px;
}

/* ---------------- EMAIL VERIFICATION UI ---------------- */
.verify-container {
  background: rgba(13, 23, 46, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 16px;
  padding: 28px;
  margin-top: 18px;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}
.verify-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  color: #38bdf8;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}
.verify-target-email {
  color: #ffffff;
  font-weight: 700;
  word-break: break-all;
}
.verify-code-input {
  width: 100%;
  letter-spacing: 12px;
  font-size: 26px;
  font-weight: 800;
  font-family: monospace;
  text-align: center;
  padding: 14px;
  background: #090f22;
  border: 2px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  color: #38bdf8;
  outline: none;
  transition: all 0.2s ease;
  margin: 16px 0 20px;
}
.verify-code-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}
.verify-resend-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  font-size: 13px;
  color: #94a3b8;
}
.verify-resend-btn {
  background: none;
  border: 0;
  color: #38bdf8;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  padding: 0;
}
.verify-resend-btn:hover {
  text-decoration: underline;
}
.verify-resend-btn:disabled {
  color: #64748b;
  cursor: not-allowed;
  text-decoration: none;
}
.verify-dev-alert {
  background: rgba(212, 255, 36, 0.1);
  border: 1px solid rgba(212, 255, 36, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 14px;
  color: #D4FF24;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* =========================================================
   MOBILE RESPONSIVENESS (<= 900px & 390px Viewports)
   ========================================================= */
@media (max-width: 900px) {
  /* 1. Auth split page (Login / Register / Forgot / Verify) */
  .auth-split-wrap {
    grid-template-columns: 1fr !important;
    min-height: 100vh !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }
  .auth-right-col {
    display: none !important;
  }
  .auth-left-col {
    padding: 32px 20px !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }
  .sso-group {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .sso-btn {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* 2. Dashboard Shell & Mobile Sidebar Drawer */
  #appShell {
    flex-direction: column !important;
    height: 100vh !important;
    overflow-y: auto !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }
  .app-sidebar {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 270px !important;
    max-width: 82vw !important;
    transform: translateX(-100%) !important;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 1000 !important;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.85) !important;
  }
  .app-sidebar.open {
    transform: translateX(0) !important;
  }
  .app-main {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }
  .app-topbar {
    padding: 10px 14px !important;
    gap: 8px !important;
  }
  #sidebarToggleBtn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }
  .topbar-search-box {
    max-width: 170px !important;
  }
  .topbar-upgrade-btn {
    padding: 6px 12px !important;
    font-size: 12px !important;
  }

  /* 3. Dashboard layouts & cards */
  .dash-row-2, .dash-grid-2 {
    grid-template-columns: 1fr !important;
    display: flex !important;
    flex-direction: column !important;
  }
  .dash-stats-row {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }
  .settings-2col-layout {
    grid-template-columns: 1fr !important;
  }
  .home-shorten-box {
    flex-wrap: wrap !important;
    padding: 10px !important;
  }
  .home-shorten-input {
    width: 100% !important;
    flex: none !important;
    margin-bottom: 8px !important;
  }
  .home-domain-select {
    flex: 1 !important;
  }
  .home-shorten-btn {
    width: auto !important;
    padding: 0 16px !important;
    flex-shrink: 0 !important;
  }
}

@media (max-width: 480px) {
  .dash-stats-row {
    grid-template-columns: 1fr !important;
  }
  .topbar-search-box {
    display: none !important;
  }
  .auth-left-col {
    padding: 24px 14px !important;
  }
}


