/* =============================================
   IRSYAD DIGITAL v2.1.0
   Bold Editorial Islamic UI — Complete Reform
   ============================================= */

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

:root {
  --iq-emerald:       #0d6b3a;
  --iq-emerald-mid:   #1a8a4e;
  --iq-emerald-light: #22c55e;
  --iq-emerald-glow:  rgba(13, 107, 58, 0.12);
  --iq-gold:          #c9a227;
  --iq-gold-light:    #f0cc6a;
  --iq-gold-glow:     rgba(201, 162, 39, 0.18);
  --iq-bg:            #eef1f6;
  --iq-surface:       #ffffff;
  --iq-surface-2:     #f6f8fb;
  --iq-border:        #d5dbe8;
  --iq-border-strong: #aab2c8;
  --iq-text:          #0f1923;
  --iq-text-2:        #3a4558;
  --iq-text-3:        #6b7892;
  --iq-red:           #c41a1a;
  --iq-red-light:     #fef1f1;
  --iq-warning:       #c47a0a;
  --iq-warning-light: #fdf8ee;
  --iq-icon:          #1a2536;
  --iq-shadow-sm:     0 1px 4px rgba(0,0,0,.07);
  --iq-shadow-md:     0 4px 20px rgba(0,0,0,.09);
  --iq-shadow-lg:     0 12px 48px rgba(0,0,0,.13);
  --iq-radius:        6px;
  --iq-radius-lg:     10px;
  --iq-trans:         all 0.22s cubic-bezier(.4,0,.2,1);
  --iq-font:          'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

[data-theme="dark"] {
  --iq-bg:            #0c0f14;
  --iq-surface:       #131820;
  --iq-surface-2:     #1a2130;
  --iq-border:        #242d3e;
  --iq-border-strong: #324055;
  --iq-text:          #e8edf5;
  --iq-text-2:        #8a97b0;
  --iq-text-3:        #5a6880;
  --iq-icon:          #c9a227;
  --iq-emerald-glow:  rgba(34, 197, 94, 0.10);
}

/* ─── Reset & Base ─── */
#iqna-app, #iqna-app * { box-sizing: border-box; margin: 0; padding: 0; }
#iqna-app {
  font-family: var(--iq-font);
  background: var(--iq-bg);
  min-height: 100vh;
  color: var(--iq-text);
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }

