/* ============================================================
   ADMIN PORTAL STYLES — Summer House Stays
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  background: #F5F5F5;
  color: #111;
  -webkit-font-smoothing: antialiased;
}

/* ---------- LOGIN PAGE ---------- */
body.admin-login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #0E355F;
}

.admin-login {
  background: #F6F3EE;
  border-radius: 10px;
  padding: 48px 44px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.admin-login__brand {
  text-align: center;
  margin-bottom: 36px;
}

.admin-login__logo {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #0E355F;
  margin-bottom: 4px;
}

.admin-login__sub {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #999;
}

.admin-login__error {
  background: #fdecea;
  color: #c0392b;
  font-size: 0.8rem;
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 16px;
}

/* ---------- ADMIN LAYOUT ---------- */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 240px;
  background: #0E355F;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.admin-sidebar__brand {
  padding: 28px 24px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-sidebar__logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #F6F3EE;
  display: block;
  margin-bottom: 4px;
}

.admin-sidebar__role {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

.admin-nav {
  flex: 1;
  padding: 20px 0;
}

.admin-nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.admin-nav__item:hover {
  background: rgba(255,255,255,0.07);
  color: #F6F3EE;
}

.admin-nav__item.active {
  background: rgba(255,255,255,0.12);
  color: #F6F3EE;
}

.admin-nav__item svg { opacity: 0.7; flex-shrink: 0; }
.admin-nav__item.active svg { opacity: 1; }

.admin-sidebar__footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.admin-main {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.admin-topbar__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #0E355F;
}

.admin-topbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-content {
  flex: 1;
  padding: 32px;
}

/* ---------- CARDS ---------- */
.admin-card {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
  padding: 24px;
}

/* ---------- STATS ROW ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid #e8e8e8;
}

.stat-card__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 8px;
}

.stat-card__value {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: #0E355F;
}

/* ---------- TABS ---------- */
.admin-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e8e8e8;
  margin-bottom: 28px;
}

