/**
 * Agência Planejada CRM — Design System
 */

:root {
  --ap-navy: #0B1F33;
  --ap-navy-soft: #152A40;
  --ap-teal: #1A6B6B;
  --ap-teal-hover: #155858;
  --ap-teal-soft: rgba(26, 107, 107, 0.12);
  --ap-sand: #E8E4DC;
  --ap-bg: #FAFBFC;
  --ap-surface: #FFFFFF;
  --ap-coral: #C45C4A;
  --ap-coral-soft: rgba(196, 92, 74, 0.12);
  --ap-text: #0B1F33;
  --ap-text-muted: #5A6A7A;
  --ap-border: #E2E6EB;
  --ap-success: #2D8A5E;
  --ap-warning: #C4922A;
  --ap-info: #2B6CB0;
  --ap-radius: 14px;
  --ap-radius-sm: 10px;
  --ap-shadow: 0 1px 2px rgba(11, 31, 51, 0.04), 0 8px 24px rgba(11, 31, 51, 0.06);
  --ap-shadow-lg: 0 12px 40px rgba(11, 31, 51, 0.12);
  --ap-sidebar-w: 260px;
  --ap-topbar-h: 68px;
  --ap-font: "DM Sans", system-ui, sans-serif;
  --ap-display: "Fraunces", Georgia, serif;
  --ap-ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
}

body.ap-body {
  margin: 0;
  font-family: var(--ap-font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ap-text);
  background: var(--ap-bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ap-teal);
  text-decoration: none;
  transition: color 0.2s var(--ap-ease);
}

a:hover {
  color: var(--ap-teal-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4 {
  font-family: var(--ap-display);
  font-weight: 560;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  color: var(--ap-navy);
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1rem; color: var(--ap-text-muted); }

/* ---------- Login ---------- */
.ap-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  padding: 2rem;
  overflow: hidden;
}

.ap-login__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(11, 31, 51, 0.82) 0%, rgba(26, 107, 107, 0.55) 55%, rgba(11, 31, 51, 0.75) 100%),
    url("https://images.unsplash.com/photo-1488085061387-422e29df1db0?w=1920&q=80") center / cover no-repeat;
  animation: ap-bg- ken 28s ease-in-out infinite alternate;
}

@keyframes ap-bg-ken {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

.ap-login__card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  background: rgba(250, 251, 252, 0.96);
  backdrop-filter: blur(16px);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  box-shadow: var(--ap-shadow-lg);
  animation: ap-fade-up 0.6s var(--ap-ease);
}

@keyframes ap-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.ap-login__brand {
  text-align: center;
  margin-bottom: 2rem;
}

.ap-login__logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--ap-navy), var(--ap-teal));
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--ap-display);
  font-size: 1.4rem;
  font-weight: 600;
}

.ap-login__brand h1 {
  font-size: 1.65rem;
  color: var(--ap-navy);
  margin-bottom: 0.25rem;
}

.ap-login__brand p {
  margin: 0;
  font-size: 0.9rem;
}

.ap-login__error {
  background: var(--ap-coral-soft);
  color: var(--ap-coral);
  padding: 0.75rem 1rem;
  border-radius: var(--ap-radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.ap-login__footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
}

.ap-login__divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--ap-text-muted);
  font-size: 0.8rem;
}

.ap-login__divider::before,
.ap-login__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--ap-border);
}

.ap-btn-google {
  width: 100%;
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- App shell ---------- */
.ap-app {
  display: flex;
  min-height: 100vh;
}

.ap-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--ap-sidebar-w);
  background: var(--ap-navy);
  color: #fff;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: transform 0.35s var(--ap-ease);
}

.ap-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem 1.5rem;
}

.ap-sidebar__mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--ap-teal), #2a9a9a);
  display: grid;
  place-items: center;
  font-family: var(--ap-display);
  font-weight: 600;
  flex-shrink: 0;
}

.ap-sidebar__name {
  font-family: var(--ap-display);
  font-size: 1.05rem;
  line-height: 1.2;
}

.ap-sidebar__name small {
  display: block;
  font-family: var(--ap-font);
  font-size: 0.7rem;
  opacity: 0.55;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 2px;
}

.ap-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  overflow-y: auto;
}

.ap-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--ap-radius-sm);
  color: rgba(255, 255, 255, 0.72);
  font-weight: 500;
  font-size: 0.92rem;
  transition: background 0.2s var(--ap-ease), color 0.2s var(--ap-ease);
}

.ap-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.ap-nav a.is-active {
  background: rgba(26, 107, 107, 0.45);
  color: #fff;
}

.ap-nav a i,
.ap-nav a svg {
  width: 18px;
  height: 18px;
  opacity: 0.9;
}

.ap-sidebar__user {
  margin-top: auto;
  padding: 1rem 0.75rem 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ap-sidebar__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ap-teal);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 600;
}

