/* Form reservasi, detail, riwayat, reservasi saya, panel masuk */

/* ---------- Form ---------- */
.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding-top: 8px;
}
.side-head::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: rgba(166, 181, 192, 0.7);
}
.side h2 {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
}
.close {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--sub);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}
.close::before {
  content: "";
  width: 12px;
  height: 12px;
  background:
    linear-gradient(
      45deg,
      transparent 46%,
      currentColor 47% 53%,
      transparent 54%
    ),
    linear-gradient(
      -45deg,
      transparent 46%,
      currentColor 47% 53%,
      transparent 54%
    );
  color: var(--accent);
}
@media (hover: hover) {
  .close:hover {
    background: var(--wash);
    border-color: var(--other-edge);
  }
}
.field {
  margin-top: 14px;
}
.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--sub);
  margin-bottom: 5px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.password-control {
  position: relative;
}
.field .password-control input {
  padding-right: 46px;
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 5px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--sub);
  cursor: pointer;
  transform: translateY(-50%);
}
.password-toggle:hover {
  background: var(--wash);
  color: var(--accent);
}
.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.password-toggle .eye-off-icon,
.password-toggle[aria-pressed="true"] .eye-icon {
  display: none;
}
.password-toggle[aria-pressed="true"] .eye-off-icon {
  display: block;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: transparent;
}
.field textarea {
  resize: vertical;
  min-height: 60px;
}
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.owner {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--sub);
}
.owner strong {
  color: var(--ink);
  font-weight: 500;
}

.primary {
  margin-top: 16px;
  width: 100%;
  padding: 11px;
  border: 0;
  border-radius: var(--radius);
  background: var(--button-bg);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.primary:disabled {
  opacity: 0.55;
  cursor: wait;
}
@media (hover: hover) {
  .primary:hover,
  .new-btn:hover {
    background: var(--button-hover);
  }
}
.row-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  font-size: 14px;
}
.secondary-btn,
.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.row-actions > button {
  flex: 1;
}
.secondary-btn {
  color: var(--accent);
}
.danger-btn {
  border-color: var(--danger-border);
  color: var(--err);
}
.user-action {
  min-height: 34px;
  padding: 5px 10px;
  white-space: nowrap;
}
@media (hover: hover) {
  .secondary-btn:hover {
    border-color: var(--accent);
    background: var(--wika-soft);
  }
  .danger-btn:hover {
    border-color: var(--err);
    background: var(--danger-hover);
  }
}

.msg {
  margin-top: 12px;
  font-size: 14px;
  padding-left: 10px;
  border-left: 3px solid;
}
.msg:empty {
  display: none;
}
.msg.err {
  color: var(--err);
}
.msg.ok {
  color: var(--ok);
}

.booking-details {
  display: grid;
  gap: 0;
  margin: 16px 0 20px;
}
.booking-details > div {
  min-width: 0;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
}
.booking-details > div:first-child {
  padding-top: 0;
}
.booking-details > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.booking-details dt {
  margin-bottom: 5px;
  color: var(--sub);
  font-size: 12px;
  font-weight: 500;
}
.booking-details dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.booking-details + .primary {
  width: 100%;
  margin-top: 0;
}

.history {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  min-width: 0;
}
.history h3 {
  margin: 0 0 10px;
  color: var(--sub);
  font-size: 12px;
  font-weight: 500;
}
.history .timeline {
  margin: 0;
  padding: 0 0 0 14px;
  list-style: none;
  border-left: 1px solid var(--line);
}
.history .timeline li {
  position: relative;
  padding-bottom: 12px;
  overflow-wrap: anywhere;
}
.history .timeline li:last-child {
  padding-bottom: 0;
}
.history .timeline li::before {
  content: "";
  position: absolute;
  top: 5px;
  left: -18px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--wika);
  box-shadow: 0 0 0 2px var(--paper);
}
.history .h-act {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.history .h-at {
  margin-top: 1px;
  color: var(--sub);
  font-size: 12px;
}
.history .h-note {
  margin-top: 3px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}
.history .h-note .arrow {
  color: var(--accent);
}
.history .h-empty {
  margin: 6px 0 0;
  color: var(--sub);
  font-size: 12px;
}
.history .link {
  margin-top: 8px;
  font-size: 12px;
}
.history .h-slot {
  margin-top: 12px;
  color: var(--sub);
  font-size: 12px;
}
.history .h-slot summary {
  cursor: pointer;
}
.history .h-slot ul {
  margin: 6px 0 0;
  padding-left: 16px;
  overflow-wrap: anywhere;
}
.history .h-slot li + li {
  margin-top: 4px;
}

.mine-list {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.mine-list h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 6px;
}
.mine-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: min(38vh, 360px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.mine-list button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}
.mine-list .w {
  font-variant-numeric: tabular-nums;
}
.mine-list .r {
  display: block;
  font-size: 13px;
  color: var(--sub);
}
@media (hover: hover) {
  .mine-list button:hover .w {
    text-decoration: underline;
  }
}
.empty {
  font-size: 13px;
  color: var(--sub);
  margin: 0;
}

.backdrop {
  display: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  max-width: calc(100% - 32px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 40;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Masuk (di panel samping) ---------- */
.login-box p {
  margin: 6px 0 0;
  color: var(--sub);
  font-size: 14px;
}
.pending {
  margin-top: 12px;
  font-size: 14px;
  padding: 8px 10px;
  background: var(--wash);
  border-radius: var(--radius);
}
.pending:empty {
  display: none;
}
.guest-only {
  display: none;
}
body.guest .guest-only {
  display: initial;
}
body.guest .user-only {
  display: none !important;
}
