﻿:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-strong: #e9eef6;
  --text: #162033;
  --muted: #637083;
  --brand: #277fc3;
  --brand-dark: #155f9f;
  --accent: #df1f26;
  --line: #d9e1ec;
  --shadow: 0 18px 45px rgba(22, 32, 51, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
  border: 1px solid var(--line);
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}

.nav a:hover {
  color: var(--brand-dark);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 32px;
  align-items: center;
  min-height: calc(100vh - 82px);
  padding: 72px clamp(18px, 5vw, 72px) 48px;
  background:
    linear-gradient(110deg, rgba(21, 95, 159, 0.95), rgba(39, 127, 195, 0.78)),
    url("assets/capa-portal.jpeg") center/cover;
  color: #fff;
}

.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.55fr);
  gap: 28px;
  align-items: end;
  padding: 58px clamp(18px, 5vw, 72px);
  background: #11243c;
  color: #fff;
}

.admin-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
}

.admin-hero p {
  max-width: 720px;
  color: #d9e8f7;
  line-height: 1.7;
}

.admin-actions {
  display: grid;
  gap: 12px;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.access-gate {
  display: grid;
  min-height: calc(100vh - 82px);
  place-items: center;
  padding: 32px 18px;
  background: #11243c;
}

.access-card {
  width: min(100%, 460px);
}

.access-card h1 {
  margin: 0;
}

.hero-content {
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.section h2 {
  margin: 0;
  letter-spacing: 0;
}

.hero h1 {
  font-size: clamp(42px, 8vw, 86px);
  line-height: 0.96;
}

.hero p {
  max-width: 650px;
  font-size: 18px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-actions button {
  width: auto;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.button.primary {
  background: var(--accent);
  color: #171307;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.hero-panel {
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.panel-label {
  color: #fff4d6;
  font-weight: 800;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.stats-grid div {
  min-height: 86px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
}

.stats-grid strong {
  display: block;
  font-size: 28px;
}

.stats-grid small {
  color: #e8f7f5;
}

.panel-note {
  margin-bottom: 0;
  color: #ecfffd;
}

code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.16);
}

.section {
  padding: 76px clamp(18px, 5vw, 72px);
}

.section.muted {
  background: var(--surface-strong);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading.split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  max-width: none;
}

.section h2 {
  color: var(--text);
  font-size: clamp(30px, 4vw, 48px);
}

.section p {
  color: var(--muted);
  line-height: 1.7;
}

.info-grid,
.employee-grid,
.property-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.info-card,
.employee-card,
.property-card,
.accordion-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(22, 32, 51, 0.06);
}

.info-card,
.employee-card,
.property-card {
  padding: 22px;
}

.info-card h3,
.employee-card h3,
.property-card h3 {
  margin: 12px 0 8px;
}

.photo-placeholder,
.employee-photo {
  display: grid;
  place-items: center;
  border: 1px dashed #9fb5cf;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.photo-placeholder.large {
  min-height: 180px;
}

.property-photo {
  aspect-ratio: 16 / 10;
  margin-bottom: 14px;
}

.employee-card {
  position: relative;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.employee-photo {
  width: 74px;
  height: 74px;
  overflow: hidden;
}

.employee-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #e8f3ff;
  color: var(--brand-dark);
  font-weight: 800;
}

.search,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.search {
  max-width: 340px;
  min-height: 46px;
  padding: 0 14px;
}

.employee-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e8f5e9;
  color: #236b2f;
  font-size: 12px;
  font-weight: 800;
}

.schedule-table {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

th,
td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  background: #edf6ff;
  color: var(--brand-dark);
}

tr:last-child td {
  border-bottom: 0;
}

.accordion {
  display: grid;
  gap: 12px;
}

.accordion-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 20px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.accordion-content {
  display: none;
  padding: 0 20px 20px;
}

.accordion-item.open .accordion-content {
  display: block;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
  gap: 36px;
  align-items: start;
}

.site-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.6fr);
  gap: 18px;
  align-items: start;
}

.site-card {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(22, 32, 51, 0.06);
}

.site-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.site-card strong {
  font-size: clamp(24px, 4vw, 36px);
  word-break: break-word;
}

.site-card img {
  width: min(100%, 260px);
  justify-self: center;
  border-radius: 8px;
}

.qr-card {
  text-align: center;
}

.visitor-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr);
  gap: 22px;
  align-items: start;
}

.resident-layout,
.resident-access-grid,
.admin-subgrid {
  display: grid;
  gap: 18px;
}

.resident-access-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 520px));
  align-items: start;
}

.resident-panel {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(22, 32, 51, 0.06);
}

.panel-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.panel-title-row h3,
.visitor-form h3,
.admin-subgrid h4 {
  margin: 0;
}

.compact-form {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  box-shadow: none;
}

.compact-form label:has(textarea),
.compact-form .button,
.compact-form .form-message {
  grid-column: 1 / -1;
}

