/* SoulShakers Admin Panel - Dark Luxury Styling */
:root {
  --bg-main: #0e0d0d;
  --bg-surface: #171615;
  --bg-card: #201e1d;
  --bg-card-hover: #272524;
  --bg-input: #141312;

  --border-subtle: #2b2826;
  --border-active: #4a4440;
  --border-gold: #c89f81;

  --accent-gold: #d9baa6;
  --accent-gold-hover: #e8ceba;
  --accent-gold-dark: #8c6e59;

  --text-main: #f5f0ec;
  --text-muted: #a69e97;
  --text-dim: #736b65;

  --status-new-bg: rgba(217, 186, 166, 0.14);
  --status-new-text: #e2c7b5;
  --status-new-border: rgba(217, 186, 166, 0.3);

  --status-contacted-bg: rgba(79, 148, 222, 0.14);
  --status-contacted-text: #7ab3ec;
  --status-contacted-border: rgba(79, 148, 222, 0.3);

  --status-confirmed-bg: rgba(52, 199, 123, 0.14);
  --status-confirmed-text: #50d890;
  --status-confirmed-border: rgba(52, 199, 123, 0.3);

  --status-cancelled-bg: rgba(239, 68, 68, 0.14);
  --status-cancelled-text: #f87171;
  --status-cancelled-border: rgba(239, 68, 68, 0.3);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   BUTTONS & FORMS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--accent-gold);
  color: #171514;
}
.btn-primary:hover {
  background-color: var(--accent-gold-hover);
  box-shadow: 0 4px 14px rgba(217, 186, 166, 0.25);
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-subtle);
}
.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-active);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-muted);
  border-color: var(--border-subtle);
}
.btn-outline:hover {
  color: #ff6b6b;
  border-color: #ff6b6b;
}

.btn-block {
  width: 100%;
}

.btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 1px var(--accent-gold);
}

.input-readonly {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 12px 18px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  font-size: 13px;
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.success {
  border-left: 4px solid var(--status-confirmed-text);
}
.toast.error {
  border-left: 4px solid var(--status-cancelled-text);
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   1. LOGIN VIEW
   ========================================================================== */
.login-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at top, #1e1b19 0%, #0e0d0d 70%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
}

.login-brand-logo {
  height: 54px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.brand-tag {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 8px;
  font-weight: 700;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.brand-subtitle {
  color: var(--text-muted);
  font-size: 13px;
}

.login-error {
  padding: 10px 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  border-radius: var(--radius-sm);
  font-size: 12px;
  margin-bottom: 14px;
}

/* 2FA Step Interface */
.login-2fa-step {
  animation: fadeIn 0.25s ease-out;
}

.twofa-card-intro {
  text-align: center;
  margin-bottom: 20px;
}

.twofa-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.twofa-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.twofa-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.twofa-email-highlight {
  display: block;
  color: var(--accent-gold);
  font-weight: 600;
  margin-top: 2px;
}

.twofa-code-input {
  text-align: center !important;
  font-size: 26px !important;
  letter-spacing: 12px !important;
  font-family: SFMono-Regular, Consolas, Monaco, monospace !important;
  font-weight: 700 !important;
  padding: 12px 14px !important;
  color: var(--accent-gold) !important;
}

.twofa-timer-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.twofa-timer {
  font-weight: 600;
  color: var(--accent-gold);
}

.twofa-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  font-size: 12px;
}

.btn-link {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  font-size: 12px;
  text-decoration: underline;
  transition: color 0.2s;
}

.btn-link:hover {
  color: var(--accent-gold);
}

.btn-link:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  text-decoration: none;
}

.twofa-divider {
  color: var(--border-active);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   2. DASHBOARD SHELL & SIDEBAR NAVIGATION
   ========================================================================== */
.dashboard-view {
  display: flex;
  flex-direction: row;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background-color: var(--bg-dark);
}

/* 2.1 Left Global Navigation Sidebar */
.admin-sidebar {
  width: 250px;
  min-width: 250px;
  height: 100vh;
  background-color: #110f0d;
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 30;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.4);
}

.sidebar-brand {
  padding: 20px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.015);
}

