@tailwind base;
@tailwind components;
@tailwind utilities;

/* App shell — matches mobile desktop [AppScaffold.buildDesktop]. */
.app-shell {
  display: flex;
  min-height: 100vh;
  background: #fff;
  position: relative;
}

.app-shell-topbar {
  display: none;
}

.app-menu-toggle {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  color: #242424;
}

.side-menu-panel {
  width: 250px;
  flex-shrink: 0;
  border-right: 1px solid #f5f5f5;
  background: #fff;
  overflow-y: auto;
  z-index: 40;
}

.side-menu-backdrop {
  display: none;
}

.app-shell-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.side-menu {
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.side-menu-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 30px 0 20px;
  text-align: center;
}

.side-menu-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

.side-menu-name {
  margin: 8px 0 0;
  font-size: 16px;
  font-weight: 400;
  color: #242424;
}

.side-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  border: none;
  background: transparent;
  padding: 10px 0;
  cursor: pointer;
  text-align: left;
  color: #5f5f5f;
  font-size: 14px;
  font-weight: 500;
}

.side-menu-item:hover {
  color: #242424;
}

.side-menu-item.is-active {
  color: #242424;
  font-weight: 600;
}

.side-menu-item-icon {
  width: 25px;
  height: 25px;
  flex-shrink: 0;
}

.side-menu-item-icon-wrap {
  position: relative;
  width: 25px;
  height: 25px;
  margin-right: 10px;
  flex-shrink: 0;
}

.side-menu-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 10px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
}

.side-menu-item-label {
  flex: 1;
}

.side-menu-spacer {
  flex: 1;
  min-height: 20px;
}

.side-menu-logout {
  border: none;
  background: transparent;
  padding: 10px 0;
  cursor: pointer;
  text-align: left;
  color: #5f5f5f;
  font-size: 14px;
  font-weight: 500;
}

.side-menu-logout:hover {
  color: #242424;
}

@media (max-width: 767px) {
  .app-shell {
    flex-direction: column;
  }

  .app-shell-topbar {
    display: flex;
    align-items: center;
    height: 48px;
    padding: 0 8px;
    border-bottom: 1px solid #f5f5f5;
    flex-shrink: 0;
  }

  .side-menu-panel {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: none;
  }

  .side-menu-panel.is-open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
  }

  .side-menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 30;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .side-menu-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .app-shell-main {
    width: 100%;
  }
}