.reservation-list,
.management-list,
.reservation-review-list {
  display: grid;
  gap: 12px;
}

.reservation-card,
.management-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.reservation-card h4,
.management-card p,
.reservation-card p {
  margin: 6px 0 0;
}

.pix-box {
  display: grid;
  gap: 10px;
  min-width: min(100%, 270px);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.pix-box.confirmed {
  background: #e8f5e9;
}

.pix-box img {
  width: 160px;
  height: 160px;
  border-radius: 8px;
}

.pix-box a {
  color: var(--brand-dark);
  font-weight: 800;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.public-visitor-layout {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  max-width: none;
}

.condo-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 160px;
  gap: 10px;
}

.condo-photo {
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(22, 32, 51, 0.06);
}

.condo-photo.featured {
  grid-column: span 2;
  grid-row: span 2;
}

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

.condo-photo:hover img {
  transform: scale(1.03);
}

.condo-photo img {
  transition: transform 180ms ease;
}

.visitor-form,
.visitor-panel {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(22, 32, 51, 0.06);
}

.form-message {
  min-height: 24px;
  margin: 0;
  color: #236b2f;
  font-weight: 800;
}

.visitor-panel-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.visitor-panel-header h3,
.visitor-card h4 {
  margin: 0;
}

.visitor-panel-header p,
.visitor-card p {
  margin: 6px 0 0;
}

.visitor-list {
  display: grid;
  gap: 12px;
}

.fine-review-list,
.activity-log-list {
  display: grid;
  gap: 12px;
}

.block-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.block-tab {
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--brand-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.block-tab.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.apartment-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.apartment-card {
  display: grid;
  gap: 14px;
  min-height: 162px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(22, 32, 51, 0.06);
}

.fine-card,
.log-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(22, 32, 51, 0.06);
}

.fine-card h3 {
  margin: 6px 0;
  overflow-wrap: anywhere;
}

.fine-card p,
.log-card p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.log-card small {
  color: var(--muted);
  font-weight: 800;
  text-align: right;
}

.apartment-card strong,
.apartment-card small,
.apartment-card span {
  display: block;
}

.apartment-card strong {
  margin-top: 6px;
  font-size: 24px;
}

.apartment-card small,
.apartment-card p,
.locked-action {
  color: var(--muted);
  line-height: 1.45;
}

.apartment-card p {
  margin: 8px 0 0;
  overflow-wrap: anywhere;
}

.apartment-label {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.locked-action {
  align-self: end;
  font-size: 13px;
  font-weight: 800;
}

.visitor-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.visitor-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.inline-edit {
  max-width: 280px;
  margin-top: 12px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
}

.status.confirmed {
  background: #e8f5e9;
  color: #236b2f;
}

.status.rejected {
  background: #fee2e2;
  color: #991b1b;
}

.button.small {
  min-height: 38px;
  padding: 9px 12px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
}

.button.neutral {
  background: #e8f3ff;
  color: var(--brand-dark);
}

.button.danger {
  background: #fee2e2;
  color: #991b1b;
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.contact-list article {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.contact-list span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-list strong {
  font-size: 20px;
}

.contact-list a {
  color: var(--brand-dark);
  font-size: 18px;
  font-weight: 800;
}

.contact-list small {
  color: var(--muted);
  line-height: 1.5;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

input,
textarea {
  padding: 13px 14px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(18px, 5vw, 72px);
  background: #111827;
  color: #e5e7eb;
}

@media (max-width: 900px) {
  .menu-button {
    display: block;
  }

  .nav {
    position: absolute;
    top: 80px;
    right: 18px;
    left: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  .nav.open {
    display: flex;
  }

  .hero,
  .admin-hero,
  .contact,
  .site-tools,
  .visitor-layout,
  .resident-access-grid,
  .compact-form {
    grid-template-columns: 1fr;
  }

  .public-visitor-layout {
    grid-template-columns: 1fr;
  }

  .apartment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    min-height: auto;
    padding-top: 56px;
  }

  .info-grid,
  .employee-grid,
  .property-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 12px 16px;
  }

  .brand {
    min-width: 0;
  }

  .brand small {
    display: none;
  }

  .hero-actions,
  .section-heading.split,
  .visitor-panel-header,
  .footer {
    align-items: stretch;
    flex-direction: column;
  }

  .visitor-card {
    grid-template-columns: 1fr;
  }

  .fine-card,
  .log-card,
  .reservation-card,
  .management-card {
    grid-template-columns: 1fr;
  }

  .log-card small {
    text-align: left;
  }

  .panel-title-row {
    flex-direction: column;
  }

  .visitor-actions {
    justify-items: stretch;
  }

  .condo-gallery {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 150px;
  }

  .condo-photo.featured {
    grid-column: span 2;
  }

  .button,
  .search {
    max-width: none;
    width: 100%;
  }

  .stats-grid,
  .info-grid,
  .employee-grid,
  .property-grid,
  .apartment-grid {
    grid-template-columns: 1fr;
  }
}

