:root {
  --ink: #061857;
  --muted: #69738f;
  --sea: #eb6255;
  --sea-dark: #061857;
  --sea-soft: #fff0ee;
  --sand: #eb6255;
  --paper: #fff;
  --bg: #f6f7fb;
  --line: #e3e6ef;
  --danger: #c43f3f;
  --shadow: 0 18px 50px rgba(6, 24, 87, 0.07);
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
summary {
  -webkit-tap-highlight-color: transparent;
}
.shell {
  min-height: 100vh;
}

.topbar {
  height: 76px;
  padding: 0 clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--sea), #4bb5a7);
  border-radius: 14px;
}
.user {
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 14px;
}
.link,
.text-danger {
  padding: 0;
  color: var(--sea-dark);
  background: none;
  border: 0;
  cursor: pointer;
}
.text-danger {
  margin-top: 14px;
  color: var(--danger);
  font-size: 13px;
}

.nav {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  color: #8a9aa6;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.nav a {
  color: inherit;
  text-decoration: none;
}
.nav a.active {
  color: var(--sea-dark);
  font-weight: 750;
}
.nav-disabled {
  cursor: default;
  opacity: 0.78;
}
.nav-icon {
  display: none;
}

.content {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
  padding: 44px 0 80px;
}
.card {
  padding: 26px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 13px 20px;
  border: 0;
  border-radius: 12px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}
.button.primary {
  color: #fff;
  background: var(--sea);
}
.button.primary:hover {
  background: var(--sea-dark);
}
.button.secondary {
  color: var(--sea-dark);
  background: var(--sea-soft);
}
.button.white {
  color: var(--sea-dark);
  background: #fff;
}
.button.ghost {
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
}
.button.danger {
  color: #fff;
  background: var(--danger);
}
.button.danger-outline {
  color: var(--danger);
  background: transparent;
  border: 1px solid #e3bcbc;
}
.button.compact {
  min-height: 38px;
  padding: 10px 15px;
  font-size: 13px;
}
.button small {
  display: block;
  margin-left: 8px;
  opacity: 0.7;
}
.button:disabled {
  opacity: 0.8;
}

