/* =========================================================
   HOSTVERO — APPLICATION LAYOUT
   ========================================================= */

.app-shell {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);

  width: 100%;
  height: 100vh;

  overflow: hidden;

  background: var(--hv-page-background);
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.sidebar {
  position: relative;
  z-index: 10;

  display: flex;
  flex-direction: column;

  width: 210px;
  height: 100vh;

  padding:
    1.15rem
    .75rem
    .8rem;

  overflow: hidden;

  background: #ffffff;

  border-right:
    1px solid
    var(--hv-border-soft);
}


/* =========================================================
   BRAND
   ========================================================= */

.sidebar-brand {
  display: flex;
  align-items: center;

  min-height: 48px;

  padding:
    0
    .55rem;
}

.sidebar-brand a {
  display: inline-flex;
  align-items: center;

  text-decoration: none;
}

.sidebar-logo {
  display: block;

  width: 126px;
  height: auto;

  object-fit: contain;
}


/* =========================================================
   PRIMARY NAVIGATION
   ========================================================= */

.nav {
  display: grid;

  gap: .15rem;

  margin-top: 1.7rem;
}

.nav-link {
  position: relative;

  display: flex;
  align-items: center;

  gap: .7rem;

  width: 100%;
  min-height: 40px;

  padding:
    .55rem
    .7rem;

  border: 0;
  border-radius: 8px;

  background: transparent;

  color: var(--hv-text-muted);

  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;

  line-height: 1;

  text-align: left;
  text-decoration: none;

  cursor: pointer;

  transition:
    background-color var(--hv-transition),
    color var(--hv-transition);
}


/* Hover */

.nav-link:hover {
  background: #f7f7f7;

  color: var(--hv-text);

  text-decoration: none;
}


/* Active */

.nav-link.active {
  background: var(--hv-blue-soft);

  color: var(--hv-deep-blue);

  font-weight: 650;
}


/* Small active indicator */

.nav-link.active::before {
  content: "";

  position: absolute;

  top: 50%;
  left: 0;

  width: 3px;
  height: 18px;

  transform: translateY(-50%);

  border-radius:
    0
    4px
    4px
    0;

  background: var(--hv-teal);
}


/* Icons */

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 18px;
  height: 18px;

  flex: 0 0 18px;

  color: #8492a6;
}

.nav-link:hover .nav-icon {
  color: var(--hv-text-secondary);
}

.nav-link.active .nav-icon {
  color: var(--hv-teal-dark);
}

.nav-icon svg {
  display: block;

  width: 18px;
  height: 18px;

  fill: none;

  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* =========================================================
   SIDEBAR FOOTER
   ========================================================= */

.sidebar-footer {
  display: grid;

  gap: .15rem;

  margin-top: auto;

  padding-top: .7rem;

  border-top:
    1px solid
    var(--hv-border-soft);

  background: #ffffff;
}

.sidebar-footer .nav-link {
  min-height: 39px;
}

.sidebar-logout {
  color: var(--hv-text-muted);
}

.sidebar-logout:hover {
  background: var(--hv-danger-soft);

  color: var(--hv-danger);
}

.sidebar-logout:hover .nav-icon {
  color: var(--hv-danger);
}


/* =========================================================
   MAIN CONTENT
   ========================================================= */

.main-area {
  min-width: 0;
  height: 100vh;

  display: flex;
  flex-direction: column;

  overflow: hidden;
}


/* =========================================================
   TOP BAR
   ========================================================= */

.topbar {
  position: relative;
  top: auto;
  z-index: 8;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;

  height: 72px;
  min-height: 72px;
  padding: 0 2rem;

  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--hv-border);
  backdrop-filter: blur(14px);
}

.topbar-left {
  min-width: 0;
}

.topbar-title {
  margin: 0;
  color: var(--hv-text);
  font-size: 1rem;
  font-weight: 750;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: .7rem;
}


/* New booking button in topbar */

.topbar-create {
  min-height: 40px;
  padding-inline: 1rem;
  white-space: nowrap;
}


