/* Owner portal only. Do not import this on staff pages. */

body.page--owner .sidebar,
body.page--owner .sidebar-mobile-toggle,
body.page--owner .sidebar-overlay {
  display: none !important;
}

body.page--owner .main {
  margin-left: 0;
  padding: 0;
  min-height: 100vh;
}

body.page--owner .footer {
  display: none;
}

body.page--owner {
  background-color: var(--background-color);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.78)),
    url("../img/owner/background.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  overflow-x: hidden;
  max-width: 100%;
}

html.dark-mode body.page--owner {
  background-image:
    linear-gradient(rgba(7, 23, 57, 0.72), rgba(7, 23, 57, 0.8)),
    url("../img/owner/background.webp");
}

body.page--owner:not(.page--owner-login) {
  height: 100vh;
  overflow: hidden;
}

body.page--owner:not(.page--owner-login) .main {
  height: 100vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ao-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1.2rem;
  flex: 0 0 auto;
}

.ao-brand {
  display: flex;
  align-items: center;
}

.ao-brand__name {
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.9rem;
  line-height: 1.2;
}

.ao-top__actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.ao-icon-btn,
.ao-text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-dark);
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

html.dark-mode .ao-icon-btn,
html.dark-mode .ao-text-btn {
  border-color: rgba(205, 212, 218, 0.28);
}

.ao-icon-btn {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
}

.ao-text-btn {
  min-height: 2.35rem;
  padding: 0 0.9rem;
  border-radius: 999px;
  font-size: 0.84rem;
}

.ao-icon-btn:hover,
.ao-text-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(7, 23, 57, 0.12);
  background: rgba(183, 100, 59, 0.08);
}

.ao-icon-btn svg {
  width: 1.1rem;
  height: 1.1rem;
}

.ao-shell {
  width: min(1240px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding-bottom: 0.55rem;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  position: relative;
}

.ao-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: 112.5px 37.5px minmax(0, 1fr);
  gap: 0.45rem;
  justify-items: center;
}

.ao-flash {
  padding: 0.45rem 0.75rem;
  border-radius: 0.5rem;
  color: var(--text-light);
  font-size: 0.86rem;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
}

.ao-flash--danger,
.ao-flash--error,
.ao-flash--warning {
  background: var(--accent-colour);
}

.ao-ad,
.ao-messages,
.ao-panel {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 28px rgba(7, 23, 57, 0.08);
  overflow: hidden;
  min-height: 0;
}

html.dark-mode .ao-ad,
html.dark-mode .ao-messages,
html.dark-mode .ao-panel {
  background: rgba(12, 35, 73, 0.72);
  border-color: rgba(205, 212, 218, 0.16);
}

.ao-ad,
.ao-messages {
  width: min(910px, 100%);
  max-width: 100%;
  margin: 0 auto;
  border-radius: 0.2rem;
  padding: 0;
  box-sizing: border-box;
}

.ao-ad {
  height: 112.5px;
  display: block;
}

.ao-messages {
  height: 37.5px;
  display: block;
  overflow: hidden;
}

.ao-rotator {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.ao-rotator__track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.55s ease;
}

.ao-rotator--vertical .ao-rotator__track {
  display: block;
  position: relative;
  height: 100%;
  transition: none;
}

.ao-rotator--vertical .ao-rotator__slide {
  position: absolute;
  inset: 0;
  transform: translateY(-100%);
}

.ao-rotator--vertical .ao-rotator__slide.is-current {
  transform: translateY(0);
  z-index: 2;
}

.ao-rotator--vertical .ao-rotator__slide.is-leaving {
  transform: translateY(100%);
  z-index: 1;
}

.ao-rotator--vertical .ao-rotator__slide.is-animating {
  transition: transform 0.55s ease;
}

.ao-rotator__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  object-position: center;
  background: rgba(0, 0, 0, 0.08);
}