.admin-tab {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #999;
  padding: 12px 20px;
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.admin-tab:hover { color: #0E355F; }

.admin-tab.active {
  color: #0E355F;
  border-bottom-color: #0E355F;
}

.admin-tab-panel { display: none; }
.admin-tab-panel.active { display: block; }

/* ---------- TABLE ---------- */
.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.admin-table tr.drag-over-row td {
  background: #e8eef5;
}

.admin-table th {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #999;
  padding: 10px 16px;
  text-align: left;
  border-bottom: 2px solid #f0f0f0;
  white-space: nowrap;
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f5f5f5;
  vertical-align: middle;
  color: #333;
}

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

.admin-table tr:hover td { background: #fafafa; }

.admin-table__thumb {
  width: 56px;
  height: 40px;
  object-fit: cover;
  border-radius: 3px;
  background: #ddd;
}

.admin-table__name {
  font-weight: 600;
  color: #111;
  margin-bottom: 2px;
}

.admin-table__sub {
  font-size: 0.78rem;
  color: #aaa;
}

/* ---------- BADGES ---------- */
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 3px;
}

.badge--green   { background: #dde8f0; color: #0E355F; }
.badge--yellow  { background: #fef9e7; color: #b7860d; }
.badge--red     { background: #fdecea; color: #c0392b; }
.badge--gray    { background: #f0f0f0; color: #777; }
.badge--blue    { background: #eaf2ff; color: #1a5fb4; }

/* ---------- ACTION BUTTONS ---------- */
.btn-admin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 9px 18px;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-admin--primary {
  background: #0E355F;
  color: #F6F3EE;
}

.btn-admin--primary:hover { background: #0a2748; }

.btn-admin--gold {
  background: #DCCDBB;
  color: #111;
}

.btn-admin--gold:hover { background: #c8b89e; }

.btn-admin--outline {
  background: transparent;
  color: #0E355F;
  border: 1.5px solid #0E355F;
}

.btn-admin--outline:hover {
  background: #0E355F;
  color: #F6F3EE;
}

.btn-admin--danger {
  background: transparent;
  color: #c0392b;
  border: 1.5px solid #c0392b;
}

.btn-admin--danger:hover {
  background: #c0392b;
  color: #fff;
}

.btn-admin--sm {
  padding: 6px 12px;
  font-size: 0.75rem;
}

.btn-admin--icon {
  padding: 8px;
  background: transparent;
  color: #888;
  border: 1px solid #e0e0e0;
}

.btn-admin--icon:hover { color: #0E355F; border-color: #0E355F; }

.actions-cell {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

/* ---------- LISTING EDIT FORM ---------- */
.edit-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

.form-section {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 28px;
  margin-bottom: 20px;
}

.form-section__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: #0E355F;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Amenities grid */
.amenities-group-admin {
  margin-bottom: 20px;
}

.amenities-group-admin__title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 12px;
}

.amenities-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.amenity-check {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1.5px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-size: 0.82rem;
  color: #444;
  background: #fff;
  user-select: none;
}

.amenity-check:has(input:checked) {
  border-color: #0E355F;
  background: rgba(14,53,95,0.05);
  color: #0E355F;
  font-weight: 600;
}

.amenity-check input[type="checkbox"] {
  display: none;
}

/* Image upload */
.upload-area {
  border: 2px dashed #ddd;
  border-radius: 6px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: #fafafa;
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: #0E355F;
  background: rgba(14,53,95,0.03);
}

.upload-area__icon { font-size: 2rem; margin-bottom: 8px; opacity: 0.4; }

.upload-area__label {
  font-size: 0.875rem;
  color: #555;
  margin-bottom: 4px;
}

.upload-area__sub {
  font-size: 0.75rem;
  color: #aaa;
}

.upload-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.upload-preview {
  position: relative;
  width: 100px;
  height: 80px;
}

.upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  border: 2px solid transparent;
}

.upload-preview.is-thumb img {
  border-color: #DCCDBB;
}

.upload-preview__del {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #c0392b;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.upload-preview__thumb-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: #DCCDBB;
  color: #111;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 5px;
  border-radius: 2px;
}

/* Blocked dates */
.blocked-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.blocked-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #444;
}

.blocked-item__label { font-size: 0.75rem; color: #aaa; margin-bottom: 2px; }

/* Sidebar card */
.edit-sidebar .form-section { margin-bottom: 16px; }

/* Toggle switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.toggle-info { flex: 1; }
.toggle-info .toggle-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111;
  margin-bottom: 2px;
}
.toggle-info .toggle-sub { font-size: 0.78rem; color: #aaa; }

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #ddd;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.3s;
}

.toggle-slider:before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  left: 3px;
  top: 3px;
  transition: transform 0.3s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.toggle input:checked + .toggle-slider { background: #0E355F; }
.toggle input:checked + .toggle-slider:before { transform: translateX(20px); }

/* ---------- FORM SHARED ---------- */
.form-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #555;
  display: block;
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.875rem;
  color: #111;
  background: #fff;
  border: 1.5px solid #ddd;
  border-radius: 4px;
  padding: 11px 14px;
  transition: border-color 0.2s;
  outline: none;
  width: 100%;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus { border-color: #0E355F; }

.form-textarea { resize: vertical; min-height: 90px; }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-group { margin-bottom: 16px; }

.form-hint {
  font-size: 0.75rem;
  color: #aaa;
  margin-top: 5px;
}

/* ---------- FEEDBACK LINK ---------- */
.feedback-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f9f7ee;
  border: 1px solid #e8d988;
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 0.8rem;
  color: #555;
}

.feedback-link-row input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.8rem;
  color: #555;
  outline: none;
  min-width: 0;
}

/* ---------- UTILITY ---------- */
.d-flex { display: flex; align-items: center; gap: 12px; }
.ml-auto { margin-left: auto; }
.text-muted { color: #aaa; font-size: 0.85rem; }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0 !important; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

/* ---------- EMPTY STATE ---------- */
.empty-state {
  text-align: center;
  padding: 60px 0;
  color: #aaa;
}

.empty-state__icon { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.4; }
.empty-state h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: #777;
  margin-bottom: 8px;
}
.empty-state p { font-size: 0.875rem; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; flex-direction: row; padding: 0; }
  .admin-sidebar__brand { border-bottom: none; border-right: 1px solid rgba(255,255,255,0.1); }
  .admin-nav { display: flex; overflow-x: auto; padding: 0; }
  .admin-nav__item { white-space: nowrap; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .edit-layout { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 540px) {
  .admin-content { padding: 16px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .form-row-3, .form-row-2 { grid-template-columns: 1fr; }
}