/* Notification button */

.topbar-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 40px;
  height: 40px;

  border: 1px solid var(--hv-border);
  border-radius: 10px;

  background: #ffffff;
  color: #64748b;

  text-decoration: none;
  transition:
    background-color .18s ease,
    border-color .18s ease,
    color .18s ease;
}

.topbar-icon-button:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--hv-deep-blue);
  text-decoration: none;
}

.topbar-icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* Profile control */

.profile-control {
  display: flex;
  align-items: center;
  gap: .65rem;

  min-height: 44px;
  padding: .25rem .4rem .25rem .25rem;

  border-radius: 12px;

  color: var(--hv-text);
  text-decoration: none;

  transition: background-color .18s ease;
}

.profile-control:hover {
  background: #f7f9fc;
  text-decoration: none;
}

.avatar {
  display: grid;
  place-items: center;

  width: 38px;
  height: 38px;
  flex: 0 0 38px;

  border-radius: 50%;

  background: var(--hv-deep-blue);
  color: #ffffff;

  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .02em;
}

.profile-control-text {
  display: grid;
  gap: 2px;
  line-height: 1.1;
}

.profile-control-text strong {
  max-width: 145px;
  overflow: hidden;
  color: var(--hv-text);
  font-size: .82rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-control-text small {
  color: #8a97a8;
  font-size: .69rem;
  font-weight: 550;
}


/* =========================================================
   PAGE AREA
   ========================================================= */

.page {
  width: min(100%, 1440px);
  margin: 0 auto;

  flex: 1;

  padding: 2rem 2.25rem 3rem;

  overflow-y: auto;
  overflow-x: hidden;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.page-heading h1 {
  margin: 0 0 .35rem;
}


/* =========================================================
   MOBILE NAVIGATION
   ========================================================= */

.mobile-nav {
  display: none;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1050px) and (min-width: 768px) {

  .app-shell {
    grid-template-columns: 195px minmax(0, 1fr);
  }

  .sidebar {
    width: 195px;
  }

  .sidebar-logo {
    width: 118px;
  }

  .page {
    padding: 1.75rem;
  }

  .topbar {
    padding-inline: 1.5rem;
  }

  .profile-control-text {
    display: none;
  }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

  .app-shell {
    display: block;
    min-height: 100vh;
    padding-bottom: 72px;
  }

  .sidebar {
    display: none;
  }

  .main-area {
    min-height: auto;
  }

  .topbar {
    position: sticky;
    top: 0;

    min-height: 64px;
    padding: .7rem 1rem;
  }

  .topbar-title {
    font-size: .95rem;
  }

  .topbar-create {
    display: none;
  }

  .profile-control-text {
    display: none;
  }

  .topbar-actions {
    gap: .45rem;
  }

  .topbar-icon-button {
    width: 38px;
    height: 38px;
  }

  .avatar {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .profile-control {
    padding: 0;
  }

  .page {
    width: 100%;
    padding: 1.25rem 1rem 2rem;
  }

  .page-heading {
    gap: .85rem;
  }

  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;

    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));

    min-height: 66px;

    background: rgba(255, 255, 255, .98);
    border-top: 1px solid var(--hv-border);

    box-shadow: 0 -8px 24px rgba(15, 23, 42, .07);
    backdrop-filter: blur(14px);
  }

  .mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;

    min-width: 0;
    min-height: 66px;

    color: #7b8798;

    font-size: .62rem;
    font-weight: 650;

    text-decoration: none;
  }

  .mobile-nav a:hover {
    text-decoration: none;
  }

  .mobile-nav a.active {
    color: var(--hv-deep-blue);
  }

  .mobile-nav .nav-icon {
    width: 20px;
    height: 20px;
    color: currentColor;
  }

  .mobile-nav .nav-icon svg {
    width: 20px;
    height: 20px;
  }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

  .page-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .page-heading > .button,
  .page-heading > a.button {
    width: 100%;
    justify-content: center;
  }
}