/* ForHost PMS – shared styles */

/* Base */
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  background: #fff;
}

a {
  color: #2563eb;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Auth pages: login, forgot, reset */
.wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  padding: 24px 28px 24px 24px;
  box-sizing: border-box;
}

.card input,
.card select,
.card .btn {
  box-sizing: border-box;
  max-width: 100%;
}

.card h1 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}
.card h1.narrow {
  font-size: 1.3rem;
}
.main .card {
  padding: 20px 28px 20px 20px;
}
.main .card .field input {
  padding: 9px 11px;
}

p.sub {
  margin: 0 0 16px;
  color: #6b7280;
  font-size: 0.9rem;
}

label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 4px;
  color: #374151;
}

input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
}
input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}
input[disabled] {
  background: #f9fafb;
  color: #6b7280;
}

/* Photo card: keep caption input inside card width and add margin above buttons */
.photo-card__body,
.photo-card__body .photo-card__caption-form {
  min-width: 0;
  overflow: hidden;
}
.photo-card__body input.input,
.photo-card__body input[name="txt"] {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-bottom: 10px;
}

textarea.input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
  box-sizing: border-box;
  font-family: inherit;
  resize: vertical;
}

.field {
  margin-bottom: 12px;
}

.field-hint {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: #6b7280;
}

.page-body {
  margin-top: 12px;
  line-height: 1.6;
}
.page-body p {
  margin: 0 0 12px;
}

.btn {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  box-sizing: border-box;
}
/* NEW record – e.g. New property, New owner */
.btn-primary {
  background: #88BDF2;
  color: #1a2533;
}
.btn-primary:hover {
  background: #6fa8e8;
  color: #1a2533;
}
.btn-primary:active {
  transform: translateY(1px);
}
/* EDIT – e.g. Edit in list, Save on edit form */
.btn-edit {
  background: #6A89A7;
  color: #fff;
}
.btn-edit:hover {
  background: #5a7894;
  color: #fff;
}
/* Rates: New standard rate button (pairs with .btn-primary for NEW DERIVED) */
.btn-rate-standard {
  background: #6A89A7;
  color: #fff;
}
.btn-rate-standard:hover {
  background: #5a7894;
  color: #fff;
}
/* Cancel / dismiss / Close (secondary actions) — compound selector beats UA submit styling */
/* Width: default .btn is 100%; .btn-small sets width:auto for toolbar popups */
.btn.btn-cancel,
.btn-cancel {
  background: #ffc107;
  color: #1a1a1a;
  border: none;
  appearance: none;
  -webkit-appearance: none;
}
.btn.btn-cancel:hover,
.btn-cancel:hover {
  background: #e8ae06;
  color: #1a1a1a;
}
.btn.btn-cancel:focus-visible,
.btn-cancel:focus-visible {
  outline: 2px solid #1a1a1a;
  outline-offset: 2px;
}
.btn.btn-cancel:active,
.btn-cancel:active {
  background: #d9a006;
}
.btn-secondary {
  display: block;
  text-align: center;
  text-decoration: none;
  background: transparent;
  color: #374151;
  border: 2px solid #d1d5db;
  box-sizing: border-box;
  border-radius: 10px;
}
.btn-secondary:hover {
  border-color: #9ca3af;
  background: #f9fafb;
}

.login-register-wrap {
  margin-top: 40px;
}

.login-forgot-row {
  text-align: right;
  margin-top: 10px;
  font-size: 0.85rem;
}
.login-forgot-row a {
  color: #2563eb;
  text-decoration: none;
}
.login-forgot-row a:hover {
  text-decoration: underline;
}

.login-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
  font-size: 0.85rem;
}
.login-footer a {
  color: #6b7280;
  text-decoration: none;
}
.login-footer a:hover {
  text-decoration: underline;
}

.error {
  background: #fee2e2;
  color: #b91c1c;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.msg {
  background: #ecfdf5;
  color: #166534;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.links {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-top: 10px;
}

.back-link {
  margin-top: 10px;
  font-size: 0.85rem;
}

/* Home page: spacing below nav and icon bar */
.page-home .icon-bar { flex-shrink: 0; }
.page-home .main { margin-top: 24px; }