.hero {
  min-height: 250px;
  margin-bottom: 38px;
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  background: linear-gradient(120deg, #d9f0ea, #fdf0dc);
  border-radius: 28px;
}
.hero h1,
.page-head h1 {
  margin: 10px 0 14px;
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.hero p,
.page-head p {
  max-width: 650px;
  color: var(--muted);
  font-size: 17px;
}
.eyebrow {
  color: var(--sea-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.section-head {
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.section-head h2 {
  margin: 5px 0 0;
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.035em;
}
.page-head {
  margin-bottom: 25px;
}
.narrow-head,
.narrow-card {
  width: min(760px, 100%);
  margin-right: auto;
  margin-left: auto;
}
.back-link {
  display: block;
  width: max-content;
  margin-bottom: 24px;
  color: var(--sea-dark);
  font-weight: 700;
  text-decoration: none;
}

.trip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.trip-card {
  display: block;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.trip-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(23, 50, 77, 0.1);
}
.trip-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.trip-arrow {
  color: var(--sea);
  font-size: 24px;
}
.status {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.status.upcoming {
  color: #8a5918;
  background: #fff0d7;
}
.status.current {
  color: #11664a;
  background: #dff4e9;
}
.status.finished {
  color: #60717e;
  background: #edf1f3;
}
.trip-destination {
  display: block;
  margin-top: 24px;
  color: var(--sea-dark);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}
.trip-card h3 {
  margin: 7px 0 7px;
  font-size: 25px;
  letter-spacing: -0.025em;
}
.trip-dates {
  margin: 0;
  color: var(--muted);
}
.trip-meta {
  margin-top: 22px;
  padding-top: 17px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.empty-state {
  padding: 52px 24px;
  text-align: center;
}
.empty-state h3 {
  margin: 14px 0 5px;
  font-size: 25px;
}
.empty-state p {
  max-width: 540px;
  margin: 0 auto 22px;
  color: var(--muted);
  line-height: 1.6;
}
.empty-icon {
  font-size: 38px;
}

.admin-callout {
  margin-top: 28px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  background: var(--ink);
  border-radius: 20px;
}
.admin-callout p {
  margin: 5px 0 0;
  color: #bdd0df;
}

.form-card {
  padding: clamp(24px, 5vw, 42px);
}
.form-grid {
  display: grid;
  gap: 18px;
}
.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.field {
  display: block;
  min-width: 0;
}
.field.full {
  grid-column: 1 / -1;
}
.field > span {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 750;
}
.field small {
  margin-left: 4px;
  color: var(--muted);
  font-weight: 500;
}
.field input,
.field select,
.field textarea,
.drop input {
  display: block;
  width: 100%;
  padding: 13px 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cbd9d5;
  border-radius: 10px;
  outline: none;
}
.field textarea {
  resize: vertical;
  line-height: 1.5;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--sea);
  box-shadow: 0 0 0 3px rgba(22, 139, 136, 0.12);
}
.form-actions {
  margin-top: 26px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.danger-zone {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: none;
}
.danger-zone h2 {
  margin: 0 0 5px;
  font-size: 20px;
}
.danger-zone p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.trip-hero {
  min-height: 285px;
  padding: clamp(30px, 6vw, 58px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  color: #fff;
  background: linear-gradient(135deg, #0b6f70, #2ea397 62%, #e6a64e 145%);
  border-radius: 28px;
  overflow: hidden;
}
.trip-hero .eyebrow {
  color: #d6f3ef;
}
.trip-hero-line {
  display: flex;
  align-items: center;
  gap: 12px;
}
.trip-hero h1 {
  margin: 16px 0 8px;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}
.trip-hero p {
  margin: 0;
  color: #d6edeb;
}
.trip-description {
  max-width: 680px;
  margin-top: 20px;
  color: #eefaf8;
  line-height: 1.6;
  white-space: pre-line;
}
.local-nav {
  margin: 18px 0 24px;
  padding: 0 6px;
  display: flex;
  gap: 22px;
  overflow-x: auto;
}
.local-nav a {
  padding: 9px 0;
  color: var(--sea-dark);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: none;
}
.stat-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--sea-dark);
  background: var(--sea-soft);
  border-radius: 13px;
  font-size: 21px;
}
.stat-card strong,
.stat-card span {
  display: block;
}
.stat-card strong {
  font-size: 24px;
}
.stat-card div span {
  color: var(--muted);
  font-size: 12px;
}
.content-section {
  padding-top: 58px;
  scroll-margin-top: 20px;
}

.action-details {
  position: relative;
}
.action-details > summary {
  list-style: none;
}
.action-details > summary::-webkit-details-marker,
.mini-menu > summary::-webkit-details-marker {
  display: none;
}
.popover-form {
  position: absolute;
  z-index: 30;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, calc(100vw - 36px));
  box-shadow: 0 24px 60px rgba(23, 50, 77, 0.18);
}
.popover-form.wide {
  width: min(620px, calc(100vw - 36px));
}
.popover-form h3 {
  margin: 0 0 18px;
  font-size: 22px;
}
.popover-form .field {
  margin-bottom: 14px;
}
.traveler-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.traveler-card {
  position: relative;
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  box-shadow: none;
}
.avatar {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--sea), #56b9ab);
  border-radius: 50%;
  font-weight: 800;
}
.traveler-copy {
  min-width: 0;
  flex: 1;
}
.traveler-copy strong,
.traveler-copy span,
.traveler-copy small {
  display: block;
  overflow-wrap: anywhere;
}
.traveler-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.traveler-copy small {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.4;
}
.mini-menu {
  position: relative;
}
.mini-menu > summary {
  padding: 4px;
  color: var(--muted);
  list-style: none;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.mini-panel {
  position: absolute;
  z-index: 35;
  top: 28px;
  right: 0;
  width: min(330px, calc(100vw - 44px));
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(23, 50, 77, 0.18);
}
.mini-panel .field {
  margin-bottom: 11px;
}
.soft-empty {
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: none;
}
.soft-empty > span {
  font-size: 28px;
}
.soft-empty strong {
  display: block;
}
.soft-empty p {
  margin: 5px 0 0;
  color: var(--muted);
}

.timeline {
  position: relative;
}
.day-block {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  padding: 0 0 28px;
}
.day-head {
  position: sticky;
  top: 14px;
  align-self: start;
  display: flex;
  align-items: center;
  gap: 11px;
}
.day-number {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--sea);
  border-radius: 12px;
  font-weight: 800;
}
.day-head strong,
.day-head div span {
  display: block;
}
.day-head div span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}
.day-count {
  display: none;
}
.day-content {
  min-width: 0;
}
.plan-card {
  position: relative;
  margin-bottom: 12px;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 17px;
}
.plan-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--sea-dark);
  background: var(--sea-soft);
  border-radius: 11px;
  font-weight: 900;
}
.type-food {
  color: #995b14;
  background: #fff0d7;
}
.type-transport {
  color: #3c5d8f;
  background: #e7eef9;
}
.type-accommodation {
  color: #765092;
  background: #f0e8f7;
}
.type-note {
  color: #5e6971;
  background: #edf1f3;
}
.plan-main {
  min-width: 0;
  flex: 1;
}
.plan-topline {
  display: flex;
  gap: 12px;
  align-items: center;
}
.plan-type {
  color: var(--sea-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.plan-topline time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.plan-main h3 {
  margin: 5px 0 0;
  font-size: 18px;
}
.plan-location {
  margin: 7px 0 0;
  color: var(--sea-dark);
  font-size: 13px;
}
.plan-notes {
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-line;
}
.plan-panel {
  width: min(620px, calc(100vw - 44px));
}
.empty-day {
  padding: 18px;
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  border: 1px dashed #c3d5d0;
  border-radius: 15px;
}
.empty-day span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--sea-dark);
  background: var(--sea-soft);
  border-radius: 8px;
  font-weight: 800;
}

.login-wrap {
  min-height: calc(100vh - 165px);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 9vw;
}
.login-copy h1 {
  margin: 15px 0;
  font-size: clamp(44px, 7vw, 74px);
  line-height: 1;
  letter-spacing: -0.055em;
}
.login-copy p {
  max-width: 520px;
  color: var(--muted);
  font-size: 18px;
}
.login-card {
  padding: 36px;
}
.login-card h2 {
  margin: 0 0 6px;
  font-size: 27px;
}
.login-card label:not(.check),
.drop {
  display: block;
  margin-top: 20px;
  font-size: 13px;
  font-weight: 700;
}
.login-card input[type="email"],
.login-card input[type="password"] {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  border: 1px solid #cbd9d5;
  border-radius: 10px;
}
.check {
  margin: 18px 0;
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.login-card .button {
  width: 100%;
}
.alert {
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: 12px;
}
.alert.success {
  color: #176840;
  background: #dff4e9;
}
.alert.error {
  color: #8e2929;
  background: #f9e2e2;
}
.two-cols {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
}
.drop {
  margin-bottom: 18px;
  padding: 22px;
  border: 2px dashed #c3d5d0;
  border-radius: 14px;
}
.history {
  padding: 13px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px;
  border-bottom: 1px solid var(--line);
}
.history small {
  grid-column: 1 / -1;
  color: var(--muted);
}
.muted,
.card p {
  color: var(--muted);
  line-height: 1.6;
}
dl {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
}
dt {
  font-weight: 700;
}
dd {
  margin: 0;
  color: var(--muted);
}
hr {
  margin: 25px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .trip-grid,
  .traveler-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .topbar {
    height: 64px;
    padding: 0 18px;
  }
  .brand small,
  .user span {
    display: none;
  }
  .nav {
    position: fixed;
    z-index: 50;
    right: 0;
    bottom: 0;
    left: 0;
    height: 68px;
    padding: 5px 8px 7px;
    justify-content: space-around;
    gap: 0;
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 20px rgba(23, 50, 77, 0.08);
  }
  .nav a,
  .nav-disabled {
    min-width: 54px;
    display: grid;
    place-items: center;
    gap: 2px;
    font-size: 10px;
  }
  .nav-icon {
    display: block;
    font-size: 19px;
    line-height: 1;
  }
  .nav a:last-child {
    max-width: 72px;
    overflow: hidden;
  }
  .content {
    width: min(100% - 28px, 1160px);
    padding: 25px 0 95px;
  }
  .hero {
    min-height: 0;
    padding: 28px;
    display: block;
    border-radius: 22px;
  }
  .hero .button {
    width: 100%;
    margin-top: 18px;
  }
  .hero h1 {
    font-size: 42px;
  }
  .section-head {
    align-items: flex-end;
  }
  .trip-grid,
  .traveler-grid,
  .stats-grid,
  .two-cols,
  .login-wrap,
  .form-grid.two {
    grid-template-columns: 1fr;
  }
  .trip-card {
    padding: 22px;
  }
  .empty-state {
    padding: 38px 20px;
  }
  .admin-callout {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
  .admin-callout .button {
    width: 100%;
  }
  .login-wrap {
    gap: 28px;
  }
  .login-copy h1 {
    font-size: 44px;
  }
  .login-card {
    padding: 25px;
  }
  .form-card {
    padding: 22px;
  }
  .field.full {
    grid-column: auto;
  }
  .field input,
  .field select,
  .field textarea {
    font-size: 16px;
  }
  .form-actions {
    flex-direction: column-reverse;
  }
  .form-actions .button {
    width: 100%;
  }
  .danger-zone {
    align-items: flex-start;
    flex-direction: column;
  }
  .danger-zone .button {
    width: 100%;
  }
  .trip-hero {
    min-height: 270px;
    padding: 28px 24px;
    align-items: flex-start;
    flex-direction: column;
    border-radius: 22px;
  }
  .trip-hero h1 {
    font-size: 43px;
  }
  .trip-hero .button {
    width: 100%;
  }
  .trip-description {
    font-size: 14px;
  }
  .local-nav {
    margin-bottom: 16px;
  }
  .stats-grid {
    gap: 10px;
  }
  .stat-card {
    padding: 15px;
  }
  .content-section {
    padding-top: 44px;
  }
  .popover-form {
    position: fixed;
    z-index: 80;
    top: 76px;
    right: 14px;
    left: 14px;
    width: auto;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
  }
  .popover-form.wide {
    width: auto;
  }
  .traveler-grid {
    gap: 10px;
  }
  .day-block {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-bottom: 24px;
  }
  .day-head {
    position: static;
  }
  .day-count {
    display: block;
    margin-left: auto;
    color: var(--muted);
    font-size: 12px;
  }
  .plan-card {
    padding: 16px 13px;
    gap: 11px;
  }
  .plan-icon {
    width: 34px;
    height: 34px;
  }
  .plan-main h3 {
    font-size: 16px;
  }
  .mini-panel,
  .plan-panel {
    position: fixed;
    z-index: 90;
    top: 76px;
    right: 14px;
    left: 14px;
    width: auto;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
  }
}

/* Identidad visual Viajario 0.2.1 */
body {
  background:
    radial-gradient(circle at 4% 2%, rgba(235, 98, 85, 0.055), transparent 24rem),
    var(--bg);
  color: var(--ink);
}

.topbar {
  height: 78px;
  padding: 0 clamp(22px, 5vw, 76px);
  border-bottom-color: rgba(6, 24, 87, 0.08);
  box-shadow: 0 5px 24px rgba(6, 24, 87, 0.025);
}

.brand {
  width: 186px;
  height: 52px;
  overflow: hidden;
}

.brand img {
  display: block;
  width: 186px;
  height: auto;
}

.user {
  gap: 12px;
  color: var(--ink);
  font-weight: 650;
}

.user-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--ink);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
}

.link {
  margin-left: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.link:hover {
  color: var(--sea);
}

.nav {
  height: 58px;
  gap: clamp(25px, 4vw, 52px);
  border-bottom-color: rgba(6, 24, 87, 0.08);
}

.nav a,
.nav-disabled {
  height: 100%;
  display: inline-flex;
  align-items: center;
  position: relative;
  font-weight: 650;
}

.nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--sea);
  border-radius: 4px 4px 0 0;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.nav a.active {
  color: var(--ink);
}

.nav a.active::after,
.nav a:hover::after {
  transform: scaleX(1);
}

.nav-disabled {
  opacity: 0.5;
}

.content {
  width: min(1180px, calc(100% - 44px));
  padding-top: 42px;
}

.card {
  border-color: rgba(6, 24, 87, 0.1);
  box-shadow: var(--shadow);
}

.button {
  min-height: 48px;
  gap: 12px;
  border-radius: 13px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button.primary {
  background: var(--sea);
  box-shadow: 0 10px 22px rgba(235, 98, 85, 0.2);
}

.button.primary:hover {
  background: #dc5146;
  box-shadow: 0 13px 28px rgba(235, 98, 85, 0.28);
  transform: translateY(-1px);
}

.button.secondary {
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(6, 24, 87, 0.14);
}

.button.ghost {
  color: var(--ink);
  background: #fff;
  border-color: rgba(6, 24, 87, 0.14);
}

.button.white {
  color: var(--ink);
}

.eyebrow {
  color: var(--sea);
  letter-spacing: 0.15em;
}

.back-link {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 13px;
  transition: color 0.18s ease;
}

.back-link:hover {
  color: var(--sea);
}

/* Inicio */
.hero {
  min-height: 320px;
  padding: clamp(36px, 6vw, 70px);
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(125deg, #061857 0%, #10296f 60%, #263e83 100%);
  border-radius: 30px;
}

.hero::before {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -90px;
  top: -160px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 690px;
}

.hero h1 {
  max-width: 650px;
  margin-top: 12px;
  color: #fff;
  font-size: clamp(40px, 5.5vw, 66px);
}

.hero p {
  max-width: 610px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.65;
}

.hero .button {
  margin-top: 14px;
}

.hero-visual {
  width: 250px;
  height: 190px;
  position: relative;
  flex: 0 0 250px;
}

.route-line {
  position: absolute;
  width: 190px;
  height: 120px;
  left: 16px;
  top: 34px;
  border: 2px dashed rgba(255, 255, 255, 0.34);
  border-color: rgba(255,255,255,.34) transparent transparent rgba(255,255,255,.34);
  border-radius: 50%;
  transform: rotate(8deg);
}

.route-dot,
.route-plane,
.route-pin {
  position: absolute;
  display: grid;
  place-items: center;
}

.route-dot {
  width: 14px;
  height: 14px;
  left: 10px;
  bottom: 37px;
  background: #fff;
  border: 4px solid var(--sea);
  border-radius: 50%;
}

.route-plane {
  width: 56px;
  height: 56px;
  left: 88px;
  top: 45px;
  color: var(--ink);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.16);
  font-size: 23px;
  transform: rotate(-10deg);
}

.route-pin {
  right: 5px;
  top: 15px;
  color: #fff;
  font-size: 52px;
}

.section-head h2 {
  color: var(--ink);
}

.trip-card {
  border-top: 4px solid transparent;
}

.trip-card:hover {
  border-top-color: var(--sea);
  box-shadow: 0 22px 50px rgba(6, 24, 87, 0.11);
}

.trip-arrow,
.trip-destination {
  color: var(--sea);
}

.empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  color: var(--sea);
  background: var(--sea-soft);
  border-radius: 21px;
}

.admin-callout {
  background: var(--ink);
}

/* Crear y editar viaje */
.create-intro {
  min-height: 210px;
  margin-bottom: 24px;
  padding: clamp(30px, 5vw, 52px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(125deg, #061857, #112a70);
  border-radius: 28px;
}

.create-intro::after {
  content: "";
  width: 240px;
  height: 240px;
  position: absolute;
  right: -75px;
  top: -100px;
  border: 46px solid rgba(235, 98, 85, 0.12);
  border-radius: 50%;
}

.create-intro > div:first-child {
  position: relative;
  z-index: 2;
}

.create-intro h1 {
  margin: 9px 0 12px;
  color: #fff;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.create-intro p {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  line-height: 1.6;
}

.create-mark {
  width: 94px;
  height: 94px;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  color: #fff;
  background: var(--sea);
  border: 10px solid rgba(255, 255, 255, 0.13);
  border-radius: 50% 50% 50% 16px;
  transform: rotate(-8deg);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.16);
  font-size: 32px;
}

.create-mark span {
  transform: rotate(8deg);
}

.compact-intro {
  min-height: 180px;
}

.steps {
  max-width: 880px;
  margin: 0 auto 24px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  position: relative;
  list-style: none;
}

.steps::before {
  content: "";
  height: 2px;
  position: absolute;
  top: 19px;
  right: 16%;
  left: 16%;
  background: var(--line);
}

.steps li {
  display: grid;
  justify-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
  color: #98a0b5;
  font-size: 12px;
}

.steps li span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #7e879f;
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: 50%;
  font-weight: 800;
}

.steps li.active {
  color: var(--ink);
}

.steps li.active span {
  color: #fff;
  background: var(--sea);
  border-color: var(--sea);
  box-shadow: 0 7px 16px rgba(235, 98, 85, 0.23);
}

.journey-form {
  width: min(880px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.form-card {
  padding: clamp(26px, 5vw, 48px);
  border-radius: 24px;
}

.form-section {
  padding-bottom: 34px;
  margin-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.form-section.last-section {
  margin-bottom: 0;
}

.form-section-head {
  margin-bottom: 22px;
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.section-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--sea);
  background: var(--sea-soft);
  border-radius: 13px;
  font-size: 12px;
  font-weight: 900;
}

.form-section-head h2 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 21px;
  letter-spacing: -0.02em;
}

.form-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.form-grid {
  gap: 20px;
}

.field > span {
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 13px;
}

.field > span b {
  color: var(--sea);
}

.field input,
.field select,
.field textarea,
.drop input {
  min-height: 50px;
  padding: 14px 16px;
  color: var(--ink);
  background: #fbfbfd;
  border-color: #d9deea;
  border-radius: 12px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field textarea {
  min-height: 122px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #9ba3b5;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  background: #fff;
  border-color: var(--sea);
  box-shadow: 0 0 0 4px rgba(235, 98, 85, 0.11);
}

.field-help {
  display: block;
  margin-top: 7px;
  color: #929aaf;
  text-align: right;
  font-size: 11px;
}

.form-actions {
  margin-top: 6px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

/* Acceso */
.guest-content {
  padding-top: 36px;
}

.login-wrap {
  min-height: calc(100vh - 150px);
  gap: clamp(45px, 9vw, 120px);
}

.login-copy h1 {
  color: var(--ink);
}

.login-copy h1 em {
  color: var(--sea);
  font-style: normal;
}

.login-route {
  max-width: 360px;
  margin-top: 35px;
  display: flex;
  align-items: center;
  color: var(--sea);
}

.login-route i {
  height: 1px;
  flex: 1;
  border-top: 2px dashed #cdd2df;
}

.login-route b {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--ink);
  border-radius: 15px;
  transform: rotate(-8deg);
}

.login-card {
  padding: clamp(28px, 4vw, 44px);
  border-top: 5px solid var(--sea);
  border-radius: 24px;
}

.login-kicker,
.card-kicker {
  color: var(--sea);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.login-card h2 {
  margin-top: 8px;
  color: var(--ink);
  font-size: 30px;
}

.login-card input[type="email"],
.login-card input[type="password"] {
  min-height: 50px;
  border-color: #d9deea;
  border-radius: 12px;
  outline: none;
}

.login-card input:focus {
  border-color: var(--sea);
  box-shadow: 0 0 0 4px rgba(235, 98, 85, 0.11);
}

/* Administración */
.admin-intro strong {
  color: #fff;
}

.admin-card {
  border-radius: 22px;
}

.admin-card h2 {
  margin: 8px 0 4px;
  color: var(--ink);
}

.drop {
  padding: 26px;
  display: grid;
  justify-items: center;
  gap: 5px;
  color: var(--ink);
  background: #fbfbfd;
  border-color: #ccd2e0;
  text-align: center;
}

.drop-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  color: var(--sea);
  background: var(--sea-soft);
  border-radius: 14px;
  font-size: 23px;
}

.drop small {
  color: var(--muted);
  font-weight: 500;
}

.drop input {
  min-height: auto;
  margin-top: 13px;
  background: #fff;
}

.history strong {
  color: var(--ink);
}

.trip-hero,
.avatar {
  background: linear-gradient(135deg, #061857, #17357e 72%, #eb6255 160%);
}

.plan-icon,
.stat-icon,
.empty-day span {
  color: var(--sea);
  background: var(--sea-soft);
}

.day-number {
  background: var(--sea);
}

.plan-type,
.plan-location,
.local-nav a {
  color: var(--ink);
}

@media (max-width: 760px) {
  .topbar {
    height: 66px;
    padding: 0 16px;
  }

  .brand {
    width: 142px;
    height: 42px;
  }

  .brand img {
    width: 142px;
  }

  .user-name {
    display: none;
  }

  .user-avatar {
    width: 32px;
    height: 32px;
  }

  .nav a,
  .nav-disabled {
    height: auto;
  }

  .nav a::after {
    display: none;
  }

  .nav a.active .nav-icon {
    color: var(--sea);
  }

  .content {
    width: min(100% - 28px, 1180px);
  }

  .hero {
    padding: 34px 26px;
  }

  .hero h1 {
    font-size: 41px;
  }

  .hero-visual {
    display: none;
  }

  .create-intro {
    min-height: 0;
    padding: 30px 24px;
    border-radius: 22px;
  }

  .create-intro h1 {
    font-size: 39px;
  }

  .create-mark {
    display: none;
  }

  .steps li strong {
    font-size: 10px;
    text-align: center;
  }

  .steps li span {
    width: 36px;
    height: 36px;
  }

  .steps::before {
    top: 17px;
  }

  .form-section-head {
    gap: 11px;
  }

  .section-number {
    width: 38px;
    height: 38px;
  }

  .form-section-head h2 {
    font-size: 19px;
  }

  .form-section {
    padding-bottom: 28px;
    margin-bottom: 28px;
  }

  .form-actions {
    padding-top: 24px;
  }

  .login-copy {
    padding-top: 10px;
  }

  .login-copy h1 {
    font-size: 42px;
  }

  .login-route {
    display: none;
  }

  .guest-content {
    padding-bottom: 35px;
  }
}

/* Reservas y documentación · Viajario 0.3.0 */
.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.reservation-form {
  width: min(720px, calc(100vw - 36px));
}

.file-field input[type="file"] {
  min-height: 58px;
  padding: 10px;
  background: #fff;
  border-style: dashed;
}

.file-field input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 10px 13px;
  color: var(--ink);
  background: var(--sea-soft);
  border: 0;
  border-radius: 9px;
  font-weight: 750;
  cursor: pointer;
}

.reservation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.reservation-card {
  min-width: 0;
  padding: 22px;
  box-shadow: none;
}

.reservation-top {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.reservation-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--sea);
  background: var(--sea-soft);
  border-radius: 13px;
  font-size: 19px;
  font-weight: 850;
}

.reservation-icon.type-transport {
  color: #365b98;
  background: #eaf0fb;
}

.reservation-icon.type-accommodation {
  color: #715099;
  background: #f1eafb;
}

.reservation-icon.type-restaurant {
  color: #9b5a18;
  background: #fff1d9;
}

.reservation-heading {
  min-width: 0;
  flex: 1;
}

.reservation-type {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.reservation-heading h3 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.reservation-status {
  padding: 6px 9px;
  flex: 0 0 auto;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 850;
}

.reservation-status.confirmed {
  color: #176840;
  background: #dff4e9;
}

.reservation-status.pending {
  color: #8a5918;
  background: #fff0d7;
}

.reservation-status.cancelled {
  color: #8e2929;
  background: #f9e2e2;
}

.reservation-data {
  margin-top: 20px;
  padding: 17px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.reservation-data:empty {
  display: none;
}

.reservation-data div {
  min-width: 0;
}

.reservation-data .full-data {
  grid-column: 1 / -1;
}

.reservation-data small,
.reservation-data strong {
  display: block;
}

.reservation-data small {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.reservation-data strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.reservation-reference {
  color: var(--sea) !important;
  letter-spacing: 0.045em;
}

.reservation-notes {
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-line;
}

.reservation-actions {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.document-link {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.document-link > span:first-child {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--sea);
  background: var(--sea-soft);
  border-radius: 10px;
  font-weight: 900;
}

.document-link > span:last-child {
  min-width: 0;
}

.document-link strong,
.document-link small {
  display: block;
}

.document-link strong {
  max-width: 260px;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-link small,
.no-document {
  color: var(--muted);
  font-size: 11px;
}

.reservation-menu > summary {
  list-style: none;
  letter-spacing: normal;
}

.reservation-panel {
  width: min(690px, calc(100vw - 44px));
}

.remove-document {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
}

.remove-document input {
  width: 17px;
  height: 17px;
  accent-color: var(--danger);
}

@media (max-width: 980px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .stats-grid,
  .reservation-grid {
    grid-template-columns: 1fr;
  }

  .reservations-section .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .reservations-section .action-details,
  .reservations-section .action-details > summary {
    width: 100%;
  }

  .reservation-form,
  .reservation-panel {
    width: auto;
  }

  .reservation-card {
    padding: 18px;
  }

  .reservation-top {
    flex-wrap: wrap;
  }

  .reservation-status {
    margin-left: 56px;
  }

  .reservation-data {
    grid-template-columns: 1fr;
  }

  .reservation-data .full-data {
    grid-column: auto;
  }

  .reservation-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .reservation-menu,
  .reservation-menu > summary {
    width: 100%;
  }

  .document-link strong {
    max-width: calc(100vw - 115px);
  }
}
