/* SANDIRENT Property Management - Theme: #f69522, #424244 */
:root {
  --primary: #f69522;
  --primary-dark: #e08518;
  --dark: #424244;
  --dark-light: #5a5a5c;
  --bg: #f8f8f8;
  --card-bg: #fff;
  --text: #424244;
  --text-muted: #6b6b6d;
}

* {
  box-sizing: border-box;
}

button,
a,
.unit-clickable,
.view-toggle-btn,
.unit-carousel-btn,
.unit-carousel-dot,
.detail-close,
.detail-nav,
.detail-thumb {
  touch-action: manipulation;
}

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-tap-highlight-color: rgba(246, 149, 34, 0.25);
}

/* Header */
.site-header {
  background: var(--dark);
  color: #fff;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: contain;
}

.site-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.site-header a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.site-header a:hover {
  text-decoration: underline;
}

.site-header-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Shared branded shell (live + dashboard + login) */
body.branded-page {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  background:
    radial-gradient(ellipse 90% 55% at 0% -10%, rgba(246, 149, 34, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 45% at 100% 0%, rgba(66, 66, 68, 0.12), transparent 50%),
    linear-gradient(180deg, #f3f1ee 0%, #f7f6f4 40%, #f0eeeb 100%);
  min-height: 100vh;
  color: var(--text);
}

body.branded-page .branded-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0.9rem 1.5rem;
  background: rgba(36, 36, 38, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

body.branded-page .site-brand {
  gap: 0.75rem;
}

body.branded-page .site-logo {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #fff;
  padding: 3px;
  box-shadow: 0 0 0 1px rgba(246, 149, 34, 0.35);
}

body.branded-page .site-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

body.branded-page .site-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.1;
}

body.branded-page .site-tagline {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

body.branded-page .branded-header-link {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(246, 149, 34, 0.16);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

body.branded-page .branded-header-link:hover {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}

body.branded-page .site-header-links {
  gap: 0.5rem;
}

body.branded-page .empty-state {
  padding: 3.5rem 1.25rem;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 18px;
  border: 1px dashed rgba(66, 66, 68, 0.15);
}

/* Live site: unit grid */
.live-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3.5rem;
}

.live-intro {
  margin-bottom: 1.75rem;
  max-width: 36rem;
  animation: live-fade-up 0.55s ease both;
}

.live-eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-dark);
}

.live-heading {
  margin: 0 0 0.55rem;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--dark);
}

.live-subhead {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.live-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.35rem;
  animation: live-fade-up 0.55s ease 0.08s both;
}

.view-toggle {
  display: inline-flex;
  padding: 0.25rem;
  border: 1px solid rgba(66, 66, 68, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 16px rgba(66, 66, 68, 0.06);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  gap: 0.15rem;
}

.view-toggle-btn {
  border: none;
  background: transparent;
  padding: 0.45rem 1.05rem;
  font-size: 0.86rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.view-toggle-btn + .view-toggle-btn {
  border-left: none;
}

.view-toggle-btn:hover {
  color: var(--dark);
  background: rgba(246, 149, 34, 0.1);
}

.view-toggle-btn.active {
  background: var(--dark);
  color: #fff;
  box-shadow: 0 2px 8px rgba(66, 66, 68, 0.2);
}

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

.units-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.35rem;
}

.area-heading {
  grid-column: 1 / -1;
  margin: 1.25rem 0 0.15rem;
  padding: 0;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark);
  border-bottom: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.area-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(246, 149, 34, 0.55), transparent);
}

.units-list-view .area-heading {
  margin-top: 1.1rem;
}

.units-list-view .area-heading:first-child {
  margin-top: 0;
}

