.topbar .top-actions {
  gap: 14px;
  margin-right: auto;
  min-width: 0;
}

.topbar .header-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 78px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  line-height: 1.4;
  white-space: nowrap;
}

.topbar .header-clock b {
  font-family: IRANSansBold, Tahoma, sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.topbar .header-clock [data-clock-time] {
  font-family: IRANSansBold, Tahoma, sans-serif;
  font-size: 12px;
  font-weight: 700;
  direction: ltr;
  font-variant-numeric: tabular-nums;
}

.topbar .top-actions > .header-separator {
  display: block;
  height: 30px;
  width: 1px;
  background: #d8e2ea;
  flex: none;
}

.area-automation .topbar .header-popover:not(.header-account) summary {
  width: 32px;
  min-width: 32px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: #365a7b;
  font-size: 18px;
}

.area-automation .topbar .header-popover:not(.header-account) summary:hover,
.area-automation .topbar .header-popover:not(.header-account)[open] summary {
  color: #0b7d86;
  background: #eef7f7;
}

.topbar .header-account {
  flex: none;
  position: relative;
}

.topbar .header-account summary,
.area-automation .topbar .header-account summary {
  display: flex;
  align-items: center;
  gap: 8px;
  width: auto;
  max-width: 230px;
  height: 40px;
  padding: 0 5px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  list-style: none;
  cursor: pointer;
}

.topbar .header-account summary::-webkit-details-marker { display: none; }

.header-account summary span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-account-chevron {
  font-size: 9px;
  color: var(--muted);
}

.header-account[open] .header-account-chevron {
  transform: rotate(180deg);
}

.topbar .header-account-menu {
  position: absolute;
  left: 0;
  right: auto;
  top: calc(100% + 8px);
  width: 220px;
  padding: 6px;
  font-size: 12px;
  z-index: 25;
  max-height: 60vh;
  overflow: auto;
  background: #fff;
  border: 1px solid #cbd9e8;
  border-radius: 10px;
  box-shadow: 0 15px 35px #183b5b30;
}

.header-account-menu .header-account-company {
  padding: 10px;
  color: #365a7b;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

.header-account-menu a,
.header-account-menu button {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  text-align: right;
  cursor: pointer;
}

.header-account-menu a:hover,
.header-account-menu button:hover {
  background: #eef7f7;
}

.header-account-menu form {
  border-top: 1px solid var(--border);
}

@media (max-width: 1100px) {
  .area-automation .topbar .header-account { display: block; }
}

@media (max-width: 900px) {
  .topbar { height: auto; min-height: 70px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .topbar .top-actions { width: 100%; justify-content: flex-start; flex-wrap: nowrap; }
  .topbar .header-account { margin-right: auto; }
}

@media (max-width: 420px) {
  .topbar .top-actions { gap: 8px; }
  .topbar .header-account summary { max-width: 120px; }
}