.ap-sidebar__user-meta {
  flex: 1;
  min-width: 0;
}

.ap-sidebar__user-meta strong {
  display: block;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ap-sidebar__user-meta span {
  font-size: 0.75rem;
  opacity: 0.55;
}

.ap-main {
  flex: 1;
  margin-left: var(--ap-sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.ap-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--ap-topbar-h);
  background: rgba(250, 251, 252, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ap-border);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.75rem;
}

.ap-menu-toggle {
  display: none;
  border: none;
  background: var(--ap-surface);
  border: 1px solid var(--ap-border);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  place-items: center;
}

.ap-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.ap-search input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--ap-border);
  border-radius: 12px;
  padding: 0 1rem 0 2.5rem;
  background: var(--ap-surface);
  font: inherit;
  color: var(--ap-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ap-search input:focus {
  outline: none;
  border-color: var(--ap-teal);
  box-shadow: 0 0 0 3px var(--ap-teal-soft);
}

.ap-search__icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ap-text-muted);
  pointer-events: none;
}

.ap-search__results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--ap-surface);
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius);
  box-shadow: var(--ap-shadow-lg);
  max-height: 360px;
  overflow-y: auto;
  display: none;
  z-index: 50;
}

.ap-search__results.is-open {
  display: block;
  animation: ap-fade-up 0.2s var(--ap-ease);
}

.ap-search__group {
  padding: 0.5rem 0;
}

.ap-search__group-title {
  padding: 0.35rem 1rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ap-text-muted);
  font-weight: 600;
}

.ap-search__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  color: var(--ap-text);
  cursor: pointer;
}

.ap-search__item:hover {
  background: var(--ap-teal-soft);
}

.ap-topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.ap-icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--ap-border);
  background: var(--ap-surface);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--ap-navy);
  transition: background 0.2s, border-color 0.2s;
}

.ap-icon-btn:hover {
  background: var(--ap-sand);
  border-color: transparent;
}

.ap-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ap-coral);
  border: 2px solid var(--ap-surface);
}

.ap-notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  background: var(--ap-surface);
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius);
  box-shadow: var(--ap-shadow-lg);
  display: none;
  z-index: 50;
  overflow: hidden;
}

.ap-notif-panel.is-open {
  display: block;
  animation: ap-fade-up 0.2s var(--ap-ease);
}

.ap-notif-panel__head {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--ap-border);
  font-weight: 600;
  font-size: 0.95rem;
}

.ap-notif-item {
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--ap-border);
  font-size: 0.875rem;
}

.ap-notif-item:hover {
  background: var(--ap-bg);
}

.ap-notif-item strong {
  display: block;
  margin-bottom: 0.15rem;
}

.ap-notif-item span {
  color: var(--ap-text-muted);
  font-size: 0.8rem;
}

.ap-content {
  padding: 1.75rem;
  flex: 1;
  animation: ap-fade-up 0.4s var(--ap-ease);
}

.ap-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.ap-page-head p {
  margin: 0.25rem 0 0;
}

.ap-page-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* ---------- Forms & buttons ---------- */
.ap-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 42px;
  padding: 0 1.15rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 560;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.15s var(--ap-ease), background 0.2s, box-shadow 0.2s;
}

.ap-btn:active {
  transform: scale(0.98);
}

.ap-btn--primary {
  background: var(--ap-teal);
  color: #fff;
}

.ap-btn--primary:hover {
  background: var(--ap-teal-hover);
  color: #fff;
}

.ap-btn--secondary {
  background: var(--ap-surface);
  border-color: var(--ap-border);
  color: var(--ap-navy);
}

.ap-btn--secondary:hover {
  background: var(--ap-sand);
  color: var(--ap-navy);
}

.ap-btn--ghost {
  background: transparent;
  color: var(--ap-text-muted);
}

.ap-btn--danger {
  background: var(--ap-coral);
  color: #fff;
}

.ap-btn--sm {
  height: 34px;
  padding: 0 0.75rem;
  font-size: 0.8rem;
  border-radius: 9px;
}

.ap-btn--block {
  width: 100%;
}

.ap-field {
  margin-bottom: 1.15rem;
}

.ap-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--ap-navy);
}

.ap-field input,
.ap-field select,
.ap-field textarea {
  width: 100%;
  border: 1px solid var(--ap-border);
  border-radius: 11px;
  padding: 0.7rem 0.9rem;
  font: inherit;
  background: var(--ap-surface);
  color: var(--ap-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ap-field textarea {
  min-height: 100px;
  resize: vertical;
}

.ap-field input:focus,
.ap-field select:focus,
.ap-field textarea:focus {
  outline: none;
  border-color: var(--ap-teal);
  box-shadow: 0 0 0 3px var(--ap-teal-soft);
}

.ap-grid {
  display: grid;
  gap: 1.15rem;
}

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

.ap-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.ap-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ---------- Cards / stats ---------- */
.ap-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
  margin-bottom: 1.75rem;
}

.ap-stat {
  background: var(--ap-surface);
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--ap-shadow);
  transition: transform 0.25s var(--ap-ease), box-shadow 0.25s;
}