/* Row 2: icon bar – one box per icon + name */
.icon-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}
.icon-bar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 20px;
  min-width: 88px;
  max-width: 110px;
  color: #6c757d;
  text-decoration: none;
  flex-shrink: 0;
  flex-grow: 0;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
}
.icon-bar__item:hover {
  background: #f8f9fa;
  color: #212529;
  border-color: #adb5bd;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
.icon-bar__icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  max-width: 28px;
  min-height: 28px;
  max-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0d6efd;
  flex-shrink: 0;
  overflow: hidden;
}
.icon-bar__item:hover .icon-bar__icon { color: #0a58ca; }
.icon-bar__icon svg {
  width: 28px;
  height: 28px;
  min-width: 28px;
  max-width: 28px;
  min-height: 28px;
  max-height: 28px;
  flex-shrink: 0;
  display: block;
}
.icon-bar__label {
  font-size: 0.8rem;
  line-height: 1.2;
  text-align: center;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  color: inherit;
}

/* Accounts: label row + four quick icons (owners, guests, agencies, staff) */
.icon-bar__cluster {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 0 0 2px 12px;
  margin-left: 4px;
  border-left: 1px solid #dee2e6;
}
.icon-bar__cluster-title {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #868e96;
  line-height: 1;
  white-space: nowrap;
}
.icon-bar__cluster-icons {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: stretch;
}
.icon-bar__cluster-icons .icon-bar__item {
  min-width: 80px;
  padding: 12px 14px;
}

/* Legacy header (when not using top-nav) */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 8px;
}
.top.profile {
  padding: 16px;
}

.greet {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.sub {
  font-size: 0.85rem;
  color: #6b7280;
}

.title {
  font-weight: 600;
  font-size: 1rem;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.main {
  padding: 20px 16px 32px;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}
.page-heading {
  margin-bottom: 20px;
}
.page-heading .greet {
  margin-bottom: 2px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 0;
}

.tile {
  background: #fff;
  border-radius: 12px;
  padding: 16px 14px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  text-decoration: none;
  color: #111827;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 100px;
  transition: box-shadow 0.15s ease;
}
.tile:hover {
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
}
.tile-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 10px;
  color: #2563eb;
  flex-shrink: 0;
}
.tile-icon svg {
  width: 100%;
  height: 100%;
}

.tile-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.tile-desc {
  font-size: 0.8rem;
  color: #6b7280;
}

.form-logout {
  margin-top: 20px;
  font-size: 0.8rem;
  color: #9ca3af;
}
.form-logout button {
  background: none;
  border: none;
  color: #ef4444;
  padding: 0;
  font-size: 0.8rem;
  cursor: pointer;
}

.link-back {
  font-size: 0.85rem;
}

/* Registration form */
.card--wide {
  max-width: 480px;
  padding: 24px 28px 24px 24px;
  box-sizing: border-box;
}
.card--wide .field input,
.card--wide .field select {
  box-sizing: border-box;
  max-width: 100%;
}
select.input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
  background: #fff;
}
select.input:focus {
  outline: none;
  border-color: #2563eb;
}

/* Slim Select (account forms, ≤768px): match .input sizing; panel above sticky nav */
@media (max-width: 768px) {
  .main .ss-main {
    min-height: 42px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.95rem;
    border-color: #d1d5db;
  }
  body > .ss-content {
    z-index: 1050;
  }
}
.field--checkbox {
  margin-bottom: 8px;
}
.label--checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: normal;
  cursor: pointer;
}
.label--checkbox input {
  width: auto;
}
.label--checkbox a.label-link {
  color: #2563eb;
  text-decoration: underline;
}
.label--checkbox a.label-link:hover {
  text-decoration: none;
}

