/* ==========================================================================
   Protótipo Interativo — Jusbrasil × Nubank
   Fase 1: Lock Screen | Fase 2: App Nubank | Fase 3: App Jusbrasil
   ========================================================================== */

/* ---------- Reset & Page ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Device Float Effect ---------- */
.device-iphone-14-pro {
  filter: drop-shadow(0 24px 80px rgba(0, 0, 0, 0.25)) drop-shadow(0 10px 24px rgba(0, 0, 0, 0.12));
}

/* ---------- Device Screen Override ---------- */
.device-iphone-14-pro .device-screen {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  object-fit: unset;
  position: relative;
}

/* ---------- Lock Screen ---------- */
.lockscreen {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  background-image: url('../../assets/valentin-beauvais-kDaxao_v_5o-unsplash.jpg');
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

/* Lock screen exit animation */
.lockscreen.exit {
  animation: lockScreenExit 0.35s cubic-bezier(0.2, 0.9, 0.6, 1) forwards;
}

/* Gradient overlay for text readability */
.lockscreen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.0) 30%,
    rgba(0, 0, 0, 0.0) 60%,
    rgba(0, 0, 0, 0.4) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* All lock screen children above overlay */
.lockscreen > * {
  position: relative;
  z-index: 2;
}

/* ---------- Lock Screen Dynamic Island ---------- */
.lockscreen-dynamic-island {
  width: 100px;
  height: 30px;
  background: #000;
  border-radius: 18px;
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

/* ---------- Status Bar ---------- */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px 0;
  height: 50px;
}

.status-carrier {
  color: white;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-icon {
  display: block;
}

.battery-container {
  display: flex;
  align-items: center;
}

/* ---------- Date & Clock (iOS 16+ style) ---------- */
.lockscreen-datetime {
  text-align: center;
  padding-top: 16px;
}

.lockscreen-date {
  color: white;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.lockscreen-clock {
  color: white;
  font-size: 120px;
  font-weight: 700;
  line-height: 0.9;
  margin-top: 2px;
  letter-spacing: -3px;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

/* ---------- Spacer (pushes notification to bottom) ---------- */
.lockscreen-spacer {
  flex: 1;
}

/* ---------- Push Notification (bottom position) ---------- */
.notification {
  margin: 0 14px 10px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-radius: 22px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: transform 0.15s ease;

  /* Start hidden for animation — enters from bottom */
  opacity: 0;
  transform: translateY(100px);
}

@supports not (backdrop-filter: blur(40px)) {
  .notification {
    background: rgba(255, 255, 255, 0.92);
  }
}

.notification:active {
  transform: scale(0.97);
}

.notification.visible {
  animation: slideUpNotification 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Notification header */
.notification-header {
  display: flex;
  align-items: center;
  gap: 7px;
}

.notification-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  object-fit: cover;
}

.notification-app {
  font-size: 13px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.45);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.notification-time {
  font-size: 13px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.35);
  margin-left: auto;
}

/* Notification body */
.notification-body {
  margin-top: 6px;
}

.notification-title {
  font-size: 15px;
  font-weight: 600;
  color: #000;
  line-height: 1.3;
}

.notification-text {
  font-size: 15px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.75);
  line-height: 1.35;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Bottom Bar ---------- */
.lockscreen-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 44px 4px;
}

.bottom-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: rgba(50, 50, 50, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.bottom-icon svg,
.bottom-icon .sf-icon {
  opacity: 0.9;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.bottom-icon:active {
  background: rgba(50, 50, 50, 0.7);
}

/* ---------- Home Indicator ---------- */
.home-indicator {
  width: 140px;
  height: 5px;
  background: white;
  border-radius: 3px;
  margin: 8px auto 8px;
  opacity: 0.6;
}

/* ==========================================================================
   SPLASH SCREEN
   ========================================================================== */

.splash-screen {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: #820AD1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-logo {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  opacity: 0;
  transform: scale(0.85);
}

.splash-screen.active .splash-logo {
  animation: splashLogoEnter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.splash-screen.fade-out {
  animation: splashFadeOut 0.4s ease-out forwards;
}

/* ==========================================================================
   NUBANK APP (Fase 2)
   ========================================================================== */

.nubank-app {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  background: #F0F1F5;
  opacity: 0;
}

.nubank-app.visible {
  opacity: 1;
}

/* App Status Bar */
.app-status-bar {
  position: relative;
  flex-shrink: 0;
  background: #F0F1F5;
  height: 54px;
}

.app-dynamic-island {
  width: 100px;
  height: 30px;
  background: #000;
  border-radius: 18px;
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
}

.app-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  /* Center vertically with the Dynamic Island: top 12px + height 30px / 2 = 27px center */
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  height: 30px;
}

.app-status-time {
  font-size: 15px;
  font-weight: 600;
  color: #111;
}

/* App Content */
.app-content {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  -webkit-overflow-scrolling: touch;
}

/* Top Navigation Bar (fixed on scroll) */
.app-top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  position: sticky;
  top: 0;
  background: #F0F1F5;
  z-index: 10;
}

.top-nav-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.top-nav-btn:active {
  background: rgba(0, 0, 0, 0.05);
}

.top-nav-title {
  font-size: 18px;
  font-weight: 600;
  color: #111;
  letter-spacing: -0.2px;
}

/* Process Header */
.process-header {
  padding: 24px 24px 28px;
}

.badge-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: white;
  background: #4C0677;
  border-radius: 6px;
  padding: 5px 8px;
  letter-spacing: 0.3px;
  margin-bottom: 14px;
}

.process-title {
  font-size: 26px;
  font-weight: 600;
  color: #111;
  line-height: 1.2;
  margin-bottom: 8px;
}

.process-subtitle {
  font-size: 16px;
  font-weight: 400;
  color: #666;
  line-height: 1.45;
  margin-bottom: 20px;
}

.process-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  color: #666;
}