.ao-ticker {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.ao-ticker__track {
  position: relative;
  width: 100%;
  height: 100%;
}

.ao-ticker__item {
  position: absolute;
  left: 0;
  top: 50%;
  display: inline-flex;
  align-items: center;
  height: 1.55em;
  margin: 0;
  white-space: nowrap;
  font-size: 0.82rem;
  line-height: 1;
  padding: 0 0.7rem;
  visibility: hidden;
  will-change: transform;
}

.ao-ticker__item.is-urgent {
  font-weight: 700;
  color: #000;
  background: #d31212;
  border-radius: 0.2rem;
}

.ao-rotator__text,
.ao-rotator__empty {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.7rem;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ao-bottom {
  width: 100%;
  justify-self: stretch;
  align-self: start;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  grid-template-rows: auto auto;
  gap: 0.55rem;
  min-height: 0;
  align-items: stretch;
}

.ao-info {
  grid-column: 1;
  grid-row: 1;
}

.ao-cards-panel {
  grid-column: 2;
  grid-row: 1;
}

.ao-password {
  grid-column: 1 / -1;
  grid-row: 2;
}

.ao-messages__title,
.ao-panel__label {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ao-message {
  padding: 0.5rem 0.65rem;
  border-radius: 0.55rem;
  margin-top: 0.35rem;
  font-size: 0.88rem;
}

.ao-message--urgent {
  background: rgba(183, 100, 59, 0.16);
  border-left: 4px solid var(--accent-colour);
}

.ao-message--info {
  background: rgba(12, 35, 73, 0.06);
  border-left: 4px solid #4a6288;
}

html.dark-mode .ao-message--info {
  background: rgba(205, 212, 218, 0.08);
}

.ao-empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.ao-stage {
  height: 100%;
  width: 100%;
  display: grid;
  place-items: center;
  padding: 0.8rem;
  text-align: center;
}

.ao-stage__mark {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-colour);
  margin-bottom: 0.25rem;
}

.ao-info,
.ao-password,
.ao-cards-panel {
  padding: 0.45rem 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.ao-info,
.ao-cards-panel {
  height: 100%;
}

.ao-info__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
  align-content: start;
  flex: 1;
}

.ao-info__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  height: 2em;
  padding: 0;
  margin: 0;
  line-height: 1;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.82rem;
}

html.dark-mode .ao-info__row {
  border-bottom-color: rgba(205, 212, 218, 0.12);
}

.ao-info__key {
  color: var(--text-muted);
}

.ao-info__val {
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

.ao-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem;
}

.ao-card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.ao-card-list .ao-chip {
  justify-content: flex-start;
  width: 100%;
  box-sizing: border-box;
}

.ao-chip {
  display: inline-flex;
  align-items: center;
  height: 2em;
  padding: 0 0.55rem;
  border-radius: 0.4rem;
  background: rgba(183, 100, 59, 0.12);
  font-size: 0.82rem;
  line-height: 1;
}

body.page--owner-login .ao-login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem 3rem;
}

.ao-login {
  width: min(28rem, 100%);
  padding: 2rem 1.6rem 1.6rem;
  border-radius: 1.2rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 24px 50px rgba(7, 23, 57, 0.14);
  animation: ao-rise 0.45s ease;
}

html.dark-mode .ao-login {
  background: rgba(12, 35, 73, 0.88);
  border-color: rgba(205, 212, 218, 0.16);
}

.ao-login__logo {
  letter-spacing: 0.18em;
  font-weight: 700;
  text-align: center;
}

.ao-login__title {
  margin: 0.35rem 0 1.3rem;
  text-align: center;
  font-size: 1.15rem;
}

.ao-field {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 0.95rem;
}

.ao-field label {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.ao-field input {
  width: 100%;
  box-sizing: border-box;
  height: 2.85rem;
  border: 0;
  border-bottom: 2px solid rgba(0, 0, 0, 0.16);
  background: transparent;
  color: var(--text-dark);
  font: inherit;
  padding: 0 0.2rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

html.dark-mode .ao-field input {
  border-bottom-color: rgba(205, 212, 218, 0.28);
}

.ao-field input:focus {
  border-bottom-color: var(--accent-colour);
  box-shadow: 0 6px 0 -4px var(--accent-colour);
}

.ao-error {
  color: var(--accent-colour);
  font-size: 0.8rem;
}

.ao-submit {
  width: 100%;
  margin-top: 0.6rem;
  height: 2.9rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent-colour);
  color: var(--text-light);
  font: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}

.ao-submit:hover {
  transform: translateY(-1px);
  background: var(--accent-colour-hover);
}

.ao-password__form {
  width: 100%;
  max-width: none;
  flex: none;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 0.55rem;
}

.ao-password .ao-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.18rem;
  margin-bottom: 0;
  height: auto;
  flex: 1 1 0;
  min-width: 0;
  font-size: 0.82rem;
}

