/* ==========================================================================
   MeuRastreioMaster - Mantis Design System (Ant Design + Material-UI Standard)
   Inspired by CodedThemes Mantis React Admin Template
   ========================================================================== */

:root {
  /* Light Theme (Mantis Official Preset Default) */
  --bg-app: #fafafb;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f5f5f5;
  --bg-subtle: #fafafa;
  --bg-input: #ffffff;

  --border: #e6ebf1;
  --border-subtle: #f0f0f0;
  --border-focus: #1677ff;

  --text-main: #262626;
  --text-secondary: #8c8c8c;
  --text-muted: #bfbfbf;

  --primary: #1677ff;
  --primary-hover: #4096ff;
  --primary-active: #0958d9;
  --primary-lighter: #e6f4ff;

  /* Semantic Status Colors (Ant Design System) */
  --status-pending: #8c8c8c;
  --status-transit: #1677ff;
  --status-customs: #722ed1;
  --status-delivery: #13c2c2;
  --status-delivered: #52c41a;
  --status-alert: #ff4d4f;

  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;

  /* Mantis Custom Shadows */
  --shadow-card: 0px 1px 4px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0px 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-modal: 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12);
  --shadow-button: 0 2px 0 rgba(0, 0, 0, 0.043);
  --shadow-focus: 0 0 0 2px rgba(22, 119, 255, 0.2);
}

[data-theme="dark"] {
  /* Dark Theme (Mantis Dark Mode Option) */
  --bg-app: #111936;
  --bg-surface: #1a223f;
  --bg-surface-hover: #212c4f;
  --bg-subtle: #151e3d;
  --bg-input: #111936;

  --border: #283252;
  --border-subtle: #1e2846;
  --border-focus: #1677ff;

  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --primary: #1677ff;
  --primary-hover: #4096ff;
  --primary-active: #0958d9;
  --primary-lighter: #162a4d;

  --status-pending: #94a3b8;
  --status-transit: #60a5fa;
  --status-customs: #c084fc;
  --status-delivery: #2dd4bf;
  --status-delivered: #4ade80;
  --status-alert: #f87171;

  --shadow-card: 0px 1px 4px rgba(0, 0, 0, 0.25);
  --shadow-card-hover: 0px 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-modal: 0 16px 32px rgba(0, 0, 0, 0.5);
  --shadow-button: none;
  --shadow-focus: 0 0 0 2px rgba(22, 119, 255, 0.3);
}

/* Base Reset & Mantis Typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.57;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Layout */
.app-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
}

/* ==========================================================================
   Header (Mantis Navigation Bar)
   ========================================================================== */
.app-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  height: 60px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.2px;
  white-space: nowrap;
}

/* Navigation Tabs (Ant Design Line Tabs Style) */
.dashboard-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--primary);
  background-color: var(--bg-surface-hover);
}

.nav-tab.active {
  color: var(--primary);
  background-color: var(--primary-lighter);
  font-weight: 600;
}

.nav-tab i {
  font-size: 16px;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-mobile-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Buttons (Ant Design / Mantis MUI Button Style) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: var(--primary);
  color: #ffffff;
  border: 1px solid var(--primary);
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-button);
  transition: all 0.2s ease;
}

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

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-button);
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--bg-surface);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ghost:hover {
  color: var(--text-main);
  background-color: var(--bg-surface-hover);
}

.btn-ghost.btn-sm {
  padding: 4px 8px;
  font-size: 12px;
}

.btn-square {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--radius-sm);
}

.btn-full {
  width: 100%;
}

.btn-icon-subtle {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-icon-subtle:hover {
  color: var(--primary);
  background-color: var(--bg-surface-hover);
}

.btn-icon-subtle.btn-delete:hover {
  color: var(--status-alert);
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  transition: all 0.15s ease;
}

.link-btn:hover {
  background-color: var(--primary-lighter);
  text-decoration: none;
}

/* ==========================================================================
   Metrics Bar (Mantis AnalyticEcommerce KPI Cards)
   ========================================================================== */
.metrics-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metric-item {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
}

.metric-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-card-hover);
}

