/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --rose:       #c7687e;
  --rose-dark:  #a8536a;
  --rose-light: #fdf0f3;
  --navy:       #1d2742;
  --navy-light: #2c3a5c;
  --text:       #1a1c2e;
  --text-muted: #6b7280;
  --border:     #e8eaf0;
  --white:      #ffffff;
  --green:      #10b981;
  --red:        #e0495e;
  --bg:         #ffffff;
  --bg-hover:   #f3f4f8;
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06);
  --shadow:     0 4px 18px rgba(0,0,0,0.08);
  --shadow-lg:  0 24px 64px rgba(0,0,0,0.18);
}

html, body { height: 100%; overflow: hidden; }

body {
  font-family: 'Noto Sans KR', 'Noto Sans JP', 'Noto Sans SC', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: #f3f5fa;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ── Login Screen ─────────────────────────────────────────── */
#login-screen {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, #1d2742 0%, #2c3a5c 60%, #1d2742 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.login-card {
  background: #fff;
  border-radius: 24px;
  padding: 44px 40px 36px;
  width: 360px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.15);
  text-align: center;
}
.login-logo {
  font-size: 36px;
  color: var(--rose);
  margin-bottom: 16px;
  line-height: 1;
}
.login-brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.login-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.login-field {
  text-align: left;
  margin-bottom: 14px;
}
.login-field label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}
.login-field input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: #f8f9fc;
  transition: border-color .2s, background .2s, box-shadow .2s;
  outline: none;
}
.login-field input:focus {
  border-color: var(--rose);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(199,104,126,0.12);
}
.login-btn {
  width: 100%;
  background: var(--rose);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  margin-top: 8px;
  transition: background .15s, box-shadow .15s, transform .1s;
  box-shadow: 0 4px 16px rgba(199,104,126,0.4);
  letter-spacing: 0.3px;
}
.login-btn:hover { background: var(--rose-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(199,104,126,0.45); }
.login-btn:active { transform: translateY(0); }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.login-error {
  color: var(--red);
  font-size: 12px;
  margin-top: 10px;
  min-height: 18px;
  text-align: center;
}

/* ── App Layout ───────────────────────────────────────────── */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.app-header {
  background: var(--navy);
  color: #fff;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.app-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.app-logo {
  color: var(--rose);
  font-size: 18px;
}
.app-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.app-title-sub {
  font-weight: 400;
  opacity: 0.65;
  margin-left: 4px;
}
.app-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.app-user {
  font-size: 12px;
  opacity: 0.7;
}
.app-logout-btn {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.75);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.app-logout-btn:hover { background: rgba(255,255,255,0.18); color: #fff; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
  background: var(--rose);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, box-shadow .15s, transform .1s;
  box-shadow: 0 2px 8px rgba(199,104,126,0.28);
}
.btn-primary:hover { background: var(--rose-dark); box-shadow: 0 4px 14px rgba(199,104,126,0.38); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* ── Form ─────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.form-group:last-child { margin-bottom: 0; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }

input[type=text], input[type=date], input[type=number], select, textarea {
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px 11px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color .15s;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(232,160,168,0.15);
}
textarea { resize: vertical; min-height: 90px; }

/* ── Modal ────────────────────────────────────────────────── */
#modal-overlay {
  position: fixed; inset: 0;
  background: rgba(8,12,30,0.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  animation: modalOverlayIn .18s ease;
}
#modal-overlay.hidden { display: none; }
@keyframes modalOverlayIn { from { opacity: 0; } to { opacity: 1; } }
#modal-box {
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  width: 90%; max-width: 520px; max-height: 90vh;
  display: flex; flex-direction: column; overflow: hidden;
  animation: modalBoxIn .22s cubic-bezier(0.34,1.4,0.64,1);
}
@keyframes modalBoxIn {
  from { opacity: 0; transform: scale(.94) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
#modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px; border-bottom: 1px solid var(--border);
}
#modal-title { font-size: 16px; font-weight: 700; color: var(--navy); }
.modal-close-x {
  width: 30px; height: 30px; background: #f3f4f7; border: none; border-radius: 50%;
  font-size: 18px; cursor: pointer; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.modal-close-x:hover { background: #e8e9f0; color: var(--text); }
#modal-body { padding: 22px 24px; overflow-y: auto; flex: 1; }
#modal-footer {
  padding: 16px 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
  background: #fafbfc;
}
#modal-footer .btn-ghost { color: var(--text-muted); border-color: var(--border); background: #fff; }
#modal-footer .btn-ghost:hover { background: #f3f4f7; color: var(--text); }

/* ── Toast ────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 28px; right: 28px;
  display: flex; flex-direction: column; gap: 8px; z-index: 2000;
}
.toast {
  background: #1d2742; color: #fff;
  padding: 11px 18px 11px 16px; border-radius: 12px;
  font-size: 13px; font-weight: 500;
  box-shadow: 0 8px 28px rgba(0,0,0,.22);
  animation: slideIn .28s cubic-bezier(.34,1.3,.64,1);
  max-width: 320px; border-left: 3px solid rgba(255,255,255,.2);
}
.toast.success { background: #0d7a54; border-left-color: #34d399; }
.toast.error   { background: #9b1c2e; border-left-color: #fca5a5; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Inquiry Layout ───────────────────────────────────────── */
.inq-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  background: #fff;
}

/* Left panel */
.inq-sidebar {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: #fff;
  overflow: hidden;
}
.inq-sidebar-header {
  padding: 14px 14px 10px;
  background: var(--navy);
  color: #fff;
  flex-shrink: 0;
}
.inq-sidebar-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 10px;
}
.inq-sidebar-title {
  font-size: 15px; font-weight: 700; letter-spacing: -0.3px;
  white-space: nowrap; flex-shrink: 0;
}
.inq-header-actions {
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
}
.inq-icon-btn {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; cursor: pointer;
  transition: background .15s, color .15s; flex-shrink: 0;
}
.inq-icon-btn:hover { background: rgba(255,255,255,0.18); color: #fff; }
.inq-new-btn {
  background: var(--rose); color: #fff; border: none;
  border-radius: 6px; padding: 0 11px; height: 28px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  white-space: nowrap; flex-shrink: 0;
}
.inq-new-btn:hover { background: var(--rose-dark); }
.inq-filter-tabs { display: flex; gap: 3px; flex-wrap: nowrap; }
.inq-filter-tab {
  flex: 1; padding: 4px 6px; border-radius: 6px;
  font-size: 11px; font-weight: 500; cursor: pointer;
  background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.07);
  white-space: nowrap; text-align: center; transition: background .15s, color .15s;
}
.inq-filter-tab.active { background: var(--rose); color: #fff; }
.inq-channel-filters {
  display: flex; gap: 4px; padding: 8px 10px; flex-wrap: wrap;
  border-bottom: 1px solid var(--border); background: #f9f9fb; flex-shrink: 0;
}
.inq-ch-chip {
  padding: 2px 8px; border-radius: 10px; font-size: 11px; cursor: pointer;
  border: 1.5px solid var(--border); background: #fff; color: var(--text-muted);
  transition: all .12s;
}
.inq-ch-chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.inq-list { flex: 1; overflow-y: auto; }
.inq-loading { padding: 28px; text-align: center; color: var(--text-muted); font-size: 13px; }
.inq-item {
  padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer;
  display: flex; align-items: flex-start; gap: 10px; transition: background .1s;
}
.inq-item:hover { background: #f5f6fc; }
.inq-item.active { background: var(--rose-light); border-left: 3px solid var(--rose); padding-left: 11px; }
.inq-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0; background: #edeef5;
}
.inq-item-body { flex: 1; min-width: 0; }
.inq-item-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; gap: 4px; }
.inq-item-name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.inq-item-time { font-size: 10px; color: var(--text-muted); flex-shrink: 0; white-space: nowrap; }
.inq-item-preview { font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inq-item-badges { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.inq-unread-badge {
  background: var(--rose-dark); color: #fff; border-radius: 10px;
  font-size: 10px; font-weight: 700; padding: 1px 5px; min-width: 18px; text-align: center;
}
.inq-ch-badge {
  display: inline-block; padding: 1px 5px; border-radius: 5px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.02em;
}

/* Right thread panel */
.inq-thread {
  flex: 1; display: flex; flex-direction: column; overflow: hidden; background: #f4f5f9;
}
.inq-thread-header {
  padding: 12px 20px; background: #fff; border-bottom: 1px solid #eaebf2;
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04); z-index: 1;
}
.inq-thread-name { font-weight: 700; font-size: 14px; }
.inq-thread-meta {
  font-size: 11px; color: var(--text-muted); margin-top: 1px;
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.inq-thread-info { flex: 1; min-width: 0; }
.inq-thread-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.inq-status-select {
  border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px;
  font-size: 12px; cursor: pointer; background: #fff; color: var(--navy); width: auto;
}
.inq-messages {
  flex: 1; overflow-y: auto; padding: 20px 24px;
  display: flex; flex-direction: column; gap: 3px;
  background: #f0f2f8;
  background-image: radial-gradient(circle at 1px 1px, rgba(29,39,66,0.03) 1px, transparent 0);
  background-size: 24px 24px;
}
.inq-msg { max-width: 70%; display: flex; flex-direction: column; gap: 3px; margin-bottom: 2px; }
.inq-msg.in  { align-self: flex-start; }
.inq-msg.out { align-self: flex-end; }
.inq-bubble {
  padding: 10px 14px; border-radius: 18px;
  font-size: 13.5px; line-height: 1.65;
  word-break: break-word; white-space: pre-wrap;
}
.inq-msg.in .inq-bubble {
  background: #fff; border-top-left-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,.07), 0 0 0 1px rgba(0,0,0,.04);
}
.inq-msg.out .inq-bubble {
  background: linear-gradient(145deg, var(--navy-light) 0%, var(--navy) 100%);
  color: #fff; border-top-right-radius: 4px;
  box-shadow: 0 2px 10px rgba(29,39,66,.3);
}
.inq-msg-meta {
  font-size: 10px; color: var(--text-muted); padding: 0 6px;
  display: flex; align-items: center; gap: 5px;
}
.inq-msg.out .inq-msg-meta { justify-content: flex-end; }
.inq-msg-del {
  background: none; border: none; cursor: pointer; font-size: 10px;
  color: var(--text-muted); padding: 0 2px; border-radius: 3px;
  opacity: 0; transition: opacity .15s;
}
.inq-msg:hover .inq-msg-del { opacity: 0.7; }
.inq-msg-del:hover { opacity: 1 !important; color: var(--red); }
.inq-bubble-ext { opacity: 0.82; border: 1px dashed var(--border) !important; }
.ext-reply-badge { font-size: 10px; padding: 1px 6px; border-radius: 10px; background: var(--bg-hover); color: var(--text-muted); border: 1px solid var(--border); }
.inq-original-text { margin-top: 4px; font-size: 11px; color: var(--text-muted); opacity: 0.75; border-top: 1px solid var(--border); padding-top: 3px; }
.inq-media-img { max-width: 260px; max-height: 260px; border-radius: 10px; cursor: zoom-in; display: block; object-fit: cover; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.inq-translate-btn {
  background: none; border: none; cursor: pointer; font-size: 13px;
  opacity: 0; padding: 0 2px; transition: opacity .15s; line-height: 1;
}
.inq-msg:hover .inq-translate-btn { opacity: 0.6; }
.inq-translate-btn:hover, .inq-translate-btn.active { opacity: 1 !important; }
.inq-translation {
  margin-top: 6px; border-radius: 12px;
  background: #edf5ff; border: 1px solid #c5dcf8;
  padding: 10px 14px; max-width: 90%;
}
.inq-trans-label {
  display: inline-block; font-size: 10px; font-weight: 700; color: #1976d2;
  letter-spacing: 0.4px; background: #dbeeff; border-radius: 4px;
  padding: 1px 6px; margin-bottom: 5px;
}
.inq-trans-body { font-size: 13px; color: #1a1a2e; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }

/* Translate out button */
.inq-translate-out {
  background: #f3f4f8; border: 1.5px solid #e5e7f0; border-radius: 10px;
  padding: 8px 11px; cursor: pointer; font-size: 12px; color: var(--text-muted);
  white-space: nowrap; transition: all .15s; font-family: inherit;
  width: 72px; text-align: center;
}
.inq-translate-out:hover { background: var(--rose-light); border-color: var(--rose); color: var(--rose-dark); }

/* Translation preview (bottom sheet) */
#trans-preview-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(8,14,38,0.58);
  backdrop-filter: blur(16px) saturate(160%);
  display: flex; align-items: flex-end; justify-content: center;
  animation: transOverlayIn .2s ease;
}
@keyframes transOverlayIn { from { opacity: 0; } to { opacity: 1; } }
.trans-preview-card {
  background: #fff; border-radius: 28px 28px 0 0;
  width: 100%; max-width: 640px;
  box-shadow: 0 -8px 48px rgba(0,0,0,.18);
  overflow: hidden; display: flex; flex-direction: column;
  animation: sheetUp .3s cubic-bezier(.32,.72,0,1);
}
@keyframes sheetUp { from { transform: translateY(60px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.trans-preview-card::before {
  content: ''; display: block; width: 40px; height: 4px;
  background: #e0e2ea; border-radius: 2px; margin: 12px auto 0; flex-shrink: 0;
}
.trans-preview-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; border-bottom: 1px solid #f0f1f6; }
.trans-preview-title { font-size: 15px; font-weight: 700; color: var(--navy); }
.trans-preview-close {
  width: 30px; height: 30px; background: #f3f4f7; border: none; border-radius: 50%;
  font-size: 14px; cursor: pointer; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
}
.trans-preview-close:hover { background: #e5e6ee; }
.trans-preview-body { padding: 18px 24px 20px; display: flex; flex-direction: column; gap: 10px; }
.trans-preview-block { border-radius: 14px; padding: 14px 16px; }
.trans-preview-block.orig { background: #f6f7fb; border: 1px solid #ebebf3; }
.trans-preview-block.result { background: linear-gradient(135deg,#f0f7ff,#edf4ff); border: 1.5px solid #c2d9f8; }
.trans-preview-label { font-size: 10px; font-weight: 700; color: #8b929e; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 10px; }
.trans-preview-text { font-size: 14px; line-height: 1.75; color: var(--text); white-space: pre-wrap; word-break: break-word; min-height: 36px; }
.trans-preview-text.editable { outline: none; cursor: text; border-radius: 8px; padding: 4px 6px; margin: -4px -6px; transition: background .15s; }
.trans-preview-text.editable:focus { background: rgba(255,255,255,0.7); }
.trans-preview-divider { text-align: center; font-size: 12px; color: #9ca3b0; display: flex; align-items: center; gap: 10px; }
.trans-preview-divider::before, .trans-preview-divider::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg,transparent,#dde0ec,transparent); }
.trans-preview-footer { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 14px 24px 24px; }
.trans-preview-footer .btn-ghost { background: #f4f5fa; color: var(--text-muted); border: 1.5px solid #e5e7f0; padding: 9px 18px; border-radius: 10px; font-size: 13px; cursor: pointer; font-family: inherit; }
.trans-preview-footer .btn-primary { min-width: 96px; padding: 10px 22px; border-radius: 10px; font-size: 13.5px; }

/* Memo bar */
.inq-memo-bar {
  display: flex; align-items: flex-start; gap: 7px;
  padding: 9px 16px 10px; background: #fffbf0;
  border-top: 1px solid #f0e8c8; border-bottom: 1px solid #f0e8c8;
  flex-shrink: 0; min-height: 38px;
}
.inq-memo-icon { font-size: 13px; margin-top: 2px; flex-shrink: 0; opacity: 0.7; }
.inq-memo-text {
  flex: 1; font-size: 12.5px; line-height: 1.5; color: #5a4a20;
  outline: none; min-height: 18px; word-break: break-all; cursor: text;
}
.inq-memo-text:empty::before { content: attr(data-placeholder); color: #b8a060; opacity: 0.6; pointer-events: none; }
.inq-memo-status { font-size: 10.5px; color: #a89050; white-space: nowrap; margin-top: 3px; flex-shrink: 0; min-width: 48px; text-align: right; }

/* Input bar */
.inq-input-bar {
  padding: 10px 16px 14px; background: #fff;
  border-top: 1px solid #eaebf2;
  display: flex; flex-direction: column; gap: 8px; flex-shrink: 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.04);
}
.inq-quick-list { display: flex; gap: 6px; flex-wrap: wrap; }
.inq-quick-btn {
  background: #f4f5fb; border: 1.5px solid #e5e7f0; border-radius: 20px;
  padding: 4px 12px; font-size: 11.5px; cursor: pointer; color: var(--navy);
  white-space: nowrap; transition: all .15s; font-weight: 500;
}
.inq-quick-btn:hover { background: var(--rose-light); border-color: var(--rose); color: var(--rose-dark); }
.inq-input-top-row { display: flex; gap: 7px; }
.inq-input-top-row .inq-recv-btn { flex: 1; }
.inq-input-row { display: flex; gap: 7px; align-items: flex-end; }
.inq-input-actions { display: flex; flex-direction: column; gap: 5px; align-items: stretch; flex-shrink: 0; }
.inq-input-text {
  flex: 1; resize: none; border: 1.5px solid #e5e7f0; border-radius: 14px;
  padding: 10px 14px; font-family: inherit; font-size: 13.5px;
  min-height: 64px; max-height: 140px; outline: none; line-height: 1.55;
  background: #f8f9fc; color: var(--text);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.inq-input-text:focus { border-color: var(--rose); background: #fff; box-shadow: 0 0 0 3px rgba(199,104,126,.1); }
.inq-recv-btn {
  flex: 1; background: #f3f4f8; border: 1.5px solid #e5e7f0; border-radius: 10px;
  padding: 8px 11px; font-size: 12px; cursor: pointer; color: var(--text-muted);
  white-space: nowrap; transition: all .15s; font-family: inherit;
}
.inq-recv-btn:hover { background: #eaebf5; border-color: #c8cade; color: var(--navy); }
.inq-input-actions .btn-primary { width: 72px; padding: 8px 0; text-align: center; border-radius: 10px; font-size: 13px; }

/* Empty thread */
.inq-empty-thread {
  flex: 1; display: flex; align-items: center; justify-content: center;
  flex-direction: column; color: var(--text-muted); gap: 10px;
}
.inq-empty-icon { font-size: 44px; opacity: 0.25; }

/* Status */
.inq-s-open     { color: var(--red);   font-weight: 600; }
.inq-s-answered { color: var(--green); font-weight: 600; }
.inq-s-closed   { color: var(--text-muted); }

/* Date separator */
.inq-date-sep {
  text-align: center; font-size: 11px; color: var(--text-muted);
  margin: 6px 0; display: flex; align-items: center; gap: 8px;
}
.inq-date-sep::before, .inq-date-sep::after { content: ''; flex: 1; border-top: 1px solid var(--border); }

/* Channel settings */
.ch-cfg-section-title {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  border-bottom: 1px solid var(--border); padding-bottom: 6px; margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.ch-cfg-dot { width: 8px; height: 8px; border-radius: 50%; }

/* Form grid (modal forms) */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}
.form-group.full { grid-column: 1 / -1; }
.form-select, .form-textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 7px;
  padding: 8px 11px; font-size: 13px; font-family: inherit; color: var(--text);
  background: #fff; outline: none; transition: border-color .15s;
}
.form-select:focus, .form-textarea:focus { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(232,160,168,.15); }
.form-textarea { resize: vertical; min-height: 90px; }

/* Card */
.card {
  background: #fff; border-radius: 12px;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}

/* Icon buttons (QR manager, etc.) */
.btn-icon {
  background: #f3f4f8; border: 1.5px solid #e5e7f0; border-radius: 8px;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  font-size: 14px; cursor: pointer; transition: all .15s;
}
.btn-icon:hover { background: var(--rose-light); border-color: var(--rose); }

/* Voice / media messages */
.inq-voice-box {
  display: flex; align-items: center; gap: 8px; font-size: 13px;
  padding: 4px 0;
}
.inq-voice-dl {
  font-size: 11px; color: var(--rose); text-decoration: underline;
}
.inq-media-audio { max-width: 240px; display: block; }
.inq-media-video { max-width: 280px; max-height: 200px; border-radius: 10px; display: block; }

@media (max-width: 700px) {
  .inq-sidebar { width: 100%; }
  .inq-layout  { flex-direction: column; }
  .inq-thread  { display: none; }
  .inq-layout.thread-open .inq-sidebar { display: none; }
  .inq-layout.thread-open .inq-thread  { display: flex; }
  #inq-back-btn { display: block !important; }
  .form-grid { grid-template-columns: 1fr; }
}