.sidebar-logo-img {
  height: 34px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 2px 6px rgba(212, 175, 55, 0.2));
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--accent-gold);
  line-height: 1.1;
}

.sidebar-subtitle {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 3px;
}

.sidebar-nav {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  overflow-y: auto;
}

.sidebar-nav-group-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: #796e60;
  padding: 8px 10px 4px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-sans);
  text-align: left;
}

.sidebar-nav-item:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}

.sidebar-nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.16), rgba(212, 175, 55, 0.04));
  border-color: rgba(212, 175, 55, 0.35);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--accent-gold);
}

.nav-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  color: inherit;
  flex-shrink: 0;
}

.nav-item-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-badge {
  padding: 2px 7px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(212, 175, 55, 0.2);
  color: var(--accent-gold);
  border: 1px solid rgba(212, 175, 55, 0.35);
}

.sidebar-mini-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 2.2 Sidebar Footer */
.sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--border-subtle);
  background: #0d0b0a;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.sidebar-user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
}

.sidebar-user-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.sidebar-user-email {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 10px;
  color: var(--accent-gold);
  font-weight: 500;
}

.sidebar-bottom-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sidebar-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11.5px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-sans);
}

.sidebar-logout-btn:hover {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
}

/* 2.3 Application Shell & Contextual Topbar */
.admin-app-shell {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-dark);
}

.topbar {
  height: 64px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
  gap: 16px;
  z-index: 10;
}

.topbar-context-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 0;
}

.topbar-context-section {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.topbar-title {
  font-family: var(--font-serif);
  font-size: 16.5px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.3px;
  margin: 0;
  white-space: nowrap;
}

.topbar-stats {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.stat-pill:hover {
  border-color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.05);
}

.stat-label {
  color: var(--text-muted);
}

.stat-value {
  font-weight: 700;
  color: var(--text-main);
}

.stat-new .stat-value { color: var(--status-new-text); }
.stat-contacted .stat-value { color: var(--status-contacted-text); }

/* CMS Navigation Quick Buttons in Topbar */
.cms-section-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.cms-sec-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.cms-sec-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.cms-sec-btn.active {
  color: #1a1612;
  background: linear-gradient(135deg, #d4af37, #f3e5ab);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.admin-workspace-container {
  flex: 1;
  min-height: 0;
  display: flex;
  position: relative;
  overflow: hidden;
}

.user-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

/* ==========================================================================
   WORKSPACE & PANELS
   ========================================================================== */
.workspace {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Left Panel: Inbox */
.inbox-panel {
  width: 380px;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.inbox-controls {
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-dim);
  pointer-events: none;
}

.search-box input {
  padding-left: 36px;
  padding-right: 30px;
}

.clear-btn {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
}

.filter-tabs {
  display: flex;
  background-color: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 3px;
}

.filter-tab {
  flex: 1;
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.filter-tab.active {
  background-color: var(--bg-card);
  color: var(--text-main);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.inquiries-list {
  flex: 1;
  overflow-y: auto;
}

.inquiry-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background-color 0.15s;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.inquiry-item:hover {
  background-color: var(--bg-card-hover);
}
.inquiry-item.active {
  background-color: var(--bg-card);
  border-left: 3px solid var(--accent-gold);
}

.inquiry-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inquiry-item-name {
  font-weight: 700;
  color: var(--text-main);
  font-size: 14px;
}

.inquiry-item-time {
  font-size: 11px;
  color: var(--text-dim);
}

.inquiry-item-details {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.inquiry-item-snippet {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.status-badge.new {
  background: var(--status-new-bg);
  color: var(--status-new-text);
  border: 1px solid var(--status-new-border);
}
.status-badge.contacted {
  background: var(--status-contacted-bg);
  color: var(--status-contacted-text);
  border: 1px solid var(--status-contacted-border);
}
.status-badge.confirmed {
  background: var(--status-confirmed-bg);
  color: var(--status-confirmed-text);
  border: 1px solid var(--status-confirmed-border);
}
.status-badge.cancelled {
  background: var(--status-cancelled-bg);
  color: var(--status-cancelled-text);
  border: 1px solid var(--status-cancelled-border);
}

/* Right Panel: Conversation Thread */
.thread-panel {
  flex: 1;
  background-color: var(--bg-main);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.thread-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  text-align: center;
  padding: 32px;
}
.thread-empty-state .empty-icon {
  font-size: 44px;
  margin-bottom: 16px;
}
.thread-empty-state h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--text-main);
  margin-bottom: 8px;
}

.thread-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Customer Header */
.customer-header {
  padding: 16px 24px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.customer-info-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.customer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3d3733, #23201e);
  border: 1px solid var(--border-gold);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
}

.customer-name {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--text-main);
  font-weight: 600;
}

.customer-contacts {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent-gold);
  text-decoration: none;
  font-size: 12px;
  transition: color 0.15s;
}
.contact-link:hover {
  color: var(--accent-gold-hover);
  text-decoration: underline;
}

.badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 11px;
}
.badge-city {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}
.badge-count {
  background-color: rgba(217, 186, 166, 0.1);
  color: var(--accent-gold);
}

.customer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-select-label {
  font-size: 12px;
  color: var(--text-muted);
}

.status-select {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  width: auto;
}

/* Timeline Container */
.timeline-container {
  flex: 1;
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--text-main);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-badge {
  font-size: 11px;
  color: var(--text-dim);
}

.timeline-messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Timeline Cards */
.timeline-card {
  border-radius: var(--radius-md);
  padding: 16px 18px;
  position: relative;
  border: 1px solid var(--border-subtle);
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Inbound Inquiry from Customer */
.timeline-card.inquiry {
  background-color: var(--bg-card);
  border-left: 3px solid var(--accent-gold);
}

.timeline-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.timeline-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text-main);
}

.timeline-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background-color: rgba(217, 186, 166, 0.2);
  color: var(--accent-gold);
  text-transform: uppercase;
}

