/* Global Reset & Typography */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --bg-card: #f8fafc;
  --bg-page: #f1f5f9;
  --badge-orange-bg: #fef3c7;
  --badge-orange-text: #b45309;
  --badge-green-bg: #dcfce7;
  --badge-green-text: #15803d;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --radius: 14px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  height: 100vh;
  height: 100dvh;
  overflow: hidden; /* Lock root window scrolling */
  touch-action: manipulation;
  overscroll-behavior-y: none;
}

/* App Container */
.app-container {
  max-width: 680px;
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Header */
.app-header {
  flex-shrink: 0;
  z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Frozen Page Sub-header (Across All Views) */
.page-sticky-header {
  flex-shrink: 0;
  background: #ffffff;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  z-index: 30;
  margin: 0;
  position: static;
}

.page-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
  margin: 0;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-badge {
  font-size: 0.72rem;
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

/* Main Content Views */
.view-section {
  display: none;
  padding: 0;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.view-section.active {
  display: flex !important;
}

/* Scrollable Content inside each view */
.view-scroll-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 16px;
  padding-bottom: 84px; /* Space for bottom navigation on mobile */
  box-sizing: border-box;
}

/* Bottom Navigation (Mobile Friendly) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  z-index: 40;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 500;
  border: none;
  background: none;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
  transition: all 0.2s;
  user-select: none;
  -webkit-user-select: none;
}

.nav-item .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.nav-item svg,
.nav-item .icon svg {
  width: 22px !important;
  height: 22px !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  display: block !important;
  flex-shrink: 0;
}

.nav-item.active {
  color: var(--primary) !important;
  font-weight: 700;
}

.nav-item.active svg,
.nav-item.active .icon svg {
  stroke: var(--primary) !important;
}

/* Buttons & Inputs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-success {
  background: #16a34a;
  color: #ffffff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
}

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

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  background: #ffffff;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Photo Input Box */
.upload-card {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 16px;
}

.upload-card:hover {
  border-color: var(--primary);
  background: #f0f7ff;
}

.upload-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

/* ==============================================================
   INVOICE TEMPLATE (Replicates User's Reference Image Exactly)
   ============================================================== */
.invoice-wrapper {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 24px 20px;
  margin: 16px 0;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

/* Header */
.invoice-store-name {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #0f172a;
}

.invoice-store-sub {
  text-align: center;
  font-size: 0.85rem;
  color: #475569;
  margin-top: 2px;
}

/* Title & Status (Giãn thêm 20px trên và dưới) */
.invoice-title-block {
  text-align: center;
  margin: 38px 0 34px;
}

.invoice-title {
  color: var(--primary);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.invoice-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.invoice-badge-unpaid {
  display: inline-block;
  background: var(--badge-orange-bg);
  color: var(--badge-orange-text);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-top: 8px;
  letter-spacing: 0.3px;
}

.invoice-badge-paid {
  display: inline-block;
  background: var(--badge-green-bg);
  color: var(--badge-green-text);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-top: 8px;
  letter-spacing: 0.3px;
}

/* Customer Section (Giãn cách trên dưới) */
.invoice-customer-section {
  padding-top: 18px;
  margin-bottom: 6px;
}

.invoice-section-title {
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.invoice-customer-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 2px;
}

.invoice-customer-detail {
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.4;
  margin-top: 2px;
}

/* Items List - Card Based */
.invoice-items-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.invoice-item-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid #f1f5f9;
}

.item-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

.item-name {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #0f172a;
  letter-spacing: 0.2px;
}

.item-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.item-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

.item-qty-price {
  font-size: 0.85rem;
  color: #475569;
}

.item-total-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary);
}

/* Calculation Breakdown */
.invoice-calc-section {
  border-top: 1px solid #f1f5f9;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: #475569;
}

.calc-row .val {
  font-weight: 700;
  color: #1e293b;
}

.calc-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 6px 0;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.total-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.total-amount {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--primary);
}

.amount-in-words {
  text-align: right;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 2px;
}

/* VietQR Section */
.invoice-qr-section {
  text-align: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

.invoice-qr-image {
  max-width: 220px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.invoice-qr-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Footer Watermark */
.invoice-footer-watermark {
  text-align: center;
  margin-top: 20px;
  font-size: 0.72rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* Modals */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  max-height: 90vh;
  overflow-y: auto;
}

/* Modal with Frozen Header and Scrollable Body */
.modal-fixed-header-dialog {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  padding: 0 !important;
}

.modal-fixed-header-dialog .modal-header {
  flex-shrink: 0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
  margin-bottom: 0;
  z-index: 10;
}

.modal-scroll-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 16px 18px 20px;
  box-sizing: border-box;
}

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

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.btn-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
}

/* Countdown Alert Box (for Free Tier AI) */
.countdown-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  color: #92400e;
}

