html, body { overflow: auto; height: auto; }

/* ══ LAYOUT ══ */
.intros-page {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: calc(100vh - 52px);
  overflow: hidden;
}

/* ══ LIST PANEL ══ */
.intros-list-panel {
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden;
}

.intros-header {
  padding: 18px 16px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.intros-title {
  font-size: 16px; font-weight: 800; color: var(--text); margin-bottom: 4px;
}

.intros-sub {
  font-size: 12px; color: var(--text3);
}

.intros-tabs {
  display: flex; padding: 10px 12px 0;
  gap: 4px; flex-shrink: 0;
}

.itab {
  flex: 1; padding: 8px; border-radius: 6px 6px 0 0;
  font-size: 12px; font-weight: 700; color: var(--text2);
  border: 1px solid transparent; border-bottom: none;
  background: transparent; transition: all .15s; cursor: pointer;
  font-family: inherit; position: relative;
}
.itab:hover { color: var(--text); background: var(--bg3); }
.itab.active { color: var(--acc3); background: var(--bg); border-color: var(--border); }

.itab-badge {
  display: inline-block; background: var(--acc2);
  color: #fff; font-size: 9px; font-weight: 800;
  padding: 1px 5px; border-radius: 10px; margin-left: 4px;
}

.intros-list {
  flex: 1; overflow-y: auto; padding: 4px 0;
}

/* ══ INTRO ROW ══ */
.intro-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background .12s; position: relative;
}
.intro-row:hover { background: var(--bg3); }
.intro-row.active { background: rgba(139,0,0,.18); }
.intro-row.unread { border-left: 3px solid var(--acc3); }

.ir-av {
  width: 48px; height: 48px; border-radius: 50%;
  flex-shrink: 0; display: flex; align-items: center;
  justify-content: center; font-size: 18px; font-weight: 800;
  color: #fff; overflow: hidden;
}
.ir-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.ir-body { flex: 1; min-width: 0; }

.ir-name {
  font-size: 14px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-bottom: 2px;
}

.ir-meta { font-size: 11px; color: var(--text2); margin-bottom: 4px; }

.ir-preview {
  font-size: 12px; color: var(--text2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-style: italic;
}

.ir-time { font-size: 10px; color: var(--text3); margin-top: 3px; }

.ir-dismiss {
  position: absolute; top: 10px; right: 10px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg3); color: var(--text3);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; opacity: 0; transition: opacity .15s;
  cursor: pointer; z-index: 1;
}
.intro-row:hover .ir-dismiss { opacity: 1; }
.ir-dismiss:hover { background: #cc2222; color: #fff; }

.intros-empty {
  padding: 40px 20px; text-align: center; color: var(--text2); font-size: 14px;
}

/* ══ DETAIL PANEL ══ */
.intros-detail {
  display: flex; flex-direction: column;
  overflow: hidden; background: var(--bg);
}

.detail-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
}
.detail-empty-icon { font-size: 52px; opacity: .3; }
.detail-empty p { color: var(--text3); font-size: 14px; }

/* ══ DETAIL CONTENT ══ */
.detail-content {
  display: flex; flex-direction: column; height: 100%;
}

.detail-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2); flex-shrink: 0;
}

.detail-profile {
  display: flex; align-items: center; gap: 16px; margin-bottom: 12px;
}

.detail-av {
  width: 72px; height: 72px; border-radius: 50%;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; color: #fff;
  overflow: hidden; border: 3px solid var(--border2);
}
.detail-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.detail-name {
  font-size: 22px; font-weight: 800; color: var(--text);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 4px;
}

.detail-meta { font-size: 13px; color: var(--text2); }

.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-reply {
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--acc2), var(--acc3));
  color: #fff; border-radius: 6px;
  font-size: 14px; font-weight: 700;
  border: none; cursor: pointer; font-family: inherit;
  box-shadow: 0 3px 12px rgba(179,0,0,.3);
  transition: opacity .2s;
}
.btn-reply:hover { opacity: .85; }

.btn-dismiss-big {
  padding: 10px 20px;
  border: 1px solid var(--border2); color: var(--text2);
  border-radius: 6px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.btn-dismiss-big:hover { border-color: #cc2222; color: #cc2222; }

.btn-view-profile {
  padding: 10px 20px;
  border: 1px solid var(--border2); color: var(--text2);
  border-radius: 6px; font-size: 13px; font-weight: 600;
  text-decoration: none; transition: all .15s;
}
.btn-view-profile:hover { border-color: var(--acc3); color: var(--acc3); text-decoration: none; }

/* ══ MESSAGE AREA ══ */
.detail-messages {
  flex: 1; overflow-y: auto; padding: 20px 24px;
}

.intro-message-bubble {
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: 12px 12px 12px 3px;
  padding: 14px 18px; max-width: 560px;
  margin-bottom: 12px;
}

.intro-message-label {
  font-size: 10px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px;
}

.intro-message-text {
  font-size: 15px; color: var(--text); line-height: 1.6;
  white-space: pre-wrap; word-break: break-word;
}

.intro-message-time {
  font-size: 11px; color: var(--text3); margin-top: 8px;
}

.reply-gate-box {
  background: rgba(139,0,0,.08); border: 1px solid rgba(212,32,32,.25);
  border-radius: 8px; padding: 16px 20px;
  text-align: center; margin: 0 24px 20px;
}

.reply-gate-box p {
  color: var(--text2); font-size: 13px; margin-bottom: 12px;
}

/* ══ UPGRADE MODAL ══ */
.upgrade-card { max-width: 400px; text-align: center; }

.upgrade-icon { font-size: 44px; margin-bottom: 12px; }

.upgrade-title {
  font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 10px;
}

.upgrade-text {
  font-size: 14px; color: var(--text2); line-height: 1.6; margin-bottom: 16px;
}

.upgrade-perks {
  list-style: none; text-align: left;
  background: var(--bg3); border-radius: 8px;
  padding: 14px 18px; margin-bottom: 16px;
}
.upgrade-perks li {
  font-size: 13px; color: var(--text); padding: 4px 0; font-weight: 500;
}
.upgrade-perks li::before { color: #3aaa3a; }

.upgrade-price {
  font-size: 15px; color: var(--text2); margin-bottom: 16px;
}
.upgrade-price strong { color: var(--acc3); font-size: 20px; }
