/* ============================================================
   ADMIN — Unified Messages + Review Queue
   "Declassified Dossier" dark-editorial theme
   ============================================================ */

/* Ensure [hidden] attribute always wins */
[hidden] { display: none !important; }

/* ---- Override global body ---- */
body {
  background: #0d0c0b;
  background-image: none;
  overflow: hidden;
  height: 100vh;
}

body::before {
  color: #fff;
  opacity: 0.015;
  font-size: 3rem;
}

/* ====================================================
   TOP-LEVEL VIEW SWITCHER
   ==================================================== */

.adm-view-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  background: #0a0908;
  border-bottom: 1px solid #1e1c18;
  padding: 0 16px;
  height: 44px;
  flex-shrink: 0;
}

.adm-view-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: none;
  font-family: 'Oswald', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4a4438;
  padding: 10px 28px;
  cursor: pointer;
  transition: color 0.2s;
  position: relative;
}

.adm-view-tab:hover {
  color: #c8b88a;
}

.adm-view-tab.active {
  color: #e8dfc8;
}

.adm-view-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: #D4AF37;
}

.adm-tab-icon {
  font-size: 1rem;
  opacity: 0.7;
}

.adm-view-tab.active .adm-tab-icon {
  opacity: 1;
}

.adm-view-sep {
  width: 1px;
  height: 20px;
  background: #D4AF37;
  opacity: 0.4;
  flex-shrink: 0;
}

.adm-tab-badge {
  display: none;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 9999px;
  background: var(--color-red);
  color: white;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.adm-tab-badge.visible {
  display: inline-block;
}

/* ---- Auth loading screen ---- */
.adm-auth-screen {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d0c0b;
  z-index: 50;
}

.adm-auth-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: #7a6e5a;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.adm-auth-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid #2a2520;
  border-top-color: #D4AF37;
  border-radius: 50%;
  animation: adm-spin 0.8s linear infinite;
}

@keyframes adm-spin { to { transform: rotate(360deg); } }

/* ---- Panel container (messages or queue) ---- */
.adm-panel {
  display: flex;
  height: calc(100vh - 64px - 44px); /* nav + view bar */
  position: relative;
  background: #0d0c0b;
}

/* ====================================================
   MESSAGES — SIDEBAR
   ==================================================== */

.ai-sidebar {
  width: 340px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #0f0e0d;
  border-right: 1px solid #1e1c18;
  overflow: hidden;
}

.ai-sidebar-header {
  padding: 18px 16px 0;
  border-bottom: 1px solid #1e1c18;
  flex-shrink: 0;
}

.ai-sidebar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Oswald', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c8b88a;
  margin-bottom: 14px;
}

.ai-sidebar-icon {
  color: var(--color-red);
  font-size: 1rem;
}

.ai-count {
  margin-left: auto;
  background: #1e1c18;
  color: #7a6e5a;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid #2a2520;
  letter-spacing: 0.04em;
}

.ai-filters {
  display: flex;
  gap: 0;
  margin: 0 -16px;
}