.metric-item.active {
  border-color: var(--primary);
  background-color: var(--bg-surface);
  box-shadow: 0 0 0 1px var(--primary);
}

.metric-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: capitalize;
}

.metric-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.metric-divider {
  display: none;
}

/* ==========================================================================
   Toolbar & Segmented Filters (Ant Design Radio / Input Style)
   ========================================================================== */
.dashboard-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box {
  position: relative;
  width: 280px;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
}

.search-box input {
  width: 100%;
  height: 34px;
  padding: 6px 30px 6px 32px;
  background-color: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
}

.search-box input:focus {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.btn-clear-search {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-clear-search:hover {
  color: var(--text-main);
}

/* Segmented Control (Ant Design Group Style) */
.segmented-control {
  display: flex;
  align-items: center;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.segment-btn {
  background: transparent;
  border: none;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

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

.segment-btn.active {
  background-color: var(--bg-surface);
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   Data Table (Ant Design Table Style)
   ========================================================================== */
.table-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

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

.data-table thead tr {
  background-color: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}

.data-table th {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.15s ease;
}

.data-table tbody tr:hover {
  background-color: var(--bg-surface-hover);
}

.data-table td {
  padding: 12px 16px;
  color: var(--text-main);
  vertical-align: middle;
}

.cell-title {
  font-weight: 600;
  color: var(--text-main);
}

.cell-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* Badges & Status Typographic (Ant Design Standard) */
.mono-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-main);
  background-color: var(--bg-subtle);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  display: inline-block;
}

.status-text-item {
  font-size: 13px;
  font-weight: 500;
}

.status-text-item.status-transit { color: var(--status-transit); }
.status-text-item.status-customs { color: var(--status-customs); }
.status-text-item.status-delivery { color: var(--status-delivery); }
.status-text-item.status-delivered { color: var(--status-delivered); }
.status-text-item.status-pending { color: var(--status-pending); }
.status-text-item.status-alert { color: var(--status-alert); }

/* Empty State */
.empty-state {
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.empty-state.hidden {
  display: none;
}

.empty-icon {
  font-size: 36px;
  color: var(--text-muted);
}

.empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.empty-desc {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 360px;
}

/* ==========================================================================
   Analytics View
   ========================================================================== */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.analytics-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.analytics-card-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.analytics-card-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
}

.carrier-stats-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.carrier-stats-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.carrier-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
}

.carrier-row:last-child {
  border-bottom: none;
}

.carrier-name {
  font-weight: 500;
  color: var(--text-main);
}

.carrier-count {
  font-weight: 600;
  color: var(--primary);
}

/* ==========================================================================
   Public Tracking View (Mantis Minimalist Public Card)
   ========================================================================== */
.public-track-container {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 780px;
  margin: 20px auto;
  box-shadow: var(--shadow-card);
}

.public-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.public-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 4px;
}

.public-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.pub-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Stepper / Timeline (Ant Design Steps & Timeline Standard) */
.stages-tracker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  position: relative;
}

.stage-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 2;
  flex: 1;
  text-align: center;
}

.stage-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.stage-step.active .stage-name {
  color: var(--primary);
  font-weight: 600;
}

.stage-bar {
  flex: 1;
  height: 2px;
  background-color: var(--border);
  margin: 0 -4px;
  position: relative;
  top: -10px;
  z-index: 1;
  transition: background-color 0.2s ease;
}

.stage-bar.active {
  background-color: var(--primary);
}

/* Timeline Events List (Ant Design Timeline) */
.events-section {
  margin-top: 20px;
}

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

.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.events-timeline {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 20px;
}

.events-timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background-color: var(--border-subtle);
}

.timeline-event-item {
  position: relative;
  padding-bottom: 20px;
}