.units-list-view {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.unit-list-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 1rem 1.25rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(66, 66, 68, 0.06);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  box-shadow: 0 6px 20px rgba(66, 66, 68, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.unit-list-main {
  min-width: 0;
}

.unit-list-address {
  margin: 0 0 0.2rem;
  font-weight: 700;
  color: var(--dark);
  font-size: 0.98rem;
}

.unit-list-specs {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  text-align: left;
  min-width: 0;
}

.unit-list-price {
  margin: 0;
  color: var(--primary);
  font-size: 1.12rem;
  font-weight: 800;
  white-space: nowrap;
  text-align: right;
}

.unit-list-available {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dark);
  white-space: nowrap;
  text-align: right;
  min-width: 8.5rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(246, 149, 34, 0.1);
}

.unit-list-chevron {
  color: var(--text-muted);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.2s, color 0.2s;
}

@media (max-width: 720px) {
  .unit-list-row {
    grid-template-columns: 1fr auto;
    gap: 0.35rem 0.75rem;
  }

  .unit-list-main {
    grid-column: 1 / -1;
  }

  .unit-list-available {
    text-align: left;
    min-width: 0;
    justify-self: start;
  }

  .unit-list-price {
    text-align: left;
  }

  .unit-list-chevron {
    grid-row: 2 / 4;
    align-self: center;
  }
}

@media (min-width: 1200px) {
  .units-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 900px) and (max-width: 1199px) {
  .units-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.unit-card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(66, 66, 68, 0.06);
  box-shadow: 0 10px 28px rgba(66, 66, 68, 0.07);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  animation: live-fade-up 0.5s ease both;
}

.units-grid > .unit-card:nth-child(2) { animation-delay: 0.04s; }
.units-grid > .unit-card:nth-child(3) { animation-delay: 0.08s; }
.units-grid > .unit-card:nth-child(4) { animation-delay: 0.12s; }
.units-grid > .unit-card:nth-child(5) { animation-delay: 0.16s; }

.unit-clickable {
  cursor: pointer;
}

.unit-clickable:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.unit-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(66, 66, 68, 0.14);
  border-color: rgba(246, 149, 34, 0.28);
}

.unit-card:hover .unit-card-image {
  transform: scale(1.04);
}

.unit-list-row.unit-clickable:hover {
  box-shadow: 0 12px 28px rgba(66, 66, 68, 0.1);
  transform: translateY(-2px);
  border-color: rgba(246, 149, 34, 0.3);
}

.unit-list-row.unit-clickable:hover .unit-list-chevron {
  color: var(--primary);
  transform: translateX(3px);
}

@keyframes live-fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.branded-page .empty-state {
  padding: 3.5rem 1.25rem;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 18px;
  border: 1px dashed rgba(66, 66, 68, 0.15);
}

body.detail-open {
  overflow: hidden;
}

.detail-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(36, 36, 38, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.detail-overlay[hidden] {
  display: none !important;
}

.detail-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.detail-panel {
  position: relative;
  width: min(1080px, 100%);
  height: min(88vh, 780px);
  max-height: min(92vh, 900px);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  grid-template-rows: minmax(0, 1fr);
  background: var(--card-bg);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  transform: translateY(18px) scale(0.98);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.detail-overlay.is-open .detail-panel {
  transform: translateY(0) scale(1);
}

.detail-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 3;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--dark);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-close:hover {
  background: var(--primary);
  color: #fff;
}

.detail-media {
  background: #1f1f21;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.detail-photo-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  background: #1f1f21;
  overflow: hidden;
}

.detail-photo {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.detail-photo-empty {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 1rem;
}

.detail-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--dark);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.detail-nav:hover {
  background: var(--primary);
  color: #fff;
}

.detail-nav-prev { left: 0.85rem; }
.detail-nav-next { right: 0.85rem; }

.detail-photo-count {
  position: absolute;
  left: 50%;
  bottom: 0.85rem;
  transform: translateX(-50%);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
}

.detail-thumbs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  overflow-x: auto;
  background: #2a2a2c;
  flex: 0 0 auto;
}

.detail-thumb {
  flex: 0 0 auto;
  width: 64px;
  height: 48px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: transparent;
  opacity: 0.65;
  transition: opacity 0.2s, border-color 0.2s;
}

.detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-thumb:hover,
.detail-thumb.active {
  opacity: 1;
  border-color: var(--primary);
}

.detail-body {
  padding: 2rem 1.75rem 1.75rem;
  overflow-y: auto;
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(246, 149, 34, 0.12), transparent 55%),
    linear-gradient(180deg, #fff 0%, #fafafa 100%);
}

