/*
 * layout.css -- the app shell (sidebar + topbar + content grid).
 *
 * Horilla's own shell (.oh-wrapper-main / .oh-sidebar / .oh-navbar) is a
 * dark-background sidebar with Alpine.js-driven collapsible submenus and a
 * generic multi-app menu loader (see horilla-hr/templates/sidebar.html) --
 * none of which this standalone, single-app, jQuery/Alpine-free project
 * needs or should import. This is a purpose-built equivalent that matches
 * the *rendered* look of the live GCS Horilla instance (light sidebar,
 * rounded item cards, same accent color) using Horilla's own compiled
 * .oh-card/.oh-btn tokens for everything else.
 */

.ot-shell {
  display: grid;
  grid-template-columns: var(--ot-sidebar-w) 1fr;
  min-height: 100vh;
}

.ot-sidebar {
  background: var(--ot-page-bg);
  border-right: 1px solid #ececec;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.ot-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  margin-bottom: 6px;
}
.ot-sidebar__brand-mark {
  width: 32px;
  height: 32px;
  border-radius: var(--ot-radius-sm);
  background: var(--ot-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  overflow: hidden;
}
.ot-sidebar__brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ot-sidebar__brand-text {
  font-weight: 600;
  font-size: 15px;
  color: #1d1d1d;
}
.ot-sidebar__menu {
  list-style: none;
  margin: 0;
  padding: 4px 16px;
}
.ot-sidebar__menu li {
  margin-bottom: 10px;
}
.ot-sidebar__link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  color: #3a3a3a;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.ot-sidebar__link ion-icon {
  font-size: 20px;
  flex-shrink: 0;
  color: var(--ot-accent);
}
.ot-sidebar__link:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.ot-sidebar__link--active {
  background: var(--ot-accent);
  color: #fff;
  box-shadow: 0 4px 10px rgba(226, 89, 60, 0.35);
}
.ot-sidebar__link--active ion-icon {
  color: #fff;
}
.ot-sidebar__link--active:hover {
  background: var(--ot-accent-dark);
  color: #fff;
}

.ot-main {
  min-width: 0;
}
.ot-topbar {
  background: #fff;
  border-bottom: 1px solid #ececec;
  min-height: var(--ot-topbar-h);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.ot-topbar__left {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
.ot-topbar__title {
  font-weight: 600;
  font-size: 16px;
  color: #1d1d1d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.ot-topbar__user {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.ot-topbar__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ot-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
}
.ot-topbar__name {
  font-size: 13px;
  color: #1d1d1d;
  line-height: 1.2;
}
.ot-topbar__role {
  font-size: 11px;
  color: var(--ot-muted);
}

.ot-content {
  padding: 24px;
  max-width: 1400px;
  font-size: 14.5px;
}
.ot-content h2 {
  font-size: 22px;
  font-weight: 600;
  color: #1d1d1d;
}
.ot-content h4 {
  font-size: 15px;
  font-weight: 600;
  color: #1d1d1d;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ot-border-light);
}
.ot-content table {
  font-size: 14px;
}
.ot-content .text-xs {
  font-size: 12px;
}

/* Horilla's compiled .oh-btn/.oh-label are sized for a denser admin UI
   than this project wants -- bumped up for readability (buttons had no
   explicit font-size at all outside the 575px breakpoint, so they were
   inheriting whatever size text happened to sit at; labels were 0.85rem). */
.oh-btn {
  font-size: 15px;
}
.oh-btn--small {
  font-size: 14px;
}
.oh-btn--x-small {
  font-size: 13px;
}
.oh-label {
  font-size: 14px;
}

.ot-topbar__menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: #3a3a3a;
  cursor: pointer;
  padding: 4px;
  margin-right: 8px;
}

@media (max-width: 900px) {
  .ot-shell {
    grid-template-columns: 1fr;
  }
  .ot-topbar__menu-toggle {
    display: block;
  }
  .ot-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    max-width: 80vw;
    z-index: 1000;
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.15);
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  .ot-shell--sidebar-open .ot-sidebar {
    transform: translateX(0);
  }
  .ot-shell--sidebar-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 999;
  }
  .ot-content {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .ot-topbar {
    padding: 8px 12px;
  }
  .ot-topbar__title {
    font-size: 14px;
  }
  .ot-topbar__identity {
    display: none;
  }
  .ot-content h2 {
    font-size: 18px;
  }
  .ot-kpi-card__value {
    font-size: 22px;
  }
  .ot-kpi-card__label {
    font-size: 10px;
  }
}