.ap-stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--ap-shadow-lg);
}

.ap-stat__label {
  font-size: 0.8rem;
  color: var(--ap-text-muted);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.ap-stat__value {
  font-family: var(--ap-display);
  font-size: 1.85rem;
  color: var(--ap-navy);
  line-height: 1;
}

.ap-stat__hint {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--ap-teal);
}

.ap-panel {
  background: var(--ap-surface);
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius);
  padding: 1.35rem;
  box-shadow: var(--ap-shadow);
}

.ap-panel__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.15rem;
}

.ap-dash-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.15rem;
}

.ap-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ap-list li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--ap-border);
}

.ap-list li:last-child {
  border-bottom: none;
}

.ap-list__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ap-teal);
  flex-shrink: 0;
}

.ap-list__meta {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--ap-text-muted);
  white-space: nowrap;
}

/* ---------- Table ---------- */
.ap-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius);
  background: var(--ap-surface);
  box-shadow: var(--ap-shadow);
}

.ap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.ap-table th,
.ap-table td {
  padding: 0.9rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--ap-border);
}

.ap-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ap-text-muted);
  font-weight: 600;
  background: var(--ap-bg);
}

.ap-table tr:last-child td {
  border-bottom: none;
}

.ap-table tr:hover td {
  background: rgba(26, 107, 107, 0.04);
}

.ap-avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--ap-sand);
}

/* ---------- Tags / progress ---------- */
.ap-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--ap-teal-soft);
  color: var(--ap-teal);
}

.ap-tag--coral { background: var(--ap-coral-soft); color: var(--ap-coral); }
.ap-tag--sand { background: var(--ap-sand); color: var(--ap-navy); }
.ap-tag--success { background: rgba(45, 138, 94, 0.12); color: var(--ap-success); }
.ap-tag--warning { background: rgba(196, 146, 42, 0.15); color: var(--ap-warning); }
.ap-tag--info { background: rgba(43, 108, 176, 0.12); color: var(--ap-info); }

.ap-progress {
  height: 6px;
  background: var(--ap-border);
  border-radius: 99px;
  overflow: hidden;
}

.ap-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--ap-teal), #2a9a9a);
  border-radius: 99px;
  transition: width 0.4s var(--ap-ease);
}

/* ---------- Kanban ---------- */
.ap-kanban {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1.5rem;
  min-height: calc(100vh - 160px);
  align-items: flex-start;
}

.ap-kanban__col {
  flex: 0 0 300px;
  background: rgba(232, 228, 220, 0.45);
  border-radius: var(--ap-radius);
  padding: 0.85rem;
  min-height: 200px;
}

.ap-kanban__col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding: 0.25rem 0.35rem;
}

.ap-kanban__col-head h3 {
  font-family: var(--ap-font);
  font-size: 0.82rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0;
}

.ap-kanban__count {
  font-size: 0.75rem;
  background: var(--ap-surface);
  color: var(--ap-text-muted);
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  font-weight: 600;
}

.ap-kanban__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 40px;
}

.ap-card {
  background: var(--ap-surface);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--ap-shadow);
  border: 1px solid transparent;
  cursor: grab;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.ap-card:hover {
  box-shadow: var(--ap-shadow-lg);
  border-color: var(--ap-border);
}

.ap-card.sortable-ghost {
  opacity: 0.4;
}

.ap-card.sortable-chosen {
  cursor: grabbing;
  transform: rotate(1deg);
}

.ap-card__thumb {
  width: 100%;
  height: 96px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--ap-sand), #d4e4e4);
}

.ap-card__client {
  font-weight: 650;
  font-size: 0.95rem;
  color: var(--ap-navy);
  margin-bottom: 0.15rem;
}

.ap-card__dest {
  font-size: 0.8rem;
  color: var(--ap-text-muted);
  margin-bottom: 0.75rem;
}

.ap-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.ap-card__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--ap-text-muted);
  margin-bottom: 0.5rem;
}

.ap-card__value {
  font-weight: 650;
  color: var(--ap-navy);
}

.ap-card__actions {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--ap-border);
}

/* ---------- Tabs / timeline ---------- */
.ap-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--ap-border);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.ap-tabs a,
.ap-tabs button {
  padding: 0.75rem 1.1rem;
  border: none;
  background: none;
  font: inherit;
  font-weight: 550;
  color: var(--ap-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}

.ap-tabs a.is-active,
.ap-tabs button.is-active {
  color: var(--ap-teal);
  border-bottom-color: var(--ap-teal);
}

.ap-timeline {
  position: relative;
  padding-left: 1.5rem;
}

.ap-timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--ap-border);
}

