/* ═══════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes tBounce {
    from { transform: translateY(0); opacity: .4; }
    to   { transform: translateY(-6px); opacity: 1; }
}

/* ═══════════════════════════════════════
   SEARCH BOX
═══════════════════════════════════════ */
.search-box {
    display: flex; align-items: center; gap: 7px;
    background: var(--card); border: 1px solid var(--border);
    border-radius: 8px; padding: 6px 12px; transition: var(--t);
}
.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
.search-input {
    border: none; background: none; font-family: inherit;
    font-size: 13px; color: var(--txt1); outline: none; width: 140px;
}
.search-input::placeholder { color: var(--txt3); }

@media (max-width: 640px) { .search-box { display: none; } }

/* ═══════════════════════════════════════
   ICON BUTTONS
═══════════════════════════════════════ */
.icon-btn {
    width: 36px; height: 36px; border-radius: 9px;
    border: 1px solid var(--border); background: var(--card);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: var(--txt2); transition: var(--t); position: relative;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.notif-dot {
    position: absolute; top: 5px; right: 5px;
    width: 7px; height: 7px; background: var(--red);
    border-radius: 50%; border: 1.5px solid var(--bg);
}

/* ═══════════════════════════════════════
   PROFILE PILL & DROPDOWN
═══════════════════════════════════════ */
.profile-pill {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 12px 5px 5px;
    border-radius: 30px; border: 1px solid var(--border); background: var(--card);
    cursor: pointer; transition: var(--t); position: relative;
}
.profile-pill:hover { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.profile-avatar {
    width: 26px; height: 26px; border-radius: 50%;
    background: linear-gradient(135deg,#818CF8,#4F46E5);
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700; color: #fff;
}
.profile-name { font-size: 13px; font-weight: 600; }

.dropdown {
    position: absolute; top: calc(100% + 8px); right: 0;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--r); box-shadow: 0 12px 48px rgba(0,0,0,0.12);
    min-width: 210px; overflow: hidden;
    opacity: 0; transform: translateY(-6px);
    pointer-events: none; transition: var(--t); z-index: 300;
}
.dropdown.open { opacity: 1; transform: translateY(0); pointer-events: all; }
.dd-header { padding: 14px 16px; border-bottom: 1px solid var(--border-faint); }
.dd-biz   { font-size: 13px; font-weight: 700; }
.dd-email { font-size: 11px; color: var(--txt3); margin-top: 2px; }
.dd-item  {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 16px; font-size: 13px; color: var(--txt2);
    cursor: pointer; transition: var(--t);
}
.dd-item:hover { background: var(--border-faint); color: var(--txt1); }
.dd-item.danger { color: var(--red); }
.dd-item.danger:hover { background: #FEF2F2; }
.dd-divider { height: 1px; background: var(--border-faint); }

/* ═══════════════════════════════════════
   SECTION CARDS (shared shell)
═══════════════════════════════════════ */
.section-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--r); overflow: hidden;
    animation: fadeUp .4s ease both;
}
.section-card:nth-child(1){ animation-delay:.26s }
.section-card:nth-child(2){ animation-delay:.32s }

.section-hd {
    padding: 18px 22px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.section-title { font-size: 14.5px; font-weight: 700; }
.section-link  { font-size: 12.5px; color: var(--primary); font-weight: 600; cursor: pointer; transition: var(--t); }
.section-link:hover { color: var(--primary-dark); }

/* ═══════════════════════════════════════
   REVIEW CARDS
═══════════════════════════════════════ */
.review-card {
    padding: 18px 22px; border-bottom: 1px solid var(--border-faint);
    transition: var(--t);
}
.review-card:last-child { border-bottom: none; }
.review-card:hover { background: #FAFBFF; }

.rc-top {
    display: flex; align-items: flex-start;
    justify-content: space-between; gap: 12px; margin-bottom: 10px;
}
.reviewer { display: flex; align-items: center; gap: 11px; }
.rev-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.rev-name { font-size: 13.5px; font-weight: 600; }
.rev-date { font-size: 11px; color: var(--txt3); margin-top: 2px; }

.rc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.rev-stars { display: flex; gap: 1px; }
.rs { font-size: 12px; color: var(--yellow); }
.rs.off { color: #D1D5DB; }

.rev-text { font-size: 13px; color: var(--txt2); line-height: 1.65; margin-bottom: 14px; }
.rev-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ═══════════════════════════════════════
   BADGES
═══════════════════════════════════════ */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600;
}
.badge-dot { width: 5px; height: 5px; border-radius: 50%; }
.badge.pending  { background: var(--orange-bg); color: var(--orange); }
.badge.pending .badge-dot { background: var(--orange); }
.badge.responded{ background: var(--green-bg);  color: var(--green); }
.badge.responded .badge-dot { background: var(--green); }

/* ═══════════════════════════════════════
   SOURCE TAGS
═══════════════════════════════════════ */
.source-tag {
    display: inline-block; font-size: 10px; font-weight: 700;
    padding: 2px 7px; border-radius: 4px; letter-spacing: .4px;
    text-transform: uppercase; margin-bottom: 8px;
}
.src-google      { background: #EEF2FF; color: #4338CA; }
.src-tripadvisor { background: #ECFDF5; color: #065F46; }
.src-yelp        { background: #FEF2F2; color: #B91C1C; }

/* ═══════════════════════════════════════
   BUTTONS
═══════════════════════════════════════ */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: var(--r-sm);
    font-size: 12.5px; font-weight: 600; cursor: pointer;
    transition: var(--t); border: none; font-family: inherit;
    white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(79,70,229,.28);
}
.btn-soft { background: var(--primary-light); color: var(--primary); }
.btn-soft:hover { background: var(--primary-mid); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--txt2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--border-faint); color: var(--txt1); }
.btn-lg { padding: 9px 18px; font-size: 13px; }
.btn-danger { background: #FEF2F2; color: var(--red); }
.btn-danger:hover { background: #FEE2E2; }

/* ═══════════════════════════════════════
   FILTER TABS
═══════════════════════════════════════ */
.filter-row { display: flex; gap: 3px; padding: 10px 22px; border-bottom: 1px solid var(--border-faint); }
.f-tab {
    padding: 4px 12px; border-radius: 6px; font-size: 12.5px; font-weight: 500;
    color: var(--txt2); cursor: pointer; transition: var(--t);
}
.f-tab:hover  { background: var(--border-faint); color: var(--txt1); }
.f-tab.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }

/* ═══════════════════════════════════════
   OVERLAY
═══════════════════════════════════════ */
.overlay {
    position: fixed; inset: 0;
    background: rgba(15,14,42,.45);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 500;
    opacity: 0; pointer-events: none;
    transition: opacity .3s ease;
}
.overlay.open { opacity: 1; pointer-events: all; }

/* ═══════════════════════════════════════
   SLIDEOVER
═══════════════════════════════════════ */
.slideover {
    position: fixed; top: 0; right: 0;
    width: 520px; max-width: 100vw; height: 100vh;
    background: var(--card); z-index: 600;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    display: flex; flex-direction: column;
    box-shadow: -24px 0 80px rgba(0,0,0,.16);
}
.slideover.open { transform: translateX(0); }

@media (max-width: 640px) {
    .slideover { width: 100vw; }
    .so-footer { flex-wrap: wrap; }
}

.so-header {
    padding: 22px 26px; border-bottom: 1px solid var(--border);
    display: flex; align-items: flex-start; justify-content: space-between;
    flex-shrink: 0;
}
.so-title    { font-size: 16px; font-weight: 800; letter-spacing: -.4px; }
.so-subtitle { font-size: 12px; color: var(--txt3); margin-top: 3px; }

.close-btn {
    width: 30px; height: 30px; border-radius: 7px;
    border: none; background: var(--border-faint);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: var(--txt2); transition: var(--t);
}
.close-btn:hover { background: #FEE2E2; color: var(--red); }

.so-body { flex: 1; overflow-y: auto; padding: 22px 26px; }

.orig-block {
    background: var(--bg); border-radius: var(--r);
    padding: 15px; margin-bottom: 22px;
}
.orig-label   { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .9px; color: var(--txt3); margin-bottom: 10px; }
.orig-reviewer{ display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.orig-name    { font-size: 13px; font-weight: 600; }
.orig-text    { font-size: 13px; color: var(--txt2); line-height: 1.6; font-style: italic; }

.tone-wrap  { margin-bottom: 20px; }
.tone-title { font-size: 12px; font-weight: 600; color: var(--txt2); margin-bottom: 8px; }
.tone-opts  { display: flex; gap: 7px; flex-wrap: wrap; }
.tone-opt   {
    padding: 4px 12px; border-radius: 20px; border: 1.5px solid var(--border);
    font-size: 12px; font-weight: 500; color: var(--txt2);
    cursor: pointer; transition: var(--t);
}
.tone-opt:hover, .tone-opt.active {
    border-color: var(--primary); background: var(--primary-light); color: var(--primary);
}

.ai-gen-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .9px; color: var(--txt3);
    display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.ai-badge {
    background: linear-gradient(135deg,#818CF8,#4F46E5);
    color: #fff; font-size: 9px; padding: 2px 8px; border-radius: 20px;
    letter-spacing: .4px;
}

.ai-thinking {
    display: flex; align-items: center; gap: 10px;
    padding: 14px; border: 1.5px dashed var(--primary-mid);
    border-radius: var(--r); background: var(--primary-ultra);
    margin-bottom: 14px;
}
.thinking-dot {
    width: 7px; height: 7px; background: var(--primary);
    border-radius: 50%; animation: tBounce 1s infinite alternate;
}
.thinking-dot:nth-child(2){ animation-delay: .15s; }
.thinking-dot:nth-child(3){ animation-delay: .3s; }
.thinking-txt { font-size: 13px; color: var(--primary); font-weight: 500; }

.ai-textarea {
    width: 100%; min-height: 185px; padding: 14px;
    border: 1.5px solid var(--border); border-radius: var(--r);
    font-family: inherit; font-size: 13.5px; color: var(--txt1);
    line-height: 1.65; resize: vertical; transition: var(--t);
    background: #fff;
}
.ai-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }

.char-count { text-align: right; font-size: 11px; color: var(--txt3); margin-top: 6px; }

.so-footer {
    padding: 14px 26px; border-top: 1px solid var(--border);
    display: flex; gap: 9px; flex-shrink: 0;
}

/* ═══════════════════════════════════════
   TOAST
═══════════════════════════════════════ */
.toast {
    position: fixed; bottom: 24px; right: 24px;
    background: #111827; color: #fff;
    padding: 12px 18px; border-radius: 12px; font-size: 13.5px; font-weight: 500;
    box-shadow: 0 12px 36px rgba(0,0,0,.2);
    display: flex; align-items: center; gap: 10px;
    opacity: 0; transform: translateY(8px);
    transition: all .3s cubic-bezier(.4,0,.2,1);
    z-index: 9999; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-ico {
    width: 20px; height: 20px; border-radius: 50%; background: var(--green);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ═══════════════════════════════════════
   LANG TOGGLE
═══════════════════════════════════════ */
.lang-toggle {
  display: flex; align-items: center;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 7px; overflow: hidden;
  margin-right: 4px;
}
.lang-opt {
  padding: 5px 10px; font-size: 12px; font-weight: 700;
  cursor: pointer; color: var(--txt3); transition: var(--t);
  letter-spacing: .5px;
}
.lang-opt:hover { color: var(--txt1); background: var(--border-faint); }
.lang-opt.active { background: var(--primary); color: #fff; }
