/* Travia — portado de app/Downloads/Travia_VPS/styles.css (prototipo
   estático) + adiciones para páginas renderizadas en servidor (Jinja2),
   marcadas con "-- Travia:" para distinguirlas del original. */
:root {
  --ink: #153d38;
  --ink-2: #315b55;
  --cream: #f8f5ed;
  --paper: #fffdf8;
  --line: #dddace;
  --coral: #ef765f;
  --coral-dark: #d85e4a;
  --mint: #b9dfcd;
  --mint-light: #e5f2eb;
  --yellow: #f2c96d;
  --blue: #b9dfe5;
  --shadow: 0 24px 60px rgba(21,61,56,.13);
  --radius: 22px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--cream); color: var(--ink); font-family: "DM Sans", sans-serif; }
button, input, select { font: inherit; }
button { color: inherit; }
a { color: inherit; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(22px, 5vw, 78px); border-bottom: 1px solid rgba(21,61,56,.12); background: rgba(248,245,237,.91); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 50; }
.brand { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; cursor: pointer; font: 800 22px "Manrope"; letter-spacing: -.6px; text-decoration: none; color: var(--ink); }
.brand-mark, .mark { display: grid; place-items: center; width: 37px; height: 37px; color: var(--coral); background: var(--ink); border-radius: 10px; color: white; font: 800 13px "Manrope"; }
.top-actions { display: flex; align-items: center; gap: 18px; }
.private-pill { display: flex; align-items: center; gap: 7px; padding: 7px 10px; background: rgba(185,223,205,.45); border: 1px solid rgba(21,61,56,.12); border-radius: 100px; font-size: 12px; font-weight: 700; }
.private-pill span { width: 7px; height: 7px; border-radius: 50%; background: #479e76; box-shadow: 0 0 0 3px rgba(71,158,118,.13); }
.notification-button { width: 38px; height: 38px; position: relative; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); cursor: pointer; font-size: 20px; text-decoration: none; }
.notification-button b { position: absolute; right: -4px; top: -5px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; border-radius: 20px; background: var(--coral); color: white; border: 2px solid var(--cream); font-size: 8px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--ink); color: white; font-size: 12px; font-weight: 800; cursor: pointer; }
.hero { min-height: 610px; max-width: 1440px; margin: 0 auto; padding: 64px clamp(24px, 7vw, 112px) 54px; display: grid; grid-template-columns: .86fr 1.14fr; gap: 50px; align-items: center; overflow: hidden; }
.hero-copy { position: relative; z-index: 3; }
.eyebrow { width: fit-content; display: flex; align-items: center; gap: 7px; padding: 7px 12px; background: var(--mint-light); border-radius: 100px; color: var(--ink-2); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.15px; }
.eyebrow span { color: var(--coral); }
h1, h2, h3 { font-family: "Manrope", sans-serif; margin: 0; }
h1 { margin: 21px 0 18px; font-size: clamp(40px, 6vw, 72px); line-height: 1; letter-spacing: -3px; }
h1 em { color: var(--coral); font-style: normal; }
.hero-copy > p { max-width: 530px; font-size: 18px; line-height: 1.65; color: var(--ink-2); }
.hero-actions { display: flex; gap: 12px; margin: 30px 0 38px; flex-wrap: wrap; }
.btn { border: 0; border-radius: 12px; padding: 12px 18px; cursor: pointer; font-weight: 700; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, opacity .18s ease; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:disabled { opacity: .43; cursor: not-allowed; }
.btn-primary { background: var(--coral); color: white; box-shadow: 0 8px 20px rgba(239,118,95,.22); }
.btn-primary:hover:not(:disabled) { background: var(--coral-dark); box-shadow: 0 11px 24px rgba(239,118,95,.3); }
.btn-quiet, .btn.ghost { background: transparent; border: 1px solid rgba(21,61,56,.25); }
.btn-quiet:hover:not(:disabled), .btn.ghost:hover:not(:disabled) { background: var(--paper); }
.btn-large { padding: 15px 22px; }
.btn.small { padding: 8px 12px; font-size: 12px; }
.btn.danger { background: #f4dfda; color: #a94d3c; }
.kicker { display: block; color: var(--coral); font-size: 11px; font-weight: 800; letter-spacing: 1.6px; margin-bottom: 10px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 28px; flex-wrap: wrap; gap: 10px; }
.section-heading h2 { font-size: 32px; letter-spacing: -1.4px; }
.section-heading p { color: #6a817c; margin: 0; }
.plans-section { max-width: 1290px; margin: 0 auto; padding: 40px 24px 80px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: stretch; }
.plan-card { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,253,248,.75); padding: 25px 22px; display: flex; flex-direction: column; min-height: 260px; transition: .2s ease; }
.plan-card:hover { transform: translateY(-4px); box-shadow: 0 18px 35px rgba(21,61,56,.08); }
.plan-card.featured { background: var(--ink); color: white; border-color: var(--ink); }
.plan-card .recommended { position: absolute; right: 17px; top: 17px; background: var(--yellow); color: var(--ink); font-size: 9px; font-weight: 800; padding: 5px 8px; border-radius: 7px; letter-spacing: .7px; }
.plan-card h3 { font-size: 19px; }
.plan-price { font: 800 34px "Manrope"; letter-spacing: -1.5px; margin: 17px 0 3px; }
.plan-price sup { font-size: 15px; vertical-align: top; line-height: 2; }
.plan-price small { font: 500 11px "DM Sans"; letter-spacing: 0; opacity: .7; }
.plan-description { font-size: 12px; line-height: 1.5; color: #68807a; min-height: 38px; }
.featured .plan-description { color: #c4d4d0; }
.plan-features { list-style: none; padding: 0; margin: 17px 0 24px; display: grid; gap: 8px; font-size: 12px; }
.plan-features li:before { content: "✓"; color: var(--coral); font-weight: 800; margin-right: 7px; }
.plan-card .btn { margin-top: auto; width: 100%; justify-content: center; }
.featured .btn-quiet { color: white; border-color: rgba(255,255,255,.4); }
.plan-card.agency-plan { background: linear-gradient(160deg,#fff9e7,#f5e3a9); border: 2px solid #e1bd58; padding: 24px 21px; }
.plan-card.agency-plan .recommended { background: var(--ink); color: white; }
.plan-card.agency-plan .btn { background: var(--ink); color: white; }

/* -- Travia: layout de la app autenticada (topbar + sidebar + workspace) */
.app-shell { min-height: calc(100vh - 76px); display: grid; grid-template-columns: 220px 1fr; max-width: 1500px; margin: 0 auto; }
.sidebar { background: rgba(255,253,248,.64); border-right: 1px solid var(--line); padding: 24px 14px; display: flex; flex-direction: column; gap: 3px; min-height: calc(100vh - 76px); }
.sidebar-label { font-size: 9px; font-weight: 800; letter-spacing: 1.4px; color: #81928e; margin: 10px 12px 6px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 12px; margin: 2px 0; border: 0; background: transparent; border-radius: 10px; color: #58716b; cursor: pointer; text-align: left; font-size: 13px; font-weight: 600; text-decoration: none; }
.nav-item:hover { background: #edf0e9; }
.nav-item.active { background: var(--mint-light); color: var(--ink); font-weight: 800; }
.workspace { padding: 32px clamp(20px,4vw,56px); min-width: 0; }
.workspace-header { display: flex; justify-content: space-between; gap: 24px; align-items: start; margin-bottom: 24px; flex-wrap: wrap; }
.workspace-header h2 { font-size: 30px; letter-spacing: -1.3px; }
.workspace-header > div > p { margin: 6px 0 0; color: #69817b; font-size: 14px; }
.header-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.trip-stats, .reservation-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap: 12px; margin-bottom: 22px; }
.stat-card { border: 1px solid var(--line); background: rgba(255,253,248,.72); padding: 15px; border-radius: 15px; }
.stat-card span { display: block; color: #7c8d89; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; font-weight: 800; }
.stat-card strong { font: 800 20px "Manrope"; display: block; margin-top: 5px; }
.main-grid { display: grid; grid-template-columns: 1.4fr .8fr; gap: 18px; }
.content-card, .card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.content-card h3 { font-size: 16px; margin-bottom: 15px; }
.date-card { position: relative; overflow: hidden; background: var(--ink); color: white; min-height: 180px; }
.date-card .date-range { font: 800 24px "Manrope"; position: relative; z-index: 2; }
.date-card .date-meta { font-size: 12px; color: #c5d4d0; position: relative; z-index: 2; }
.lock-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 100px; padding: 6px 9px; background: rgba(255,255,255,.13); font-size: 10px; margin-top: 12px; position: relative; z-index: 2; }
.date-edit-row { position: relative; z-index: 2; display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.date-edit-row input { min-width: 0; padding: 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.1); color: white; color-scheme: dark; }
.activity-list { display: grid; gap: 10px; }
.activity { display: grid; grid-template-columns: 50px 38px 1fr auto; align-items: center; gap: 11px; padding: 11px; border: 1px solid #ebe8df; border-radius: 12px; }
.activity time { font-size: 11px; font-weight: 800; }
.activity-icon { width: 36px; height: 36px; display: grid; place-items: center; background: var(--mint-light); border-radius: 10px; }
.activity strong { display: block; font-size: 12px; }
.activity small { color: #81908c; font-size: 10px; }
.activity button { border: 0; background: transparent; color: #879590; cursor: pointer; font-size: 16px; }
.empty-state { text-align: center; padding: 34px 16px; color: #788a86; }
.empty-state .empty-icon { font-size: 28px; }
.empty-state h3 { color: var(--ink); margin: 8px 0; }
.viewer-banner { padding: 13px 16px; border-radius: 13px; background: #fff2cd; border: 1px solid #e9d28f; display: flex; gap: 12px; align-items: center; margin-bottom: 20px; }
.viewer-banner strong { font-size: 12px; display: block; }
.viewer-banner p { font-size: 10px; margin: 2px 0 0; color: #756744; }
.day-tabs { display: flex; gap: 7px; overflow: auto; padding-bottom: 7px; margin-bottom: 18px; }
.day-tab { flex: 0 0 auto; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; padding: 8px 12px; cursor: pointer; font-size: 11px; text-decoration: none; color: var(--ink); }
.day-tab small { display: block; font-size: 10px; opacity: .7; margin-top: 2px; text-align: center; }
.day-tab { text-align: center; }
.day-tab.active { background: var(--ink); color: white; border-color: var(--ink); }
.people-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.person { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #ece9e0; }
.person:last-child { border-bottom: 0; }
.person-avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); font-size: 11px; font-weight: 800; flex-shrink: 0; }
.person-info { flex: 1; min-width: 0; }
.person strong { display: block; font-size: 12px; }
.person small { color: #82918d; font-size: 10px; }
.role-badge { font-size: 9px; font-weight: 800; background: #edf0e9; padding: 5px 8px; border-radius: 100px; white-space: nowrap; }
.role-badge.editor, .role-badge.owner { background: #fde2db; color: #a64634; }
.reservation-filters { display: flex; gap: 7px; overflow: auto; padding: 2px 0 14px; }
.reservation-filters a { white-space: nowrap; border: 1px solid var(--line); background: var(--paper); border-radius: 100px; padding: 8px 11px; font-size: 10px; font-weight: 700; cursor: pointer; text-decoration: none; color: var(--ink); }
.reservation-filters a.active { background: var(--ink); border-color: var(--ink); color: white; }
.reservation-list { display: grid; gap: 10px; }
.reservation-card { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; gap: 14px; align-items: start; padding: 17px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.reservation-card.cancelled { opacity: .58; }
.reservation-card.settled { border-color: #bfd8c5; }
.reservation-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; background: var(--mint-light); font-size: 20px; }
.reservation-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 3px; }
.reservation-type { font-size: 8px; color: #70847f; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.reservation-status, .due-badge { font-size: 8px; font-weight: 800; padding: 4px 7px; border-radius: 20px; background: #eeeae0; color: #6d7b77; }
.reservation-status.confirmed { background: #dceceb; color: #34736e; }
.reservation-status.paid { background: #dceedd; color: #3a774a; }
.reservation-status.cancelled { background: #f3d7d1; color: #a64e3d; }
.due-badge.overdue, .due-badge.today { background: #f8dcd6; color: #a94c3a; }
.due-badge.soon { background: #fff0c9; color: #8a6723; }
.reservation-main h3 { font-size: 14px; margin: 0 0 3px; }
.reservation-main > p { font-size: 10px; color: #758681; margin: 0; }
.reservation-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 9px; font-size: 9px; color: #697e78; }
.reservation-notes { display: block; margin-top: 8px; color: #81908c; font-size: 9px; }
.payment-control { margin-top: 12px; padding: 11px; border-radius: 12px; background: #f6f7f2; }
.payment-figures { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.payment-figures span { font-size: 8px; color: #758681; }
.payment-figures b { display: block; margin-top: 2px; font-size: 11px; color: var(--ink); }
.payment-figures .balance b { color: var(--coral); }
.payment-history { margin-top: 10px; font-size: 9px; color: #63736e; }
.payment-history > strong { display: block; margin-bottom: 5px; }
.payment-row { display: grid; grid-template-columns: minmax(0,1fr) auto 22px; gap: 8px; align-items: center; padding: 5px 0; border-top: 1px dashed #dcddd7; }
.payment-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.payment-row button { width: 21px; height: 21px; border: 0; border-radius: 6px; background: #f4dfda; color: #a94d3c; cursor: pointer; }
.reservation-side { text-align: right; min-width: 130px; }
.reservation-side > strong { display: block; font: 800 16px "Manrope"; }
.reservation-side > small { display: block; color: #85938f; font-size: 8px; }
.reservation-side > a { display: block; margin-top: 9px; color: var(--coral); font-size: 9px; font-weight: 700; text-decoration: none; }
.reservation-actions { display: flex; justify-content: flex-end; gap: 5px; margin-top: 8px; }
.reservation-actions a, .reservation-actions button { border: 1px solid var(--line); background: white; border-radius: 7px; padding: 5px 8px; font-size: 9px; cursor: pointer; text-decoration: none; color: var(--ink); }
.liquidation-alerts { padding: 16px; margin-bottom: 18px; border: 1px solid #f0c5ad; border-radius: 16px; background: #fff8f3; }
.liquidation-alert-list { display: grid; gap: 6px; margin-top: 10px; }
.liquidation-alert { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 10px; background: white; border: 1px solid #efe4db; }
.liquidation-alert.overdue, .liquidation-alert.today { border-color: #e4a597; background: #fff2ef; }
.notification-list { display: grid; gap: 9px; }
.notification-item { display: grid; grid-template-columns: 36px 1fr; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fbfaf5; }
.notification-item.unread { border-left: 3px solid var(--coral); }
.notification-item-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--mint-light); }
.notification-item.news .notification-item-icon { background: #fff0c8; }
.notification-item.payment .notification-item-icon { background: #f8dcd6; color: #a54c3d; font-weight: 800; }
.notification-item strong { display: block; font-size: 11px; }
.notification-item p { font-size: 10px; color: #687d78; margin: 3px 0; line-height: 1.45; }
.notification-item time { font-size: 8px; color: #929c99; }
.capacity-row { display: flex; justify-content: space-between; font-size: 11px; margin: 12px 0 7px; }
.capacity-track { height: 6px; background: #e8e7df; border-radius: 10px; overflow: hidden; }
.capacity-track span { display: block; height: 100%; background: var(--coral); }

form { display: grid; gap: 15px; }
label { display: grid; gap: 6px; font-size: 11px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid #d7d6cf; border-radius: 10px; background: white; padding: 11px 12px; color: var(--ink); outline: none; }
textarea { resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus { border-color: #6c998c; box-shadow: 0 0 0 3px rgba(108,153,140,.12); }
input:disabled, textarea:disabled, select:disabled { background: #eeece5; color: #6f7b78; }
.field-row, .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-help { font-size: 10px; color: #73847f; font-weight: 500; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; }
.checkbox-row input { width: auto; }

/* -- Travia: tarjetas de autenticación */
.auth-wrap { max-width: 420px; margin: 60px auto; padding: 0 20px; }
.card.auth { text-align: left; }
.lockup { display: flex; align-items: center; gap: 10px; font: 800 18px "Manrope"; margin-bottom: 18px; }
.muted { color: #6a817c; font-size: 12px; }

/* -- Travia: alertas / flash */
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-size: 13px; font-weight: 600; }
.alert.info { background: var(--mint-light); color: var(--ink-2); }
.alert.error { background: #fde2db; color: #a64634; }

/* -- Travia: listas simples (viajes, compras) */
.list-item { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); margin-bottom: 10px; text-decoration: none; color: var(--ink); transition: transform .15s ease; }
.list-item:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(21,61,56,.06); }
.list-item .titulo { font-weight: 800; font-size: 14px; }
.list-item .meta { font-size: 11px; color: #75857f; margin-top: 4px; }
.pill { font-size: 9px; font-weight: 800; padding: 4px 8px; border-radius: 100px; background: #eeeae0; color: #6d7b77; margin-left: 6px; }
.pill.pending_payment, .pill.pending { background: #fff0c8; color: #8a6723; }
.pill.active { background: #dceedd; color: #3a774a; }
.pill.expired, .pill.cancelled, .pill.revoked { background: #f3d7d1; color: #a64e3d; }
.container { max-width: 1100px; margin: 0 auto; padding: 32px 20px; }
.card-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.link { border: 0; background: transparent; color: var(--coral); font-size: 12px; font-weight: 700; cursor: pointer; padding: 0; text-decoration: none; }
.copy-box { display: flex; gap: 8px; align-items: center; background: #f6f7f2; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 11px; word-break: break-all; }

/* -- Travia: galería de fotos del viaje */
.upload-card { margin-bottom: 22px; }
.camera-row { display: flex; gap: 10px; flex-wrap: wrap; }
.camera-wrap { margin-top: 14px; display: grid; gap: 10px; justify-items: center; }
.camera-wrap video { width: 100%; max-width: 420px; border-radius: 14px; background: #000; }
.camera-actions { display: flex; gap: 10px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 14px; }
.photo-card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 0; }
.photo-card img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.photo-card figcaption { padding: 8px 10px 0; font-size: 11px; color: var(--ink-2); }
.photo-meta { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 10px; }
.photo-meta small { color: #85938f; font-size: 9px; }
.photo-meta form { display: contents; }
.photo-meta button { border: 0; background: #f4dfda; color: #a94d3c; border-radius: 6px; width: 22px; height: 22px; cursor: pointer; }

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; padding-top: 45px; }
  .app-shell { grid-template-columns: 1fr; }
  .main-grid, .people-grid { grid-template-columns: 1fr; }
  .field-row, .row { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .topbar { height: 66px; padding: 0 16px; }
  .sidebar { min-height: auto; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; overflow: auto; position: sticky; top: 66px; z-index: 20; }
  .sidebar-label { display: none; }
  .nav-item { white-space: nowrap; margin: 0; }
  .workspace { padding: 22px 16px; }
  .reservation-card { grid-template-columns: 42px minmax(0,1fr); }
  .reservation-side { grid-column: 2; text-align: left; }
}