.ao-password .ao-field label {
  font-size: inherit;
  line-height: 1.2;
  margin: 0;
  white-space: nowrap;
}

.ao-password .ao-field input,
.ao-password .ao-field input:focus {
  width: 100%;
  box-sizing: border-box;
  height: 2em;
  min-height: 0;
  line-height: 2em;
  padding: 0 0.55rem;
  font-size: inherit;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

html.dark-mode .ao-password .ao-field input,
html.dark-mode .ao-password .ao-field input:focus {
  border-color: rgba(205, 212, 218, 0.28);
  background: rgba(7, 23, 57, 0.35);
  box-shadow: none;
}

.ao-password .ao-field input:focus {
  border-color: var(--accent-colour);
}

.ao-password .ao-error {
  font-size: 0.72rem;
  line-height: 1.2;
  min-height: 0;
}

.ao-password .ao-submit {
  width: auto;
  flex: 0 0 auto;
  align-self: flex-end;
  height: 2em;
  min-height: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding: 0 1.1rem;
  font-size: 0.82rem;
  line-height: 1;
  border-radius: 0.4rem;
  white-space: nowrap;
}

.ao-login-theme {
  position: fixed;
  top: 1rem;
  right: 1rem;
}

@keyframes ao-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  body.page--owner:not(.page--owner-login) {
    height: auto;
    min-height: 100vh;
    overflow: auto;
    overflow-x: hidden;
  }

  body.page--owner:not(.page--owner-login) .main {
    height: auto;
    min-height: 100vh;
    display: block;
    overflow: visible;
  }

  .ao-top {
    padding: 0.55rem 0.75rem;
    gap: 0.5rem;
  }

  .ao-shell {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 0.75rem 1.1rem;
    overflow: visible;
  }

  .ao-layout {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    justify-items: stretch;
  }

  .ao-ad,
  .ao-messages {
    width: 100%;
    max-width: 100%;
  }

  .ao-ad {
    height: auto;
    aspect-ratio: 910 / 112.5;
    min-height: 4.5rem;
  }

  .ao-messages {
    height: 2.6rem;
    min-height: 2.6rem;
  }

  .ao-bottom {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
  }

  .ao-info,
  .ao-password,
  .ao-cards-panel {
    grid-column: auto;
    grid-row: auto;
    height: auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
  }

  .ao-info__grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .ao-info__row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.15rem;
    height: auto;
    min-height: 0;
    align-items: start;
    padding: 0.4rem 0;
  }

  .ao-info__key,
  .ao-info__val {
    min-width: 0;
    max-width: 100%;
    text-align: left;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .ao-password__form {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.65rem;
  }

  .ao-password .ao-field {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
  }

  .ao-password .ao-field label {
    white-space: normal;
  }

  .ao-password .ao-field input,
  .ao-password .ao-field input:focus {
    height: 2.5rem;
    min-height: 2.5rem;
    line-height: 1.2;
  }

  .ao-password .ao-submit {
    flex: 0 0 auto;
    width: 100%;
    height: 2.6rem;
    align-self: stretch;
    white-space: normal;
  }
}


/* Switch between the apartments registered under this owner */
.ao-apts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.6rem;
}

.ao-apt {
  display: inline-flex;
  align-items: center;
  height: 1.9em;
  padding: 0 0.7rem;
  border-radius: 0.4rem;
  background: rgba(183, 100, 59, 0.12);
  color: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.ao-apt:hover {
  background: rgba(183, 100, 59, 0.25);
}

.ao-apt.is-current {
  background: #b7643b;
  color: #fff;
}