.process-meta-row svg {
  flex-shrink: 0;
}

/* Movements Section — white background zone */
.movements-zone {
  background: white;
  padding: 24px 0 0;
}

.movements-zone-title {
  font-size: 16px;
  font-weight: 500;
  color: #777;
  padding: 0 24px 16px;
}

/* Movement Cards */
.movement-card {
  background: white;
  border: 1px solid #E0E1E5;
  border-radius: 16px;
  padding: 24px;
  margin: 0 16px 12px;
}

.movement-card--highlight {
  background: #E8DFF5;
  border: none;
}

/* Card entrance animation — stagger */
.movement-card {
  opacity: 0;
  transform: translateY(16px);
}

.movement-card.animate-in {
  animation: cardSlideIn 0.4s ease-out forwards;
}

/* Highlight card — expands in, pushing others down */
.movement-card--highlight {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
  overflow: hidden;
  opacity: 0;
  transform: none;
}

.movement-card--highlight.animate-in {
  animation: cardExpandIn 1.2s ease forwards;
}

@keyframes cardSlideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardExpandIn {
  0% {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    opacity: 0;
    background-color: #E8DFF5;
  }
  30% {
    opacity: 1;
    background-color: #E8DFF5;
  }
  100% {
    max-height: 350px;
    padding-top: 24px;
    padding-bottom: 24px;
    margin-bottom: 12px;
    opacity: 1;
    background-color: #F3EEFA;
  }
}

.movement-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.movement-type {
  font-size: 14px;
  font-weight: 500;
  color: #666;
}

.movement-date {
  font-size: 12px;
  font-weight: 400;
  color: #bbb;
}

.movement-card--highlight .movement-type {
  color: #4C0677;
}

.movement-card--highlight .movement-date {
  color: #9B7DC4;
}

.movement-card--highlight .movement-explanation {
  color: #444;
}

.movement-title {
  font-size: 14px;
  font-weight: 500;
  color: #111;
  line-height: 1.35;
  margin-top: 6px;
}

.movement-explanation {
  font-size: 14px;
  font-weight: 400;
  color: #666;
  line-height: 1.45;
  margin-top: 8px;
}

.movement-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #820AD1;
  text-decoration: none;
  cursor: pointer;
  margin-top: 14px;
}

.movement-cta:active {
  opacity: 0.7;
}

.cta-arrow {
  font-size: 18px;
  line-height: 1;
}

/* Hidden movements */
.movements-hidden {
  display: none;
}

.movements-hidden.visible {
  display: block;
}

/* Ver mais button */
.movements-toggle {
  display: block;
  width: calc(100% - 32px);
  margin: 4px 16px 12px;
  padding: 14px;
  border: none;
  border-radius: 100px;
  background: #EAEBEF;
  color: #111;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s;
}

.movements-toggle:active {
  background: #DDDEE2;
}

/* App Home Indicator (Nubank) */
.app-home-indicator-wrap {
  background: white;
  padding: 12px 0;
  flex-shrink: 0;
}

