/* ================================================================
   Booking Site – Main Stylesheet
   Branding: Almedina-inspired (teal & warm gold palette)
   ================================================================ */

/* ── Variables ─────────────────────────────────────────────────── */
:root {
  --color-primary:        #1a5f7a;
  --color-primary-dark:   #134758;
  --color-primary-light:  #e8f4f8;
  --color-secondary:      #57c5b6;
  --color-accent:         #e8a838;
  --color-danger:         #dc3545;
  --color-danger-light:   #fdecea;
  --color-success:        #198754;
  --color-success-light:  #d1e7dd;
  --color-warning:        #e8a838;
  --color-warning-light:  #fff3cd;
  --color-info-light:     #cff4fc;

  --color-bg:             #f0f4f8;
  --color-surface:        #ffffff;
  --color-border:         #dde3ea;
  --color-text:           #1e2a35;
  --color-text-muted:     #6b7a8d;

  --sidebar-width:        240px;
  --topbar-height:        60px;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-full: 9999px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 4px 12px rgba(0,0,0,.1);
  --shadow-lg:  0 8px 24px rgba(0,0,0,.12);

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Fira Code', 'Consolas', monospace;
  --transition: 150ms ease;
}

/* ── Reset & Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { display: block; }

/* ── Auth Layout ────────────────────────────────────────────────── */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, #2d8fa6 100%);
  padding: 24px;
}

.auth-wrapper {
  width: 100%;
  max-width: 420px;
}

.auth-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.auth-brand-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.3px;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 24px;
  letter-spacing: -0.4px;
}

.auth-description {
  color: var(--color-text-muted);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.auth-footer-text {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--color-text-muted);
}

.auth-info-block {
  text-align: center;
  padding: 8px 0;
}

.auth-info-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  color: var(--color-primary);
}

.auth-info-block h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--color-text);
}

.auth-info-block p {
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ── App Layout ─────────────────────────────────────────────────── */
.app-body { background: var(--color-bg); }

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--color-primary-dark);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-header {
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.sidebar-brand span {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.sidebar-nav {
  list-style: none;
  padding: 12px 10px;
  flex: 1;
  overflow-y: auto;
}

.nav-section {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  padding: 16px 8px 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  color: rgba(255,255,255,.75);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  margin-bottom: 2px;
}

.nav-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-link:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
  text-decoration: none;
}

.nav-link.active {
  background: rgba(87, 197, 182, .2);
  color: var(--color-secondary);
}

.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-user {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background var(--transition);
  overflow: hidden;
}

.sidebar-user:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.sidebar-user.active { background: rgba(87,197,182,.15); }

.avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--color-secondary);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-user-info {
  overflow: hidden;
  min-width: 0;
}

.sidebar-user-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,.5);
}

.sidebar-logout {
  padding: 8px;
  border-radius: var(--radius-md);
  color: rgba(255,255,255,.5);
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}

.sidebar-logout svg { width: 18px; height: 18px; }
.sidebar-logout:hover { background: rgba(220,53,69,.15); color: #fc8080; text-decoration: none; }

/* Nav dropdown */
.nav-link--dropdown {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.nav-dropdown-arrow {
  margin-left: auto;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform var(--transition);
}
.nav-item-dropdown.is-open .nav-dropdown-arrow {
  transform: rotate(90deg);
}
.nav-subnav {
  list-style: none;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.nav-item-dropdown.is-open .nav-subnav {
  max-height: 200px;
}
.nav-sublink {
  display: block;
  padding: 7px 12px 7px 40px;
  border-radius: var(--radius-md);
  color: rgba(255,255,255,.65);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 2px;
  transition: background var(--transition), color var(--transition);
}
.nav-sublink:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
  text-decoration: none;
}
.nav-sublink.active {
  background: rgba(87,197,182,.2);
  color: var(--color-secondary);
}

/* Main content */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--topbar-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.topbar-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 4px;
  border-radius: var(--radius-sm);
}

.topbar-menu-btn svg { width: 20px; height: 20px; }
.topbar-menu-btn:hover { color: var(--color-text); background: var(--color-bg); }

.topbar-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.3px;
}

.page-content {
  padding: 28px 24px;
  flex: 1;
}

