/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/.pnpm/next@15.5.12_@babel+core@7.29.0_@opentelemetry+api@1.9.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!../../node_modules/.pnpm/next@15.5.12_@babel+core@7.29.0_@opentelemetry+api@1.9.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./src/app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* uwibo — Mobile-first base styles */

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

:root {
  /* Brand colors — uwibo blue */
  --color-primary: #1A6FED;
  --color-primary-hover: #1558CC;
  --color-primary-light: #EBF2FE;

  /* Neutral */
  --color-bg: #FFFFFF;
  --color-bg-secondary: #F8F9FA;
  --color-text: #1A1A2E;
  --color-text-secondary: #6B7280;
  --color-text-tertiary: #9CA3AF;
  --color-border: #E5E7EB;
  --color-border-light: #F3F4F6;

  /* Semantic */
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-error: #EF4444;
  --color-info: #3B82F6;

  /* Trust levels */
  --color-trust-good: #10B981;
  --color-trust-normal: #6B7280;
  --color-trust-poor: #EF4444;

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans TC', sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

  /* Layout */
  --bottom-nav-height: 64px;
  --header-height: 56px;
  --max-content-width: 480px;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100dvh;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  font: inherit;
  border: none;
  outline: none;
}

/* ─── Utility classes ──────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: 12px var(--spacing-lg);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--font-size-base);
  transition: background-color 0.15s, opacity 0.15s;
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

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

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

.btn-ghost {
  background: transparent;
  color: var(--color-primary);
}

.btn-danger {
  background: var(--color-error);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #DC2626;
}

.input-field {
  width: 100%;
  padding: 14px var(--spacing-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  background: var(--color-bg);
  transition: border-color 0.15s;
}

.input-field:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.input-field.error {
  border-color: var(--color-error);
}

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-sm);
}

/* ─── Trust level badges ──────────────────────────────────────────────── */

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
}

.trust-good {
  background: #ECFDF5;
  color: var(--color-trust-good);
}

.trust-normal {
  background: #F3F4F6;
  color: var(--color-trust-normal);
}

.trust-poor {
  background: #FEF2F2;
  color: var(--color-trust-poor);
}

/* ─── Status badges ──────────────────────────────────────────────────── */

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 500;
}

.status-waiting { background: #FEF3C7; color: #92400E; }
.status-called  { background: #DBEAFE; color: #1E40AF; }
.status-seated  { background: #ECFDF5; color: #065F46; }
.status-done    { background: #F3F4F6; color: #374151; }
.status-cancelled { background: #FEE2E2; color: #991B1B; }

/* ─── Bottom Navigation ──────────────────────────────────────────────── */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: var(--color-bg);
  border-top: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 100;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: var(--font-size-xs);
  color: var(--color-text-tertiary);
  padding: var(--spacing-sm);
  min-width: 64px;
}

.bottom-nav-item.active {
  color: var(--color-primary);
}

.bottom-nav-icon {
  width: 24px;
  height: 24px;
}

/* ─── Page padding for bottom nav ────────────────────────────────────── */

.page-with-nav {
  padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0) + var(--spacing-md));
}

/* ─── Header ─────────────────────────────────────────────────────────── */

.page-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  height: var(--header-height);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  padding: 0 var(--spacing-md);
  z-index: 50;
}

.page-header h1 {
  font-size: var(--font-size-lg);
  font-weight: 700;
}

/* ─── Loading spinner ────────────────────────────────────────────────── */

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

.loading-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
}

/* ─── Empty state ────────────────────────────────────────────────────── */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-2xl) var(--spacing-md);
  text-align: center;
  color: var(--color-text-secondary);
  gap: var(--spacing-sm);
}

/* ─── Skeleton loader ────────────────────────────────────────────────── */

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 50%, #F3F4F6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}

/* ─── OTP digit boxes ────────────────────────────────────────────────── */

.otp-input {
  width: 44px;
  height: 52px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-xl);
  font-weight: 700;
  text-align: center;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.otp-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
  outline: none;
}

.otp-input.filled {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.otp-input.error {
  border-color: var(--color-error);
}

/* ─── Notification badge ─────────────────────────────────────────────── */

.notif-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-error);
  border: 2px solid var(--color-bg);
}

/* ─── Progress bar ───────────────────────────────────────────────────── */

.progress-bar-track {
  width: 100%;
  height: 6px;
  background: var(--color-border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  transition: width 0.4s ease;
}

/* ─── Category chip ──────────────────────────────────────────────────── */

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 500;
  background: var(--color-bg-secondary);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
}

