/* The shared admin shell owns geometry; business styles must not resize it. */
#adminAppShell {
  --admin-sidebar-width: 264px;
  --admin-content-padding: 32px;
  display: flex;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}
#adminAppShell[hidden] { display: none; }
#adminAppShell .admin-layout { width: 100%; height: 100%; min-height: 0; overflow: hidden; }
#adminAppShell .sidebar {
  box-sizing: border-box;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: var(--admin-sidebar-width);
  padding: 22px 14px 16px;
  background: #14213d;
  color: #dfe7f8;
}
#adminAppShell .main-area {
  margin-left: var(--admin-sidebar-width);
  width: calc(100% - var(--admin-sidebar-width));
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
#adminAppShell .brand {
  display: flex;
  flex: none;
  align-items: center;
  gap: 11px;
  padding: 0 10px 21px;
}
#adminAppShell .brand > div:last-child { min-width: 0; }
#adminAppShell .brand strong {
  display: block;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  letter-spacing: 0;
  white-space: nowrap;
}
#adminAppShell .brand small {
  display: block;
  margin-top: 4px;
  color: #91a3c5;
  font-size: 11px;
  line-height: 16px;
  white-space: nowrap;
}
#adminAppShell .brand-mark {
  display: flex;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(145deg, #6e8dff, #2dcbd1);
}
#adminAppShell .brand-mark span { display: block; width: 4px; border-radius: 4px; background: #fff; }
#adminAppShell .brand-mark span:nth-child(1) { height: 11px; opacity: .68; }
#adminAppShell .brand-mark span:nth-child(2) { height: 18px; }
#adminAppShell .brand-mark span:nth-child(3) { height: 14px; opacity: .82; }
#adminAppShell .topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 68px;
  flex: 0 0 68px;
  padding: 0 var(--admin-content-padding);
  border-bottom: 1px solid var(--line);
  background: #fff;
}
#adminAppShell .content-wrap { width: 100%; max-width: none; min-height: 0; flex: 1; overflow: auto; padding: 20px var(--admin-content-padding); }
#adminAppShell .breadcrumbs { min-width: 0; white-space: nowrap; }
#adminAppShell .breadcrumbs strong { overflow: hidden; text-overflow: ellipsis; }
#adminAppShell .top-actions { flex: none; }
@media (max-width: 1100px) {
  #adminAppShell { --admin-content-padding: 24px; }
}
/* On narrow screens use a full-width, scrollable menu above the content.
   Do not squeeze full menu labels into the legacy 64px icon-only sidebar. */
@media (max-width: 700px) {
  #adminAppShell { flex-direction: column; --admin-content-padding: 16px; }
  #adminAppShell .admin-layout { flex-direction: column; }
  #adminAppShell .sidebar { position: relative; inset: auto; width: 100%; max-height: 160px; flex: 0 0 auto; padding: 12px 16px; overflow: auto; }
  #adminAppShell .main-area { width: 100%; margin-left: 0; }
  #adminAppShell .brand { padding-bottom: 14px; }
  #adminAppShell #sidebarNav { flex: 1; min-height: 0; overflow: auto; }
  #adminAppShell .sidebar-footer { display: none; }
}

/* Header controls are shared by all page modes. */
#adminBreadcrumb { min-width: 0; flex: 1; overflow: hidden; }
#adminBreadcrumb .el-breadcrumb { display: flex; align-items: center; white-space: nowrap; line-height: 24px; }
#adminBreadcrumb .el-breadcrumb__item { display: flex; align-items: center; min-width: 0; float: none; }
#adminBreadcrumb .el-breadcrumb__inner { overflow: hidden; text-overflow: ellipsis; }
#adminBreadcrumb .el-breadcrumb__separator { flex: none; margin: 0 10px; }
#adminAppShell .top-actions { gap: 16px; }
#adminAppShell #refreshPageBtn { display: inline-flex; align-items: center; justify-content: center; }
#adminAppShell .admin-account-trigger { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; white-space: nowrap; }
#adminAppShell .admin-account-trigger > * { cursor: pointer; }
#adminAppShell .admin-account-trigger, #adminAppShell .admin-account-trigger:hover, #adminAppShell .admin-account-trigger:focus, #adminAppShell .admin-account-trigger:focus-visible, #adminAppShell .admin-account-trigger:active { outline: none; box-shadow: none; }
#adminAppShell .admin-account-trigger [data-admin-name] { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#adminAppShell .admin-account-trigger .top-avatar { flex: none; display: flex; align-items: center; justify-content: center; line-height: 1; }
.admin-input-control { display: contents; }
@media (max-width: 700px) {
  #adminAppShell .top-actions { gap: 8px; }
  #adminAppShell .admin-account-trigger [data-admin-name] { max-width: 80px; }
}

/* Search inputs own one Element Plus border, prefix and focus state. */
admin-search { display: block; width: 100%; min-width: 0; }
admin-search[variant="search-field"] { width: 240px; margin-left: auto; }
admin-search[variant="filter-search"] { flex: 1 1 270px; max-width: 420px; }
admin-search[variant="payment-filter-search"] { flex: 1 1 240px; }
admin-search .el-input { width: 100%; }
@media (max-width: 700px) {
  admin-search[variant="search-field"], admin-search[variant="filter-search"] { width: 100%; max-width: none; }
}

admin-select { display: inline-block; min-width: 140px; width: 100%; vertical-align: middle; }
admin-select .el-select { width: 100%; }

admin-date { display: inline-block; width: 100%; min-width: 0; vertical-align: middle; }
admin-date .el-date-editor.el-input { width: 100%; }

admin-button { display: inline-flex; vertical-align: middle; }
admin-button[hidden] { display: none; }
.admin-button-mount { display: contents; }
admin-button > .admin-button-mount > .el-button { width: 100%; }