.timeline-event-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -20px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--bg-surface);
  border: 2px solid var(--border);
  z-index: 2;
}

.timeline-event-item.latest .timeline-dot {
  border-color: var(--primary);
  background-color: var(--primary);
}

.timeline-event-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.timeline-event-time {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
}

.timeline-event-desc {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.4;
}

.timeline-event-orig {
  font-size: 11px;
  color: var(--text-muted);
  font-style: normal;
}

.timeline-event-location {
  font-size: 11px;
  color: var(--text-secondary);
}

/* ==========================================================================
   Modals (Ant Design Modal Standard)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  backdrop-filter: blur(2px);
}

.modal-overlay.hidden {
  display: none;
}

.modal-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  animation: modalFadeIn 0.2s ease-out;
}

.modal-lg {
  max-width: 680px;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: var(--radius-xs);
  transition: all 0.15s ease;
}

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

.modal-body {
  padding: 20px;
}

.modal-content.timeline-content {
  padding: 20px;
  max-height: 65vh;
  overflow-y: auto;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background-color: var(--bg-subtle);
}

.modal-actions-between {
  justify-content: space-between;
}

.ext-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  height: 36px;
  padding: 6px 12px;
  background-color: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
}

.form-group input:focus {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
}

.form-help {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==========================================================================
   Toast Notifications (Ant Design Notification / Message)
   ========================================================================== */
.toast-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}

.toast {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-modal);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.2s ease-out;
}

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

.toast.toast-success { border-left: 3px solid var(--status-delivered); }
.toast.toast-error { border-left: 3px solid var(--status-alert); }
.toast.toast-info { border-left: 3px solid var(--primary); }

/* ==========================================================================
   Footer
   ========================================================================== */
.app-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
}

.footer-meta {
  color: var(--text-muted);
}

/* ==========================================================================
   Bottom Navigation Bar (Mobile Only)
   ========================================================================== */
.bottom-nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 999;
  padding: 0 8px;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  flex: 1;
  height: 100%;
  transition: color 0.15s ease;
}

.bottom-nav-item i {
  font-size: 18px;
}

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

.bottom-nav-action {
  position: relative;
  top: -6px;
}

.bottom-action-circle {
  width: 36px;
  height: 36px;
  background-color: var(--primary);
  color: #ffffff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
  transition: background-color 0.15s ease;
}

.bottom-nav-action:hover .bottom-action-circle {
  background-color: var(--primary-hover);
}

/* ==========================================================================
   Public Shared View Mode (Pure Clean Read-Only Mode)
   ========================================================================== */
body.is-public-mode .bottom-nav-bar,
body.is-public-mode .dashboard-nav,
body.is-public-mode #open-add-modal-btn,
body.is-public-mode #mobile-add-btn,
body.is-public-mode #mobile-menu-btn,
body.is-public-mode #mobile-menu-drawer,
body.is-public-mode #api-status-badge,
body.is-public-mode .divider-v {
  display: none !important;
}

body.is-public-mode .app-main {
  padding-bottom: 24px !important;
}

/* ==========================================================================
   Mobile Responsive Rules
   ========================================================================== */
.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: flex;
  }

  .app-main {
    padding: 16px 16px 80px 16px;
  }

  .metrics-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .analytics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .toolbar-left, .toolbar-right {
    width: 100%;
  }

  .search-box {
    width: 100%;
  }

  .segmented-control {
    width: 100%;
    overflow-x: auto;
  }

  .public-track-container {
    padding: 18px;
    margin: 10px auto;
  }

  .footer-inner {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }

  /* Drawer Mobile */
  .mobile-drawer {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-modal);
    z-index: 99;
  }

  .mobile-drawer.hidden {
    display: none;
  }

  .mobile-drawer-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: left;
  }

  .mobile-nav-item.active {
    background-color: var(--primary-lighter);
    color: var(--primary);
    font-weight: 600;
  }
}