.countdown-digits {
  font-size: 2.2rem;
  font-weight: 900;
  color: #b45309;
  margin: 10px 0;
}

/* Table / List Cards */
.history-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s;
}

.history-card:hover {
  border-color: var(--primary);
  background: #f8fafc;
}

/* ==============================================================
   TOP ACTION BUTTONS & VOICE RECORDING STATION
   ============================================================== */
/* Screen Lock for "Tạo Đơn" Tab */
body.tab-create-active {
  overflow: hidden !important;
  height: 100vh !important;
  height: 100dvh !important;
  touch-action: manipulation;
  overscroll-behavior-y: none;
  padding-bottom: 0 !important;
}

body.tab-create-active .app-container {
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
  padding-bottom: 72px !important; /* Đảm bảo đáy cách thanh bottom-nav khoảng trống an toàn */
  box-sizing: border-box;
}

#view-create {
  display: none;
  flex-direction: column;
  padding: 10px 16px 12px;
  flex: 1;
  min-height: 0;
  overflow: hidden !important;
  overscroll-behavior: none;
  box-sizing: border-box;
  position: relative;
}

#view-create.active {
  display: flex !important;
}

#view-create .page-sticky-header {
  position: static;
  margin: -10px -16px 0 -16px;
  padding: 8px 16px 10px;
  flex-shrink: 0;
}

/* Container gom toàn bộ chức năng chụp ảnh / upload và ghi âm vào center theo chiều vertical */
.create-actions-wrapper {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Đưa các chức năng vào center theo chiều vertical của trang */
  align-items: center;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  gap: 16px;
}

.top-action-bar {
  display: flex;
  gap: 12px;
  width: 100%;
  margin-bottom: 0;
  flex-shrink: 0;
}

.btn-top-action {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  background: #ffffff;
  color: #1e293b;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.btn-top-action:active {
  transform: scale(0.97);
  background: #f1f5f9;
  border-color: var(--primary);
}

.btn-top-action svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
  flex-shrink: 0;
}

/* Khung chức năng ghi âm: bao gọn gàng khu vực micro, không tràn xuống bottom */
.voice-station-hero {
  background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
  border: 1.5px solid #bfdbfe;
  border-radius: 20px;
  padding: 20px 18px 18px;
  text-align: center;
  box-shadow: 0 4px 18px -2px rgba(37, 99, 235, 0.08);
  margin-bottom: 0;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.voice-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 20px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: #2563eb;
  border-radius: 50%;
  animation: pulseDot 1.5s infinite;
}

.voice-headline {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
  flex-shrink: 0;
}

.voice-subtext {
  font-size: 0.82rem;
  color: #64748b;
  max-width: 320px;
  margin: 0 auto 12px;
  line-height: 1.4;
  flex-shrink: 0;
}

.voice-status-hint {
  font-size: 0.88rem;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 10px;
  transition: all 0.2s;
  min-height: 20px;
  flex-shrink: 0;
}

.voice-status-hint.recording {
  color: #dc2626;
  animation: blinkText 1s infinite;
}

.voice-btn-wrapper {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.voice-record-btn {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #ffffff;
  border: 4px solid #ffffff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  transition: all 0.15s ease-out;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  z-index: 5;
}

.voice-record-btn.recording {
  transform: scale(1.08);
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.5);
  animation: hapticVibrate 0.15s infinite;
}

.voice-record-btn svg {
  width: 36px;
  height: 36px;
}

.voice-ripple-rings {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

.voice-record-btn.recording ~ .voice-ripple-rings {
  animation: rippleRings 1.5s ease-out infinite;
  border: 3px solid rgba(239, 68, 68, 0.5);
}

.voice-timer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  flex-shrink: 0;
}

.voice-timer-text {
  font-size: 1.15rem;
  font-weight: 800;
  color: #dc2626;
  font-variant-numeric: tabular-nums;
}

.sound-wave-bars {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 20px;
}