.ap-timeline__item {
  position: relative;
  padding-bottom: 1.35rem;
}

.ap-timeline__item::before {
  content: "";
  position: absolute;
  left: -1.5rem;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ap-teal);
  border: 2px solid var(--ap-surface);
  box-shadow: 0 0 0 2px var(--ap-teal-soft);
}

.ap-timeline__item strong {
  display: block;
  font-size: 0.9rem;
}

.ap-timeline__item span {
  font-size: 0.8rem;
  color: var(--ap-text-muted);
}

/* ---------- Calendar ---------- */
.ap-calendar-wrap {
  background: var(--ap-surface);
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius);
  padding: 1.25rem;
  box-shadow: var(--ap-shadow);
}

.fc {
  font-family: var(--ap-font) !important;
}

.fc .fc-button-primary {
  background: var(--ap-teal) !important;
  border-color: var(--ap-teal) !important;
}

.fc .fc-daygrid-day.fc-day-today {
  background: var(--ap-teal-soft) !important;
}

/* ---------- Overlay / mobile ---------- */
.ap-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 51, 0.45);
  z-index: 35;
}

.ap-overlay.is-open {
  display: block;
}

.ap-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--ap-text-muted);
}

.ap-alert {
  padding: 0.85rem 1.1rem;
  border-radius: var(--ap-radius-sm);
  margin-bottom: 1.15rem;
  font-size: 0.9rem;
}

.ap-alert--success {
  background: rgba(45, 138, 94, 0.12);
  color: var(--ap-success);
}

.ap-alert--error {
  background: var(--ap-coral-soft);
  color: var(--ap-coral);
}

.ap-alert--info {
  background: rgba(43, 108, 176, 0.12);
  color: var(--ap-info);
}

.ap-mini-cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
  font-size: 0.75rem;
}

.ap-mini-cal__day {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--ap-text-muted);
}

.ap-mini-cal__day.is-today {
  background: var(--ap-teal);
  color: #fff;
  font-weight: 600;
}

.ap-mini-cal__day.has-event {
  box-shadow: inset 0 -2px 0 var(--ap-coral);
}

.ap-mini-cal__head {
  font-weight: 600;
  color: var(--ap-navy);
  font-size: 0.7rem;
}

@media (max-width: 1100px) {
  .ap-stats { grid-template-columns: repeat(2, 1fr); }
  .ap-dash-grid { grid-template-columns: 1fr; }
  .ap-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .ap-sidebar {
    transform: translateX(-100%);
  }
  .ap-sidebar.is-open {
    transform: translateX(0);
  }
  .ap-main {
    margin-left: 0;
  }
  .ap-menu-toggle {
    display: grid;
  }
  .ap-grid--2,
  .ap-grid--3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .ap-content { padding: 1.15rem; }
  .ap-stats { grid-template-columns: 1fr; }
  .ap-topbar { padding: 0 1rem; }
  .ap-search { max-width: none; }
}

/* ---------- Atmosphere / life ---------- */
body.ap-body {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(26, 107, 107, 0.14), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(196, 92, 74, 0.08), transparent 50%),
    radial-gradient(700px 400px at 70% 100%, rgba(43, 108, 176, 0.07), transparent 45%),
    var(--ap-bg);
}

.ap-sidebar {
  background:
    linear-gradient(180deg, #0B1F33 0%, #0f2c45 45%, #124040 100%);
  box-shadow: 8px 0 40px rgba(11, 31, 51, 0.18);
}

.ap-sidebar__mark {
  animation: ap-pulse-soft 4s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(42, 154, 154, 0.45);
}

@keyframes ap-pulse-soft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(42, 154, 154, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(42, 154, 154, 0); }
}

.ap-nav a.is-active {
  background: linear-gradient(90deg, rgba(26, 107, 107, 0.55), rgba(26, 107, 107, 0.2));
  box-shadow: inset 3px 0 0 #3dbdbd;
}

.ap-content > .ap-page-head {
  animation: ap-fade-up 0.45s var(--ap-ease);
}

.ap-stat {
  position: relative;
  overflow: hidden;
}

.ap-stat::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -20px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--ap-teal-soft), transparent 70%);
  pointer-events: none;
}

.ap-stat:nth-child(2)::after { background: radial-gradient(circle, rgba(196, 92, 74, 0.15), transparent 70%); }
.ap-stat:nth-child(3)::after { background: radial-gradient(circle, rgba(43, 108, 176, 0.15), transparent 70%); }
.ap-stat:nth-child(4)::after { background: radial-gradient(circle, rgba(196, 146, 42, 0.18), transparent 70%); }

.ap-panel--glow {
  border-color: transparent;
  background:
    linear-gradient(var(--ap-surface), var(--ap-surface)) padding-box,
    linear-gradient(135deg, rgba(26, 107, 107, 0.35), rgba(232, 228, 220, 0.6), rgba(196, 92, 74, 0.2)) border-box;
  border: 1px solid transparent;
}

