/* ===== Base & Layout ===== */
body { margin: 0; font-family: 'Inter', system-ui, -apple-system, sans-serif; background: #f1f5f9; }
*, *::before, *::after { box-sizing: border-box; }

.app-shell { display: flex; height: 100vh; }

/* ===== Sidebar ===== */
.sidebar {
  width: 210px; flex-shrink: 0;
  background: #0f172a;
  display: flex; flex-direction: column;
  overflow: hidden;
}

/* Brand */
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 14px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.sidebar-brand-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-brand-name {
  font-size: 0.9rem; font-weight: 700; color: #f8fafc; letter-spacing: 0.01em;
}
.sidebar-brand-sub {
  font-size: 0.65rem; color: #64748b; margin-top: 1px; text-transform: uppercase; letter-spacing: 0.05em;
}

/* Nav container */
.sidebar-nav {
  flex: 1; overflow-y: auto; padding: 10px 8px;
  scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

/* Section labels */
.nav-section-label {
  font-size: 0.6rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: #475569;
  padding: 10px 8px 4px;
}

/* Divider */
.nav-divider {
  height: 1px; background: rgba(255,255,255,0.06);
  margin: 6px 0;
}

/* Nav item */
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; border-radius: 6px;
  font-size: 0.8rem; font-weight: 500; color: #94a3b8;
  cursor: pointer; background: none;
  border: none; width: 100%; text-align: left;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: #e2e8f0; }
.nav-item.active {
  background: rgba(59,130,246,0.18);
  color: #93c5fd;
}
.nav-item.active .nav-icon { color: #60a5fa; }

/* Icon wrapper */
.nav-icon {
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: #64748b;
  background: rgba(255,255,255,0.04);
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover .nav-icon { background: rgba(255,255,255,0.08); color: #cbd5e1; }
.nav-item.active .nav-icon { background: rgba(59,130,246,0.25); }

.nav-label { flex: 1; }

/* Badge on nav item */
.nav-badge {
  font-size: 0.65rem; font-weight: 700;
  background: #3b82f6; color: #fff;
  border-radius: 9999px; padding: 1px 6px;
  min-width: 18px; text-align: center;
}

/* Footer */
.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 10px 8px;
}
.sidebar-user {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 6px;
  background: rgba(255,255,255,0.04);
}
.sidebar-user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff; font-weight: 700; font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 0.75rem; font-weight: 600; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 0.65rem; color: #64748b; margin-top: 1px; }
.sidebar-reset-btn {
  background: none; border: none; color: #475569; cursor: pointer;
  padding: 4px; border-radius: 4px; display: flex; align-items: center;
  transition: color 0.15s, background 0.15s;
}
.sidebar-reset-btn:hover { color: #94a3b8; background: rgba(255,255,255,0.08); }

.main-content { flex: 1; overflow-y: auto; padding: 24px; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== Typography ===== */
.page-title { font-size: 1.875rem; font-weight: 700; color: #111827; margin: 0 0 24px; }
.section-title { font-size: 1.25rem; font-weight: 600; color: #1d4ed8; margin: 0 0 16px; }

/* ===== Cards & Containers ===== */
.card { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.card-body { padding: 20px; }
.card-header { padding: 16px 20px; border-bottom: 1px solid #e5e7eb; }

.stat-card { padding: 20px; cursor: pointer; transition: box-shadow 0.15s; }
.stat-card:hover { box-shadow: 0 4px 6px rgba(0,0,0,0.07); }
.stat-card .stat-label { font-size: 0.875rem; color: #6b7280; margin: 0; }
.stat-card .stat-value { font-size: 1.875rem; font-weight: 600; margin: 8px 0 0; }
.stat-card .stat-sub { font-size: 0.75rem; color: #6b7280; margin: 4px 0 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }
.content-with-sidebar { display: grid; grid-template-columns: 1fr 320px; gap: 24px; }
.space-y > * + * { margin-top: 24px; }

/* ===== Tables ===== */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead { background: #f9fafb; }
th { padding: 12px 16px; text-align: left; font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280; border-bottom: 1px solid #e5e7eb; }
td { padding: 12px 16px; font-size: 0.875rem; color: #374151; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
tr:hover { background: #f9fafb; }
thead.primary-head th { background: #2563eb; color: #fff; }

/* ===== Badges ===== */
.badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; line-height: 1.25rem; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-gray { background: #f3f4f6; color: #374151; }
.badge-purple { background: #f3e8ff; color: #6b21a8; }
.badge-orange { background: #ffedd5; color: #9a3412; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 6px; font-size: 0.875rem; font-weight: 500; cursor: pointer; border: none; transition: all 0.15s; text-decoration: none; }
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: #16a34a; color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-outline { background: #fff; color: #374151; border: 1px solid #d1d5db; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.btn-outline:hover { background: #f9fafb; }
.btn-sm { padding: 4px 12px; font-size: 0.8rem; }
.btn-link { background: none; border: none; color: #2563eb; cursor: pointer; padding: 0; font-size: 0.875rem; }
.btn-link:hover { color: #1d4ed8; text-decoration: underline; }
.btn-link-danger { background: none; border: none; color: #dc2626; cursor: pointer; padding: 0; font-size: 0.875rem; }
.btn-link-danger:hover { color: #b91c1c; }

/* ===== Forms ===== */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; color: #374151; margin-bottom: 4px; }
.form-input, .form-select { width: 100%; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 0.875rem; line-height: 1.25rem; transition: border-color 0.15s, box-shadow 0.15s; }
.form-input:focus, .form-select:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; align-items: end; }

/* ===== Progress Steps ===== */
.progress-bar { display: flex; align-items: center; gap: 4px; }
.progress-step { padding: 2px 8px; font-size: 0.75rem; font-weight: 500; border-radius: 9999px; }
.progress-step.complete { background: #dbeafe; color: #1e40af; }
.progress-step.incomplete { background: #f3f4f6; color: #6b7280; }
.progress-connector { width: 16px; height: 2px; }
.progress-connector.complete { background: #2563eb; }
.progress-connector.incomplete { background: #e5e7eb; }

/* ===== Action Cards (Sidebar) ===== */
.action-card { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-radius: 6px; border-left: 4px solid; }
.action-card-red { border-color: #ef4444; background: #fef2f2; }
.action-card-yellow { border-color: #f59e0b; background: #fffbeb; }
.action-card-orange { border-color: #f97316; background: #fff7ed; }
.action-card-green { border-color: #22c55e; background: #f0fdf4; }
.action-card .action-icon { font-size: 1.5rem; flex-shrink: 0; margin-right: 12px; }
.action-card .action-text strong { display: block; font-size: 0.95rem; color: #111827; }
.action-card .action-text { font-size: 0.8rem; color: #6b7280; }

/* ===== NLQ Search ===== */
.nlq-container { position: relative; }
.nlq-bar { display: flex; gap: 8px; }
.nlq-input-wrap { position: relative; flex: 1; }
.nlq-input-wrap .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #9ca3af; pointer-events: none; }
.nlq-input { width: 100%; padding: 12px 12px 12px 40px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 0.95rem; }
.nlq-input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.nlq-suggestions { position: absolute; top: 100%; left: 0; right: 0; z-index: 50; margin-top: 4px; background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; box-shadow: 0 10px 15px rgba(0,0,0,0.1); max-height: 240px; overflow-y: auto; display: none; }
.nlq-suggestions.show { display: block; }
.nlq-suggestion { display: flex; align-items: center; gap: 12px; padding: 12px; cursor: pointer; font-size: 0.875rem; }
.nlq-suggestion:hover { background: #f3f4f6; }
.nlq-answer { padding: 16px; background: #eff6ff; border-radius: 6px; font-size: 0.875rem; color: #1e40af; display: none; }
.nlq-answer.show { display: block; }
.nlq-tags { display: flex; flex-wrap: wrap; gap: 8px; min-height: 24px; }
.nlq-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; background: #dbeafe; color: #1e40af; border-radius: 9999px; font-size: 0.8rem; font-weight: 500; }
.nlq-tag button { background: none; border: none; color: #1e40af; cursor: pointer; font-size: 1rem; padding: 0; line-height: 1; }
.nlq-plan { font-family: monospace; font-size: 0.85rem; line-height: 1.6; background: #f3f4f6; border: 1px solid #d1d5db; border-radius: 4px; padding: 12px; white-space: pre-wrap; }
.bulk-actions { display: flex; gap: 8px; min-height: 38px; flex-wrap: wrap; }

/* ===== Pagination ===== */
.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 24px; }
.pagination a { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 6px; font-size: 0.875rem; font-weight: 500; color: #374151; text-decoration: none; border: 1px solid #d1d5db; }
.pagination a:hover { background: #f9fafb; }
.pagination a.active { background: #2563eb; color: #fff; border-color: #2563eb; }
.pagination a.disabled { opacity: 0.5; pointer-events: none; }
.pagination a.ellipsis { border: none; pointer-events: none; }

/* ===== Modals & Drawers ===== */
.modal-overlay { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; background: rgba(17,24,39,0.5); backdrop-filter: blur(2px); }
.modal-overlay.show { display: flex; }
.modal-box { background: #fff; border-radius: 8px; padding: 24px; box-shadow: 0 20px 25px rgba(0,0,0,0.15); width: 100%; max-width: 500px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-header h2 { font-size: 1.25rem; font-weight: 600; margin: 0; }
.modal-close { background: none; border: none; font-size: 1.5rem; color: #9ca3af; cursor: pointer; }
.modal-footer { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; padding-top: 16px; border-top: 1px solid #e5e7eb; }

.drawer-overlay { position: fixed; inset: 0; z-index: 55; background: rgba(17,24,39,0.5); backdrop-filter: blur(2px); opacity: 0; transition: opacity 0.3s; display: none; }
.drawer-overlay.show { display: block; opacity: 1; }
.drawer { position: fixed; right: 0; top: 0; z-index: 60; height: 100%; width: 100%; max-width: 420px; background: #fff; box-shadow: -4px 0 15px rgba(0,0,0,0.1); transform: translateX(100%); transition: transform 0.3s ease; display: flex; flex-direction: column; }
.drawer.open { transform: translateX(0); }
.drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid #e5e7eb; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px; }
.drawer-footer { padding: 16px; border-top: 1px solid #e5e7eb; display: flex; justify-content: flex-end; gap: 12px; }

/* ===== Role Toggles ===== */
.role-category { margin-top: 16px; margin-bottom: 8px; padding-bottom: 4px; border-bottom: 1px solid #e5e7eb; font-weight: 600; color: #2563eb; font-size: 0.875rem; }
.role-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.role-row span { font-size: 0.875rem; color: #374151; }
.toggle { position: relative; width: 44px; height: 24px; cursor: pointer; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-track { position: absolute; inset: 0; background: #d1d5db; border-radius: 9999px; transition: background 0.2s; }
.toggle-thumb { position: absolute; left: 2px; top: 2px; width: 20px; height: 20px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.2); transition: transform 0.2s; }
.toggle input:checked + .toggle-track { background: #2563eb; }
.toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(20px); }

/* ===== Toaster ===== */
.toaster-container { position: fixed; top: 24px; right: 24px; z-index: 2000; display: flex; flex-direction: column; gap: 12px; }
.toast { padding: 12px 16px; border-radius: 6px; font-size: 0.875rem; font-weight: 600; box-shadow: 0 10px 15px rgba(0,0,0,0.1); animation: slideIn 0.3s ease; }
.toast-success { background: #22c55e; color: #fff; }
.toast-error { background: #ef4444; color: #fff; }
.toast-info { background: #3b82f6; color: #fff; }
.toast-receipt { max-width: 350px; border-left: 4px solid #2563eb; border-radius: 6px; padding: 16px; background: #fff; box-shadow: 0 10px 15px rgba(0,0,0,0.1); }
.toast-receipt p { font-weight: 600; color: #111827; margin: 0 0 12px; }
.toast-receipt .receipt-actions { display: flex; gap: 8px; }

@keyframes slideIn { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }

/* ===== MailHog Simulated ===== */
.email-card { border: 1px solid #e5e7eb; border-radius: 8px; padding: 16px; margin-bottom: 16px; background: #fff; }
.email-card .email-meta { font-size: 0.875rem; color: #6b7280; line-height: 1.6; }
.email-card .email-meta strong { color: #111827; }
.email-card .email-body { margin-top: 12px; padding: 12px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 4px; }
.email-card .email-actions { margin-top: 12px; display: flex; gap: 8px; }

/* ===== Dashboard Charts ===== */
.funnel-bar { padding: 12px 16px; border-radius: 6px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.funnel-bar .funnel-label { font-size: 0.875rem; font-weight: 500; }
.funnel-bar .funnel-value { font-size: 1.125rem; font-weight: 700; }
.rate-card { text-align: center; padding: 16px; }
.rate-card .rate-value { font-size: 2rem; font-weight: 700; }
.rate-card .rate-label { font-size: 0.8rem; color: #6b7280; margin-top: 4px; }

/* ===== Action Menu ===== */
.action-menu { position: relative; }
.action-menu-btn { background: none; border: none; color: #2563eb; cursor: pointer; font-size: 1.2rem; padding: 4px 8px; }
.action-dropdown { position: absolute; right: 0; z-index: 30; margin-top: 4px; width: 192px; background: #fff; border-radius: 6px; box-shadow: 0 10px 15px rgba(0,0,0,0.1); border: 1px solid #e5e7eb; display: none; }
.action-dropdown.show { display: block; }
.action-dropdown button { display: block; width: 100%; text-align: left; padding: 8px 16px; font-size: 0.875rem; color: #374151; background: none; border: none; cursor: pointer; }
.action-dropdown button:hover { background: #f3f4f6; }

/* ===== Checkbox ===== */
input[type="checkbox"] { width: 16px; height: 16px; border-radius: 4px; border: 1px solid #d1d5db; cursor: pointer; accent-color: #2563eb; }

/* ===== Radio ===== */
.radio-group { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.radio-group input[type="radio"] { width: 16px; height: 16px; accent-color: #2563eb; }

/* ===== Tabs ===== */
.tab-bar { display: flex; border-bottom: 1px solid #e5e7eb; margin-bottom: 24px; }
.tab-btn { padding: 8px 16px; font-size: 0.875rem; font-weight: 500; border: none; background: none; cursor: pointer; border-bottom: 2px solid transparent; color: #6b7280; }
.tab-btn.active { color: #2563eb; border-bottom-color: #2563eb; }

/* ===== Flex helpers ===== */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.text-muted { color: #6b7280; font-size: 0.875rem; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ===== Mirror Info ===== */
.mirror-info { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 6px; padding: 12px; font-size: 0.875rem; color: #1e40af; margin-bottom: 16px; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .content-with-sidebar { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar { width: 56px; }
  .sidebar .nav-label, .sidebar-brand-name, .sidebar-brand-sub,
  .nav-section-label, .nav-divider, .sidebar-user-info, .nav-badge { display: none; }
  .sidebar-brand { justify-content: center; padding: 12px 8px; }
  .nav-item { justify-content: center; padding: 8px; }
  .sidebar-user { justify-content: center; padding: 8px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ===== Outlook-style Inbox ===== */

/* Override main-content padding for mailhog tab */
#tab-mailhog { margin: -24px; height: calc(100vh - 0px); flex-direction: column; padding: 0; }

.inbox-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; background: #fff;
  border-bottom: 1px solid #e5e7eb; flex-shrink: 0;
}
.inbox-toolbar-left { display: flex; align-items: center; gap: 8px; }

.inbox-shell {
  display: flex; flex: 1; overflow: hidden; height: 100%;
}

/* Left pane — email list */
.inbox-list-pane {
  width: 320px; flex-shrink: 0;
  border-right: 1px solid #e5e7eb;
  background: #fff; display: flex; flex-direction: column;
  overflow: hidden;
}
.inbox-list-header {
  padding: 10px 16px; border-bottom: 1px solid #e5e7eb;
  background: #f9fafb; flex-shrink: 0;
}
.inbox-list {
  flex: 1; overflow-y: auto;
}

/* Email row in list */
.inbox-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.1s;
}
.inbox-row:hover { background: #f9fafb; }
.inbox-row.selected { background: #eff6ff; border-left: 3px solid #2563eb; }
.inbox-row.unread .inbox-row-from { font-weight: 700; color: #111827; }
.inbox-row.unread .inbox-row-subject { font-weight: 600; color: #111827; }
.inbox-row.read .inbox-row-from { font-weight: 500; color: #374151; }
.inbox-row.read .inbox-row-subject { font-weight: 400; color: #6b7280; }

.inbox-row-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: #dbeafe; color: #1d4ed8;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; flex-shrink: 0;
}
.inbox-row-body { flex: 1; min-width: 0; }
.inbox-row-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.inbox-row-from { font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.inbox-row-time { font-size: 0.7rem; color: #9ca3af; flex-shrink: 0; }
.inbox-row-subject { font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
.inbox-row-preview { font-size: 0.72rem; color: #9ca3af; display: flex; align-items: center; gap: 4px; }

/* Status dots */
.inbox-status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.inbox-dot-green  { background: #22c55e; }
.inbox-dot-blue   { background: #3b82f6; }
.inbox-dot-yellow { background: #f59e0b; }
.inbox-dot-red    { background: #ef4444; }
.inbox-dot-gray   { background: #d1d5db; }

/* Right pane — email detail */
.inbox-detail-pane {
  flex: 1; overflow-y: auto; background: #fff;
}
.inbox-detail {
  height: 100%;
}

/* Empty state */
.inbox-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 48px 24px; text-align: center;
  height: 100%;
}

/* Detail header */
.detail-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}
.detail-subject {
  font-size: 1.2rem; font-weight: 700; color: #111827; margin-bottom: 12px;
}
.detail-meta-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
}
.detail-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: #dbeafe; color: #1d4ed8;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem; flex-shrink: 0;
}
.detail-from, .detail-to { font-size: 0.85rem; color: #374151; }
.detail-timestamp { margin-left: auto; font-size: 0.8rem; color: #9ca3af; }
.detail-status-row { font-size: 0.85rem; color: #6b7280; display: flex; align-items: center; gap: 8px; }

/* Detail body */
.detail-body {
  padding: 24px;
  font-size: 0.9rem; line-height: 1.7; color: #374151;
  border-bottom: 1px solid #f3f4f6;
  background: #fafafa;
}

/* Tracking actions */
.detail-actions {
  padding: 16px 24px;
}
.detail-actions-title {
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: #6b7280; margin-bottom: 12px;
}
.detail-actions-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ===== User Guide ===== */
.guide-step {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #f3f4f6;
}
.guide-step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.guide-step-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 6px;
}
.guide-step-desc {
  font-size: 0.825rem;
  color: #4b5563;
  line-height: 1.65;
}
.guide-tip {
  margin-top: 8px;
  font-size: 0.775rem;
  color: #6b7280;
  background: #f9fafb;
  border-left: 3px solid #d1d5db;
  padding: 6px 10px;
  border-radius: 0 4px 4px 0;
}
.guide-tip code {
  background: #e5e7eb;
  padding: 1px 5px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 0.8rem;
}