/* ── Forms ──────────────────────────────────────────────────────── */
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.form-grid  { display: flex; flex-direction: column; gap: 18px; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-label-link {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-primary);
}

.checkbox-label {
  display: inline-flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  cursor: pointer;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  -webkit-appearance: none;
}

select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7a8d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 18px;
  padding-right: 36px;
  cursor: pointer;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26,95,122,.12);
}

input::placeholder { color: var(--color-text-muted); }

input.datepicker {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7a8d'%3e%3cpath fill-rule='evenodd' d='M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z' clip-rule='evenodd'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 38px;
  cursor: pointer;
}

.input-code {
  font-size: 24px;
  letter-spacing: 8px;
  text-align: center;
  font-family: var(--font-mono);
}

.form-hint {
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-top: 2px;
}

/* ── Stay price rows (rate period form) ───────────────────────── */
.stay-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.stay-price-nights {
  width: 90px;
}

.stay-price-price {
  width: 110px;
}

.stay-price-label {
  font-size: 14px;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.input-group {
  display: flex;
  align-items: stretch;
}

.input-group .input-group-text {
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 14px;
  color: var(--color-text-muted);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  white-space: nowrap;
}

.input-group .input-group-text--prefix {
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
}

.input-group .input-group-text--suffix {
  border-left: none;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.input-group input {
  flex: 1;
  min-width: 0;
  border-radius: 0;
}

.input-group .input-group-text--prefix + input {
  border-radius: 0 var(--radius) var(--radius) 0;
}

.input-group input:last-child {
  border-radius: 0 var(--radius) var(--radius) 0;
}

.input-group .input-group-text--prefix[style*="display: none"] + input {
  border-radius: var(--radius) 0 0 var(--radius);
}

/* jQuery Validate error/valid states */
span.field-error,
span.form-error {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--color-danger);
}

input.input-invalid,
select.input-invalid,
textarea.input-invalid {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(220,53,69,.1);
}

input.input-valid,
select.input-valid,
textarea.input-valid {
  border-color: var(--color-success);
}

.form-actions {
  display: flex;
  gap: 10px;
  padding-top: 6px;
}

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  line-height: 1;
}

.btn:active { transform: translateY(1px); }
.btn:hover  { text-decoration: none; }