.sound-wave-bars .bar {
  width: 4px;
  height: 8px;
  background: #ef4444;
  border-radius: 4px;
  animation: soundwave 1s ease-in-out infinite;
}
.sound-wave-bars .bar:nth-child(2) { animation-delay: 0.15s; }
.sound-wave-bars .bar:nth-child(3) { animation-delay: 0.3s; }
.sound-wave-bars .bar:nth-child(4) { animation-delay: 0.45s; }
.sound-wave-bars .bar:nth-child(5) { animation-delay: 0.6s; }

/* Secondary Compact Dropzone (Chỉ hiện trên PC, ẩn hoàn toàn trên Mobile) */
.dropzone-compact {
  display: none !important;
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  padding: 12px;
  text-align: center;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 600;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 10px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.dropzone-compact:hover {
  border-color: var(--primary);
  background: #eff6ff;
  color: var(--primary);
}

.dropzone-compact svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Hiển thị Dropzone trên PC / Desktop */
@media (min-width: 768px) {
  .dropzone-compact {
    display: flex !important;
  }
}

/* Overlay Loading State for View Create */
#ocrLoadingIndicator {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 20px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 30;
  text-align: center;
  padding: 24px;
  box-sizing: border-box;
}

/* Floating Action Button (FAB) for Invoice Preview */
.floating-preview-fab {
  position: fixed;
  bottom: 76px;
  right: 20px;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  border-radius: 30px;
  padding: 12px 20px;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-preview-fab:active {
  transform: scale(0.95);
}

.floating-preview-fab svg {
  width: 20px;
  height: 20px;
}

/* Preview Modal Dialog */
.preview-modal-dialog {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  margin: auto;
}

.preview-modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}

.preview-modal-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  background: #f1f5f9;
}

.preview-modal-footer {
  padding: 14px 18px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 10px;
  background: #ffffff;
}

.btn-copy-text {
  font-size: 0.76rem;
  padding: 2px 8px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #86efac;
  color: #166534;
  font-weight: 600;
  cursor: pointer;
}

@keyframes soundwave {
  0%, 100% { height: 6px; }
  50% { height: 22px; }
}

@keyframes rippleRings {
  0% { transform: scale(0.9); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

@keyframes hapticVibrate {
  0% { transform: translate(0, 0) scale(1.1); }
  25% { transform: translate(-1px, 1px) scale(1.1); }
  50% { transform: translate(1px, -1px) scale(1.1); }
  75% { transform: translate(-1px, -1px) scale(1.1); }
  100% { transform: translate(0, 0) scale(1.1); }
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes blinkText {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ==============================================================
   MICROPHONE PERMISSION MODAL & BANNER STYLES
   ============================================================== */
.mic-denied-banner {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  color: #dc2626;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  animation: pulseWarning 2s infinite;
  transition: all 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.mic-denied-banner:hover {
  background: #fee2e2;
  border-color: #ef4444;
}

@keyframes pulseWarning {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.92; transform: scale(0.99); }
}

.os-tabs-nav {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 14px;
}

.os-tab-btn {
  flex: 1;
  padding: 8px 6px;
  font-size: 0.78rem;
  font-weight: 700;
  border: none;
  background: transparent;
  color: #64748b;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.os-tab-btn.active {
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.guide-method-title {
  font-size: 0.86rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}

.guide-step-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.guide-step-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #334155;
}

.guide-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 800;
  font-size: 0.76rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.guide-badge-highlight {
  display: inline-block;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 1px 6px;
  border-radius: 6px;
  font-weight: 700;
  color: #0f172a;
  font-size: 0.82rem;
}

/* ==============================================================
   PWA UPDATE NOTIFICATION BANNER
   ============================================================== */
.pwa-update-banner {
  position: fixed;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 460px;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 14px;
  border-radius: 14px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 95;
  animation: slideUpUpdate 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

@keyframes slideUpUpdate {
  from {
    transform: translate(-50%, 40px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

.pwa-update-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  animation: pulseDot 2s infinite;
}

.pwa-update-content {
  flex: 1;
  min-width: 0;
}

.pwa-update-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}

.pwa-update-desc {
  font-size: 0.74rem;
  color: #94a3b8;
  margin-top: 2px;
  line-height: 1.35;
}

.pwa-update-btn {
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.pwa-update-btn:hover {
  background: #1d4ed8;
}

.pwa-update-btn:active {
  transform: scale(0.96);
}

.pwa-update-close {
  background: none;
  border: none;
  color: #64748b;
  font-size: 1rem;
  padding: 4px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.pwa-update-close:hover {
  color: #ffffff;
}