.ap-kanban__col:nth-child(odd) {
  background: rgba(26, 107, 107, 0.08);
}
.ap-kanban__col:nth-child(even) {
  background: rgba(196, 92, 74, 0.06);
}

.ap-card {
  animation: ap-fade-up 0.35s var(--ap-ease) both;
}

.ap-btn--primary {
  box-shadow: 0 6px 18px rgba(26, 107, 107, 0.28);
}

.ap-btn--primary:hover {
  box-shadow: 0 8px 24px rgba(26, 107, 107, 0.38);
  transform: translateY(-1px);
}

.ap-btn--lg {
  height: 48px;
  padding: 0 1.5rem;
  font-size: 0.95rem;
}

/* ---------- Passeio form / list ---------- */
.ap-passeio-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 1.25rem;
  align-items: start;
}

.ap-passeio-main {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.ap-passeio-side {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  position: sticky;
  top: calc(var(--ap-topbar-h) + 1rem);
}

.ap-form-step {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.ap-form-step h2 {
  margin: 0 0 0.2rem;
  font-size: 1.15rem;
}

.ap-form-step p {
  margin: 0;
  font-size: 0.85rem;
}

.ap-step-num {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--ap-teal), #2a9a9a);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(26, 107, 107, 0.3);
}

.ap-field-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--ap-text-muted);
}

.ap-geo-search {
  display: flex;
  gap: 0.5rem;
}

.ap-geo-search input {
  flex: 1;
}

.ap-ordem-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.ap-ordem-row input {
  max-width: 100px;
}

.ap-leaflet-map {
  height: 260px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--ap-border);
  margin-bottom: 0.75rem;
  background: var(--ap-sand);
}

.ap-gmaps-embed {
  width: 100%;
  height: 180px;
  border: 0;
  border-radius: 12px;
  margin-top: 0.75rem;
}

.ap-map-coords {
  font-size: 0.78rem;
  color: var(--ap-text-muted);
  font-variant-numeric: tabular-nums;
}

.ap-nearby-hint {
  font-size: 0.85rem;
  margin: 0 0 0.85rem;
}

.ap-nearby-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ap-nearby-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 12px;
  background: var(--ap-bg);
  border: 1px solid var(--ap-border);
  color: inherit;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.ap-nearby-item:hover {
  border-color: var(--ap-teal);
  transform: translateX(3px);
  box-shadow: var(--ap-shadow);
  color: inherit;
}

.ap-nearby-item strong {
  display: block;
  font-size: 0.9rem;
}

.ap-nearby-item span {
  display: block;
  font-size: 0.75rem;
  color: var(--ap-text-muted);
}

.ap-nearby-item em {
  margin-left: auto;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--ap-teal);
  white-space: nowrap;
}

.ap-nearby-ordem {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--ap-navy);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.ap-filters {
  margin-bottom: 1.5rem;
}

.ap-geo-group {
  margin-bottom: 2rem;
  animation: ap-fade-up 0.4s var(--ap-ease) both;
}

.ap-geo-group__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--ap-border);
}

.ap-geo-group__head h2 {
  margin: 0;
}

.ap-geo-group__head p {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
}

.ap-passeio-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.ap-passeio-card {
  display: flex;
  gap: 0.85rem;
  background: var(--ap-surface);
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius);
  padding: 1rem;
  box-shadow: var(--ap-shadow);
  transition: transform 0.25s var(--ap-ease), box-shadow 0.25s;
}

.ap-passeio-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ap-shadow-lg);
}

.ap-passeio-card__ordem {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--ap-navy), var(--ap-teal));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-family: var(--ap-display);
  flex-shrink: 0;
}

.ap-passeio-card__body {
  flex: 1;
  min-width: 0;
}

.ap-passeio-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.ap-passeio-card__top h3 {
  margin: 0;
  font-family: var(--ap-font);
  font-size: 1rem;
  font-weight: 650;
}

.ap-passeio-card__meta {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
}

.ap-passeio-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ap-passeio-card__actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

@media (max-width: 1100px) {
  .ap-passeio-layout {
    grid-template-columns: 1fr;
  }
  .ap-passeio-side {
    position: static;
  }
}


/* ---------- Itinerary (viagem) ---------- */
.ap-itin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.ap-itin-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ap-itin-prefs {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.ap-itin-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.85fr;
  gap: 1.15rem;
  align-items: start;
}

.ap-dias-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ap-dia-card {
  background: var(--ap-bg);
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius);
  padding: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ap-dia-card.is-active {
  border-color: var(--ap-teal);
  box-shadow: 0 0 0 3px var(--ap-teal-soft);
}

.ap-dia-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.ap-dia-card__head h3 {
  margin: 0;
  font-family: var(--ap-font);
  font-size: 1rem;
}

.ap-dia-card__head p {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
}