.app-home-indicator-wrap > .home-indicator {
  background: #333;
  opacity: 0.3;
  margin: 0 auto;
  width: 140px;
  height: 5px;
  border-radius: 3px;
}

/* ---------- Animations ---------- */

@keyframes lockScreenExit {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100%);
    opacity: 0;
  }
}

@keyframes splashLogoEnter {
  0% {
    opacity: 0;
    transform: scale(0.85);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes splashFadeOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes slideUpNotification {
  0% {
    opacity: 0;
    transform: translateY(100px);
  }
  40% {
    opacity: 1;
  }
  70% {
    transform: translateY(-4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Reset Button (Figma-style) ---------- */
.reset-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  height: 40px;
  border-radius: 20px;
  border: 1px solid #e0e0e0;
  background: white;
  color: #666;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px 0 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.reset-btn:hover {
  background: #f5f5f5;
  color: #333;
  border-color: #ccc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.reset-icon {
  font-size: 16px;
  line-height: 1;
}

.reset-label {
  font-weight: 500;
  letter-spacing: 0.2px;
}

.reset-hotkey {
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  color: #999;
  background: #f0f0f0;
  border-radius: 4px;
  padding: 2px 5px;
  margin-left: 2px;
  line-height: 1;
}

/* ---------- Responsive: Mobile Direct View ---------- */
@media (max-width: 480px) {
  body {
    background: #000;
  }

  .device-iphone-14-pro {
    transform: none !important;
  }

  .device-frame,
  .device-stripe,
  .device-header,
  .device-sensors,
  .device-btns,
  .device-power {
    display: none !important;
  }

  .device-iphone-14-pro .device-screen {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }
}

/* ==========================================================================
   JUSBRASIL APP (Fase 3) - Farol Design System
   ========================================================================== */

/* ---------- Lucide Icon Sizes ---------- */
.jus-icon-12 { width: 12px; height: 12px; }
.jus-icon-14 { width: 14px; height: 14px; }
.jus-icon-16 { width: 16px; height: 16px; }
.jus-icon-18 { width: 18px; height: 18px; }
.jus-icon-20 { width: 20px; height: 20px; }
.jus-icon-48 { width: 48px; height: 48px; }

[data-lucide] {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ---------- Farol DS Tokens ---------- */
:root {
  --jus-primary: #007A5F;
  --jus-primary-1: #E6F4F0;
  --jus-primary-2: #C9E9DF;
  --jus-primary-3: #00664F;
  --jus-primary-4: #004D3B;
  --jus-secondary: #7AB441;
  --jus-secondary-1: #F2F8EC;
  --jus-foreground: #0F172A;
  --jus-foreground-1: #2B3950;
  --jus-muted: #F1F5F9;
  --jus-muted-fg: #5C6F8A;
  --jus-border: #E2E8F0;
  --jus-background: #FFFFFF;
  --jus-warning-pure: #FBD94C;
  --jus-warning-1: #FEFAEC;
  --jus-warning-3: #E3B806;
  --jus-negative: #E41E3F;
  --jus-radius-xs: 6px;
  --jus-radius-sm: 8px;
  --jus-radius-md: 16px;
  --jus-radius-pill: 500px;
  --jus-ease-productive: cubic-bezier(0, 0, 0.3, 1);
  --jus-shadow-2: 0 2px 8px rgba(25, 52, 102, 0.08);
  --jus-shadow-3: 0 4px 24px rgba(25, 52, 102, 0.08);
}

/* ---------- Jusbrasil App Container ---------- */
.jusbrasil-app {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  background: var(--jus-background);
  opacity: 0;
  transform: translateX(100%);
  pointer-events: none;
}

.jusbrasil-app.visible {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.jusbrasil-app.slide-in {
  animation: jusSlideIn 400ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.jusbrasil-app.slide-out {
  animation: jusSlideOut 400ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Nubank slide-out when transitioning to Jus */
.nubank-app.slide-out-left {
  animation: nuSlideOutLeft 400ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.nubank-app.slide-in-left {
  animation: nuSlideInLeft 400ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ---------- Jus Status Bar ---------- */
.jus-status-bar {
  position: relative;
  flex-shrink: 0;
  background: var(--jus-background);
  height: 54px;
}

.jus-status-bar .app-dynamic-island {
  background: #000;
}

.jus-status-bar .app-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  height: 30px;
}

.jus-status-bar .app-status-time {
  font-size: 15px;
  font-weight: 600;
  color: var(--jus-foreground);
}

/* ---------- Jus Top Bar ---------- */
.jus-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--jus-background);
  border-bottom: 1px solid var(--jus-border);
}

.jus-logo-img {
  display: block;
  height: 34px;
  width: 34px;
  object-fit: contain;
}

.jus-topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.jus-topbar-search {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--jus-foreground);
  border-radius: 50%;
}

.jus-topbar-search [data-lucide] {
  stroke-width: 2.2;
}

.jus-topbar-search:active {
  background: var(--jus-muted);
}

.jus-topbar-avatar {
  display: flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
}

.jus-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #D4E4BC;
  color: #4A6B2A;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.3px;
}

.jus-avatar-chevron {
  color: var(--jus-foreground-1);
  stroke-width: 1.8;
}

/* ---------- Jus Navigation Bar ---------- */
.jus-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--jus-background);
  position: sticky;
  top: 0;
  z-index: 5;
}

.jus-navbar-back {
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--jus-primary);
  font-size: 16px;
  font-weight: 500;
  padding: 0;
  font-family: inherit;
}

.jus-navbar-back:active {
  opacity: 0.7;
}

.jus-navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.jus-navbar-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--jus-foreground-1);
}