.detail-area {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(246, 149, 34, 0.12);
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.detail-area .detail-icon {
  width: 0.95rem;
  height: 0.95rem;
}

.detail-address {
  margin: 0 0 0.5rem;
  font-size: 1.55rem;
  line-height: 1.25;
  color: var(--dark);
  font-weight: 700;
}

.detail-price {
  margin: 0 0 1.35rem;
  color: var(--primary);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.detail-price-unit {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

.detail-specs {
  list-style: none;
  margin: 0 0 1.35rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.detail-spec {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 0.7rem;
  border-radius: 12px;
  background: rgba(66, 66, 68, 0.05);
  color: var(--dark);
  font-size: 0.88rem;
}

.detail-spec strong {
  font-size: 1.05rem;
}

.detail-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: var(--primary);
}

.detail-section {
  margin-bottom: 1.25rem;
}

.detail-section-title {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.detail-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.detail-feature {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(66, 66, 68, 0.1);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark);
}

.detail-feature .detail-icon {
  width: 1.05rem;
  height: 1.05rem;
}

.detail-available {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding-top: 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark);
}

@media (max-width: 860px) {
  .detail-panel {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    height: min(94vh, 900px);
    max-height: 94vh;
    overflow: hidden;
  }

  .detail-media {
    height: auto;
    max-height: 48vh;
  }

  .detail-photo-wrap {
    flex: 0 0 auto;
    aspect-ratio: 4 / 3;
    max-height: 40vh;
  }

  @supports not (aspect-ratio: 4 / 3) {
    .detail-photo-wrap {
      height: 0;
      padding-bottom: 75%;
    }
  }

  .detail-specs {
    grid-template-columns: 1fr;
  }

  .detail-body {
    padding: 1.35rem 1.25rem 1.5rem;
    min-height: 0;
  }

  .detail-address {
    font-size: 1.3rem;
    padding-right: 2.5rem;
  }

  .detail-price {
    font-size: 1.6rem;
  }
}

.unit-card-image {
  width: 100%;
  height: auto;
  /* Fallback for WebViews without aspect-ratio */
  min-height: 12rem;
  aspect-ratio: 4/3;
  background: var(--dark);
  object-fit: cover;
  display: block;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.unit-card-media {
  position: relative;
  overflow: hidden;
  background: var(--dark);
}

.unit-card-photo-count {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 2;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.unit-card-image-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 0.9rem;
}

.unit-carousel {
  position: relative;
}

.unit-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--dark);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  z-index: 2;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

/* Soften arrows on true hover desktops only; keep fully visible on touch/kiosk */
@media (hover: hover) and (pointer: fine) {
  .unit-carousel-btn {
    opacity: 0.85;
  }

  .unit-carousel:hover .unit-carousel-btn,
  .unit-carousel:focus-within .unit-carousel-btn {
    opacity: 1;
  }
}

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

.unit-carousel-prev {
  left: 0.5rem;
}

.unit-carousel-next {
  right: 0.5rem;
}

.unit-carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.4rem;
  display: flex;
  justify-content: center;
  gap: 0.15rem;
  z-index: 2;
}

.unit-carousel-dot {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.unit-carousel-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transform: translate(-50%, -50%);
}

.unit-carousel-dot.active::after {
  background: var(--primary);
  width: 0.7rem;
  height: 0.7rem;
}

.unit-card-body {
  padding: 1.05rem 1.15rem 1.2rem;
}

.unit-card-address {
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 0.4rem;
  font-size: 0.98rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.unit-card-price {
  color: var(--primary);
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
}

.unit-card-price-unit {
  margin-left: 0.2rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.unit-card-specs {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin: 0 0 0.55rem;
  font-weight: 500;
}

.unit-card-features {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.unit-card-available {
  font-size: 0.8rem;
  color: var(--dark);
  margin: 0;
  font-weight: 600;
  display: inline-flex;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(66, 66, 68, 0.06);
}

/* Dashboard */
.dashboard-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3.5rem;
}

.dashboard-intro {
  margin-bottom: 1.5rem;
  max-width: 36rem;
  animation: live-fade-up 0.55s ease both;
}

.dashboard-eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-dark);
}

.dashboard-heading {
  margin: 0 0 0.4rem;
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--dark);
}

.dashboard-subhead {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.5;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.35rem;
  animation: live-fade-up 0.55s ease 0.06s both;
}

.dashboard-header h2 {
  margin: 0;
  color: var(--dark);
  font-size: 1.5rem;
}

