:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #11223a;
  --accent: #1e6bb8;
  --border: #d9e1ec;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #eef3fa 0%, var(--bg) 70%);
}

.container {
  max-width: 1050px;
  margin: 0 auto;
  padding: 1.2rem;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

label { display: grid; gap: 0.3rem; }
input, select, textarea, button {
  padding: 0.55rem;
  border-radius: 8px;
  border: 1px solid #c3cfdd;
  font: inherit;
}

.date-row {
  position: relative;
  display: block;
}

.date-picker {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.time-picker {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.date-picker-btn {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  border-radius: 7px;
  line-height: 1;
}

.time-picker-btn {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  border-radius: 7px;
  line-height: 1;
}

.date-row .date-input {
  padding-right: 2.6rem;
}

.date-row .time-input {
  padding-right: 2.6rem;
}

.date-input.invalid-date {
  border-color: #cb3d3d;
  background: #fff1f1;
}

button {
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
}

.plus-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 1.4rem;
  line-height: 1;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #eff5ff;
  border: 1px solid #b9cdf0;
  color: #24416b;
  font-size: 0.85rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.7rem;
}

th, td {
  border-bottom: 1px solid var(--border);
  padding: 0.6rem;
  text-align: left;
  vertical-align: top;
}

.trip { margin-bottom: 1.2rem; }
a { color: var(--accent); }
td form { display: inline; }

@media (max-width: 900px) {
  .container {
    padding: 0.8rem;
  }

  .row-between {
    flex-direction: column;
    align-items: flex-start;
  }

  .plus-btn {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }

  .card {
    padding: 0.8rem;
    border-radius: 10px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .date-row {
    display: block;
  }

  .responsive-table {
    display: block !important;
    width: 100% !important;
    border: 0 !important;
    margin-top: 0.4rem;
  }

  .responsive-table thead {
    display: none !important;
  }

  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block !important;
    width: 100% !important;
  }

  .responsive-table tr {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.3rem 0.65rem;
    margin-bottom: 0.7rem;
    overflow: hidden;
  }

  .responsive-table td {
    border-bottom: 1px dashed var(--border);
    padding: 0.45rem 0;
    white-space: normal;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    text-wrap: pretty;
  }

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

  .responsive-table td::before {
    content: attr(data-label);
    display: block;
    font-weight: 600;
    color: #355174;
    margin-bottom: 0.1rem;
  }

  .responsive-table td form,
  .responsive-table td a {
    display: block;
    margin-right: 0;
    margin-bottom: 0.35rem;
  }

  .responsive-table td form:last-child,
  .responsive-table td a:last-child {
    margin-bottom: 0;
  }

  .responsive-table td button {
    width: 100%;
  }
}