/* ─── AUTH SCREEN ─── */
.iqna-auth-screen {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 20px; position: relative;
  background: linear-gradient(160deg, #062914 0%, #0a3d1e 40%, #07200f 100%) !important;
  overflow: hidden;
}
.iqna-auth-bg { position: absolute; inset: 0; pointer-events: none; }
.iqna-auth-orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: .25;
  animation: iqnaOrb 10s ease-in-out infinite alternate;
}
.iqna-orb-1 { width: 500px; height: 500px; background: radial-gradient(circle, #0d6b3a 0%, transparent 65%); top: -150px; left: -150px; }
.iqna-orb-2 { width: 400px; height: 400px; background: radial-gradient(circle, #c9a227 0%, transparent 65%); bottom: -100px; right: -100px; animation-delay: -4s; }
.iqna-orb-3 { width: 300px; height: 300px; background: radial-gradient(circle, #1a8a4e 0%, transparent 65%); top: 50%; left: 50%; transform: translate(-50%,-50%); animation-delay: -7s; }
@keyframes iqnaOrb { 0%{transform:scale(1)} 100%{transform:scale(1.4) translate(15px,-15px)} }
.iqna-orb-3 { animation: iqnaOrb3 7s ease-in-out infinite alternate; }
@keyframes iqnaOrb3 { 0%{transform:translate(-50%,-50%) scale(1)} 100%{transform:translate(-50%,-50%) scale(1.5)} }

.iqna-geometric-pattern {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(60deg, rgba(201,162,39,.08) 0, rgba(201,162,39,.08) 1px, transparent 1px, transparent 50px),
    repeating-linear-gradient(-60deg, rgba(201,162,39,.08) 0, rgba(201,162,39,.08) 1px, transparent 1px, transparent 50px),
    repeating-linear-gradient(0deg, rgba(201,162,39,.04) 0, rgba(201,162,39,.04) 1px, transparent 1px, transparent 50px);
}

.iqna-auth-container { width: 100%; max-width: 420px; position: relative; z-index: 10; margin: 0 auto; }

/* Brand / Logo */
.iqna-brand { text-align: center; margin-bottom: 32px; display: flex; flex-direction: column; align-items: center; }
.iqna-brand-emblem { width: 120px; height: 120px; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; }
.iqna-logo-img { width: 120px; height: 120px; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 4px rgba(201,162,39,.6), 0 8px 32px rgba(0,0,0,.25); display: block; }
.iqna-logo-circle { border-radius: 50%; }
.iqna-logo-fallback {
  width: 90px; height: 90px;
  display: flex; align-items: center; justify-content: center;
  background: #ffffff;
  border: 3px solid rgba(201,162,39,.6);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(201,162,39,.2), 0 8px 32px rgba(0,0,0,.3);
  animation: iqnaPulse 4s ease-in-out infinite;
}
.iqna-logo-fallback svg { width: 44px; height: 44px; stroke: var(--iq-emerald); fill: none; stroke-width: 1.5; }
@keyframes iqnaPulse {
  0%,100%{ box-shadow: 0 0 0 4px rgba(201,162,39,.2), 0 8px 32px rgba(0,0,0,.3); }
  50%{ box-shadow: 0 0 0 6px rgba(201,162,39,.35), 0 8px 40px rgba(13,107,58,.4); }
}
.iqna-brand-title { font-size: 26px; font-weight: 900; color: #ffffff; letter-spacing: -0.5px; }
.iqna-brand-sub { font-size: 14px; color: rgba(201,162,39,.9); margin-top: 6px; letter-spacing: 0.5px; font-weight: 600; }
.iqna-brand-divider { display: flex; align-items: center; gap: 10px; margin-top: 14px; justify-content: center; }
.iqna-brand-divider span:first-child, .iqna-brand-divider span:last-child { flex: 1; max-width: 56px; height: 1px; background: linear-gradient(90deg, transparent, rgba(201,162,39,.45)); }
.iqna-brand-divider span:last-child { background: linear-gradient(90deg, rgba(201,162,39,.45), transparent); }
.iqna-diamond { font-size: 7px; color: var(--iq-gold); }

/* Auth Card */
.iqna-auth-card {
  background: rgba(255,255,255,.09);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--iq-radius-lg);
  padding: 28px 24px;
  box-shadow: 0 24px 80px rgba(0,0,0,.3);
}

.iqna-auth-tabs { display: flex; gap: 3px; background: rgba(0,0,0,.25); border-radius: var(--iq-radius); padding: 4px; margin-bottom: 24px; }
.iqna-tab-btn {
  flex: 1; background: transparent; border: none;
  color: rgba(255,255,255,.6); padding: 12px 16px;
  border-radius: calc(var(--iq-radius) - 2px);
  font-size: 14px; font-weight: 700; cursor: pointer; transition: var(--iq-trans);
  font-family: var(--iq-font); min-height: 46px;
}
.iqna-tab-btn.active { background: linear-gradient(135deg, var(--iq-emerald), var(--iq-emerald-mid)); color: #fff; }

.iqna-tab-panel { display: none; }
.iqna-tab-panel.active { display: block; }

.iqna-form-group { margin-bottom: 18px; }
.iqna-form-group label { display: block; font-size: 11px; font-weight: 700; color: rgba(255,255,255,.7); margin-bottom: 7px; text-transform: uppercase; letter-spacing: 0.8px; }
/* Flex wrapper — border & bg on the wrap, not the input */
.iqna-input-wrap {
  display: flex; align-items: center;
  background: rgba(10,10,20,.45); border: 1.5px solid rgba(255,255,255,.18);
  border-radius: var(--iq-radius); min-height: 52px;
  transition: var(--iq-trans); position: relative;
}
.iqna-input-wrap:focus-within {
  border-color: var(--iq-emerald-light); box-shadow: 0 0 0 3px rgba(34,197,94,.15);
}
/* Icon is a flex child — takes its own space, never overlaps text */
.iqna-input-icon { position: static; transform: none; flex-shrink: 0; padding: 0 10px 0 14px; color: rgba(255,255,255,.6); display: flex; align-items: center; pointer-events: none; }
.iqna-input-icon svg { width: 18px; height: 18px; stroke: currentColor; flex-shrink: 0; display: block; }
/* Input takes remaining space, no left padding needed — icon is beside it */
.iqna-input-wrap input {
  flex: 1; min-width: 0; padding: 15px 10px 15px 0;
  background: transparent; border: none; box-shadow: none;
  color: #ffffff; font-size: 15px;
  outline: none; font-family: var(--iq-font);
  min-height: 50px; -webkit-text-fill-color: #ffffff;
}
/* Fix 3: force white text even with autofill */
.iqna-input-wrap input:-webkit-autofill,
.iqna-input-wrap input:-webkit-autofill:hover,
.iqna-input-wrap input:-webkit-autofill:focus {
  -webkit-text-fill-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0 1000px rgba(10,10,20,.7) inset !important;
  caret-color: #ffffff;
}
.iqna-input-wrap input::placeholder { color: rgba(255,255,255,.38); }
.iqna-input-wrap input:focus { border: none; box-shadow: none; background: transparent; }
.iqna-toggle-pw { flex-shrink: 0; padding: 0 13px 0 6px; background: none; border: none; color: rgba(255,255,255,.5); cursor: pointer; display: flex; align-items: center; transition: var(--iq-trans); }
.iqna-toggle-pw svg { width: 18px; height: 18px; stroke: currentColor; }
.iqna-toggle-pw:hover { color: rgba(255,255,255,.85); }

/* ─── BUTTONS ─── */
.iqna-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 28px; border-radius: var(--iq-radius);
  font-size: 15px; font-weight: 700; letter-spacing: 0.1px;
  cursor: pointer; transition: var(--iq-trans);
  border: none; outline: none; font-family: var(--iq-font);
  min-height: 54px; position: relative;
}
.iqna-btn svg { width: 17px; height: 17px; stroke: currentColor; flex-shrink: 0; min-width: 17px; }
.iqna-btn:active { transform: scale(.97); }
.iqna-btn-primary {
  background: var(--iq-emerald); color: #fff;
  box-shadow: 0 4px 0 #074a27, 0 6px 20px rgba(13,107,58,.3);
}
.iqna-btn-primary:hover { background: var(--iq-emerald-mid); box-shadow: 0 2px 0 #074a27, 0 4px 16px rgba(13,107,58,.35); transform: translateY(2px); }
.iqna-btn-primary:active { box-shadow: 0 0 0 #074a27; transform: translateY(4px); }
.iqna-btn-ghost {
  background: var(--iq-surface-2); color: var(--iq-text-2);
  border: 1.5px solid var(--iq-border); box-shadow: 0 2px 0 var(--iq-border);
}
.iqna-btn-ghost:hover { border-color: var(--iq-border-strong); box-shadow: 0 1px 0 var(--iq-border); transform: translateY(1px); }
.iqna-btn-danger {
  background: var(--iq-red); color: #fff; box-shadow: 0 4px 0 #8b0c0c;
}
.iqna-btn-danger:hover { box-shadow: 0 2px 0 #8b0c0c; transform: translateY(2px); }
.iqna-btn-full { width: 100%; }
.iqna-btn-sm { padding: 10px 18px; font-size: 13px; min-height: 42px; }
.btn-loader { animation: iqnaSpin 1s linear infinite; display: inline-block; }
@keyframes iqnaSpin { to { transform: rotate(360deg); } }

.iqna-msg { margin-top: 14px; padding: 12px 16px; border-radius: var(--iq-radius); font-size: 14px; font-weight: 600; display: none; }
.iqna-msg.error { background: rgba(239,68,68,.2); color: #fca5a5; border: 1.5px solid rgba(239,68,68,.4); display: block; }
.iqna-msg.success { background: rgba(34,197,94,.15); color: #86efac; border: 1.5px solid rgba(34,197,94,.4); display: block; }
/* Inside white modals — darker colours for readability */
.iqna-modal-box-body .iqna-msg.error { color: #dc2626; background: #fef2f2; border-color: #fecaca; }
.iqna-modal-box-body .iqna-msg.success { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }

/* ─── TOP BAR ─── */
.iqna-topbar {
  height: 60px; background: var(--iq-surface);
  border-bottom: 2px solid var(--iq-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.iqna-topbar-brand { display: flex; align-items: center; gap: 10px; }
.iqna-topbar-logo { width: 36px; height: 36px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.iqna-topbar-logo-img { width: 36px; height: 36px; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 2px rgba(201,162,39,.5); }
  width: 34px; height: 34px; background: var(--iq-emerald);
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  display: flex; align-items: center; justify-content: center;
}
.iqna-topbar-logo-fb svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 2; }
.iqna-topbar-title { font-size: 16px; font-weight: 900; color: var(--iq-emerald); letter-spacing: -0.3px; }
.iqna-version-tag { font-size: 10px; background: var(--iq-emerald-glow); color: var(--iq-emerald); padding: 3px 7px; border-radius: 4px; font-weight: 700; border: 1px solid rgba(13,107,58,.15); }
.iqna-topbar-right { display: flex; align-items: center; gap: 10px; }
.iqna-theme-toggle {
  background: var(--iq-surface-2); border: 1.5px solid var(--iq-border);
  border-radius: var(--iq-radius); width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--iq-trans); color: var(--iq-icon);
}
.iqna-theme-toggle:hover { border-color: var(--iq-emerald); color: var(--iq-emerald); }
.iqna-theme-toggle svg { width: 18px; height: 18px; stroke: currentColor; }

/* ─── BELL NOTIFICATION ─── */
.iqna-bell-btn {
  position: relative; width: 40px; height: 40px;
  background: var(--iq-surface-2); border: 1.5px solid var(--iq-border);
  border-radius: var(--iq-radius); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--iq-trans); color: var(--iq-icon);
}
.iqna-bell-btn:hover { border-color: var(--iq-emerald); color: var(--iq-emerald); }
.iqna-bell-btn svg { width: 18px; height: 18px; stroke: currentColor; }
.iqna-bell-badge {
  position: absolute; top: -5px; right: -5px;
  background: var(--iq-red); color: #fff;
  font-size: 10px; font-weight: 800; min-width: 18px; height: 18px;
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
  padding: 0 4px; border: 2px solid var(--iq-surface);
}
/* Notification Drawer */
.iqna-notif-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 1000; }
.iqna-notif-drawer {
  position: fixed; top: 0; right: 0; width: min(360px, 100vw); height: 100vh;
  background: var(--iq-surface); border-left: 1px solid var(--iq-border);
  z-index: 1001; display: flex; flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,.12);
  transform: translateX(100%); transition: transform .25s ease;
}
.iqna-notif-drawer.open { transform: translateX(0); }
.iqna-notif-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--iq-border);
  font-weight: 700; font-size: 15px; color: var(--iq-text); flex-shrink: 0;
}
.iqna-notif-read-all { background: none; border: none; font-size: 11px; color: var(--iq-emerald); cursor: pointer; font-weight: 600; padding: 4px 8px; border-radius: 4px; font-family: var(--iq-font); }
.iqna-notif-read-all:hover { background: var(--iq-emerald-glow); }
.iqna-notif-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--iq-text-3); padding: 4px; }
.iqna-notif-list { flex: 1; overflow-y: auto; }
.iqna-notif-item {
  display: flex; gap: 12px; padding: 14px 18px;
  border-bottom: 1px solid var(--iq-border); cursor: pointer;
  transition: background .1s; position: relative;
}
.iqna-notif-item:hover { background: var(--iq-surface-2); }
.iqna-notif-item.unread { background: var(--iq-emerald-glow); }
.iqna-notif-item.unread::before { content:''; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--iq-emerald); }
.iqna-notif-img { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.iqna-notif-img-ph { width: 50px; height: 50px; border-radius: 8px; background: var(--iq-surface-2); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.iqna-notif-title { font-size: 13px; font-weight: 700; color: var(--iq-text); margin-bottom: 3px; line-height: 1.4; }
.iqna-notif-body-txt { font-size: 12px; color: var(--iq-text-2); line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.iqna-notif-time { font-size: 10px; color: var(--iq-text-3); margin-top: 4px; }
/* Notif full modal */
.iqna-notif-modal-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.55); z-index:1100; }
.iqna-notif-modal { display:none; position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); width:90%; max-width:460px; max-height:85vh; overflow-y:auto; background:var(--iq-surface); border-radius:var(--iq-radius-lg); z-index:1101; box-shadow:0 20px 60px rgba(0,0,0,.3); }
.iqna-notif-modal-img { width:100%; max-height:190px; object-fit:cover; border-radius:var(--iq-radius-lg) var(--iq-radius-lg) 0 0; display:block; }
.iqna-notif-modal-body { padding:20px 20px 24px; }
.iqna-notif-modal-title { font-size:17px; font-weight:800; color:var(--iq-text); margin-bottom:10px; }
.iqna-notif-modal-text { font-size:15px; line-height:1.85; color:var(--iq-text-2); white-space:pre-wrap; }
.iqna-notif-modal-close-btn { display:block; width:100%; margin-top:18px; padding:16px; background:var(--iq-emerald); color:#fff; border:none; border-radius:var(--iq-radius); font-size:16px; font-weight:800; cursor:pointer; font-family:var(--iq-font); letter-spacing:0.3px; box-shadow: 0 4px 0 #0a4a28; }

/* Report Modal */
.iqna-report-modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,.55); z-index:1100; }
.iqna-report-modal {
  position:fixed; top:50%; left:50%; transform:translate(-50%,-50%);
  width:90%; max-width:440px; background:var(--iq-surface);
  border-radius:var(--iq-radius-lg); z-index:1101;
  box-shadow:0 20px 60px rgba(0,0,0,.3); overflow:hidden;
}
.iqna-report-modal-head {
  background:linear-gradient(135deg,#dc2626,#b91c1c);
  padding:16px 20px; display:flex; align-items:center; justify-content:space-between;
}
.iqna-report-modal-head h3 { color:#fff; margin:0; font-size:15px; }
.iqna-report-modal-body { padding:20px; }
.iqna-content-block { padding: 0 18px 18px; }
.iqna-content-slider-wrap { position: relative; border-radius: var(--iq-radius-lg); overflow: hidden; }
.iqna-content-slider { display: flex; transition: transform .35s ease; }
.iqna-content-slide {
  min-width: 100%; flex-shrink: 0;
  background: var(--iq-surface);
  border: 1.5px solid var(--iq-border); border-radius: var(--iq-radius-lg);
  overflow: hidden;
}
.iqna-slide-img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.iqna-slide-body { padding: 14px 16px 18px; }
.iqna-slide-cat { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--iq-emerald); margin-bottom: 6px; }
.iqna-slide-title { font-size: 15px; font-weight: 800; color: var(--iq-text); margin-bottom: 7px; line-height: 1.4; }
.iqna-slide-text { font-size: 14px; color: var(--iq-text-2); line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.iqna-slider-dots { display: flex; justify-content: center; gap: 7px; padding: 10px 0 2px; }
.iqna-slider-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--iq-border); cursor: pointer; transition: background .2s, transform .2s; border: none; padding: 0; }
.iqna-slider-dot.active { background: var(--iq-emerald); transform: scale(1.3); }
.iqna-slider-prev, .iqna-slider-next {
  position: absolute; top: 45%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.88); border: 1px solid var(--iq-border);
  font-size: 18px; cursor: pointer; color: var(--iq-text);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.1); transition: var(--iq-trans); z-index: 2;
}
.iqna-slider-prev { left: 8px; }
.iqna-slider-next { right: 8px; }
.iqna-slider-prev:hover, .iqna-slider-next:hover { background: var(--iq-emerald); color: #fff; }
.iqna-avatar-chip { display: flex; align-items: center; gap: 8px; background: var(--iq-surface-2); border: 1.5px solid var(--iq-border); border-radius: var(--iq-radius); padding: 5px 12px 5px 5px; }
.iqna-chip-avatar { width: 30px; height: 30px; border-radius: 4px; background: linear-gradient(135deg, var(--iq-emerald), var(--iq-emerald-mid)); color: #fff; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.iqna-chip-name { font-size: 13px; font-weight: 700; color: var(--iq-text-2); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── PAGES & BOTTOM NAV ─── */
.iqna-pages { height: calc(100vh - 60px - 80px); overflow: hidden; }
.iqna-page { display: none; height: 100%; overflow: hidden; flex-direction: column; }
.iqna-page.active { display: flex; }
.iqna-page-scroll { height: 100%; overflow-y: auto; padding: 24px 18px 32px; -webkit-overflow-scrolling: touch; }
/* Hide all pages until JS restores correct page — prevents dashboard flash */
.iqna-js-loading .iqna-page { display: none !important; }

.iqna-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 80px; background: var(--iq-surface);
  border-top: 2px solid var(--iq-border);
  display: flex; align-items: stretch;
  box-shadow: 0 -6px 24px rgba(0,0,0,.07); z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}
.iqna-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: none !important; border: none; cursor: pointer; padding: 10px 4px;
  color: var(--iq-text-3); transition: var(--iq-trans); position: relative; font-family: var(--iq-font);
  outline: none !important; box-shadow: none !important;
}
.iqna-nav-item:focus,
.iqna-nav-item:focus-visible {
  outline: none !important; box-shadow: none !important; background: none !important;
}
.iqna-nav-item::after,
.iqna-nav-item.active::after,
.iqna-nav-item.iqna-logout-nav.active::after {
  display: none !important;
  content: none !important;
  width: 0 !important;
  height: 0 !important;
}
.iqna-nav-item.active { color: var(--iq-emerald); }
.iqna-nav-item.iqna-logout-nav { color: var(--iq-red); }
.iqna-nav-ico { display: flex; align-items: center; justify-content: center; transition: var(--iq-trans); }
.iqna-nav-ico svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; transition: var(--iq-trans); }
.iqna-nav-item.active .iqna-nav-ico { transform: scale(1.12); }
.iqna-nav-lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.2px; }