.jus-navbar-btn:active {
  background: var(--jus-muted);
}

/* ---------- Jus Scrollable Content ---------- */
.jus-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 24px;
}

/* ---------- Jus Process Header ---------- */
.jus-process-header {
  padding: 12px 20px 0;
}

.jus-badge-pill {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--jus-muted-fg);
  background: var(--jus-muted);
  border: none;
  border-radius: var(--jus-radius-pill);
  padding: 6px 14px;
  margin-bottom: 12px;
}

.jus-process-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--jus-foreground);
  line-height: 1.25;
  margin-bottom: 8px;
  letter-spacing: -0.4px;
}

.jus-process-parties {
  font-size: 16px;
  color: var(--jus-foreground-1);
  line-height: 1.45;
  margin-bottom: 14px;
}

.jus-process-parties strong {
  display: inline;
  font-weight: 600;
  color: var(--jus-foreground);
}

.jus-process-meta {
  font-size: 16px;
  color: var(--jus-foreground-1);
  margin-bottom: 4px;
  font-weight: 400;
  line-height: 1.5;
}

.jus-bold {
  display: inline;
  font-weight: 600;
  color: var(--jus-foreground);
}

.jus-process-number {
  font-size: 16px;
  color: var(--jus-foreground-1);
  margin-bottom: 0;
  line-height: 1.5;
}

.jus-process-number a {
  display: inline;
  color: var(--jus-primary);
  text-decoration: none;
  font-weight: 500;
  margin-left: 4px;
}

.jus-process-number a:active {
  opacity: 0.65;
}

/* ---------- Situação do processo ---------- */
.jus-situacao-card {
  margin: 32px 20px 0;
  padding: 18px;
  border: 1px solid var(--jus-border);
  border-radius: 12px;
  background: var(--jus-background);
}

.jus-situacao-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--jus-foreground);
  margin-bottom: 6px;
  letter-spacing: -0.2px;
}

.jus-situacao-desc {
  font-size: 16px;
  color: var(--jus-foreground-1);
  line-height: 1.5;
  margin-bottom: 18px;
}

.jus-situacao-desc strong {
  display: inline;
  font-weight: 600;
  color: var(--jus-foreground);
}

.jus-situacao-btn-primary {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  color: white;
  background: var(--jus-primary);
  border: none;
  border-radius: var(--jus-radius-sm);
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  margin-bottom: 10px;
  transition: background 120ms ease;
}

.jus-situacao-btn-primary:active {
  background: var(--jus-primary-3);
}

.jus-situacao-btn-secondary {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--jus-foreground);
  background: var(--jus-background);
  border: 1.5px solid var(--jus-border);
  border-radius: var(--jus-radius-sm);
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  transition: all 120ms ease;
}

.jus-situacao-btn-secondary:active {
  background: var(--jus-muted);
}

/* ---------- Pergunte e entenda ---------- */
.jus-pergunte-section {
  padding: 32px 20px 0;
}

.jus-pergunte-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--jus-foreground);
  margin-bottom: 6px;
  letter-spacing: -0.2px;
}

.jus-pergunte-desc {
  font-size: 16px;
  color: var(--jus-foreground-1);
  line-height: 1.5;
  margin-bottom: 16px;
}

.jus-pergunte-desc strong {
  display: inline;
  font-weight: 600;
  color: var(--jus-foreground);
}