.timeline-date {
  font-size: 11px;
  color: var(--text-dim);
}

.timeline-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  background-color: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 12px;
}

.meta-item-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}
.meta-item-value {
  font-size: 13px;
  color: var(--text-main);
  font-weight: 600;
}

.timeline-body {
  color: var(--text-main);
  line-height: 1.6;
  white-space: pre-wrap;
  font-size: 13px;
}

/* Outbound Admin Email */
.timeline-card.email {
  background-color: #171c20;
  border: 1px solid #233440;
  border-left: 3px solid #6cb4ee;
}
.timeline-card.email .timeline-tag {
  background-color: rgba(108, 180, 238, 0.2);
  color: #6cb4ee;
}
.email-subject {
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
  font-size: 13px;
}

/* Composer Section */
.composer-section {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 16px 24px;
  flex-shrink: 0;
}

.composer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.composer-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-gold);
}

.template-selector-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.template-label {
  font-size: 12px;
  color: var(--text-muted);
}

.template-select {
  padding: 5px 10px;
  font-size: 12px;
  width: auto;
}

.form-row {
  display: flex;
  gap: 12px;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
}

.composer-hint {
  font-size: 11px;
  color: var(--text-dim);
  max-width: 60%;
}

/* Loading state */
.loading-state {
  padding: 30px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

/* ==========================================================================
   RESPONSIVENESS
   ========================================================================== */
@media (max-width: 900px) {
  .workspace {
    flex-direction: column;
  }
  .inbox-panel {
    width: 100%;
    height: 40vh;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
  .thread-panel {
    height: 60vh;
  }
  .topbar-stats {
    display: none;
  }
}

/* ==========================================================================
   USER MANAGEMENT MODAL (DEVELOPER ONLY)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 9, 8, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
}

.badge-dev {
  background: rgba(217, 186, 166, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(217, 186, 166, 0.3);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s;
}

.modal-close:hover {
  color: var(--text-main);
  background: var(--bg-card);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.user-editor-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px;
}

.user-editor-heading {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 14px;
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.form-group-check {
  display: flex;
  align-items: flex-end;
  padding-bottom: 6px;
}

.custom-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  color: var(--text-main);
}

.custom-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-gold);
  cursor: pointer;
}

.label-hint {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: normal;
  margin-left: 6px;
}

.user-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.users-list-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.users-list-heading {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.table-responsive {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
}

.admin-users-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.admin-users-table th {
  background: var(--bg-card);
  padding: 12px 16px;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-users-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
}

.admin-users-table tr:last-child td {
  border-bottom: none;
}

.admin-users-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.badge-2fa-on {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
}

.badge-2fa-off {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(231, 76, 60, 0.15);
  color: #e74c3c;
}

.badge-role-dev {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(217, 186, 166, 0.2);
  color: var(--accent-gold);
}

.badge-role-admin {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
}

.btn-edit {
  background: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-main);
}
.btn-edit:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-gold);
}

.btn-delete {
  background: rgba(231, 76, 60, 0.1);
  border-color: rgba(231, 76, 60, 0.3);
  color: #e74c3c;
}
.btn-delete:hover {
  background: rgba(231, 76, 60, 0.2);
  border-color: #e74c3c;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   TOPBAR NAVIGATION TABS & CMS VIEW
   ========================================================================== */
.topbar-nav-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.nav-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.nav-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab-btn.active {
  color: #1a1612;
  background: linear-gradient(135deg, #d4af37, #f3e5ab);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.cms-view {
  flex: 1;
  overflow-y: auto;
  padding: 30px 40px;
  background: var(--bg-dark);
  scroll-behavior: smooth;
}

.cms-container {
  max-width: 1200px;
  margin: 0 auto;
}

.cms-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.cms-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 6px;
}

.cms-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

.cms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

@media (max-width: 1100px) {
  .cms-grid {
    grid-template-columns: 1fr;
  }
}

.cms-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
  scroll-margin-top: 24px;
}

.cms-card.section-highlight {
  border-color: var(--accent-gold);
  box-shadow: 0 0 24px rgba(212, 175, 55, 0.28);
  transform: translateY(-2px);
}

.cms-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
}