/* Password visibility toggle (eye icon) – wrapper so icon is centered in input row */
.field-password .pwd-input-wrap {
  position: relative;
  display: block;
}
.field-password .pwd-input-wrap input {
  padding-right: 2.75rem;
  width: 100%;
  box-sizing: border-box;
}
.field-password .btn-toggle-pwd {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 40px;
  margin: 0;
  padding: 0;
  border: none;
  border-left: 1px solid #d1d5db;
  background: #f9fafb;
  cursor: pointer;
  color: #6b7280;
  border-radius: 0 8px 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.field-password .btn-toggle-pwd:hover {
  color: #374151;
  background: #f3f4f6;
}
.field-password .btn-toggle-pwd svg {
  width: 18px;
  height: 18px;
}
.pwd-icon-show.hidden,
.pwd-icon-hide.hidden {
  display: none;
}

/* Verify code page */
.input--code {
  text-align: center;
  letter-spacing: 0.25em;
  font-size: 1.25rem;
}

/* Properties */
.back-to-home {
  display: inline-block;
  margin-bottom: 4px;
  font-size: 0.9rem;
}
.property-back-wrap {
  margin-top: 10px;
  margin-bottom: 0;
}
.property-section-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 12px;
}
.property-section-buttons .btn {
  width: auto;
}
.property-section-btn--active {
  border-color: #6A89A7;
  background: #e8eef4;
  color: #2d3436;
}
.page-head {
  font-size: 1.25rem;
  margin: 0 0 16px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* Owners list: title on its own row; next row = search + New */
.owners-list-title {
  margin: 0 0 12px;
  width: 100%;
}
.owners-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 16px;
}
.owners-list-toolbar .owners-search-form {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  flex: 1 1 200px;
  min-width: 0;
  max-width: min(520px, 100%);
}
.owners-list-toolbar .owners-search-input {
  flex: 1;
  min-width: 120px;
}
.owners-list-toolbar .owners-list-new {
  flex: 0 0 auto;
  width: auto;
  margin-left: auto;
}
@media (max-width: 720px) {
  .owners-list-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .owners-list-toolbar .owners-search-form {
    max-width: none;
  }
  .owners-list-toolbar .owners-list-new {
    margin-left: 0;
  }
}
/* Responsive table wrapper: horizontal scroll on small screens (same idea as .icon-bar) */
.list-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
  max-width: 100%;
}
.list-table--rates {
  width: 100%;
  min-width: 640px;
}
.list-table--rates .th-id,
.list-table--rates .td-id {
  width: 1%;
  white-space: nowrap;
}
.list-table--rates .list-table__name-link {
  font-weight: 700;
  color: inherit;
  text-decoration: none;
}
.list-table--rates .list-table__name-link:hover {
  text-decoration: underline;
}

.list-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.list-table th,
.list-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}
.list-table th {
  background: #D3D3FF;
  font-weight: 600;
  font-size: 0.85rem;
}
.list-table .th-actions,
.list-table .td-actions {
  white-space: nowrap;
}
.list-table .td-actions .form-inline {
  display: inline;
}
.list-table tbody tr:last-child td {
  border-bottom: none;
}
.list-table--rates-properties .th-checkbox,
.list-table--rates-properties .td-checkbox {
  width: 2.5rem;
  text-align: center;
  vertical-align: middle;
}
.list-table--rates-properties .td-checkbox .field--checkbox {
  margin-bottom: 0;
  display: flex;
  justify-content: center;
}
.sort-link {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}
.sort-link:hover {
  text-decoration: underline;
}
.sort-link--active {
  color: #1e40af;
}
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.9rem;
}
.pagination__info {
  margin-right: 8px;
  color: #6b7280;
}
.pagination__current {
  padding: 6px 12px;
  font-weight: 600;
  background: #e5e7eb;
  border-radius: 10px;
}
.btn-small {
  padding: 6px 12px;
  font-size: 0.85rem;
  width: auto;
  border-radius: 10px;
}
/* Same height as .input / select.input when placed in a field-row */
.btn-input-height {
  width: auto;
  padding: 10px 14px;
  font-size: 0.95rem;
  border-radius: 8px;
}
.field-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.field-row .field-inline { flex: 1; min-width: 160px; }
.field-row .field-inline label { display: block; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 500px) { .two-cols { grid-template-columns: 1fr; } }
.map-container {
  height: 320px;
  width: 100%;
  margin-top: 8px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}
.map-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.list-simple {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}
.list-simple li {
  padding: 8px 0;
  border-bottom: 1px solid #e5e7eb;
}
.list-simple--modal .list-simple__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.list-simple--modal .list-simple__name { flex: 1; min-width: 0; }
.list-simple--modal .edit-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.input--small { padding: 6px 10px; font-size: 0.9rem; }
.modal-form .field-row { margin-bottom: 0; }
.modal-form .field-row .input { flex: 1; min-width: 120px; }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}
.modal__panel {
  position: relative;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  max-width: 420px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}
.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}
.modal__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}
.modal__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
  padding: 0 4px;
}
.modal__close:hover { color: #111; }
.modal__body {
  padding: 20px;
  overflow-y: auto;
}