.ap-dia-card__acts {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ap-atividade {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: var(--ap-surface);
  border-radius: 12px;
  border: 1px solid var(--ap-border);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ap-atividade:hover {
  border-color: var(--ap-teal, #1a6b6b);
  box-shadow: 0 2px 10px rgba(26, 107, 107, 0.08);
}

.ap-atividade__thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.ap-atividade__body {
  flex: 1;
  min-width: 0;
}

.ap-atividade__body strong {
  display: block;
  font-size: 0.9rem;
}

.ap-atividade__body span {
  font-size: 0.75rem;
  color: var(--ap-text-muted);
}

.ap-atividade__desc {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  font-style: normal;
  color: var(--ap-text-muted);
  opacity: 0.9;
}

.ap-atividade__actions {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex-shrink: 0;
}

.ap-modal {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: min(560px, calc(100vw - 2rem));
  width: 100%;
  background: var(--ap-surface, #fff);
  color: var(--ap-text, #1a1a1a);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.ap-modal::backdrop {
  background: rgba(15, 23, 22, 0.55);
  backdrop-filter: blur(2px);
}

.ap-modal__panel {
  margin: 0;
  display: flex;
  flex-direction: column;
  max-height: min(90vh, 720px);
}

.ap-modal__head,
.ap-modal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--ap-border);
}

.ap-modal__foot {
  border-bottom: 0;
  border-top: 1px solid var(--ap-border);
  justify-content: flex-end;
}

.ap-modal__head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.ap-modal__body {
  padding: 1.25rem;
  overflow: auto;
}

.ap-map-search {
  display: flex;
  gap: 0.5rem;
}

.ap-map-search input {
  flex: 1;
}

.ap-act-foto__preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.ap-act-foto__preview img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--ap-border);
}

.ap-act-map-wrap {
  margin-top: 0.5rem;
}

.ap-act-map-wrap .ap-gmaps-embed {
  height: 180px;
  margin-bottom: 0.5rem;
}

.ap-day-card__photo {
  margin: 0.5rem 0;
  border-radius: 10px;
  overflow: hidden;
}

.ap-day-card__photo img {
  display: block;
  width: 100%;
  height: 110px;
  object-fit: cover;
}

.ap-day-card__desc {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--ap-text-muted);
  line-height: 1.35;
}

.ap-day-card__maps {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--ap-teal, #1a6b6b);
  text-decoration: none;
}

.ap-day-card__maps:hover {
  text-decoration: underline;
}

.ap-sugestoes-panel {
  position: sticky;
  top: calc(var(--ap-topbar-h) + 1rem);
  background: linear-gradient(180deg, rgba(26,107,107,0.06), transparent 40%), var(--ap-surface);
}

@media (max-width: 1100px) {
  .ap-itin-layout {
    grid-template-columns: 1fr;
  }
  .ap-sugestoes-panel {
    position: static;
  }
}

/* ---------- Wizard viagem ---------- */
.ap-wizard {
  max-width: 1100px;
}

.ap-wizard__steps {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.ap-wizard__step {
  flex: 1;
  min-width: 110px;
  border: 1px solid var(--ap-border);
  background: var(--ap-surface);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ap-text-muted);
  cursor: pointer;
  transition: all 0.2s var(--ap-ease);
}

.ap-wizard__step span {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--ap-sand);
  color: var(--ap-navy);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.ap-wizard__step.is-active {
  border-color: var(--ap-teal);
  color: var(--ap-navy);
  box-shadow: 0 0 0 3px var(--ap-teal-soft);
}

.ap-wizard__step.is-active span,
.ap-wizard__step.is-done span {
  background: linear-gradient(145deg, var(--ap-teal), #2a9a9a);
  color: #fff;
}

.ap-wizard__step.is-done {
  color: var(--ap-teal);
}

.ap-wizard__progress {
  height: 4px;
  background: var(--ap-border);
  border-radius: 99px;
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.ap-wizard__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--ap-teal), #2a9a9a);
  border-radius: 99px;
  transition: width 0.35s var(--ap-ease);
}

.ap-wizard__panel {
  display: none;
  animation: ap-fade-up 0.35s var(--ap-ease);
}

.ap-wizard__panel.is-active {
  display: block;
}

.ap-wizard__intro {
  margin-bottom: 1.35rem;
}

.ap-wizard__intro h2 {
  margin: 0 0 0.25rem;
}

.ap-wizard__intro p {
  margin: 0;
}

.ap-wizard__sub {
  font-family: var(--ap-font);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ap-text-muted);
  margin: 1.25rem 0 0.75rem;
}

.ap-wizard__footer {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 1rem 1.15rem;
  background: rgba(250, 251, 252, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius);
  box-shadow: 0 -8px 30px rgba(11, 31, 51, 0.08);
}

.ap-wizard__footer-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.ap-wizard__hint {
  font-size: 0.8rem;
  color: var(--ap-text-muted);
}