.jus-pergunte-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.jus-pergunte-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--jus-foreground-1);
  line-height: 1.45;
}

.jus-pergunte-list li [data-lucide] {
  color: var(--jus-primary);
  flex-shrink: 0;
  margin-top: 1px;
}

.jus-pergunte-btn {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--jus-foreground);
  background: var(--jus-background);
  border: 1.5px solid var(--jus-border);
  border-radius: var(--jus-radius-sm);
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  transition: all 120ms ease;
}

.jus-pergunte-btn:active {
  background: var(--jus-muted);
}

/* ---------- Jus Histórico Header ---------- */
.jus-historico-header {
  padding: 32px 20px 0;
}

.jus-historico-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.jus-historico-title-row [data-lucide="clock"] {
  color: var(--jus-foreground);
}

.jus-historico-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--jus-foreground);
  letter-spacing: -0.2px;
  flex: 1;
}

.jus-historico-chevron {
  color: var(--jus-muted-fg);
  cursor: pointer;
}

.jus-historico-subtitle {
  font-size: 16px;
  color: var(--jus-foreground-1);
  line-height: 1.5;
  margin-top: 6px;
}

/* ---------- Jus Tab Pills ---------- */
.jus-tab-pills {
  display: flex;
  gap: 8px;
  padding: 16px 20px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.jus-tab-pills::-webkit-scrollbar {
  display: none;
}

.jus-tab-pill {
  flex: none;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--jus-foreground-1);
  background: transparent;
  border: 1.5px solid var(--jus-border);
  border-radius: var(--jus-radius-pill);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: all 120ms ease;
  line-height: 1;
}

.jus-tab-pill:active {
  background: var(--jus-muted);
}

.jus-tab-pill--active {
  color: white;
  background: var(--jus-foreground);
  border-color: var(--jus-foreground);
}

.jus-tab-pill--active:active {
  opacity: 0.85;
}

/* ---------- Jus Tab Content ---------- */
.jus-tab-content {
  display: none;
}

.jus-tab-content.active {
  display: block;
}

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

.jus-empty-icon {
  color: var(--jus-border);
  margin-bottom: 16px;
}

.jus-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--jus-foreground);
  margin-bottom: 4px;
}

.jus-empty-text {
  font-size: 14px;
  color: var(--jus-muted-fg);
}

/* ---------- Jus Timeline ---------- */
.jus-timeline {
  padding: 20px 20px 32px;
  position: relative;
  transition: opacity 0.3s ease;
}

.jus-timeline-item {
  position: relative;
  padding-left: 22px;
  padding-bottom: 8px;
  margin-bottom: 0;
  opacity: 0;
  transform: translateY(12px);
}

.jus-timeline-item.animate-in {
  animation: jusCardFadeIn 0.35s ease-out forwards;
}

/* Timeline dot */
.jus-timeline-dot {
  position: absolute;
  left: 0;
  top: 5px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid var(--jus-primary);
  z-index: 2;
}

/* Timeline vertical line */
.jus-timeline-line {
  position: absolute;
  left: 4px;
  top: 18px;
  bottom: 0;
  width: 1.5px;
  background: var(--jus-border);
}

.jus-timeline-item:last-child .jus-timeline-line {
  display: none;
}

.jus-timeline-content {
  min-height: 40px;
  border-bottom: 1px solid var(--jus-border);
  padding-bottom: 24px;
  margin-bottom: 24px;
}

.jus-timeline-item:last-child .jus-timeline-content {
  border-bottom: none;
  margin-bottom: 0;
}

/* Meta row: date + ago + badge */
.jus-timeline-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.jus-timeline-date {
  font-size: 16px;
  font-weight: 600;
  color: var(--jus-foreground);
  letter-spacing: -0.1px;
}

.jus-timeline-ago {
  font-size: 14px;
  color: var(--jus-muted-fg);
  font-weight: 400;
}

.jus-timeline-badge {
  font-size: 13px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--jus-radius-pill);
  border: none;
  background: var(--jus-muted);
  color: var(--jus-muted-fg);
  line-height: 1;
}

.jus-timeline-badge--important {
  background: var(--jus-muted);
  color: var(--jus-muted-fg);
}

/* AI label: sparkle + "O que aconteceu neste dia:" */
.jus-timeline-ai-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.jus-timeline-ai-label [data-lucide] {
  color: var(--jus-primary);
}

.jus-timeline-ai-label span {
  font-size: 14px;
  font-weight: 600;
  color: var(--jus-foreground);
  letter-spacing: -0.1px;
}