.btn:disabled,
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}
.btn--primary:hover { background: var(--color-primary-dark); color: #fff; }

.btn--secondary {
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn--secondary:hover { background: #e4eaf0; }

.btn--success { background: var(--color-success); color: #fff; }
.btn--success:hover { background: #146c43; color: #fff; }

.btn--danger { background: var(--color-danger); color: #fff; }
.btn--danger:hover { background: #b02a37; color: #fff; }

.btn--full { width: 100%; }

.btn--xs {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

/* ── Alerts ─────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  margin-bottom: 16px;
  border-left: 4px solid currentColor;
  line-height: 1.5;
}

.alert--error   { background: var(--color-danger-light);  color: #9b1c1c; border-color: var(--color-danger); }
.alert--success { background: var(--color-success-light); color: #155724; border-color: var(--color-success); }
.alert--warning { background: var(--color-warning-light); color: #7d5c00; border-color: var(--color-warning); }
.alert--info    { background: var(--color-info-light);    color: #0c5460; border-color: #17a2b8; }

/* ── Cards ──────────────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.2px;
}

.card-body {
  padding: 22px;
}

.card-body.p-0 { padding: 0; }

/* ── Stats grid ─────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg { width: 22px; height: 22px; }

.stat-icon--blue   { background: var(--color-primary-light); color: var(--color-primary); }
.stat-icon--teal   { background: rgba(87,197,182,.15);       color: var(--color-secondary); }
.stat-icon--amber  { background: rgba(232,168,56,.15);       color: var(--color-accent); }
.stat-icon--green  { background: var(--color-success-light); color: var(--color-success); }

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.5px;
}

/* ── Tables ─────────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  padding: 11px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  background: #f7f9fb;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f2f5;
  color: var(--color-text);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: #f7f9fb; }

.table-empty {
  text-align: center;
  color: var(--color-text-muted);
  padding: 32px !important;
}

.table-actions { white-space: nowrap; display: flex; gap: 6px; }

/* ── Badges ─────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  background: var(--color-bg);
  color: var(--color-text-muted);
}

.badge--green  { background: var(--color-success-light);    color: #155724; }
.badge--red    { background: var(--color-danger-light);     color: #842029; }
.badge--yellow { background: var(--color-warning-light);    color: #7d5c00; }
.badge--blue   { background: var(--color-primary-light);    color: var(--color-primary-dark); }
.badge--purple { background: rgba(111,66,193,.1);          color: #5c2d91; }
.badge--orange { background: rgba(251,146,60,.15);         color: #c2410c; }
.badge--grey   { background: #e9ecef;                      color: #495057; }

/* ── Utilities ──────────────────────────────────────────────────── */
.mt-6 { margin-top: 24px; }
.text-muted { color: var(--color-text-muted); font-size: 14px; line-height: 1.6; }

/* ── Page actions ───────────────────────────────────────────────── */
.page-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

/* ── Buttons extra sizes ────────────────────────────────────────── */
.btn--sm {
  padding: 7px 14px;
  font-size: 13px;
}

/* ── Property grid ──────────────────────────────────────────────── */
.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(520px, 1fr));
  gap: 20px;
}

.property-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: box-shadow var(--transition), border-color var(--transition);
  text-decoration: none;
  color: inherit;
}

.property-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-secondary);
  background: #f7f9fb;
  text-decoration: none;
}

.property-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.property-card-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.property-card-ref {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 4px;
  display: block;
}

.property-card-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.property-card-meta-item {
  background: var(--color-bg);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.property-card-meta-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.property-card-meta-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.property-card-meta-value--muted {
  font-weight: 400;
  color: var(--color-text-muted);
  font-style: italic;
}

.property-card-notice {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #92400e;
  background: var(--color-warning-light);
  padding: 8px 14px;
  border-top: 1px solid #fcd34d;
  margin-top: auto;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.property-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .property-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Breadcrumb ─────────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--color-primary);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb-sep {
  color: var(--color-border);
  user-select: none;
}

.breadcrumb span:not(.breadcrumb-sep) {
  color: var(--color-text-muted);
}

/* ── Empty state ────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--color-text-muted);
}

.empty-state-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  color: var(--color-border);
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.empty-state p {
  margin-bottom: 20px;
  font-size: 14px;
}

/* ── Calendar ───────────────────────────────────────────────────── */
.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.calendar-month-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
}

.calendar-legend {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.cal-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.cal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cal-dot--available       { background: var(--color-success); }
.cal-dot--blocked         { background: var(--color-danger); }
.cal-dot--changeover      { background: var(--color-accent); }
.cal-dot--booked          { background: var(--color-primary); }
.cal-dot--provisional     { background: #f97316; }
.cal-dot--outside-window  { background: #c8c8c8; }

.calendar-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.cal-header-cell {
  padding: 10px 4px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  background: #f7f9fb;
  border-bottom: 1px solid var(--color-border);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cal-cell {
  border: 1px solid var(--color-border);
  min-height: 70px;
  padding: 6px;
  position: relative;
  transition: background var(--transition);
  cursor: default;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cal-cell--empty { background: #f7f9fb; border-color: transparent; }

.cal-cell[role="button"] { cursor: pointer; }
.cal-cell[role="button"]:hover { filter: brightness(.95); }
.cal-cell[role="button"]:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -2px; }

.cal-cell--available       { background: #f0faf5; }
.cal-cell--blocked         { background: #fef0f0; }
.cal-cell--changeover      { background: #fff8ec; }
.cal-cell--booked          { background: var(--color-primary-light); }
.cal-cell--provisional     { background: #fff4e5; }
.cal-cell--past            { opacity: .55; }
.cal-cell--outside-window  { background: #f5f5f5; }
.cal-cell--outside-window .cal-day-num { color: #bbb; }
.cal-cell--today .cal-day-num { color: var(--color-primary); font-weight: 700; }

.cal-day-num {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1;
}

.cal-status-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--color-text-muted);
}

.cal-cell--blocked    .cal-status-label { color: var(--color-danger); }
.cal-cell--changeover .cal-status-label { color: #b57c00; }
.cal-cell--booked     .cal-status-label { color: var(--color-primary); }

.calendar-hint {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 12px;
}

/* ── Flatpickr calendar theme ───────────────────────────────────── */
.flatpickr-calendar {
  font-family: var(--font-sans);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.flatpickr-months .flatpickr-month,
.flatpickr-current-month .flatpickr-monthDropdown-months {
  background: var(--color-primary);
  color: #fff;
}
.flatpickr-current-month input.cur-year { color: #fff; }
.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month { background: var(--color-primary-dark); }
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month { fill: rgba(255,255,255,.8); color: rgba(255,255,255,.8); }
.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover { fill: #fff; color: #fff; }
.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg { fill: #fff; }
.flatpickr-weekdays { background: var(--color-primary-dark); }
span.flatpickr-weekday { background: var(--color-primary-dark); color: rgba(255,255,255,.6); font-size: 12px; }
.flatpickr-day { border-radius: var(--radius-sm); font-size: 13px; }
.flatpickr-day:hover,
.flatpickr-day:focus { background: var(--color-primary-light); border-color: transparent; color: var(--color-primary); }
.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.selected:focus { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.flatpickr-day.today { border-color: var(--color-secondary); }
.flatpickr-day.today:hover { background: var(--color-secondary); border-color: var(--color-secondary); color: #fff; }
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover { color: var(--color-text-muted); opacity: .4; }

/* ── Changeover diagonal cells (range start / range end) ───────── */
/* top-left = from colour, bottom-right = to colour                 */
.cal-cell--range-start {
  background: linear-gradient(135deg, #f0faf5 50%, #fef0f0 50%) !important;
}
.cal-cell--range-end {
  background: linear-gradient(135deg, #fef0f0 50%, #f0faf5 50%) !important;
}

/* ── Calendar sub-toolbar (action buttons below nav) ───────────── */
.calendar-sub-toolbar {
  margin-bottom: 12px;
}

/* ── Anchor cal-cells (blocked day links) ───────────────────────── */
a.cal-cell {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
a.cal-cell:hover { filter: brightness(.88); }

/* ── Multi-month 2×2 grid ───────────────────────────────────────── */
.calendar-grid-4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 900px) {
  .calendar-grid-4 { grid-template-columns: 1fr; }
}

.cal-mini-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.cal-mini-header {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  background: #f7f9fb;
  border-bottom: 1px solid var(--color-border);
  text-align: center;
}

.cal-mini-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: auto;
  grid-auto-rows: 60px;
}

.cal-header-cell--mini {
  padding: 5px 2px;
  font-size: 10px;
}

.cal-cell--mini {
  min-height: 0;
  height: 60px;
  padding: 6px 4px;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}

.cal-cell--mini .cal-day-num {
  font-size: 13px;
}

.cal-price {
  font-size: 11px;
  color: var(--color-text-muted);
  line-height: 1;
  margin-top: 3px;
}

.cal-cell--selected {
  background-color: var(--color-primary, #1a73e8) !important;
  color: #fff !important;
  font-weight: 600;
  border-radius: 4px;
}
.cal-cell--selected .cal-day-num {
  color: #fff !important;
  font-weight: 600;
}

.cal-override-icon {
  position: absolute;
  top: 3px;
  right: 3px;
  color: #d4a017;
}

/* ── Property page tabs ─────────────────────────────────────────────────── */
.tab-nav {
  display: flex;
  border-bottom: 2px solid var(--color-border);
  margin-top: 24px;
  gap: 0;
}

.tab-btn {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
}

.tab-btn:hover { color: var(--color-text); }

.tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.property-tab-content {
  padding-top: 24px;
  min-height: 180px;
}

.tab-loading {
  color: var(--color-text-muted);
  font-size: 14px;
}

.tab-panel-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

/* ── Search bar ─────────────────────────────────────────────────── */
.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 180px;
}

.search-select {
  width: auto;
  min-width: 140px;
}

/* ── Pagination ─────────────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.page-btn:hover       { background: var(--color-bg); text-decoration: none; }
.page-btn--active     { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ── Info list (definition list in panels) ──────────────────────── */
.info-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  font-size: 13px;
}

.info-list dt {
  color: var(--color-text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.info-list dd {
  color: var(--color-text);
}

/* ── Usage bars ─────────────────────────────────────────────────── */
.usage-bar {
  background: var(--color-border);
  border-radius: var(--radius-full);
  height: 6px;
  margin-top: 4px;
  overflow: hidden;
}
.usage-bar__fill {
  background: var(--color-secondary);
  border-radius: var(--radius-full);
  height: 6px;
  transition: width .3s ease;
}
.usage-bar__fill--warn   { background: var(--color-accent); }
.usage-bar__fill--danger { background: var(--color-danger); }

/* ── Misc helpers ───────────────────────────────────────────────── */
.nowrap       { white-space: nowrap; }
.small-text   { font-size: 12px; }
.error-message { max-width: 360px; word-break: break-word; font-size: 13px; }
.required-star  { color: var(--color-danger); }
.text-optional  { color: var(--color-text-muted); font-size: 12px; font-weight: 400; }
.card-title--danger { color: var(--color-danger); }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.is-open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .main-content {
    margin-left: 0;
  }

  .topbar-menu-btn {
    display: flex;
  }

  .page-content {
    padding: 20px 16px;
  }

  .auth-card {
    padding: 28px 24px;
  }
}


/* ── Enquiry note timeline ───────────────────────────────────────────────── */
.note-timeline { display: flex; flex-direction: column; gap: 16px; }

.note-item {
  padding: 14px 16px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-secondary);
}

.note-meta {
  display: flex;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 6px;
  font-size: 13px;
}

.note-body {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* ── Registration flow ──────────────────────────────────────────────────── */

/* Brand name + footer sit on the dark gradient, so override to white */
.register-wrapper .auth-brand-name {
  color: #fff;
}

.register-wrapper .auth-footer-text {
  color: rgba(255,255,255,.8);
}

.register-wrapper .auth-footer-text a {
  color: #fff;
  text-decoration: underline;
}

.register-wrapper {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 16px;
}

.register-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  justify-content: center;
}

/* Step progress indicator */
.register-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 32px;
}

.register-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.register-step__num {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(255,255,255,.4);
  background: transparent;
  color: rgba(255,255,255,.7);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.register-step__label {
  font-size: 11px;
  color: rgba(255,255,255,.6);
  white-space: nowrap;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.register-step.is-active .register-step__num {
  background: #fff;
  border-color: #fff;
  color: var(--color-primary);
}

.register-step.is-active .register-step__label {
  color: #fff;
}

.register-step.is-done .register-step__num {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: #fff;
}

.register-step.is-done .register-step__label {
  color: rgba(255,255,255,.8);
}

.register-step__line {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,.25);
  min-width: 40px;
  margin: 0 8px;
  margin-bottom: 22px;
}

/* Plan selection cards */
.plan-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.plan-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 2px solid transparent;
  transition: border-color var(--transition), transform var(--transition);
}

.plan-card:hover {
  border-color: var(--color-secondary);
  transform: translateY(-2px);
}

.plan-card__name {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
}

.plan-card__price {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1;
}

.plan-card__price span {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-muted);
}

.plan-card__features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.plan-card__features li {
  font-size: 14px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-card__features li::before {
  content: '✓';
  color: var(--color-secondary);
  font-weight: 700;
  flex-shrink: 0;
}

.plan-card--enterprise {
  background: var(--color-primary-light);
  border-color: var(--color-border);
}

/* Register auth card */
.register-auth-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  max-width: 480px;
  margin: 0 auto;
}

/* Onboarding checklist */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
}

.checklist-item:last-child {
  border-bottom: none;
}

.checklist-item::before {
  content: '';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-border);
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
}

.checklist-item.is-done::before {
  content: '✓';
  background: var(--color-success);
  border-color: var(--color-success);
  color: #fff;
}

.checklist-item.is-done a {
  text-decoration: line-through;
  color: var(--color-text-muted);
}

.checklist-item a {
  color: var(--color-text);
}

.checklist-item a:hover {
  color: var(--color-primary);
  text-decoration: none;
}