.ap-wizard-destino {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 1.15rem;
  align-items: start;
}

.ap-destino-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.ap-destino-card {
  border: 1px solid var(--ap-border);
  background: var(--ap-surface);
  border-radius: 14px;
  overflow: hidden;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.ap-destino-card img,
.ap-destino-card__ph {
  width: 100%;
  height: 88px;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, var(--ap-sand), #d4e4e4);
}

.ap-destino-card > div {
  padding: 0.7rem 0.8rem 0.85rem;
}

.ap-destino-card strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 0.15rem;
}

.ap-destino-card span {
  font-size: 0.75rem;
  color: var(--ap-text-muted);
}

.ap-destino-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--ap-shadow);
}

.ap-destino-card.is-selected {
  border-color: var(--ap-teal);
  box-shadow: 0 0 0 3px var(--ap-teal-soft);
}

.ap-destino-selected {
  display: none;
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(26,107,107,0.12), rgba(26,107,107,0.04));
  border: 1px solid rgba(26,107,107,0.25);
}

.ap-destino-selected.is-visible {
  display: block;
  animation: ap-fade-up 0.3s var(--ap-ease);
}

.ap-destino-selected__badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ap-teal);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.ap-destino-selected strong {
  display: block;
  font-size: 1.1rem;
}

.ap-destino-selected span {
  font-size: 0.85rem;
  color: var(--ap-text-muted);
}

.ap-destino-results {
  margin-top: 0.75rem;
  border: 1px solid var(--ap-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--ap-surface);
}

.ap-destino-results__label {
  padding: 0.45rem 0.85rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ap-text-muted);
  background: var(--ap-bg);
  font-weight: 650;
}

.ap-destino-result {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-top: 1px solid var(--ap-border);
  background: transparent;
  padding: 0.75rem 0.85rem;
  font: inherit;
  cursor: pointer;
  color: inherit;
}

.ap-destino-result:hover {
  background: var(--ap-teal-soft);
}

.ap-destino-result strong {
  display: block;
  font-size: 0.9rem;
}

.ap-destino-result span {
  font-size: 0.78rem;
  color: var(--ap-text-muted);
}

.ap-destino-result--map {
  background: linear-gradient(90deg, rgba(26,107,107,0.08), transparent);
  border-left: 3px solid var(--ap-teal);
}

.ap-destino-result--map:hover {
  background: var(--ap-teal-soft);
}

.ap-leaflet-map--lg {
  height: 320px;
}

.ap-review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.ap-review-card {
  background: var(--ap-bg);
  border: 1px solid var(--ap-border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
}

.ap-review-card span {
  display: block;
  font-size: 0.75rem;
  color: var(--ap-text-muted);
  margin-bottom: 0.35rem;
}

.ap-review-card strong {
  font-size: 1rem;
  color: var(--ap-navy);
}

@media (max-width: 960px) {
  .ap-wizard-destino {
    grid-template-columns: 1fr;
  }
  .ap-review-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .ap-wizard__step {
    min-width: calc(50% - 0.25rem);
  }
  .ap-review-grid {
    grid-template-columns: 1fr;
  }
  .ap-wizard__footer {
    flex-wrap: wrap;
  }
}

/* ---------- Day Kanban (viagem detail) ---------- */
.ap-day-kanban-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
  flex-wrap: wrap;
}

.ap-day-kanban-head h2 {
  margin: 0 0 0.2rem;
  font-family: var(--ap-display, var(--ap-font));
}

.ap-day-kanban-head p {
  margin: 0;
}

.ap-day-kanban-wrap {
  position: relative;
  margin: 0 -0.25rem;
}

.ap-day-kanban-rail {
  display: none;
}

.ap-day-kanban {
  position: relative;
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1.35rem 0.5rem 1.75rem;
  min-height: calc(100vh - 280px);
  align-items: stretch;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.ap-day-kanban .ap-kanban__col,
.ap-day-col {
  flex: 0 0 min(300px, 82vw);
  scroll-snap-align: start;
  position: relative;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(26, 107, 107, 0.12), rgba(232, 228, 220, 0.35) 38%, rgba(250, 251, 252, 0.9));
  border: 1px solid rgba(26, 107, 107, 0.12);
  box-shadow: 0 10px 28px rgba(11, 31, 51, 0.06);
}

.ap-day-col__pin {
  position: absolute;
  top: -0.35rem;
  left: 50%;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-radius: 50%;
  background: var(--ap-teal, #1a6b6b);
  box-shadow: 0 0 0 4px rgba(26, 107, 107, 0.18);
  z-index: 2;
}

.ap-day-kanban::before {
  content: "";
  position: absolute;
  top: 0.95rem;
  left: 0.5rem;
  right: 0.5rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(26, 107, 107, 0.35), transparent);
  pointer-events: none;
}