/* Explanation text (plain, indented) */
.jus-timeline-explanation {
  font-size: 14px;
  color: #475569;
  line-height: 1.65;
  margin-bottom: 20px;
  padding-left: 20px;
}

.jus-timeline-explanation.typing-active::after {
  content: '▊';
  display: inline;
  color: var(--jus-primary);
  animation: cursorBlink 0.6s step-end infinite;
  margin-left: 1px;
  font-size: 13px;
}

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

/* Documents row */
.jus-timeline-docs-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.jus-timeline-docs-row [data-lucide] {
  color: var(--jus-muted-fg);
}

.jus-timeline-docs-row span {
  font-size: 14px;
  font-weight: 600;
  color: var(--jus-foreground);
}

.jus-timeline-docs-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--jus-primary);
  text-decoration: none;
  margin-bottom: 20px;
  padding-left: 24px;
}

.jus-timeline-docs-link:active {
  opacity: 0.65;
}

/* "Ainda ficou com dúvida?" section */
.jus-timeline-ask {
  margin-top: 16px;
}

.jus-timeline-ask-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--jus-foreground);
  margin-bottom: 10px;
}

.jus-timeline-ask-btn {
  display: block;
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--jus-foreground-1);
  background: var(--jus-background);
  border: 1.5px solid var(--jus-border);
  border-radius: var(--jus-radius-sm);
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  transition: all 120ms ease;
}

.jus-timeline-ask-btn:active {
  background: var(--jus-muted);
  border-color: var(--jus-foreground-1);
}

/* ---------- Jus Bottom CTA Bar ---------- */
.jus-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 10px;
  padding: 12px 20px;
  background: var(--jus-background);
  border-top: 1px solid var(--jus-border);
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
  z-index: 10;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

.jus-btn-primary {
  flex: 1;
  padding: 13px 16px;
  border: none;
  border-radius: var(--jus-radius-sm);
  background: var(--jus-primary);
  color: white;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 120ms ease;
  letter-spacing: 0.1px;
}

.jus-btn-primary:active {
  background: var(--jus-primary-3);
}

.jus-btn-secondary {
  flex: 1;
  padding: 13px 16px;
  border: 1.5px solid var(--jus-primary);
  border-radius: var(--jus-radius-sm);
  background: var(--jus-background);
  color: var(--jus-primary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 120ms ease;
  letter-spacing: 0.1px;
}

.jus-btn-secondary:active {
  background: var(--jus-primary-1);
}

/* ---------- Jus Home Indicator ---------- */
.jus-home-indicator {
  background: #333;
  opacity: 0.3;
  width: 140px;
  height: 5px;
  border-radius: 3px;
  margin: 4px auto 8px;
  flex-shrink: 0;
}

/* ---------- Phase Transition Animations ---------- */
@keyframes jusSlideIn {
  from { opacity: 1; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

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

@keyframes nuSlideOutLeft {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0.6; transform: translateX(-25%) scale(0.92); }
}

@keyframes nuSlideInLeft {
  from { opacity: 0.6; transform: translateX(-25%) scale(0.92); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes jusCardFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Skeleton Loading ---------- */
.jus-skeleton {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  background: var(--jus-background);
  overflow: hidden;
  z-index: 3;
  transition: opacity 0.35s ease;
}

.jus-tab-content {
  position: relative;
}

.jus-skeleton.fade-out {
  opacity: 0;
  pointer-events: none;
}

.jus-skeleton-body {
  padding: 20px 20px 0;
}

.sk-timeline-item {
  display: flex;
  gap: 14px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--jus-border);
  margin-bottom: 28px;
}

.sk-timeline-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.sk-timeline-content {
  flex: 1;
}

.sk-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sk-block {
  background: #E8ECF0;
  border-radius: 4px;
  animation: skPulse 1.4s ease-in-out infinite;
}

.sk-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.sk-chip-sm { width: 64px; height: 20px; border-radius: 500px; }
.sk-text-full { width: 100%; height: 14px; }
.sk-text-lg { width: 75%; height: 14px; }
.sk-text-md { width: 90px; height: 16px; }
.sk-text-sm { width: 60px; height: 14px; }

@keyframes skPulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.8; }
}

/* ---------- Desktop Scaling ---------- */
@media (min-width: 481px) {
  .device-iphone-14-pro {
    transform: scale(0.78);
    transform-origin: center center;
  }
}

@media (min-width: 1200px) {
  .device-iphone-14-pro {
    transform: scale(0.9);
  }
}