.cms-card-icon {
  font-size: 24px;
}

.cms-card-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.cms-card-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.cms-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

.field-hint {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.cms-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.cms-bottom-hint {
  font-size: 13px;
  color: var(--text-muted);
}

.btn-save-cms {
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 700;
}

/* ==========================================================================
   ADMIN BILINGUAL (LT/EN) LANGUAGE SWITCHER
   ========================================================================== */
.admin-lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.4);
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
}

.admin-lang-btn {
  background: transparent;
  border: none;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 12px;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.admin-lang-btn:hover {
  color: var(--text-main);
}

.admin-lang-btn.active {
  color: #1a1612;
  background: linear-gradient(135deg, #d4af37, #f3e5ab);
  box-shadow: 0 0 6px rgba(212, 175, 55, 0.4);
}

.admin-lang-divider {
  font-size: 10px;
  color: var(--border-subtle);
  user-select: none;
}

.login-card-top-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

/* ==========================================================================
   SIDEBAR & DASHBOARD RESPONSIVENESS
   ========================================================================== */
@media (max-width: 900px) {
  .admin-sidebar {
    width: 68px;
    min-width: 68px;
  }
  .sidebar-brand-text,
  .sidebar-nav-group-title,
  .nav-item-label,
  .sidebar-badge,
  .sidebar-mini-tag,
  .sidebar-user-details,
  .sidebar-logout-btn span {
    display: none !important;
  }
  .sidebar-nav-item {
    justify-content: center;
    padding: 10px 0;
  }
  .sidebar-brand {
    justify-content: center;
    padding: 16px 8px;
  }
  .sidebar-user-card {
    justify-content: center;
    padding: 8px 4px;
  }
  .sidebar-bottom-controls {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }
}

@media (max-width: 768px) {
  .topbar {
    padding: 0 14px;
    height: auto;
    min-height: 56px;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .topbar-stats {
    flex-wrap: wrap;
  }
}