.dashboard-tabs {
  display: inline-flex;
  gap: 0.15rem;
  margin-bottom: 0;
  padding: 0.25rem;
  border: 1px solid rgba(66, 66, 68, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 16px rgba(66, 66, 68, 0.06);
  border-bottom: none;
}

.dashboard-tab {
  padding: 0.5rem 1.1rem;
  border: none;
  background: none;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 999px;
  margin-bottom: 0;
  border-bottom: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.dashboard-tab:hover {
  color: var(--dark);
  background: rgba(246, 149, 34, 0.1);
}

.dashboard-tab.active {
  color: #fff;
  background: var(--dark);
  border-bottom-color: transparent;
  box-shadow: 0 2px 8px rgba(66, 66, 68, 0.2);
}

.dashboard-panel {
  display: block;
  animation: live-fade-up 0.45s ease both;
}

.dashboard-panel.hidden {
  display: none;
}

/* Login */
.login-box {
  max-width: 400px;
  margin: 2.5rem auto;
  padding: 1.75rem 1.6rem;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  border: 1px solid rgba(66, 66, 68, 0.06);
  box-shadow: 0 16px 40px rgba(66, 66, 68, 0.1);
  animation: live-fade-up 0.5s ease both;
}

.login-box h2 {
  margin: 0 0 0.35rem;
  color: var(--dark);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.login-box .login-subhead {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.login-error {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: #c0392b;
  min-height: 1.25em;
  display: none;
}

.login-error.visible {
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(246, 149, 34, 0.28);
}

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

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

.btn-secondary:hover {
  background: var(--dark-light);
}

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

.btn-danger:hover {
  background: #a93226;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
}

/* Form */
.units-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.unit-item {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(66, 66, 68, 0.06);
  border-radius: 16px;
  padding: 1.05rem 1.2rem;
  margin-bottom: 0;
  box-shadow: 0 8px 24px rgba(66, 66, 68, 0.06);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.unit-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(66, 66, 68, 0.1);
  border-color: rgba(246, 149, 34, 0.25);
}

.unit-item-drag {
  cursor: grab;
  color: var(--text-muted);
  padding: 0.25rem;
  align-self: center;
}

.unit-item-drag:active {
  cursor: grabbing;
}

.unit-item-preview {
  width: 88px;
  height: 66px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--dark);
  flex-shrink: 0;
}

.unit-item-info {
  flex: 1;
  min-width: 180px;
}

.unit-item-info strong {
  display: block;
  color: var(--dark);
  margin-bottom: 0.25rem;
  font-size: 1rem;
  font-weight: 700;
}

.unit-item-info span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.unit-item-info .unit-item-area {
  display: inline-flex;
  margin-bottom: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: rgba(246, 149, 34, 0.12);
}

.unit-item-info .unit-item-available {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--dark);
}

.unit-item-actions {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.form-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(36, 36, 38, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.form-modal {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 18px;
  padding: 1.6rem 1.5rem;
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid rgba(66, 66, 68, 0.06);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
  animation: live-fade-up 0.35s ease both;
}

.form-modal h3 {
  margin: 0 0 1.15rem;
  color: var(--dark);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--dark);
  font-size: 0.86rem;
}

.form-group input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(66, 66, 68, 0.14);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(246, 149, 34, 0.18);
}

.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-row .form-group {
  flex: 1;
  min-width: 0;
}

.form-row-3 .form-group {
  flex: 0 1 calc(33.333% - 0.67rem);
}

@media (max-width: 400px) {
  .form-row-3 .form-group {
    flex: 1 1 100%;
  }
}

.form-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
}

.form-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 500;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(66, 66, 68, 0.04);
  border: 1px solid rgba(66, 66, 68, 0.06);
}

.form-check input {
  width: auto;
}

.form-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

/* Image drop zone */
.image-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  min-height: 2rem;
}

.image-thumbs-empty {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.image-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--dark);
  flex-shrink: 0;
}

.image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-thumb-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 1.35rem;
  height: 1.35rem;
  border: none;
  border-radius: 50%;
  background: rgba(192, 57, 43, 0.92);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 1;
}

.image-thumb-remove:hover {
  background: #a93226;
}

.image-thumb-order {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  padding: 2px;
  background: linear-gradient(transparent, rgba(66, 66, 68, 0.75));
}

.image-thumb-move {
  width: 1.35rem;
  height: 1.35rem;
  border: none;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--dark);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.image-thumb-move:hover {
  background: var(--primary);
  color: #fff;
}

.image-thumb-move-spacer {
  width: 1.35rem;
  height: 1.35rem;
}

.image-drop-zone {
  border: 2px dashed rgba(66, 66, 68, 0.22);
  border-radius: 14px;
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  position: relative;
  background: rgba(243, 241, 238, 0.7);
  transition: border-color 0.2s, background 0.2s;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 0.75rem;
}

.image-drop-zone:hover,
.image-drop-zone.drag-over {
  border-color: var(--primary);
  background: rgba(246, 149, 34, 0.06);
}

.image-drop-zone input[type="file"] {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.image-drop-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.image-url-input {
  margin-top: 0.25rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state p {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}

/* Reorder hints */
.unit-item.reorder-dragging {
  opacity: 0.7;
  box-shadow: 0 4px 16px rgba(66, 66, 68, 0.15);
}

.unit-item.reorder-drag-over {
  border: 2px dashed var(--primary);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .unit-card:hover,
  .unit-list-row.unit-clickable:hover {
    transform: none;
  }

  .unit-card:hover .unit-card-image {
    transform: none;
  }
}