.ai-filter {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #4a4438;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 4px 10px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.ai-filter:hover { color: #c8b88a; }

.ai-filter.active {
  color: #D4AF37;
  border-bottom-color: #D4AF37;
}

.ai-list {
  flex: 1;
  overflow-y: auto;
  list-style: none;
  padding: 6px 0;
  scroll-behavior: smooth;
}

.ai-list::-webkit-scrollbar { width: 4px; }
.ai-list::-webkit-scrollbar-track { background: #0f0e0d; }
.ai-list::-webkit-scrollbar-thumb { background: #2a2520; border-radius: 2px; }

.ai-item {
  display: block;
  padding: 12px 16px 11px;
  border-left: 3px solid transparent;
  cursor: pointer;
  border-bottom: 1px solid #141210;
  transition: background 0.1s, border-color 0.1s;
  position: relative;
}

.ai-item:hover {
  background: #141210;
  border-left-color: #2a2520;
}

.ai-item.active {
  background: #16140f;
  border-left-color: #D4AF37;
}

.ai-item-subject {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  color: #D4AF37;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-item-read-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ai-item-read-dot[data-read="0"] { background: #D4AF37; }
.ai-item-read-dot[data-read="1"] { background: #4a4438; }

.ai-item-name {
  font-family: 'Oswald', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: #c8b88a;
  line-height: 1.3;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-item-preview {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 0.72rem;
  color: #5a5040;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.ai-item-date {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  color: #4a4438;
  letter-spacing: 0.03em;
}

.ai-list-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #3a342c;
  padding: 40px 20px;
}

.ai-empty-icon {
  font-size: 2rem;
  color: #2a2520;
}

.ai-list-empty p {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-kb-hints, .aq-kb-hints {
  flex-shrink: 0;
  display: flex;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid #1a1814;
  flex-wrap: wrap;
}

.ai-kb-hints span, .aq-kb-hints span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  color: #3a342c;
  letter-spacing: 0.04em;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #1a1814;
  border: 1px solid #2a2520;
  border-radius: 3px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  color: #5a5040;
  line-height: 1;
}

/* ====================================================
   MESSAGES — DETAIL PANEL
   ==================================================== */

.ai-detail {
  flex: 1;
  overflow-y: auto;
  background: #0d0c0b;
  position: relative;
  display: flex;
  flex-direction: column;
}

.ai-detail::-webkit-scrollbar { width: 5px; }
.ai-detail::-webkit-scrollbar-track { background: #0d0c0b; }
.ai-detail::-webkit-scrollbar-thumb { background: #2a2520; border-radius: 2px; }

.ai-detail-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.ai-detail-empty-inner {
  text-align: center;
  color: #2a2520;
}

.ai-detail-empty-glyph {
  font-size: 4rem;
  display: block;
  margin-bottom: 12px;
  opacity: 0.5;
}

.ai-detail-empty-inner p {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #2a2520;
}

.ai-detail-content {
  flex: 1;
  padding: 32px 44px 48px;
  max-width: 860px;
  animation: adm-slide-in 0.2s ease;
}

@keyframes adm-slide-in {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}

.ai-detail-topbar {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #1e1c18;
}

.ai-detail-subject-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-subject-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.1rem;
  font-weight: 600;
  color: #D4AF37;
  letter-spacing: 0.1em;
}

.ai-archive-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 2px;
}

/* Unread: gold */
.ai-archive-badge[data-archived="0"][data-read="0"] {
  background: rgba(212,175,55,0.12);
  border: 1px solid rgba(212,175,55,0.3);
  color: #D4AF37;
}

/* Read but not archived: neutral */
.ai-archive-badge[data-archived="0"][data-read="1"] {
  background: rgba(160,160,160,0.12);
  border: 1px solid rgba(160,160,160,0.3);
  color: #999;
}

/* Archived: green */
.ai-archive-badge[data-archived="1"] {
  background: rgba(76,175,122,0.12);
  border: 1px solid rgba(76,175,122,0.3);
  color: #4caf7a;
}

.ai-detail-meta-line {
  display: flex;
  gap: 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  color: #4a4438;
  letter-spacing: 0.04em;
}

.ai-sender-name {
  font-family: 'Oswald', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #e8dfc8;
  line-height: 1.2;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

.ai-sender-email {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  color: #8a7456;
  margin-bottom: 24px;
}

.ai-sender-email a {
  color: #8a7456;
  text-decoration: none;
}
.ai-sender-email a:hover {
  color: #D4AF37;
  text-decoration: underline;
}

.ai-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #1a1814;
  border: 1px solid #1e1c18;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 28px;
}

.ai-meta-cell {
  background: #0f0e0d;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-meta-cell label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4a4438;
}

.ai-meta-cell span {
  font-family: 'Oswald', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #b8a87a;
  letter-spacing: 0.02em;
  word-break: break-all;
}

.ai-section {
  margin-bottom: 24px;
}

.ai-section-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4a4438;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #1a1814;
}

.ai-section p {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 0.88rem;
  line-height: 1.75;
  color: #9a8e78;
  white-space: pre-wrap;
}

.ai-tech-toggle {
  background: none;
  border: 1px solid #1e1c18;
  color: #4a4438;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 2px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: 12px;
}

.ai-tech-toggle:hover {
  color: #c8b88a;
  border-color: #2a2520;
}

.ai-tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: #1a1814;
  border: 1px solid #1e1c18;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 28px;
}

/* ====================================================
   CONVERSATION THREAD
   ==================================================== */

.ai-thread-section {
  margin-bottom: 24px;
}

.ai-thread-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-thread-msg {
  padding: 14px 18px;
  border-radius: 4px;
  max-width: 85%;
}

.ai-thread-msg[data-sender="guest"] {
  background: #161410;
  border: 1px solid #1e1c18;
  border-left: 3px solid #D4AF37;
  align-self: flex-start;
}

.ai-thread-msg[data-sender="admin"] {
  background: #101814;
  border: 1px solid #1a2a1e;
  border-left: 3px solid #4caf7a;
  align-self: flex-end;
}

.ai-thread-msg-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.ai-thread-msg-sender {
  font-family: 'Oswald', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ai-thread-msg[data-sender="guest"] .ai-thread-msg-sender { color: #D4AF37; }
.ai-thread-msg[data-sender="admin"] .ai-thread-msg-sender { color: #4caf7a; }

.ai-thread-msg-time {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  color: #4a4438;
  letter-spacing: 0.04em;
}

.ai-email-status-btn {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid #5a5a4a;
  background: transparent;
  color: #8a8a7a;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.ai-email-status-btn:hover { background: rgba(255,255,255,0.05); color: #bbb; }
.ai-email-status-btn:disabled { cursor: default; opacity: 0.7; }
.ai-email-status-delivered { color: #4ade80; border-color: #4ade80; }
.ai-email-status-opened { color: #60a5fa; border-color: #60a5fa; }
.ai-email-status-bounced { color: #f87171; border-color: #f87171; }
.ai-email-status-complained { color: #fb923c; border-color: #fb923c; }
.ai-email-status-sent { color: #facc15; border-color: #facc15; }

.ai-thread-msg-body {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 0.85rem;
  line-height: 1.7;
  color: #9a8e78;
  white-space: pre-wrap;
}

.ai-item-new-reply {
  display: inline-block;
  background: #B22234;
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 2px;
  margin-left: 6px;
}

/* ====================================================
   MESSAGES — ACTION BAR
   ==================================================== */

.ai-action-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 24px;
  border-top: 1px solid #1a1814;
  flex-wrap: wrap;
}

.ai-action-bar button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Oswald', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 20px;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.ai-action-bar button:active { transform: scale(0.97); }

.ai-btn-reply {
  background: #1e2a3d;
  color: #5a8abf;
  border: 1px solid #283a55 !important;
}
.ai-btn-reply:hover { background: #243050; }

.ai-btn-archive {
  background: #1e3d29;
  color: #4caf7a;
  border: 1px solid #2a5538 !important;
}
.ai-btn-archive:hover { background: #234530; }

.ai-btn-unarchive {
  background: #3d351e;
  color: #D4AF37;
  border: 1px solid #554a28 !important;
}
.ai-btn-unarchive:hover { background: #453c24; }

.ai-btn-icon {
  font-size: 0.9rem;
  opacity: 0.85;
}

/* ====================================================
   MESSAGES — REPLY DIALOG
   ==================================================== */

.ai-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: adm-fade-in 0.2s ease;
}

.ai-dialog {
  background: #12110f;
  border: 1px solid #2a2520;
  border-top: 3px solid var(--color-red);
  border-radius: 4px;
  padding: 28px 32px;
  width: 560px;
  max-width: 90vw;
  animation: adm-slide-up 0.2s ease;
}

.ai-dialog h2 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #c8b88a;
  margin-bottom: 6px;
}

.ai-dialog-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  color: #4a4438;
  line-height: 1.6;
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}

.ai-dialog-textarea {
  width: 100%;
  background: #0d0c0b;
  border: 1px solid #2a2520;
  border-radius: 2px;
  color: #9a8e78;
  font-family: 'Merriweather', Georgia, serif;
  font-size: 0.85rem;
  line-height: 1.6;
  padding: 12px 14px;
  resize: vertical;
  outline: none;
  margin-bottom: 18px;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.ai-dialog-textarea:focus {
  border-color: rgba(212,175,55,0.4);
}

.ai-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.ai-dialog-cancel {
  background: none;
  border: 1px solid #2a2520;
  color: #4a4438;
  font-family: 'Oswald', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 2px;
  cursor: pointer;
  transition: color 0.15s;
}
.ai-dialog-cancel:hover { color: #7a6e5a; }

.ai-dialog-confirm {
  background: var(--color-red);
  border: none;
  color: #fff;
  font-family: 'Oswald', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 20px;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.ai-dialog-confirm:hover { opacity: 0.88; }

/* ====================================================
   REVIEW QUEUE — SIDEBAR
   ==================================================== */

.aq-sidebar {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #0f0e0d;
  border-right: 1px solid #1e1c18;
  overflow: hidden;
}

.aq-sidebar-header {
  padding: 18px 16px 0;
  border-bottom: 1px solid #1e1c18;
  flex-shrink: 0;
}

.aq-sidebar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Oswald', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c8b88a;
  margin-bottom: 14px;
}

.aq-sidebar-icon {
  color: var(--color-red);
  font-size: 1rem;
}

.aq-count {
  margin-left: auto;
  background: #1e1c18;
  color: #7a6e5a;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid #2a2520;
  letter-spacing: 0.04em;
}

.aq-filters {
  display: flex;
  gap: 0;
  margin: 0 -16px;
}

.aq-filter {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #4a4438;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 4px 10px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.aq-filter:hover { color: #c8b88a; }

.aq-filter.active {
  color: #D4AF37;
  border-bottom-color: #D4AF37;
}

.aq-list {
  flex: 1;
  overflow-y: auto;
  list-style: none;
  padding: 6px 0;
  scroll-behavior: smooth;
}

.aq-list::-webkit-scrollbar { width: 4px; }
.aq-list::-webkit-scrollbar-track { background: #0f0e0d; }
.aq-list::-webkit-scrollbar-thumb { background: #2a2520; border-radius: 2px; }

.aq-item {
  display: block;
  padding: 12px 16px 11px;
  border-left: 3px solid transparent;
  cursor: pointer;
  border-bottom: 1px solid #141210;
  transition: background 0.1s, border-color 0.1s;
  position: relative;
}

.aq-item:hover {
  background: #141210;
  border-left-color: #2a2520;
}

.aq-item.active {
  background: #16140f;
  border-left-color: #D4AF37;
}

.aq-item-bill {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  color: #D4AF37;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.aq-item-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.aq-item-status-dot[data-status="pending"]  { background: #D4AF37; }
.aq-item-status-dot[data-status="approved"] { background: #4caf7a; }
.aq-item-status-dot[data-status="rejected"] { background: #7a4040; }

.aq-item-title {
  font-family: 'Oswald', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: #c8b88a;
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.aq-item-date {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  color: #4a4438;
  letter-spacing: 0.03em;
}

.aq-list-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #3a342c;
  padding: 40px 20px;
}

.aq-empty-icon {
  font-size: 2rem;
  color: #2a2520;
}

.aq-list-empty p {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ====================================================
   REVIEW QUEUE — DETAIL PANEL
   ==================================================== */

.aq-detail {
  flex: 1;
  overflow-y: auto;
  background: #0d0c0b;
  position: relative;
  display: flex;
  flex-direction: column;
}

.aq-detail::-webkit-scrollbar { width: 5px; }
.aq-detail::-webkit-scrollbar-track { background: #0d0c0b; }
.aq-detail::-webkit-scrollbar-thumb { background: #2a2520; border-radius: 2px; }

.aq-detail-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.aq-detail-empty-inner {
  text-align: center;
  color: #2a2520;
}

.aq-detail-empty-glyph {
  font-size: 4rem;
  display: block;
  margin-bottom: 12px;
  opacity: 0.5;
}

.aq-detail-empty-inner p {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #2a2520;
}

.aq-detail-content {
  flex: 1;
  padding: 32px 44px 48px;
  max-width: 860px;
  animation: adm-slide-in 0.2s ease;
}

.aq-detail-topbar {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #1e1c18;
}

.aq-detail-bill-id {
  display: flex;
  align-items: center;
  gap: 12px;
}

.aq-bill-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.2rem;
  font-weight: 600;
  color: #D4AF37;
  letter-spacing: 0.1em;
}

.aq-status-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 2px;
}

.aq-status-badge[data-status="pending"] {
  background: rgba(212,175,55,0.12);
  border: 1px solid rgba(212,175,55,0.3);
  color: #D4AF37;
}
.aq-status-badge[data-status="approved"] {
  background: rgba(76,175,122,0.12);
  border: 1px solid rgba(76,175,122,0.3);
  color: #4caf7a;
}
.aq-status-badge[data-status="rejected"] {
  background: rgba(178,34,52,0.1);
  border: 1px solid rgba(178,34,52,0.25);
  color: #b25560;
}

.aq-detail-meta-line {
  display: flex;
  gap: 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  color: #4a4438;
  letter-spacing: 0.04em;
}

.aq-bill-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #e8dfc8;
  line-height: 1.2;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

.aq-bill-nickname {
  font-family: 'Special Elite', cursive;
  font-size: 0.95rem;
  color: #8a7456;
  font-style: italic;
  margin-bottom: 24px;
}

.aq-bill-nickname:empty { display: none; }

.aq-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #1a1814;
  border: 1px solid #1e1c18;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 28px;
}

.aq-meta-cell {
  background: #0f0e0d;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aq-meta-cell label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4a4438;
}

.aq-meta-cell span {
  font-family: 'Oswald', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #b8a87a;
  letter-spacing: 0.02em;
}

.aq-section {
  margin-bottom: 24px;
}

.aq-section-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4a4438;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.aq-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #1a1814;
}

.aq-section p {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 0.88rem;
  line-height: 1.75;
  color: #9a8e78;
}

.aq-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 28px;
}

.aq-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  background: #161410;
  border: 1px solid #2a2520;
  border-radius: 2px;
  color: #6a5c44;
}

.aq-rejection-box {
  background: rgba(178,34,52,0.06);
  border: 1px solid rgba(178,34,52,0.2);
  border-left: 3px solid var(--color-red);
  border-radius: 0 4px 4px 0;
  padding: 14px 18px;
  margin-bottom: 24px;
}

.aq-rejection-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b25560;
  display: block;
  margin-bottom: 6px;
}

.aq-rejection-box p {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 0.83rem;
  color: #8a6060;
  line-height: 1.6;
  margin-bottom: 6px;
}

.aq-rejection-box small {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  color: #4a3030;
}

/* ====================================================
   REVIEW QUEUE — ACTION BAR
   ==================================================== */

.aq-action-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 24px;
  border-top: 1px solid #1a1814;
  flex-wrap: wrap;
}

.aq-action-bar button, .aq-action-bar a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Oswald', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 20px;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  text-decoration: none;
}

.aq-action-bar button:active, .aq-action-bar a:active {
  transform: scale(0.97);
}

.aq-btn-approve {
  background: #1e3d29;
  color: #4caf7a;
  border: 1px solid #2a5538 !important;
}
.aq-btn-approve:hover { background: #234530; }

.aq-btn-reject {
  background: #3d1e1e;
  color: #b25560;
  border: 1px solid #55282a !important;
}
.aq-btn-reject:hover { background: #452324; }

.aq-btn-delete {
  background: #1a1814;
  color: #4a4438;
  border: 1px solid #2a2520 !important;
}
.aq-btn-delete:hover { color: #7a6e5a; background: #201e18; }

.aq-btn-azleg {
  margin-left: auto;
  background: none;
  color: #4a4438;
  border: 1px solid #2a2520 !important;
  font-size: 0.75rem;
}
.aq-btn-azleg:hover { color: #D4AF37; border-color: rgba(212,175,55,0.3) !important; }

.aq-btn-icon {
  font-size: 0.9rem;
  opacity: 0.85;
}

.aq-action-bar[data-status="approved"] .aq-btn-approve,
.aq-action-bar[data-status="approved"] .aq-btn-reject,
.aq-action-bar[data-status="rejected"] .aq-btn-approve,
.aq-action-bar[data-status="rejected"] .aq-btn-reject {
  display: none;
}

/* ====================================================
   REJECT DIALOG
   ==================================================== */

.aq-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: adm-fade-in 0.2s ease;
}

@keyframes adm-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.aq-dialog {
  background: #12110f;
  border: 1px solid #2a2520;
  border-top: 3px solid var(--color-red);
  border-radius: 4px;
  padding: 28px 32px;
  width: 480px;
  max-width: 90vw;
  animation: adm-slide-up 0.2s ease;
}

@keyframes adm-slide-up {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.aq-dialog h2 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #c8b88a;
  margin-bottom: 6px;
}

.aq-dialog-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  color: #4a4438;
  line-height: 1.6;
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}

.aq-dialog-textarea {
  width: 100%;
  background: #0d0c0b;
  border: 1px solid #2a2520;
  border-radius: 2px;
  color: #9a8e78;
  font-family: 'Merriweather', Georgia, serif;
  font-size: 0.82rem;
  line-height: 1.6;
  padding: 10px 12px;
  resize: vertical;
  outline: none;
  margin-bottom: 18px;
  transition: border-color 0.15s;
}

.aq-dialog-textarea:focus {
  border-color: rgba(178,34,52,0.4);
}

.aq-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.aq-dialog-cancel {
  background: none;
  border: 1px solid #2a2520;
  color: #4a4438;
  font-family: 'Oswald', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 2px;
  cursor: pointer;
  transition: color 0.15s;
}
.aq-dialog-cancel:hover { color: #7a6e5a; }

.aq-dialog-confirm {
  background: var(--color-red);
  border: none;
  color: #fff;
  font-family: 'Oswald', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 20px;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.aq-dialog-confirm:hover { opacity: 0.88; }

/* ====================================================
   TOAST
   ==================================================== */

.adm-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.adm-toast-item {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 10px 18px;
  border-radius: 3px;
  animation: adm-toast-in 0.25s ease forwards;
  pointer-events: none;
}

.adm-toast-item.success {
  background: #1e3d29;
  border: 1px solid #2a5538;
  color: #4caf7a;
}

.adm-toast-item.error {
  background: #3d1e1e;
  border: 1px solid #55282a;
  color: #d46070;
}

.adm-toast-item.fade-out {
  animation: adm-toast-out 0.3s ease forwards;
}

@keyframes adm-toast-in {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes adm-toast-out {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(20px); opacity: 0; }
}