.ap-day-kanban .ap-kanban__col-head {
  align-items: flex-start;
}

.ap-day-col__actions {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 0.45rem;
}

.ap-day-col__actions .ap-btn {
  white-space: nowrap;
  padding-inline: 0.65rem;
}

.ap-day-kanban .ap-kanban__col-head h3 {
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-size: 1.05rem;
  font-family: var(--ap-display, var(--ap-font));
}

.ap-day-kanban .ap-kanban__col-head small {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--ap-text-muted);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.ap-day-kanban .ap-kanban__list {
  flex: 1;
  min-height: 120px;
}

.ap-day-empty {
  display: grid;
  place-items: center;
  min-height: 88px;
  padding: 1rem;
  border: 1px dashed rgba(26, 107, 107, 0.28);
  border-radius: 12px;
  color: var(--ap-text-muted);
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.ap-day-card {
  cursor: grab;
}

.ap-day-card:active {
  cursor: grabbing;
}

.ap-day-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.ap-day-card__time {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--ap-teal, #1a6b6b);
  background: rgba(26, 107, 107, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.ap-day-card .ap-card__client {
  font-size: 0.92rem;
}

#ap-day-activity-modal .ap-modal__head p {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
}

.ap-day-card__transport {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ap-teal, #1a6b6b);
  background: rgba(26, 107, 107, 0.08);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

/* ---------- Viagem hero ---------- */
.ap-viagem-hero {
  position: relative;
  margin-bottom: 1.75rem;
  padding: 2.25rem 2.25rem 1.75rem;
  border-radius: var(--ap-radius);
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(150deg, rgba(11, 31, 51, 0.93), rgba(26, 107, 107, 0.8)),
    var(--ap-hero-img, linear-gradient(135deg, #0b1f33, #1a6b6b)) center / cover no-repeat;
  box-shadow: 0 18px 40px rgba(11, 31, 51, 0.18);
  animation: ap-fade-up 0.4s var(--ap-ease);
}

.ap-viagem-hero__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.ap-viagem-hero__body {
  flex: 1;
  min-width: 260px;
}

.ap-viagem-hero__badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  margin-bottom: 0.9rem;
}

.ap-viagem-hero h1 {
  color: #fff;
  margin: 0 0 0.4rem;
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  line-height: 1.12;
}

.ap-viagem-hero__client {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
}

.ap-viagem-hero__client span { opacity: 0.8; }

.ap-viagem-hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.ap-viagem-hero__actions form { display: contents; }

.ap-viagem-hero__actions .ap-btn--secondary {
  background: rgba(255, 255, 255, 0.94);
}

.ap-viagem-hero__actions .ap-btn--danger {
  background: transparent;
  border: 1px solid rgba(255, 130, 110, 0.7);
  color: #ffb4a6;
}

.ap-viagem-hero__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
}

.ap-viagem-stat {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(4px);
}

.ap-viagem-stat i,
.ap-viagem-stat svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.85;
}

.ap-viagem-stat span {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  opacity: 0.72;
}

.ap-viagem-stat strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.25;
}

.ap-viagem-hero__progress {
  margin-top: 1.1rem;
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.ap-viagem-hero__progress-bar {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #3dbdbd, #8ee6d2);
}

.ap-tabs--viagem {
  gap: 0.35rem;
  margin-bottom: 1.75rem;
}

.ap-tabs--viagem a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.8rem 1.25rem;
  border-radius: 12px 12px 0 0;
}

.ap-tabs--viagem a.is-active {
  background: rgba(26, 107, 107, 0.07);
}

@media (max-width: 760px) {
  .ap-viagem-hero {
    padding: 1.5rem 1.25rem 1.25rem;
  }
  .ap-viagem-hero__top {
    margin-bottom: 1.25rem;
  }
  .ap-viagem-hero__actions .ap-btn {
    flex: 1;
    justify-content: center;
  }
}

/* ---------- Full route panel ---------- */
.ap-route-panel {
  margin-top: 1.5rem;
}

.ap-route-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

.ap-gmaps-embed--route {
  height: 420px;
}

.ap-route-stops {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.ap-route-stop {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--ap-border);
  border-radius: 12px;
  background: var(--ap-surface);
}

.ap-route-stop--origin {
  border-style: dashed;
  border-color: rgba(26, 107, 107, 0.4);
}

.ap-route-stop strong {
  display: block;
  font-size: 0.85rem;
}

.ap-route-stop span:last-child {
  font-size: 0.72rem;
  color: var(--ap-text-muted);
}

.ap-route-days {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--ap-border);
}

.ap-route-days strong {
  width: 100%;
  font-size: 0.8rem;
}

@media (max-width: 960px) {
  .ap-route-layout {
    grid-template-columns: 1fr;
  }
  .ap-route-stops {
    max-height: none;
  }
}

#ap-day-act-photo-preview {
  margin-top: 0.75rem;
}