.chip.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* ─── Divider ────────────────────────────────────────────────────────── */

.divider {
  height: 1px;
  background: var(--color-border-light);
  margin: var(--spacing-md) 0;
}

/* ─── Section header ─────────────────────────────────────────────────── */

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-md);
}

.section-title {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--color-text);
}

/* ─── Responsive ─────────────────────────────────────────────────────── */

@media (min-width: 768px) {
  :root {
    --max-content-width: 640px;
  }
}

/* ─── AI Agent FAB ──────────────────────────────────────────────────── */

.agent-fab {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0) + var(--spacing-md));
  right: var(--spacing-md);
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(26, 111, 237, 0.35);
  z-index: 200;
  transition: transform 0.15s, box-shadow 0.15s;
}

.agent-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(26, 111, 237, 0.45);
}

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

/* ─── AI Agent Chat Overlay ─────────────────────────────────────────── */

.agent-chat-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
}

@media (min-width: 768px) {
  .agent-chat-overlay {
    top: auto;
    left: auto;
    right: var(--spacing-md);
    bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0) + var(--spacing-md));
    width: 400px;
    height: 600px;
    max-height: calc(100dvh - var(--bottom-nav-height) - 40px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border-light);
  }
}

/* Header */
.agent-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--color-border-light);
  flex-shrink: 0;
}

.agent-chat-header-title {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-weight: 700;
  font-size: var(--font-size-base);
  color: var(--color-primary);
}

.agent-chat-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--color-text-secondary);
  transition: background 0.15s;
}

.agent-chat-close:hover {
  background: var(--color-bg-secondary);
}

/* Messages area */
.agent-chat-messages {
  flex: 1 1;
  overflow-y: auto;
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.agent-chat-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  font-size: var(--font-size-sm);
  line-height: 1.5;
  word-break: break-word;
}

.agent-chat-bubble p {
  margin: 0;
}

.agent-chat-bubble-user {
  align-self: flex-end;
  background: var(--color-primary);
  color: white;
  border-bottom-right-radius: var(--spacing-xs);
}

.agent-chat-bubble-assistant {
  align-self: flex-start;
  background: var(--color-bg-secondary);
  color: var(--color-text);
  border-bottom-left-radius: var(--spacing-xs);
}

/* Thinking dots */
.agent-chat-thinking {
  display: flex;
  align-items: center;
}

.agent-chat-dots {
  display: inline-flex;
  gap: 4px;
}

.agent-chat-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-text-tertiary);
  animation: agent-dot-bounce 1.2s infinite ease-in-out;
}

.agent-chat-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.agent-chat-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes agent-dot-bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

/* Suggestion chips */
.agent-chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  margin-top: var(--spacing-sm);
}

/* Input bar */
.agent-chat-input-bar {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  border-top: 1px solid var(--color-border-light);
  flex-shrink: 0;
  padding-bottom: calc(var(--spacing-sm) + env(safe-area-inset-bottom, 0));
}

@media (min-width: 768px) {
  .agent-chat-input-bar {
    padding-bottom: var(--spacing-sm);
  }
}

.agent-chat-input {
  flex: 1 1;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color 0.15s;
}

.agent-chat-input:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 2px var(--color-primary-light);
}

.agent-chat-voice-btn,
.agent-chat-send-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--color-text-secondary);
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.agent-chat-voice-btn:hover,
.agent-chat-send-btn:hover:not(:disabled) {
  background: var(--color-bg-secondary);
  color: var(--color-primary);
}

.agent-chat-voice-btn.active {
  color: var(--color-error);
  background: #FEE2E2;
}

.agent-chat-send-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ─── Action Confirmation Card ──────────────────────────────────────── */

.agent-action-confirm {
  margin-top: var(--spacing-sm);
  padding: var(--spacing-md);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.agent-action-confirm-header {
  margin-bottom: var(--spacing-sm);
}

.agent-action-confirm-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.agent-action-confirm-details {
  margin: 0 0 var(--spacing-sm);
}

.agent-action-confirm-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: var(--font-size-sm);
}

.agent-action-confirm-row dt {
  color: var(--color-text-secondary);
}

.agent-action-confirm-row dd {
  font-weight: 600;
  color: var(--color-text);
}

.agent-action-confirm-buttons {
  display: flex;
  gap: var(--spacing-sm);
}

.agent-action-btn {
  flex: 1 1;
  padding: 8px var(--spacing-md);
  font-size: var(--font-size-sm);
}