/* ─── HERO BANNER ─── */
.iqna-hero-banner {
  background: linear-gradient(150deg, #0a5030 0%, #063320 55%, #040e08 100%);
  border-radius: var(--iq-radius-lg); padding: 26px 22px;
  position: relative; overflow: hidden; margin-bottom: 20px;
}
.iqna-hero-bg-pattern {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    repeating-linear-gradient(60deg, rgba(201,162,39,.07) 0, rgba(201,162,39,.07) 1px, transparent 1px, transparent 40px),
    repeating-linear-gradient(-60deg, rgba(201,162,39,.07) 0, rgba(201,162,39,.07) 1px, transparent 1px, transparent 40px);
}
.iqna-hero-content { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; position: relative; z-index: 1; }
.iqna-hero-avatar {
  width: 58px; height: 58px; border-radius: var(--iq-radius);
  background: rgba(201,162,39,.2); border: 2px solid rgba(201,162,39,.5);
  color: var(--iq-gold-light); font-size: 22px; font-weight: 900;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.iqna-hero-greet { font-size: 10px; color: rgba(201,162,39,.7); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 3px; font-weight: 700; }
.iqna-hero-name { font-size: 22px; font-weight: 900; color: #fff; line-height: 1.1; }
.iqna-pkg-pill { display: inline-block; padding: 4px 12px; margin-top: 6px; background: rgba(201,162,39,.18); border: 1px solid rgba(201,162,39,.4); border-radius: 4px; font-size: 12px; font-weight: 700; color: var(--iq-gold-light); }
.iqna-hero-quota { position: relative; z-index: 1; }
.iqna-hq-label { font-size: 10px; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; font-weight: 700; }
.iqna-hq-nums { display: flex; align-items: baseline; gap: 4px; margin-bottom: 10px; }
.iqna-hq-remain { font-size: 38px; font-weight: 900; color: #fff; line-height: 1; }
.iqna-hq-sep { font-size: 18px; color: rgba(255,255,255,.35); }
.iqna-hq-total { font-size: 18px; color: rgba(255,255,255,.5); }
.iqna-hq-bar { height: 7px; background: rgba(255,255,255,.15); border-radius: 4px; overflow: hidden; }
.iqna-hq-fill { height: 100%; background: linear-gradient(90deg, var(--iq-gold), var(--iq-gold-light)); border-radius: 4px; transition: width 0.9s cubic-bezier(.4,0,.2,1); }

/* ─── INFO CARDS ─── */
.iqna-info-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.iqna-info-card {
  background: var(--iq-surface); border: 1.5px solid var(--iq-border);
  border-bottom: 3px solid var(--iq-border);
  border-radius: var(--iq-radius-lg); padding: 18px 16px;
  display: flex; align-items: flex-start; gap: 12px;
  transition: var(--iq-trans); box-sizing: border-box;
}
.iqna-info-card:hover { border-bottom-color: var(--iq-emerald); transform: translateY(-2px); box-shadow: var(--iq-shadow-md); }
.iqna-ic-icon { color: var(--iq-icon); display: flex; align-items: center; flex-shrink: 0; margin-top: 2px; }
.iqna-ic-icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.75; }
.iqna-ic-label { font-size: 10px; color: var(--iq-text-3); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 4px; font-weight: 700; }
.iqna-ic-val { font-size: 20px; font-weight: 900; color: var(--iq-text); letter-spacing: -0.5px; }
.iqna-ic-sub { font-size: 12px; color: var(--iq-text-3); margin-top: 2px; }

/* ─── NOTICES ─── */
.iqna-notice {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px 16px; border-radius: var(--iq-radius-lg);
  margin-bottom: 20px; border: 1.5px solid;
}
.iqna-notice strong { font-size: 14px; font-weight: 800; display: block; margin-bottom: 4px; }
.iqna-notice p { font-size: 13px; margin-bottom: 14px; line-height: 1.6; }
.iqna-notice-ico { display: flex; align-items: flex-start; flex-shrink: 0; margin-top: 1px; }
.iqna-notice-ico svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.75; }
.iqna-notice-warning { background: var(--iq-warning-light); border-color: rgba(196,122,10,.3); color: #7a4a00; }
.iqna-notice-danger  { background: var(--iq-red-light); border-color: rgba(196,26,26,.25); color: #7a1010; }
[data-theme="dark"] .iqna-notice-warning { background: rgba(196,122,10,.1); color: #fbbf24; }
[data-theme="dark"] .iqna-notice-danger { background: rgba(196,26,26,.1); color: #f87171; }

/* ─── ASK SECTION ─── */
.iqna-ask-section {
  background: var(--iq-surface); border: 1.5px solid var(--iq-border);
  border-top: 4px solid var(--iq-emerald);
  border-radius: var(--iq-radius-lg);
  box-shadow: var(--iq-shadow-md);
  display: flex; flex-direction: column; overflow: hidden;
  flex: 1; min-height: 0;
}

/* ─── TOPIC HEADER ─── */
.iqna-topic-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1.5px solid var(--iq-border);
  background: var(--iq-surface-2); gap: 10px; flex-shrink: 0;
}
.iqna-topic-title-wrap { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.iqna-section-ico { color: var(--iq-emerald); display: flex; align-items: center; flex-shrink: 0; }
.iqna-section-ico svg { width: 20px; height: 20px; stroke: currentColor; }
.iqna-topic-current-title {
  font-size: 16px; font-weight: 800; color: var(--iq-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.iqna-btn-new-topic {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--iq-emerald); color: #fff; border: none;
  border-radius: var(--iq-radius); padding: 12px 18px;
  font-size: 14px; font-weight: 800; cursor: pointer;
  font-family: var(--iq-font); white-space: nowrap; flex-shrink: 0;
  transition: var(--iq-trans); min-height: 48px;
}
.iqna-btn-new-topic:hover { background: var(--iq-emerald-mid); }
.iqna-btn-new-topic svg { width: 16px; height: 16px; stroke: currentColor; }

/* ─── CHAT AREA ─── */
.iqna-chat-area {
  flex: 1; overflow-y: auto; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 16px;
  min-height: 200px;
  -webkit-overflow-scrolling: touch;
}

/* ─── CHAT EMPTY STATE ─── */
.iqna-chat-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 30px 20px 20px;
  color: var(--iq-text-3); text-align: center; position: relative;
  min-height: 200px; overflow: hidden;
}
.iqna-chat-empty-tags {
  position: relative; width: 100%; height: 240px;
  overflow: hidden;
}
.iqna-tag {
  position: absolute;
  border-radius: 20px; padding: 7px 13px; font-size: 13px; font-weight: 700;
  white-space: nowrap; animation: floatTag ease-in-out infinite;
  border-width: 1px; border-style: solid;
}
@keyframes floatTag {
  0%   { transform: translateY(0px) rotate(var(--rot)); }
  50%  { transform: translateY(-10px) rotate(var(--rot)); }
  100% { transform: translateY(0px) rotate(var(--rot)); }
}
.iqna-chat-empty-hint {
  font-size: 14px; color: var(--iq-text-3); margin-top: 14px;
  font-weight: 600;
}

/* Chat message bubbles */
.iqna-chat-msg { display: flex; flex-direction: column; max-width: 92%; }
.iqna-chat-msg.user { align-self: flex-end; align-items: flex-end; }
.iqna-chat-msg.assistant { align-self: flex-start; align-items: flex-start; width: 100%; max-width: 100%; }
.iqna-chat-bubble {
  padding: 14px 18px; border-radius: 18px; font-size: 16px; line-height: 1.8;
  word-break: break-word;
}
.iqna-chat-msg.user .iqna-chat-bubble {
  background: var(--iq-emerald); color: #fff;
  border-bottom-right-radius: 6px;
  min-width: 120px; max-width: 100%;
  padding: 14px 20px;
}
.iqna-chat-msg.assistant .iqna-chat-bubble {
  background: var(--iq-surface-2); color: var(--iq-text);
  border: 1.5px solid var(--iq-border);
  border-bottom-left-radius: 4px;
  width: 100%;
}
.iqna-chat-msg.assistant .iqna-chat-bubble p { margin: 0 0 10px; font-size: 16px; }
.iqna-chat-msg.assistant .iqna-chat-bubble p:last-child { margin: 0; }
.iqna-chat-msg.assistant .iqna-chat-bubble strong { color: var(--iq-emerald); }
.iqna-chat-msg.assistant .iqna-chat-bubble h2,
.iqna-chat-msg.assistant .iqna-chat-bubble h3,
.iqna-chat-msg.assistant .iqna-chat-bubble h4 { color: var(--iq-emerald); margin: 12px 0 6px; font-size: 16px; }
.iqna-chat-msg.assistant .iqna-chat-bubble ul,
.iqna-chat-msg.assistant .iqna-chat-bubble ol { margin: 8px 0 8px 20px; padding: 0; }
.iqna-chat-msg.assistant .iqna-chat-bubble li { margin-bottom: 5px; font-size: 16px; }

/* Chat message actions (copy, pdf, rate) */
.iqna-chat-actions {
  display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap;
}
.iqna-chat-action-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: none; outline: none;
  border-radius: 20px; padding: 8px 14px; font-size: 13px;
  color: var(--iq-text-3); cursor: pointer; transition: var(--iq-trans);
  font-family: var(--iq-font); font-weight: 600; min-height: 38px;
}
.iqna-chat-action-btn:hover { color: var(--iq-emerald); background: var(--iq-emerald-glow); }
.iqna-chat-action-btn svg { width: 15px; height: 15px; stroke: currentColor; }
.iqna-chat-action-btn.active-like { color: #16a34a; background: #dcfce7; }
.iqna-chat-action-btn.active-dislike { color: #ca8a04; background: #fef9c3; }
.iqna-chat-action-btn.active-report { color: #dc2626; background: #fef2f2; }

/* Disclaimer inside AI bubble */
.iqna-bubble-disclaimer {
  font-size: 10px; color: var(--iq-text-3); margin-top: 10px;
  padding-top: 8px; border-top: 1px dashed var(--iq-border);
  font-style: italic; line-height: 1.5;
}

/* Thinking/Loading bubble */
.iqna-chat-thinking {
  display: flex; gap: 5px; padding: 14px 18px;
  background: var(--iq-surface-2); border: 1.5px solid var(--iq-border);
  border-radius: 18px; border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.iqna-thinking-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--iq-emerald); opacity: .5;
  animation: iqnaThink 1.2s ease-in-out infinite;
}
.iqna-thinking-dot:nth-child(2) { animation-delay: .2s; }
.iqna-thinking-dot:nth-child(3) { animation-delay: .4s; }
@keyframes iqnaThink {
  0%,80%,100% { transform: scale(.8); opacity:.4; }
  40% { transform: scale(1.2); opacity:1; }
}

/* Topic limit notice */
.iqna-topic-limit-notice {
  display: flex; align-items: center; gap: 8px;
  margin: 0 18px 12px; padding: 10px 14px;
  background: #fff7ed; border: 1.5px solid #f97316;
  border-radius: var(--iq-radius); font-size: 13px;
  color: #c2410c; font-weight: 600;
}
.iqna-topic-limit-notice svg { width: 16px; height: 16px; stroke: currentColor; flex-shrink: 0; }
.iqna-topic-limit-notice.hidden { display: none; }

/* Chat input wrap */
.iqna-chat-input-wrap { padding: 14px 18px 18px; border-top: 1.5px solid var(--iq-border); flex-shrink: 0; }
.iqna-ask-actions { display: flex; gap: 10px; align-items: stretch; margin-top: 12px; }
.iqna-section-ico svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.75; }
.iqna-section-title { font-size: 17px; font-weight: 900; color: var(--iq-text); }
.iqna-quota-chip { background: var(--iq-emerald-glow); color: var(--iq-emerald); padding: 7px 14px; border-radius: 4px; font-size: 13px; font-weight: 800; border: 1.5px solid rgba(13,107,58,.2); }

.iqna-textarea-container { margin-bottom: 6px; }
.iqna-textarea {
  width: 100%; padding: 14px 16px;
  background: var(--iq-surface-2); border: 2px solid var(--iq-border);
  border-radius: var(--iq-radius); color: var(--iq-text); font-size: 17px;
  line-height: 1.65; resize: none; outline: none; transition: var(--iq-trans);
  font-family: var(--iq-font); overflow-y: auto;
}
.iqna-textarea:focus { border-color: var(--iq-emerald); box-shadow: 0 0 0 3px var(--iq-emerald-glow); }
.iqna-textarea::placeholder { color: var(--iq-text-3); }
.iqna-char-badge { text-align: right; font-size: 11px; color: var(--iq-text-3); font-weight: 600; margin-bottom: 10px; padding-right: 2px; }

.iqna-ask-actions { display: flex; gap: 10px; align-items: stretch; margin-top: 20px; }

/* ─── FILE UPLOAD STRIP ─── */
.iqna-upload-strip {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; margin-bottom: 0; padding: 12px 16px;
  background: var(--iq-surface-2); border: 1.5px dashed var(--iq-border);
  border-radius: var(--iq-radius); transition: var(--iq-trans);
}
.iqna-upload-strip.hidden { display: none; }
.iqna-upload-trigger-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--iq-surface); border: 1.5px solid var(--iq-border);
  border-radius: var(--iq-radius); padding: 12px 20px;
  font-size: 14px; font-weight: 700; color: var(--iq-text-2);
  cursor: pointer; transition: var(--iq-trans); font-family: var(--iq-font);
  flex-shrink: 0; min-height: 48px;
}
.iqna-upload-trigger-btn:hover { border-color: var(--iq-emerald); color: var(--iq-emerald); background: var(--iq-emerald-glow); }
.iqna-upload-trigger-btn svg { width: 18px; height: 18px; stroke: currentColor; }
.iqna-upload-hint { font-size: 11px; color: var(--iq-text-3); }
.iqna-file-preview {
  display: flex; align-items: center; gap: 8px; flex: 1;
  background: var(--iq-emerald-glow); border: 1.5px solid var(--iq-emerald);
  border-radius: var(--iq-radius); padding: 7px 12px; min-width: 0;
}
.iqna-file-preview.hidden { display: none; }
.iqna-file-remove-btn {
  background: none; border: none; color: var(--iq-red);
  cursor: pointer; font-size: 14px; font-weight: 700; flex-shrink: 0; padding: 0 4px;
}
.iqna-btn-ask { flex: 1; min-height: 52px; font-size: 15px; }
.iqna-ask-actions .iqna-btn-ghost {
  background: var(--iq-surface-2); color: var(--iq-text-2);
  border: 1.5px solid var(--iq-border); min-height: 52px;
  width: 52px; min-width: 52px; max-width: 52px;
  padding: 0; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 0 var(--iq-border); flex-shrink: 0;
}
.iqna-ask-actions .iqna-btn-ghost svg { width: 20px; height: 20px; stroke: currentColor; }

/* ─── ANSWER BOX ─── */
.iqna-answer-box {
  margin-top: 22px; background: var(--iq-surface);
  border: 1.5px solid var(--iq-border);
  border-left: 4px solid var(--iq-emerald);
  border-radius: var(--iq-radius-lg); overflow: hidden;
  box-shadow: var(--iq-shadow-md);
  animation: iqnaSlideIn .35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes iqnaSlideIn { from{opacity:0;transform:translateY(14px)} to{opacity:1;transform:none} }
.iqna-answer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; background: var(--iq-emerald);
}
.iqna-answer-brand { display: flex; align-items: center; gap: 10px; }
.iqna-answer-logo { color: var(--iq-gold-light); display: flex; align-items: center; }
.iqna-answer-logo svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.75; }
.iqna-answer-ai-label { font-size: 14px; font-weight: 800; color: #fff; }
.iqna-answer-tools { display: flex; gap: 8px; }
.iqna-tool-btn {
  background: rgba(255,255,255,.15); border: 1.5px solid rgba(255,255,255,.25);
  color: #fff; border-radius: var(--iq-radius); padding: 7px 14px;
  font-size: 12px; font-weight: 700; cursor: pointer; transition: var(--iq-trans);
  display: flex; align-items: center; gap: 5px; font-family: var(--iq-font); min-height: 36px;
}
.iqna-tool-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; }
.iqna-tool-btn:hover { background: rgba(255,255,255,.25); }

.iqna-answer-question-preview {
  padding: 14px 18px;
  background: rgba(13,107,58,.05); border-bottom: 1px solid rgba(13,107,58,.1);
  font-size: 13px; color: var(--iq-emerald); font-style: italic; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.iqna-answer-content { padding: 20px 18px; font-size: 17px; line-height: 1.9; color: var(--iq-text); word-break: break-word; }
.iqna-hi-answer { display: none; padding: 16px 18px 18px; font-size: 16px; line-height: 1.9; color: var(--iq-text-2); border-top: 1.5px solid var(--iq-border); word-break: break-word; }
.iqna-answer-content strong { color: var(--iq-emerald); }

.iqna-disclaimer {
  margin: 0; padding: 14px 18px;
  background: var(--iq-surface-2); border-top: 1px solid var(--iq-border);
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 11.5px; color: var(--iq-text-3); line-height: 1.65; font-style: italic;
}
.iqna-disclaimer-icon { flex-shrink: 0; color: var(--iq-text-3); display: flex; align-items: flex-start; margin-top: 1px; }
.iqna-disclaimer-icon svg { width: 14px; height: 14px; stroke: currentColor; fill: none; }

/* Rating */
.iqna-rating-bar {
  padding: 14px 18px; border-top: 1.5px solid var(--iq-border);
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--iq-surface-2);
}
.iqna-rating-label { font-size: 11px; color: var(--iq-text-3); font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; }
.iqna-rating-btns { display: flex; gap: 8px; }
.iqna-rating-btn {
  background: var(--iq-surface); border: 1.5px solid var(--iq-border);
  border-radius: var(--iq-radius); padding: 9px 16px;
  cursor: pointer; transition: var(--iq-trans); min-height: 44px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  box-shadow: 0 2px 0 var(--iq-border); font-family: var(--iq-font);
  font-size: 12px; font-weight: 600; color: var(--iq-text-2);
}
.iqna-rating-btn svg { width: 18px; height: 18px; stroke: currentColor; flex-shrink: 0; }
.iqna-rating-btn:hover { transform: translateY(-2px); border-color: var(--iq-emerald); color: var(--iq-emerald); box-shadow: 0 4px 0 var(--iq-border); }
.iqna-rating-btn:active { transform: translateY(1px); box-shadow: none; }
.iqna-rating-btn.rated-thumbs_up { background: #dcfce7; border-color: #16a34a; color: #16a34a; box-shadow: 0 2px 0 #166534; }
.iqna-rating-btn.rated-thumbs_up svg { stroke: #16a34a; fill: #16a34a; }
.iqna-rating-btn.rated-thumbs_down { background: #fef9c3; border-color: #ca8a04; color: #ca8a04; box-shadow: 0 2px 0 #92400e; }
.iqna-rating-btn.rated-thumbs_down svg { stroke: #ca8a04; fill: #ca8a04; }
.iqna-report-btn.rated-report { background: #fef2f2; border-color: var(--iq-red); color: var(--iq-red); box-shadow: 0 2px 0 #7a1010; }
.iqna-report-btn.rated-report svg { stroke: var(--iq-red); }

.iqna-report-panel { padding: 14px 18px; border-top: 1px solid var(--iq-border); background: var(--iq-red-light); }
.iqna-textarea-sm { width: 100%; padding: 10px 14px; background: var(--iq-surface); border: 1.5px solid rgba(196,26,26,.3); border-radius: var(--iq-radius); font-size: 13px; color: var(--iq-text); resize: none; outline: none; font-family: var(--iq-font); line-height: 1.5; }
.iqna-rating-msg { padding: 10px 18px; font-size: 13px; font-weight: 700; color: var(--iq-emerald); }

/* ─── PACKAGES PAGE ─── */
.iqna-page-hero { padding: 4px 0 24px; text-align: center; }
.iqna-page-hero-title { font-size: 24px; font-weight: 900; color: var(--iq-text); letter-spacing: -0.5px; }
.iqna-page-hero-sub { font-size: 15px; color: var(--iq-text-3); margin-top: 6px; line-height: 1.5; }

.iqna-packages-grid { display: grid; gap: 20px; }
.iqna-package-card {
  background: var(--iq-surface); border: 1.5px solid var(--iq-border);
  border-radius: var(--iq-radius-lg); overflow: visible;
  box-shadow: var(--iq-shadow-sm); transition: var(--iq-trans);
}
.iqna-package-card:hover { box-shadow: var(--iq-shadow-lg); transform: translateY(-4px); }
.iqna-package-card.popular { border-color: var(--iq-gold); border-width: 2px; box-shadow: 0 0 0 3px var(--iq-gold-glow), var(--iq-shadow-md); }
.iqna-pkg-header { padding: 24px 22px 0; }
.iqna-pkg-badge { display: inline-block; background: linear-gradient(135deg, var(--iq-gold), var(--iq-gold-light)); color: #5a3800; font-size: 11px; font-weight: 800; padding: 4px 12px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 10px; }
.iqna-pkg-name { font-size: 22px; font-weight: 900; color: var(--iq-text); letter-spacing: -0.3px; }
.iqna-pkg-price-row { display: flex; align-items: baseline; gap: 4px; margin: 10px 0 0; flex-wrap: wrap; }
.iqna-pkg-rm { font-size: 16px; font-weight: 700; color: var(--iq-emerald); align-self: flex-start; padding-top: 6px; }
.iqna-pkg-amount { font-size: 44px; font-weight: 900; color: var(--iq-emerald); line-height: 1; letter-spacing: -2px; }
.iqna-pkg-period { font-size: 13px; color: var(--iq-text-3); align-self: flex-end; padding-bottom: 4px; }
.iqna-pkg-divider { height: 1.5px; background: var(--iq-border); margin: 18px 0; }
.iqna-pkg-features { padding: 0 22px 18px; }
.iqna-pkg-feature { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--iq-text-2); margin-bottom: 12px; line-height: 1.45; }
.iqna-pkg-check { color: var(--iq-emerald); flex-shrink: 0; display: flex; align-items: center; margin-top: 2px; }
.iqna-pkg-check svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2.5; fill: none; }
.iqna-pkg-cta { padding: 0 22px 22px; }

/* ─── HISTORY PAGE ─── */
.iqna-history-filter-row { margin-bottom: 18px; }
.iqna-select { width: 100%; padding: 14px 16px; background: var(--iq-surface); border: 1.5px solid var(--iq-border); border-radius: var(--iq-radius); color: var(--iq-text); font-size: 14px; outline: none; transition: var(--iq-trans); font-family: var(--iq-font); font-weight: 600; min-height: 50px; }
.iqna-select:focus { border-color: var(--iq-emerald); }

/* ─── TOPICS LIST (HISTORY PAGE) ─── */
.iqna-topics-list { display: flex; flex-direction: column; gap: 14px; }
.iqna-topic-item {
  background: var(--iq-surface); border: 1.5px solid var(--iq-border);
  border-radius: var(--iq-radius-lg); overflow: hidden;
  transition: var(--iq-trans); border-left: 4px solid var(--iq-border);
}
.iqna-topic-item:hover { border-left-color: var(--iq-emerald); box-shadow: var(--iq-shadow-md); }
.iqna-topic-item-header {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px;
  cursor: pointer; user-select: none;
}
.iqna-topic-icon { color: var(--iq-emerald); display: flex; align-items: center; flex-shrink: 0; }
.iqna-topic-icon svg { width: 22px; height: 22px; stroke: currentColor; }
.iqna-topic-info { flex: 1; min-width: 0; }
.iqna-topic-item-title { font-size: 16px; font-weight: 700; color: var(--iq-text); margin-bottom: 5px; line-height: 1.4; }
.iqna-topic-meta { font-size: 12px; color: var(--iq-text-3); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.iqna-topic-count { display: inline-flex; align-items: center; gap: 3px; background: var(--iq-emerald-glow); color: var(--iq-emerald); padding: 3px 10px; border-radius: 10px; font-weight: 700; font-size: 12px; }
.iqna-topic-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.iqna-topic-del-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; background: #fff5f5; border: 1.5px solid #fecaca;
  border-radius: var(--iq-radius); color: #dc2626; cursor: pointer;
  transition: var(--iq-trans); flex-shrink: 0;
}
.iqna-topic-del-btn:hover { background: #fee2e2; }
.iqna-topic-del-btn svg { width: 16px; height: 16px; stroke: currentColor; }

/* Full topic view */
.iqna-topic-full-view { display: none; border-top: 1.5px solid var(--iq-border); }
.iqna-topic-full-view.open { display: block; }
.iqna-topic-chat-history { padding: 18px; display: flex; flex-direction: column; gap: 16px; max-height: 60vh; overflow-y: auto; }
.iqna-topic-full-actions {
  display: flex; gap: 8px; padding: 14px 18px; border-top: 1.5px solid var(--iq-border);
  background: var(--iq-surface-2); flex-wrap: wrap; align-items: center;
}

.iqna-history-list { display: flex; flex-direction: column; gap: 14px; }
.iqna-history-item {
  background: var(--iq-surface); border: 1.5px solid var(--iq-border);
  border-left: 4px solid var(--iq-border);
  border-radius: var(--iq-radius-lg); overflow: hidden;
  transition: var(--iq-trans); cursor: pointer;
}
.iqna-history-item:hover { box-shadow: var(--iq-shadow-md); border-left-color: var(--iq-emerald); }
.iqna-history-item.open { border-left-color: var(--iq-emerald); }
.iqna-hi-header { padding: 18px; display: flex; gap: 12px; align-items: flex-start; }
.iqna-hi-q-icon { color: var(--iq-emerald); display: flex; align-items: center; flex-shrink: 0; margin-top: 2px; }
.iqna-hi-q-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.5; }
.iqna-hi-q-text { font-size: 14px; font-weight: 700; color: var(--iq-text); line-height: 1.5; flex: 1; }
.iqna-hi-meta { font-size: 11px; color: var(--iq-text-3); margin-top: 4px; font-weight: 500; }
.iqna-hi-chevron { color: var(--iq-text-3); display: flex; align-items: center; flex-shrink: 0; margin-top: 3px; transition: var(--iq-trans); }
.iqna-hi-chevron svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.5; }
.iqna-history-item.open .iqna-hi-chevron { transform: rotate(180deg); }
.iqna-hi-actions { display: none; padding: 12px 18px; gap: 10px; border-top: 1.5px solid var(--iq-border); background: var(--iq-surface-2); align-items: center; }
.iqna-history-item.open .iqna-hi-answer,
.iqna-history-item.open .iqna-hi-actions { display: flex; flex-direction: column; }
.iqna-history-item.open .iqna-hi-actions { flex-direction: row; flex-wrap: wrap; align-items: center; }
.iqna-hi-delete { min-width: 48px; padding: 0 16px !important; margin-left: auto !important; }
.iqna-hi-disclaimer { font-size: 11px; color: var(--iq-text-3); font-style: italic; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--iq-border); }

.iqna-empty-state { text-align: center; padding: 56px 20px; color: var(--iq-text-3); }
.iqna-empty-icon { color: var(--iq-icon); display: flex; justify-content: center; margin-bottom: 16px; opacity: .35; }
.iqna-empty-icon svg { width: 56px; height: 56px; stroke: currentColor; fill: none; stroke-width: 1.25; }
.iqna-empty-state p { font-size: 15px; font-weight: 600; }

/* ─── MODAL ─── */
.iqna-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.65); backdrop-filter: blur(8px); z-index: 1000; display: flex; align-items: flex-end; justify-content: center; padding: 0; }
.iqna-modal { background: var(--iq-surface); border-radius: var(--iq-radius-lg) var(--iq-radius-lg) 0 0; width: 100%; max-width: 480px; padding: 28px 24px 32px; position: relative; animation: iqnaSlideUp .3s cubic-bezier(.34,1.56,.64,1); }
@keyframes iqnaSlideUp { from{opacity:0;transform:translateY(50px)} to{opacity:1;transform:none} }
.iqna-modal-close { position: absolute; top: 18px; right: 18px; background: var(--iq-surface-2); border: 1.5px solid var(--iq-border); border-radius: var(--iq-radius); width: 36px; height: 36px; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; font-family: var(--iq-font); }
.iqna-modal-icon { font-size: 40px; text-align: center; margin-bottom: 14px; }
.iqna-modal-title { font-size: 22px; font-weight: 900; text-align: center; margin-bottom: 18px; color: var(--iq-text); }
.iqna-modal-details { background: var(--iq-surface-2); border: 1.5px solid var(--iq-border); border-radius: var(--iq-radius); padding: 18px; margin-bottom: 18px; font-size: 14px; line-height: 1.85; }
.iqna-modal-actions { display: flex; flex-direction: column; gap: 10px; }

/* ─── TOAST ─── */
.iqna-toast { position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%); background: var(--iq-text); color: var(--iq-surface); padding: 13px 22px; border-radius: var(--iq-radius); font-size: 14px; font-weight: 700; z-index: 9999; white-space: nowrap; box-shadow: var(--iq-shadow-lg); animation: iqnaToast .25s ease; }
@keyframes iqnaToast { from{opacity:0;transform:translateX(-50%) translateY(8px)} to{opacity:1;transform:translateX(-50%)} }

/* ─── LOADING ─── */
.iqna-loading {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.iqna-loading-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.iqna-loading-spinner { width: 56px; height: 56px; border: 4px solid rgba(255,255,255,.15); border-top-color: var(--iq-emerald-light); border-radius: 50%; animation: iqnaSpin 0.8s linear infinite; margin: 0 auto 16px; }
.iqna-loading-text { color: #fff; font-size: 16px; font-weight: 700; text-align: center; line-height: 1.6; text-shadow: 0 1px 4px rgba(0,0,0,.3); margin: 0; }
.iqna-loading-sub { color: rgba(255,255,255,.7); font-size: 12px; margin-top: 6px; text-align: center; }

/* Dark overrides */
[data-theme="dark"] .iqna-auth-card { background: rgba(255,255,255,.04); }
[data-theme="dark"] .iqna-answer-box { background: var(--iq-surface); border-color: rgba(34,197,94,.2); }

/* Responsive */
@media (min-width: 480px) { .iqna-packages-grid { grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); } }
@media (max-width: 360px) {
  .iqna-hero-name { font-size: 19px; }
  .iqna-hq-remain { font-size: 30px; }
  .iqna-nav-lbl { font-size: 10px; }
  .iqna-page-scroll { padding: 20px 14px 28px; }
}

/* ─── SHARED MODAL BOX ─── */
.iqna-modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,.55); z-index:1100; }
.iqna-modal-box {
  position:fixed; top:50%; left:50%; transform:translate(-50%,-50%);
  width:92%; max-width:480px; max-height:88vh;
  background:var(--iq-surface); border-radius:var(--iq-radius-lg);
  z-index:1101; box-shadow:0 20px 60px rgba(0,0,0,.3);
  display:flex; flex-direction:column; overflow:hidden;
}
.iqna-modal-box-head {
  background:linear-gradient(135deg,#0d6b3a,#1a8a4e);
  padding:16px 20px; display:flex; align-items:center; justify-content:space-between;
  flex-shrink:0;
}
.iqna-modal-box-head h3 { color:#fff; margin:0; font-size:15px; font-weight:700; }
.iqna-modal-box-head .iqna-notif-close { color:#fff; opacity:.85; font-size:20px; }
.iqna-modal-box-head .iqna-notif-close:hover { opacity:1; }
.iqna-modal-box-body { padding:20px; overflow-y:auto; flex:1; }
.iqna-modal-box-footer { padding:16px 20px; border-top:1px solid var(--iq-border); flex-shrink:0; }

/* Terms content */
.iqna-terms-content h4 { font-size:13px; font-weight:800; color:var(--iq-emerald); margin:16px 0 6px; }
.iqna-terms-content p { font-size:13px; color:var(--iq-text-2); line-height:1.7; margin:0 0 8px; }
.iqna-terms-updated { font-size:11px; color:var(--iq-text-3); margin-bottom:16px !important; }

/* Terms checkbox */
.iqna-terms-check { margin:14px 0; }
.iqna-terms-label {
  display:flex; align-items:flex-start; gap:10px; cursor:pointer;
  font-size:13px; color: #fff; line-height:1.5;
}
.iqna-terms-label input[type=checkbox] { width:18px; height:18px; margin-top:1px; flex-shrink:0; accent-color:var(--iq-emerald); cursor:pointer; }
.iqna-terms-link {
  background:none; border:none; color:#a8e6c3; font-weight:800;
  cursor:pointer; padding:0; font-size:13px; font-family:var(--iq-font);
  text-decoration:underline;
}

/* Forgot password link */
.iqna-forgot-link {
  background:none; border:none; color:var(--iq-text-3); font-size:13px;
  cursor:pointer; font-family:var(--iq-font); padding:4px 8px;
  border-radius:var(--iq-radius); transition:var(--iq-trans);
}
.iqna-forgot-link:hover { color:var(--iq-emerald); }

/* Plain input (contact form) */
.iqna-input-plain {
  width:100%; padding:14px 16px; border:1.5px solid var(--iq-border);
  border-radius:var(--iq-radius); background:var(--iq-surface-2);
  color:var(--iq-text); font-size:16px; outline:none; font-family:var(--iq-font);
  transition:var(--iq-trans); box-sizing:border-box;
}
.iqna-input-plain:focus { border-color:var(--iq-emerald); }

/* ─── ISU SEMASA ─── */
.iqna-issue-card {
  background: var(--iq-surface); border: 1.5px solid var(--iq-border);
  border-radius: var(--iq-radius-lg); padding: 14px 16px;
  margin-bottom: 10px; cursor: pointer;
  transition: var(--iq-trans); position: relative;
  display: flex; flex-direction: column; gap: 6px;
}
.iqna-issue-card:active { transform: scale(0.99); }
.iqna-issue-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.iqna-issue-card-cat {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 4px 10px; border-radius: 6px; color: #fff; flex-shrink: 0;
}
.iqna-issue-card-time { font-size: 11px; color: var(--iq-text-3); white-space: nowrap; }
.iqna-issue-card-title {
  font-size: 14px; font-weight: 700; color: var(--iq-text);
  line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.iqna-issue-card-summary {
  font-size: 12px; color: var(--iq-text-2); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.iqna-issue-card-footer { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.iqna-issue-card-source { font-size: 11px; color: var(--iq-text-3); font-weight: 600; }
.iqna-issue-card-arrow { margin-left: auto; color: var(--iq-text-3); font-size: 14px; }

.iqna-issue-cat-btn {
  padding: 10px 18px; border-radius: 20px; border: 1.5px solid var(--iq-border);
  background: var(--iq-surface-2); color: var(--iq-text-2); font-size: 14px;
  font-weight: 700; cursor: pointer; transition: var(--iq-trans); font-family: var(--iq-font);
  white-space: nowrap;
}
.iqna-issue-cat-btn.active { background: var(--iq-emerald); color: #fff; border-color: var(--iq-emerald); }

/* Category colours */
.iqna-cat-keluarga   { background: #7c3aed; }
.iqna-cat-jenayah    { background: #dc2626; }
.iqna-cat-pendidikan { background: #2563eb; }
.iqna-cat-agama      { background: #059669; }
.iqna-cat-ekonomi    { background: #d97706; }
.iqna-cat-umum       { background: #6b7280; }

/* Left border accent per category */
.iqna-issue-card[data-cat="keluarga"]   { border-left: 3px solid #7c3aed; }
.iqna-issue-card[data-cat="jenayah"]    { border-left: 3px solid #dc2626; }
.iqna-issue-card[data-cat="pendidikan"] { border-left: 3px solid #2563eb; }
.iqna-issue-card[data-cat="agama"]      { border-left: 3px solid #059669; }
.iqna-issue-card[data-cat="ekonomi"]    { border-left: 3px solid #d97706; }
.iqna-issue-card[data-cat="umum"]       { border-left: 3px solid #6b7280; }

/* Suggested questions */
.iqna-suggest-btn {
  display: block; width: 100%; text-align: left;
  padding: 12px 16px; margin-bottom: 10px;
  background: var(--iq-surface-2); border: 1.5px solid var(--iq-border);
  border-radius: var(--iq-radius); color: var(--iq-text); font-size: 14px;
  cursor: pointer; font-family: var(--iq-font); transition: var(--iq-trans);
  line-height: 1.5;
}
.iqna-suggest-btn:hover { border-color: var(--iq-emerald); background: var(--iq-emerald-glow); }
.iqna-suggest-btn::before { content: '→ '; color: var(--iq-emerald); font-weight: 800; }

/* 3-dot menu */
.iqna-dots-overlay { position: fixed; inset: 0; z-index: 1200; background: rgba(0,0,0,.3); }
.iqna-dots-menu {
  position: fixed; bottom: 72px; right: 12px; z-index: 1201;
  background: var(--iq-surface); border: 1.5px solid var(--iq-border);
  border-radius: var(--iq-radius-lg); box-shadow: var(--iq-shadow-md);
  min-width: 200px; overflow: hidden;
}
.iqna-dots-item {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 18px 22px; border: none; background: none; cursor: pointer;
  font-size: 16px; font-weight: 700; color: var(--iq-text);
  font-family: var(--iq-font); text-align: left; transition: var(--iq-trans);
  min-height: 64px;
}
.iqna-dots-item:hover { background: var(--iq-surface-2); }
.iqna-dots-item svg { width: 24px; height: 24px; stroke: currentColor; fill: none; flex-shrink: 0; stroke-width: 1.75; }
.iqna-dots-logout { color: var(--iq-red) !important; }
.iqna-dots-divider { height: 1px; background: var(--iq-border); }

/* ─── ISSUES PAGE OVERRIDES ─── */
#iqna-page-issues .iqna-page-scroll { padding-left: 10px !important; padding-right: 10px !important; }
#iqna-issues-filter { padding-left: 10px !important; padding-right: 10px !important; }
#iqna-issues-list { padding-left: 0 !important; padding-right: 0 !important; }
.iqna-issue-card-cat svg { stroke: currentColor; fill: none; width: 11px; height: 11px; flex-shrink: 0; }
.iqna-issue-card-source svg, .iqna-issue-card-time svg { display: inline; vertical-align: middle; stroke: currentColor; fill: none; }
.iqna-issue-cat-btn svg { stroke: currentColor; fill: none; display: inline; vertical-align: middle; }

/* ─── SUGGESTED QUESTIONS BUBBLES (inline in chat) ─── */
.iqna-suggest-bubbles {
  padding: 12px 0 4px;
  display: flex; flex-direction: column; gap: 8px;
}
.iqna-suggest-bubbles-label {
  font-size: 14px; color: var(--iq-emerald); font-weight: 800;
  margin-bottom: 6px; padding-left: 2px;
}
.iqna-suggest-btn {
  display: block; width: 100%; text-align: left;
  padding: 11px 16px;
  background: var(--iq-surface-2); border: 1.5px solid var(--iq-border);
  border-radius: var(--iq-radius); color: var(--iq-text); font-size: 14px;
  cursor: pointer; font-family: var(--iq-font); transition: var(--iq-trans);
  line-height: 1.5; border-left: 3px solid var(--iq-emerald);
}
.iqna-suggest-btn:hover {
  border-color: var(--iq-emerald);
  background: var(--iq-emerald-glow);
  color: var(--iq-emerald);
}
.iqna-suggest-btn::before { content: '→  '; color: var(--iq-emerald); font-weight: 800; }

/* ─── PREVENT ZOOM ─── */
html, body, #iqna-app {
  touch-action: pan-x pan-y;
  -ms-touch-action: pan-x pan-y;
}
input, textarea, select {
  font-size: 16px !important; /* prevents iOS auto-zoom on focus */
}

/* ─── SWITCH PACKAGE ─── */
.iqna-hero-pkg-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.iqna-switch-pkg-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.4);
  color: #fff; border-radius: 20px; padding: 4px 10px;
  font-size: 12px; font-weight: 700; cursor: pointer;
  font-family: var(--iq-font); transition: var(--iq-trans);
}
.iqna-switch-pkg-btn:hover { background: rgba(255,255,255,0.35); }
.iqna-switch-pkg-btn svg { stroke: #fff; }

/* Switch Package Cards */
.iqna-switch-pkg-card {
  border: 2px solid var(--iq-border); border-radius: var(--iq-radius-lg);
  padding: 14px 16px; margin-bottom: 10px; cursor: pointer;
  transition: var(--iq-trans); position: relative;
}
.iqna-switch-pkg-card.active {
  border-color: var(--iq-emerald); background: var(--iq-emerald-glow);
}
.iqna-switch-pkg-card:hover:not(.active) { border-color: var(--iq-emerald); }
.iqna-switch-pkg-card.expired { opacity: 0.5; cursor: not-allowed; }
.iqna-switch-pkg-name { font-size: 15px; font-weight: 800; color: var(--iq-text); }
.iqna-switch-pkg-quota { font-size: 13px; color: var(--iq-text-2); margin-top: 4px; }
.iqna-switch-pkg-expiry { font-size: 11px; color: var(--iq-text-3); margin-top: 2px; }
.iqna-switch-pkg-badge {
  position: absolute; top: 10px; right: 10px;
  background: var(--iq-emerald); color: #fff;
  font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 10px;
}
.iqna-switch-pkg-badge.expired-badge { background: #dc2626; }

/* ─── TOPIC CARD PIN/LIKE ─── */
.iqna-topic-actions {
  display: flex; gap: 6px; align-items: center; margin-top: 6px;
}
.iqna-topic-action-btn {
  display: inline-flex; align-items: center; gap: 3px;
  background: none; border: none; cursor: pointer;
  font-size: 12px; color: var(--iq-text-3); padding: 2px 6px;
  border-radius: 6px; font-family: var(--iq-font); transition: var(--iq-trans);
}
.iqna-topic-action-btn:hover { background: var(--iq-surface-2); color: var(--iq-text); }
.iqna-topic-action-btn.pinned { color: #f59e0b; }
.iqna-topic-action-btn.liked { color: #e91e63; }
.iqna-topic-action-btn svg { width: 13px; height: 13px; stroke: currentColor; fill: none; }
.iqna-topic-action-btn.pinned svg { fill: #f59e0b; stroke: #f59e0b; }
.iqna-topic-action-btn.liked svg { fill: #e91e63; stroke: #e91e63; }

/* Topic badge */
.iqna-topic-pkg-badge {
  display: inline-block; font-size: 10px; font-weight: 800;
  padding: 1px 6px; border-radius: 4px; margin-right: 4px;
  background: var(--iq-emerald); color: #fff; vertical-align: middle;
}
.iqna-topic-pkg-badge.isu { background: #dc2626; }
.iqna-topic-pinned-indicator {
  font-size: 11px; color: #f59e0b; font-weight: 700;
}

/* ─── TOPIC CARD — PIN, LIKE, BADGE ─── */
.iqna-topic-item.pinned {
  border-left: 3px solid #f59e0b;
}
.iqna-topic-badge-row {
  margin-bottom: 4px;
}
.iqna-topic-badge {
  display: inline-block; font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 2px 8px; border-radius: 4px; color: #fff;
  margin-right: 4px;
}
.iqna-badge-pro     { background: #7c3aed; }
.iqna-badge-asas    { background: #2563eb; }
.iqna-badge-pkg     { background: #0d6b3a; }
.iqna-badge-isu     { background: #dc2626; }
.iqna-topic-pinned-indicator { font-size: 12px; margin-right: 4px; }

.iqna-topic-action-btn {
  background: none; border: none; cursor: pointer;
  padding: 4px; border-radius: 6px; transition: var(--iq-trans);
  color: var(--iq-text-3); display: flex; align-items: center;
}
.iqna-topic-action-btn:hover { background: var(--iq-surface-2); color: var(--iq-text); }
.iqna-topic-action-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }
.iqna-topic-action-btn.pinned { color: #f59e0b; }
.iqna-topic-action-btn.liked span { color: #e91e63; }

/* ─── SWITCH PACKAGE CARD ─── */
.iqna-switch-pkg-card {
  border: 1.5px solid var(--iq-border); border-radius: var(--iq-radius-lg);
  padding: 14px 16px; margin-bottom: 10px; cursor: pointer;
  transition: var(--iq-trans); position: relative;
}
.iqna-switch-pkg-card.active {
  border-color: var(--iq-emerald); background: var(--iq-emerald-glow);
}
.iqna-switch-pkg-card:hover:not(.active):not(.expired) {
  border-color: var(--iq-emerald); transform: translateY(-1px);
}
.iqna-switch-pkg-card.expired { opacity: 0.5; cursor: not-allowed; }
.iqna-switch-pkg-badge {
  position: absolute; top: 10px; right: 10px;
  font-size: 10px; font-weight: 800; padding: 2px 8px;
  border-radius: 4px; background: var(--iq-emerald); color: #fff;
}
.iqna-switch-pkg-badge.expired-badge { background: #dc2626; }
.iqna-switch-pkg-name { font-size: 15px; font-weight: 800; color: var(--iq-text); margin-bottom: 6px; }
.iqna-switch-pkg-quota { font-size: 13px; color: var(--iq-text-2); }
.iqna-switch-pkg-expiry { font-size: 12px; color: var(--iq-text-3); margin-top: 4px; }

/* ─── TOPIC CARD META ROW + PIN/LIKE ─── */
.iqna-topic-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  flex-wrap: wrap;
}
.iqna-topic-meta-time {
  font-size: 12px;
  color: var(--iq-text-3);
}
.iqna-topic-meta-sep {
  color: var(--iq-text-3);
  font-size: 11px;
}
.iqna-topic-count {
  font-size: 12px;
  color: var(--iq-text-3);
  font-weight: 600;
}
.iqna-topic-meta-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 6px;
}
.iqna-pin-btn, .iqna-like-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.iqna-pin-btn svg, .iqna-like-btn svg {
  width: 20px;
  height: 20px;
  transition: all 0.2s;
}
.iqna-pin-btn { color: var(--iq-text-3); }
.iqna-pin-btn:hover { background: #fef3c7; color: #f59e0b; }
.iqna-pin-btn.pinned { color: #f59e0b; }
.iqna-pin-btn.pinned:hover { background: #fef3c7; }

.iqna-like-btn { color: var(--iq-text-3); }
.iqna-like-btn:hover { background: #fce4ec; color: #e91e63; }
.iqna-like-btn.liked { color: #e91e63; }
.iqna-like-btn.liked:hover { background: #fce4ec; }
.iqna-like-btn.liked svg { filter: drop-shadow(0 0 4px #e91e6366); }

/* Pinned card — border kiri amber */
.iqna-topic-item.pinned {
  border-left: 3px solid #f59e0b !important;
  background: linear-gradient(to right, #fffbeb 0%, transparent 60%);
}

/* Badge row */
.iqna-topic-badge-row {
  margin-bottom: 3px;
}
