/* 顶部栏 */
.az-header {
  height: var(--header-height);
  background: var(--header-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  z-index: 100;
  position: relative;
}

.az-header__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.az-header__hamburger {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: var(--radius-sm);
  color: #fff;
  flex-shrink: 0;
  transition: background .15s;
}
.az-header__hamburger:hover { background: rgba(255,255,255,.15); }
.az-header__hamburger:active { background: rgba(255,255,255,.25); }
.az-header__hamburger svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.az-header__brand {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -.2px;
  user-select: none;
  white-space: nowrap;
}

.az-header__brand-sub {
  font-size: var(--font-size-xs);
  color: rgba(255,255,255,.7);
  font-weight: 400;
  margin-left: 8px;
}

.az-header__right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.az-header__right > .az-header__user,
.az-header__right > .az-header__logout {
  transform: translateY(1px);
}

.az-header__user {
  font-size: var(--font-size-md);
  font-weight: 500;
  color: #ffffff;
  white-space: nowrap;
  user-select: none;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.az-header__venue-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.az-header__venue-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
}

.az-header__status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: calc(var(--font-size-sm) + 1px);
  color: #ffffff;
  font-weight: 600;
  letter-spacing: .2px;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  transition: background .2s, color .2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.az-header__status--ok {
  color: #ffffff;
  background: rgba(255,255,255,.12);
}
.az-header__status--err {
  color: #ffffff;
  background: none;
}
.az-header__status--loading {
  color: #ffffff;
  background: rgba(255,255,255,.08);
}

.az-header__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.az-header__dot--ok {
  background: #92c353;
  animation: az-breathing-light 2s ease-in-out infinite;
}
.az-header__dot--err {
  background: var(--color-text-tertiary);
  animation: az-breathing-light 2s ease-in-out infinite;
  transform: translateY(1px);
}
.az-header__dot--loading {
  background: rgba(255,255,255,.5);
  animation: az-pulse 1.5s ease-in-out infinite;
}

.az-header__logout {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: var(--radius-sm);
  color: #fff;
  margin-left: 8px;
  flex-shrink: 0;
  transition: background .15s;
}
.az-header__logout:hover {
  background: rgba(255,255,255,.15);
}
.az-header__logout:active {
  background: rgba(255,255,255,.25);
}
.az-header__logout svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
}

.az-header__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.az-header__avatar:hover {
  background: rgba(255,255,255,.3);
}

/* 主体容器 */
.az-body {
  display: flex;
  height: calc(100vh - var(--header-height));
  overflow: hidden;
}

/* 侧边栏 */
.az-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width .25s cubic-bezier(.4,0,.2,1),
              min-width .25s cubic-bezier(.4,0,.2,1);
  flex-shrink: 0;
}

.az-sidebar--collapsed {
  width: 48px;
  min-width: 48px;
}

.az-sidebar__section {
  padding: 14px 0 6px 0;
}

.az-sidebar__section-title {
  padding: 0 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--sidebar-section-color);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity .2s, height .2s;
}

.az-sidebar--collapsed .az-sidebar__section-title {
  opacity: 0;
  height: 0;
  padding: 0;
  margin: 0;
}

.az-sidebar__divider {
  height: 1px;
  background: var(--color-border);
  margin: 8px 16px;
}

.az-sidebar--collapsed .az-sidebar__divider {
  margin: 8px 6px;
}

/* 导航项 */
.az-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 36px;
  cursor: pointer;
  color: var(--sidebar-item-color);
  font-size: var(--font-size-sm);
  font-weight: 400;
  border-left: 3px solid transparent;
  transition: background .12s, border-color .12s;
  white-space: nowrap;
  overflow: hidden;
  user-select: none;
  position: relative;
}

.az-nav-item:hover {
  background: var(--sidebar-hover);
}

.az-nav-item--active {
  background: var(--sidebar-active-bg);
  border-left-color: var(--sidebar-active-bar);
  font-weight: 600;
  color: var(--azure-blue);
}

.az-nav-item__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.az-nav-item__icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.az-nav-item__label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.az-nav-item__badge {
  margin-left: auto;
  background: var(--color-danger);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.az-sidebar--collapsed .az-nav-item__label {
  display: none;
}

.az-sidebar--collapsed .az-nav-item__badge {
  display: none;
}

.az-sidebar--collapsed .az-nav-item {
  padding: 0;
  justify-content: center;
}

/* 移动端侧边栏遮罩 */
.az-sidebar-backdrop {
  display: none;
}

/* 内容区 */
.az-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-bg);
  min-width: 0;
}

/* 工具栏 / 面包屑 */
.az-toolbar {
  height: 44px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
}

.az-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  min-width: 0;
  overflow: hidden;
}

.az-breadcrumb__home {
  color: var(--azure-blue);
  cursor: pointer;
  font-weight: 500;
  flex-shrink: 0;
}
.az-breadcrumb__home:hover { text-decoration: underline; }

.az-breadcrumb__sep {
  color: var(--color-text-tertiary);
  font-size: 10px;
  flex-shrink: 0;
}

.az-breadcrumb__current {
  color: var(--color-text-primary);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.az-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* 页面滚动区 */
.az-page {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* 页面标题 */
.az-page-title {
  font-size: var(--font-size-xxl);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.az-page-title__icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.az-page-title__icon svg {
  width: 24px;
  height: 24px;
  fill: var(--azure-blue);
}

.az-page-desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin: -12px 0 20px 0;
  line-height: 1.6;
}

/* 底部保存栏 */
.az-save-bar {
  height: 48px;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 24px;
  gap: 10px;
  flex-shrink: 0;
}

/* 通知小红点 */
.az-notif-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--color-danger);
  border-radius: 50%;
  border: 2px solid var(--color-surface);
}
