:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #192538;
  background: #f5f7fa;
  font-synthesis: none;
  --blue: #1761f5;
  --muted: #64748b;
  --border: #e3e8ef;
  --navy: #101d30;
  --radius: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #8cb5ff;
  outline-offset: 3px;
}
.shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 244px;
  flex-shrink: 0;
  background: var(--navy);
  color: #b7c4d6;
  display: flex;
  flex-direction: column;
  padding: 30px 20px 18px;
  position: fixed;
  inset: 0 auto 0 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 29px;
  font-weight: 650;
  letter-spacing: -1px;
  padding: 0 7px 38px;
}
.brand-mark {
  width: 37px;
  height: 43px;
  border: 2px solid #679aff;
  border-radius: 10px;
  font-size: 33px;
  line-height: 33px;
  text-align: center;
  color: #83afff;
  font-weight: 500;
  position: relative;
}
.brand-mark span {
  font-size: 20px;
  color: #50dcb0;
  position: absolute;
  right: -5px;
  top: -9px;
}
.brand-by {
  display: block;
  font-size: 9px;
  letter-spacing: 1.6px;
  color: #8d9db4;
  margin-top: 5px;
}
.workspace-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #8292a9;
  margin: 0 12px 10px;
}
.client-select {
  background: #1c2b40;
  border: 1px solid #31415a;
  color: white;
  padding: 12px;
  border-radius: 9px;
  width: 100%;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 30px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  margin: 4px 0;
  border-radius: 9px;
  font-size: 14px;
  transition: 0.15s;
}
.nav-item:hover {
  color: #fff;
  background: #1b2c44;
}
.nav-item.active {
  color: #fff;
  background: #254477;
}
.nav-item.active svg {
  color: #8db4ff;
}
.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 34px;
}
.add-client {
  background: none;
  border: 0;
  color: #afbed2;
  font-size: 13px;
  padding: 12px 8px;
}
.local-badge {
  font-size: 11px;
  line-height: 1.6;
  color: #98a8bf;
  margin: 12px 8px 25px;
  display: flex;
  gap: 7px;
  align-items: center;
}
.local-badge span {
  width: 6px;
  height: 6px;
  background: #9eafc5;
  border-radius: 50%;
  flex-shrink: 0;
}
.profile {
  display: flex;
  gap: 12px;
  align-items: center;
  border-top: 1px solid #2a384d;
  padding-top: 22px;
  color: #e4ebf5;
  font-size: 13px;
}
.profile small {
  display: block;
  color: #8194af;
  margin-top: 4px;
  font-size: 11px;
}
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #283e5f;
  color: #bfd6fc;
  width: 37px;
  height: 37px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}
.avatar.small {
  width: 32px;
  height: 32px;
  background: #e9eef7;
  color: #314a70;
}
.workspace {
  margin-left: 244px;
  min-width: 0;
  width: calc(100% - 244px);
}
.topbar {
  height: 76px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
}
.breadcrumb {
  font-size: 13px;
  color: #718097;
}
.breadcrumb span {
  padding: 0 15px;
  color: #c2cbd7;
}
.breadcrumb strong {
  font-weight: 600;
  color: #22314b;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 15px;
}
.live-label {
  font-size: 12px;
  color: var(--muted);
}
.icon-button {
  border: 1px solid var(--border);
  background: white;
  color: #61728b;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  font-size: 20px;
}
main {
  padding: 35px 38px 48px;
  max-width: 1700px;
  margin: auto;
  min-height: calc(100vh - 125px);
}
.page-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 27px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.6px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 10px;
}
h1 {
  font-size: 29px;
  font-weight: 650;
  letter-spacing: -0.8px;
  line-height: 1.2;
  margin: 0 0 10px;
}
h2 {
  font-size: 18px;
  font-weight: 650;
  margin: 0;
  letter-spacing: -0.3px;
}
h3 {
  font-size: 15px;
  margin: 0;
  font-weight: 600;
}
p {
  line-height: 1.6;
}
.subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 16px;
  background: white;
  border: 1px solid #dce3ed;
  border-radius: 8px;
  color: #31415b;
  font-size: 13px;
  font-weight: 600;
  min-height: 40px;
}
.btn svg {
  width: 16px;
  height: 16px;
}
.btn:hover {
  background: #f4f7fb;
}
.btn.primary {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
  box-shadow: 0 2px 3px #1761f519;
}
.btn.primary:hover {
  background: #0d50d6;
}
.btn.small {
  padding: 7px 11px;
  min-height: 32px;
  font-size: 12px;
}
.btn.ghost {
  background: transparent;
  border: 0;
  color: var(--blue);
  padding: 6px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 17px;
  margin-bottom: 28px;
}
.stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
  position: relative;
}
.stat-label {
  font-size: 12px;
  color: #62738a;
  font-weight: 500;
}
.stat-value {
  font-size: 29px;
  letter-spacing: -1px;
  font-weight: 650;
  margin: 9px 0 7px;
}
.stat-foot {
  font-size: 11px;
  color: #8591a3;
}
.stat-symbol {
  position: absolute;
  right: 19px;
  top: 21px;
  color: #718bad;
  background: #f1f5fb;
  border-radius: 8px;
  padding: 7px;
  display: flex;
}
.stat-symbol svg {
  width: 17px;
  height: 17px;
}
.stat-value.green {
  color: #128069;
}
.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 15px;
}
.section-bar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.badge {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  background: #f0f3f8;
  color: #526277;
  white-space: nowrap;
}
.badge.green {
  background: #e6f5ef;
  color: #117859;
}
.badge.amber {
  background: #fff4df;
  color: #946010;
}
.badge.blue {
  background: #eaf1ff;
  color: #235ad0;
}
.badge.red {
  background: #ffecec;
  color: #b43d3d;
}
.dashboard-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 278px;
  gap: 24px;
}
.screen-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.screen-grid.full {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.screen-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
  overflow: hidden;
  transition:
    box-shadow 0.18s,
    border-color 0.18s;
}
.screen-card:hover {
  border-color: #c7d4e6;
  box-shadow: 0 5px 22px #17294308;
}
.screen-card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 17px 0;
  align-items: center;
}
.screen-card-top label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}
.screen-preview {
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f7fa;
  margin: 15px 16px 0;
  border: 1px solid #edf0f5;
  border-radius: 8px;
  position: relative;
}
.monitor {
  width: 79px;
  height: 139px;
  border: 4px solid #3c4c64;
  background: #15243a;
  border-radius: 5px;
  box-shadow: 7px 8px 14px #18314e16;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.monitor.landscape {
  width: 185px;
  height: 105px;
}
.monitor img,
.monitor video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.monitor-placeholder {
  color: #91a4bd;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 8px;
  letter-spacing: 1px;
}
.monitor-placeholder svg {
  width: 22px;
  height: 22px;
  opacity: 0.6;
}
.preview-orientation {
  position: absolute;
  bottom: 10px;
  right: 10px;
  color: #7b8b9f;
  font-size: 10px;
}
.screen-body {
  padding: 17px;
}
.screen-site {
  font-size: 12px;
  color: #65758c;
  margin: 6px 0 17px;
  min-height: 16px;
}
.screen-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #526277;
  border-top: 1px solid #eef1f5;
  padding: 12px 0 0;
}
.screen-row strong {
  font-size: 11px;
  font-weight: 500;
  color: #465872;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.screen-card-actions {
  display: flex;
  justify-content: space-between;
  padding-top: 14px;
  gap: 7px;
}
.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 21px;
}
.panel + .panel {
  margin-top: 18px;
}
.panel h2 {
  font-size: 15px;
}
.progress-list {
  display: flex;
  flex-direction: column;
  gap: 21px;
  margin-top: 24px;
}
.progress-step {
  display: flex;
  gap: 11px;
  align-items: flex-start;
}
.step-number {
  border-radius: 50%;
  background: #eef3fd;
  color: #3862a2;
  font-size: 11px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.progress-step strong {
  font-size: 12px;
  font-weight: 600;
  display: block;
  padding-top: 4px;
}
.progress-step p {
  color: #8190a3;
  font-size: 11px;
  line-height: 1.6;
  margin: 5px 0 0;
}
.activity {
  padding: 16px 0;
  border-bottom: 1px solid #edf0f5;
}
.activity:last-child {
  border: 0;
  padding-bottom: 0;
}
.activity p {
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
  color: #52637b;
}
.activity time {
  font-size: 10px;
  color: #97a2b1;
  display: block;
  margin-top: 5px;
}
.quiet-banner {
  display: flex;
  gap: 13px;
  align-items: center;
  background: #eaf1ff;
  border: 1px solid #d7e5fe;
  padding: 16px 20px;
  border-radius: 10px;
  margin-bottom: 26px;
  font-size: 13px;
  color: #3d5f97;
}
.quiet-banner svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.search {
  width: 270px;
  max-width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 13px;
  color: #33445e;
}
.toolbar select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  color: #53647d;
  background: #fff;
  font-size: 13px;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.media-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.media-cover {
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e9edf3;
  position: relative;
}
.media-cover img,
.media-cover video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.media-cover .badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #ffffffec;
}
.media-card-info {
  padding: 16px;
}
.media-card-info h3 {
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 6px;
}
.meta {
  font-size: 11px;
  color: #526277;
}
/* Supplemental catalog guidance must remain readable on the page background. */
.workspace .catalog-language-help {
  color: #526277;
}
.empty {
  border: 1px dashed #cfd8e6;
  border-radius: 14px;
  background: #fff;
  text-align: center;
  padding: 55px 25px;
  color: #526277;
  grid-column: 1/-1;
}
.empty svg {
  width: 34px;
  height: 34px;
  color: #8ba5cf;
  margin-bottom: 15px;
}
.empty h2 {
  color: #364960;
  margin-bottom: 8px;
}
.empty p {
  font-size: 14px;
  margin: 8px 0 20px;
}
.playlist-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.playlist-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
}
.playlist-art {
  position: relative;
  height: 120px;
  background: #eef3fc;
  border-radius: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-bottom: 19px;
  overflow: hidden;
}
.playlist-art img {
  height: 88px;
  max-width: 80px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 2px 4px 8px #16345813;
}
.playlist-art svg {
  width: 35px;
  height: 35px;
  color: #7295cb;
}
.playlist-card p {
  font-size: 12px;
  color: var(--muted);
  margin: 7px 0 20px;
}
.table-wrap {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}
th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #526277;
  background: #fbfcfe;
  padding: 15px 20px;
  font-weight: 600;
}
td {
  padding: 19px 20px;
  border-top: 1px solid #edf0f5;
  font-size: 13px;
}
td small {
  display: block;
  color: #8995a6;
  font-size: 11px;
  margin-top: 5px;
}
.schedule-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.days {
  display: flex;
  gap: 6px;
}
.day {
  height: 30px;
  width: 30px;
  border-radius: 6px;
  background: #f0f3f7;
  color: #a4adbb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}
.day.on {
  background: #e8f0ff;
  color: #2d63c3;
}
.hours {
  font-size: 14px;
  font-weight: 600;
}
.schedule-name {
  min-width: 155px;
}
.schedule-name small {
  display: block;
  font-size: 11px;
  color: #8190a4;
  margin-top: 5px;
}
footer {
  padding: 0 38px 21px;
  color: #526277;
  font-size: 10px;
  display: flex;
  justify-content: space-between;
}
dialog {
  border: 0;
  border-radius: 16px;
  padding: 0;
  width: min(640px, calc(100vw - 32px));
  max-height: 90vh;
  box-shadow: 0 25px 100px #07162c4a;
  color: #203149;
}
dialog::backdrop {
  background: #0d1a2f7a;
  backdrop-filter: blur(3px);
}
.dialog-head {
  padding: 25px 28px 21px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}
.dialog-head h2 {
  font-size: 22px;
}
.dialog-head p {
  font-size: 13px;
  margin: 7px 0 0;
  color: #7b899c;
}
.dialog-body {
  padding: 24px 28px;
}
.dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 28px;
  border-top: 1px solid var(--border);
  background: #fafbfd;
}
.close {
  border: 0;
  background: #f0f3f8;
  border-radius: 7px;
  width: 29px;
  height: 29px;
  font-size: 20px;
  color: #6b7b91;
}
.field {
  display: block;
  margin-bottom: 20px;
}
.field > span,
.field > label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}
.field input,
.field select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #d7dfea;
  border-radius: 8px;
  background: white;
  color: #2d405e;
  font-size: 14px;
}
.field small {
  display: block;
  color: #7d8ba0;
  font-size: 12px;
  margin-top: 8px;
  line-height: 1.5;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field-row .field {
  min-width: 0;
}
.check-days {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.check-days label {
  font-size: 12px;
  border: 1px solid var(--border);
  padding: 8px;
  border-radius: 6px;
  display: flex;
  gap: 4px;
  align-items: center;
}
.check-days input {
  accent-color: var(--blue);
}
input[type="checkbox"] {
  accent-color: var(--blue);
  width: 15px;
  height: 15px;
  margin: 0;
}
.note {
  padding: 12px 15px;
  border-radius: 8px;
  background: #f1f5fb;
  color: #627590;
  font-size: 12px;
  line-height: 1.7;
  margin: 0 0 20px;
}
.error {
  background: #fff0f0;
  color: #a83434;
  font-size: 13px;
  border-radius: 8px;
  padding: 12px 15px;
  margin-bottom: 15px;
}
.form-error:empty {
  display: none;
}
.pick-screen {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 9px;
  font-size: 13px;
}
.pick-screen small {
  display: block;
  color: #7e8ca0;
  margin-top: 4px;
  font-size: 11px;
}
.pick-screen .badge {
  margin-left: auto;
}
.playlist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px;
  margin-bottom: 9px;
}
.playlist-item img {
  width: 32px;
  height: 43px;
  object-fit: cover;
  background: #dfe7f3;
  border-radius: 3px;
}
.playlist-item-main {
  flex: 1;
  min-width: 0;
  font-size: 12px;
}
.playlist-item input {
  width: 62px;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 6px;
  font-size: 12px;
}
.playlist-item button {
  border: 0;
  background: #f0f4f9;
  color: #536c8f;
  border-radius: 5px;
  padding: 6px;
}
.playlist-item .meta {
  margin-top: 5px;
}
.upload-zone {
  border: 2px dashed #ccdaef;
  border-radius: 12px;
  background: #f7faff;
  padding: 38px 20px;
  text-align: center;
  cursor: pointer;
  display: block;
  color: #2c5b9a;
}
.upload-zone:hover,
.upload-zone.drag {
  border-color: var(--blue);
  background: #edf4ff;
}
.upload-zone svg {
  width: 34px;
  height: 34px;
  margin-bottom: 13px;
}
.upload-zone strong {
  display: block;
  font-size: 15px;
}
.upload-zone small {
  font-size: 12px;
  color: #7c90af;
  display: block;
  margin-top: 9px;
}
.upload-progress {
  margin-top: 16px;
  font-size: 13px;
  color: #58708e;
}
.upload-progress progress {
  width: 100%;
  accent-color: var(--blue);
  margin-top: 10px;
}
.preview-stage {
  background: #101d30;
  border-radius: 10px;
  height: 440px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
.preview-stage img,
.preview-stage video {
  height: 100%;
  max-width: 100%;
  object-fit: contain;
}
.preview-caption {
  text-align: center;
  font-size: 13px;
  color: #6c7d95;
  margin: 15px 0 0;
}
.secret {
  padding: 14px;
  background: #edf2fa;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-wrap: anywhere;
  font-family: monospace;
  font-size: 13px;
}
.loading {
  padding: 60px;
  text-align: center;
  color: #8090a6;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: calc(50% + 100px);
  transform: translateX(-50%) translateY(100px);
  background: #142940;
  color: white;
  padding: 14px 22px;
  border-radius: 10px;
  box-shadow: 0 8px 35px #10243826;
  font-size: 13px;
  max-width: 80vw;
  opacity: 0;
  transition: 0.2s;
  z-index: 5;
}
#toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
code {
  font-size: 12px;
  overflow-wrap: anywhere;
}
@media (min-width: 1500px) {
  .screen-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .dashboard-columns {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
  .screen-grid.full {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1200px) {
  .dashboard-columns {
    grid-template-columns: 1fr;
  }
  .dashboard-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .panel + .panel {
    margin-top: 0;
  }
  .media-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .screen-grid.full {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .playlist-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .schedule-card {
    flex-wrap: wrap;
  }
  .stat {
    padding: 18px 15px;
  }
  .stat-symbol {
    display: none;
  }
}
@media (max-width: 850px) {
  .sidebar {
    width: 190px;
    padding: 25px 12px 15px;
  }
  .workspace {
    margin-left: 190px;
    width: calc(100% - 190px);
  }
  main {
    padding: 27px 23px;
  }
  .topbar {
    padding: 0 23px;
  }
  .live-label {
    display: none;
  }
  .brand {
    font-size: 25px;
    padding-left: 3px;
  }
  .brand-mark {
    width: 32px;
    height: 38px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-title {
    flex-direction: column;
  }
  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-side {
    grid-template-columns: 1fr;
  }
  .local-badge {
    font-size: 10px;
  }
  .screen-card-actions {
    flex-wrap: wrap;
  }
  footer span {
    display: none;
  }
}
@media (max-width: 580px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    width: 100%;
    padding: 16px 16px 0;
  }
  .brand {
    padding: 0;
    font-size: 23px;
  }
  .brand-by {
    font-size: 8px;
  }
  .brand-mark {
    height: 34px;
    font-size: 28px;
    line-height: 28px;
  }
  .workspace-label,
  .sidebar-bottom {
    display: none;
  }
  .client-select {
    position: absolute;
    right: 16px;
    top: 16px;
    width: 130px;
    padding: 9px;
    margin: 0;
  }
  .sidebar nav {
    display: flex;
    overflow-x: auto;
    gap: 3px;
    padding: 12px 0 8px;
  }
  .nav-item {
    font-size: 12px;
    padding: 9px;
    gap: 6px;
    white-space: nowrap;
  }
  .nav-item svg {
    width: 16px;
    height: 16px;
  }
  .workspace {
    margin: 0;
    width: 100%;
  }
  .topbar {
    height: 55px;
    padding: 0 18px;
  }
  main {
    padding: 25px 18px;
  }
  .page-title {
    gap: 15px;
  }
  h1 {
    font-size: 25px;
  }
  .stats {
    gap: 10px;
  }
  .stat-value {
    font-size: 25px;
  }
  .screen-grid,
  .screen-grid.full,
  .playlist-grid {
    grid-template-columns: 1fr;
  }
  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .media-cover {
    height: 170px;
  }
  .media-card-info {
    padding: 12px;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .screen-preview {
    height: 200px;
  }
  .dialog-head,
  .dialog-body {
    padding: 20px;
  }
  .dialog-foot {
    padding: 16px 20px;
  }
  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .preview-stage {
    height: 360px;
  }
  #toast {
    left: 50%;
    width: max-content;
  }
  .schedule-card {
    padding: 18px;
  }
  .quiet-banner {
    font-size: 12px;
  }
  .section-bar {
    align-items: flex-start;
  }
  footer {
    padding: 0 18px 20px;
  }
}
.preview-display {
  height: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #080d16;
}
.preview-display.portrait {
  aspect-ratio: 9/16;
}
.preview-display.landscape {
  aspect-ratio: 16/9;
  height: auto;
  width: 100%;
  max-height: 100%;
}
.preview-display.natural {
  width: 100%;
}
.preview-display img,
.preview-display video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.preview-display.cover img,
.preview-display.cover video {
  object-fit: cover;
}
.playlist-item > svg {
  width: 28px;
  height: 32px;
  flex-shrink: 0;
  color: #6688b8;
}
.monitor-placeholder {
  text-align: center;
  font-size: 7px;
}
.subtitle,
.btn,
.nav-item,
.field > span,
.field > label,
.screen-card-top label,
td {
  font-size: 14px;
}
.stat-label,
.screen-site,
.screen-row,
.playlist-card p,
.note {
  font-size: 13px;
}

/* Montana: contexte revendeur et navigation du module Signage. */
.brand {
  font-size: 25px;
  gap: 9px;
}
.brand-mark {
  font-size: 27px;
  min-width: 37px;
}
.module-label {
  margin-top: 22px;
  margin-bottom: 8px;
}
.sidebar {
  overflow-y: auto;
}
.profile {
  font-size: 12px;
}
.brand-by {
  font-size: 8px;
  letter-spacing: 1px;
}

/* Equipment supervision */
.device-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
  padding: 12px;
  background: #f4f7fb;
  border-radius: 10px;
}
.device-pillars span {
  font-size: 11px;
  color: #526277;
}
.device-pillars strong {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #182c46;
}
.equipment-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.diagnostic-grid {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 2fr;
  gap: 10px 18px;
  font-size: 13px;
}
.diagnostic-grid dt {
  color: #64748b;
}
.diagnostic-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.asset-card {
  border: 1px solid #dce4ef;
  border-radius: 12px;
  padding: 18px;
  margin: 15px 0;
}
.asset-card h3 {
  margin: 0 0 8px;
}
.capture-figure {
  margin: 0;
  text-align: center;
}
.capture-figure img {
  display: block;
  max-width: 100%;
  max-height: 60vh;
  margin: auto;
  object-fit: contain;
  background: #101a2b;
}
.capture-figure figcaption {
  font-size: 12px;
  color: #64748b;
  margin-top: 12px;
}
.screen-card-actions {
  flex-wrap: wrap;
}

.optional-details {
  margin: 12px 0;
  font-size: 13px;
}
.optional-details summary {
  cursor: pointer;
  color: #4b6380;
  padding: 10px 0;
}
.optional-details[open] > summary {
  margin-bottom: 12px;
}
.capture-dialog {
  width: min(1100px, 94vw);
  max-width: 94vw;
}
.capture-toolbar {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.capture-toolbar .field {
  flex: 1;
  min-width: 230px;
  margin: 0;
}
.capture-viewport {
  overflow: auto;
  max-height: max(180px, calc(94vh - 410px));
  background: #101a2b;
  border-radius: 8px;
}
.capture-viewport img {
  max-width: 100%;
  max-height: max(180px, calc(94vh - 410px));
  width: auto;
  height: auto;
  margin: auto;
  display: block;
}
.capture-viewport.native-size img {
  max-width: none;
  max-height: none;
}
.capture-figure + .actions {
  margin-top: 14px;
}
#capture-error {
  color: #b42318;
}

/* Disposition : l’écran entier reste visible, sans recadrage de la capture. */
.display-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #edf1f6;
  border-radius: 12px;
  padding: 18px;
  min-height: 220px;
}
.display-frame {
  background: #080d16;
  border: 7px solid #253247;
  border-radius: 9px;
  box-shadow: 0 8px 20px #17294320;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
}
.display-frame.landscape {
  width: min(100%, 640px);
  aspect-ratio: 16/9;
}
.display-frame.portrait {
  height: min(46vh, 460px);
  aspect-ratio: 9/16;
  max-width: 100%;
}
.display-frame img,
.display-frame video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
/* Cadrage de l’aperçu par classe : la CSP du portail (style-src 'self') refuse les attributs style en ligne. */
.display-frame .fit-contain {
  object-fit: contain;
}
.display-frame .fit-cover {
  object-fit: cover;
}
.display-summary {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  margin-top: 14px;
}
.display-summary span {
  color: #64748b;
}
.display-check > .note {
  text-align: center;
}
.display-check > .actions {
  justify-content: center;
}
.capture-viewport:not(.native-size) {
  display: flex;
  justify-content: center;
  align-items: center;
}
.capture-viewport:not(.native-size) img {
  width: 100%;
  height: max(180px, calc(94vh - 410px));
  object-fit: contain;
}

/* Fiche centrée sur la vérification visuelle et le contexte de diffusion. */
.display-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 1fr);
  gap: 26px;
  align-items: start;
}
.display-context {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}
.display-context .diagnostic-grid {
  grid-template-columns: 110px minmax(0, 1fr);
  line-height: 1.5;
  margin: 20px 0;
}
.display-context .device-pillars {
  grid-template-columns: 1fr;
  gap: 12px;
}
.display-context .device-pillars span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.display-context .device-pillars strong {
  margin: 0;
}
.display-layout .display-stage {
  min-height: 280px;
}
.display-layout .display-frame.portrait {
  height: min(44vh, 430px);
}
.display-context > .meta {
  line-height: 1.6;
}
.display-layout .display-summary {
  gap: 6px 14px;
}
@media (max-width: 760px) {
  .display-layout {
    grid-template-columns: 1fr;
  }
  .display-layout .display-stage {
    min-height: 200px;
  }
  .display-context .device-pillars {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .display-context .device-pillars span {
    display: block;
  }
  .display-context .device-pillars strong {
    margin-top: 5px;
  }
}

/* Authentication */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #f1f5fb;
  padding: 24px;
}
.login-card {
  width: min(100%, 440px);
  padding: 36px;
  background: white;
  border: 1px solid #dce4f0;
  border-radius: 20px;
  box-shadow: 0 16px 60px #18366012;
}
.login-card .brand {
  color: #163b72;
  margin-bottom: 32px;
}
.login-card h1 {
  font-size: 26px;
}
.login-card p {
  line-height: 1.6;
}
.login-card .field {
  margin: 18px 0;
}
.login-card button {
  width: 100%;
}
#login-error {
  color: #b42318;
}

.login-card {
  min-height: 0;
}
.login-card .brand {
  padding-bottom: 0;
}

/* Montana official kit 1.0 — wordmark files are used without modification. */
:root {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  --navy: #071b3b;
  --blue: #2454d6;
  --signature: #1683f8;
  --muted: #596579;
  --border: #dce3ed;
  --radius: 12px;
  color: #18243b;
  background: #f5f7fb;
}
body {
  background: #f5f7fb;
  color: #18243b;
}
.brand {
  display: flex;
  align-items: center;
  padding: 16px 14px;
  margin: 0 0 24px;
  min-height: 58px;
  letter-spacing: normal;
}
.brand-logo {
  display: block;
  width: 176px;
  max-width: 100%;
  height: auto;
  flex-shrink: 1;
}
.sidebar {
  background: #eef2f9;
  color: #18243b;
  border-right: 1px solid var(--border);
}
.workspace-label {
  color: var(--muted);
}
.client-select {
  background: #fff;
  color: #18243b;
  border-color: var(--border);
  border-radius: 8px;
}
.nav-item {
  color: var(--muted);
  border-radius: 8px;
}
.nav-item:hover {
  background: #e4ebf7;
  color: var(--navy);
}
.nav-item.active {
  background: #e1e9fc;
  color: var(--blue);
}
.nav-item.active svg {
  color: var(--blue);
}
.add-client {
  color: var(--blue);
}
.local-badge,
.profile small {
  color: var(--muted);
}
.profile {
  border-color: var(--border);
  color: #18243b;
  overflow-wrap: anywhere;
}
.btn {
  border-radius: 8px;
}
.btn.primary {
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: none;
}
.btn.primary:hover {
  background: #1c43ad;
  border-color: #1c43ad;
}
.badge.green {
  color: #176445;
}
.badge.amber {
  color: #805000;
}
.badge.red {
  color: #b42318;
}
.badge.blue {
  color: var(--blue);
}
.subtitle,
.note {
  color: var(--muted);
}
.login-page {
  background: #f5f7fb;
}
.login-card {
  border-radius: 12px;
  box-shadow: 0 12px 40px #071b3b08;
  padding: 32px;
  min-height: 0;
}
.login-card .brand {
  padding: 16px 14px;
  margin: 0 0 24px;
  width: 204px;
}
.login-card h1 {
  font-size: 28px;
  color: var(--navy);
  line-height: 1.2;
}
.login-card .note {
  font-size: 13px;
  border-radius: 8px;
  background: #f5f7fb;
}
.login-card input {
  border-radius: 8px;
}
.login-card button {
  min-height: 44px;
}
.login-card .login-help {
  margin-top: 24px;
}

@media (max-width: 700px) {
  .sidebar .brand {
    width: 176px;
    margin-bottom: 8px;
    padding: 12px;
  }
  .sidebar .client-select {
    position: static;
    width: 100%;
    margin: 0;
  }
  .login-page {
    padding: 16px;
  }
  .login-card {
    padding: 24px;
  }
  .login-card h1 {
    font-size: 25px;
  }
}
@media (max-width: 700px) {
  .workspace {
    min-width: 0;
    width: 100%;
  }
  .topbar {
    height: auto;
    min-height: 64px;
    padding: 12px 16px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .topbar-right {
    gap: 8px;
    min-width: 0;
  }
  .topbar #logout {
    font-size: 13px;
    padding: 8px;
  }
  .breadcrumb {
    min-width: 0;
  }
  .sidebar nav {
    max-width: 100%;
  }
}
#logout {
  width: auto;
  min-width: 96px;
  flex-shrink: 0;
  padding: 8px 12px;
  font-size: 13px;
}
.login-card .brand {
  margin-left: auto;
  margin-right: auto;
}
.access-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
}
.access-panel h2 {
  font-size: 20px;
  margin-top: 0;
}
.access-table-wrap {
  overflow: auto;
}
.access-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.access-table th {
  font-size: 12px;
  color: var(--muted);
  padding: 12px;
  border-bottom: 1px solid var(--border);
}
.access-table td {
  padding: 16px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.access-table small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
  max-width: 300px;
}
.access-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.access-check {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}
#client-choice {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  max-height: 240px;
  overflow: auto;
}
#access-error,
#activate-error {
  color: #b42318;
}
.dialog-footer {
  padding: 20px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--border);
}
[hidden] {
  display: none !important;
}

/* Navigation: clear client and administration contexts. */
.sidebar {
  overflow-y: auto;
}
.brand {
  padding-bottom: 24px;
}
.nav-item {
  min-height: 44px;
  padding: 10px 12px;
  margin: 2px 0;
}
.workspace-label {
  letter-spacing: 0;
  text-transform: none;
  font-size: 12px;
}
.module-label {
  margin-top: 22px;
}
.client-select {
  margin-bottom: 12px;
}
#single-client {
  font-weight: 650;
  padding: 8px 12px 16px;
}
.space-link {
  display: block;
  padding: 12px;
  margin-bottom: 12px;
  color: var(--blue);
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.sidebar-bottom {
  padding-top: 18px;
}
.profile {
  overflow-wrap: anywhere;
}
#menu-toggle {
  display: none;
}
.brand-logo {
  max-width: 100%;
  height: auto;
}
@media (max-width: 580px) {
  #menu-toggle {
    display: block;
    position: absolute;
    right: 16px;
    top: 18px;
  }
  .sidebar {
    position: relative;
    padding: 20px 16px;
  }
  .brand {
    max-width: 175px;
    padding: 0 0 16px;
  }
  .client-select {
    position: static;
    width: 100%;
    margin: 0 0 10px;
  }
  .sidebar nav {
    display: none;
  }
  .sidebar.menu-open nav {
    display: block;
  }
  .sidebar .workspace-label {
    display: block;
  }
  .sidebar .sidebar-bottom {
    display: block;
  }
  .sidebar .profile {
    display: none;
  }
  .nav-item {
    white-space: normal;
    font-size: 14px;
    min-height: 44px;
  }
  .space-link {
    margin: 0;
    padding: 10px 0;
  }
  .sidebar-bottom {
    padding: 0;
  }
  .topbar {
    height: auto;
    min-height: 60px;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 16px;
  }
  .breadcrumb span {
    padding: 0 6px;
  }
  .topbar-right {
    gap: 8px;
  }
  .table-wrap {
    overflow-x: auto;
  }
}

.breadcrumb #module-name {
  color: #475569;
}
.breadcrumb #client-name {
  color: #192538;
}

.license-status {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 650;
}
.license-success {
  color: #166534;
  background: #dcfce7;
}
.license-warning {
  color: #854d0e;
  background: #fef3c7;
}
.license-danger {
  color: #991b1b;
  background: #fee2e2;
}
.license-neutral {
  color: #475569;
  background: #f1f5f9;
}

.creation-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 22px;
}
.creation-template {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  border: 1px solid #dce3ed;
  background: white;
  border-radius: 16px;
  padding: 18px;
  cursor: pointer;
  color: #132746;
  font: inherit;
}
.creation-template:hover,
.creation-template:focus-visible {
  outline: 2px solid #2383ed;
  outline-offset: 2px;
}
.creation-template canvas {
  height: 250px;
  max-width: 100%;
  object-fit: contain;
  align-self: center;
}
.creation-template span {
  color: #53627a;
  font-size: 0.9rem;
}
.creation-editor {
  display: grid;
  grid-template-columns: minmax(300px, 440px) minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}
.creation-preview-panel {
  position: sticky;
  top: 20px;
  text-align: center;
  padding: 24px;
  background: #edf1f7;
  border-radius: 18px;
}
.creation-preview-panel canvas {
  max-width: 100%;
  max-height: 65vh;
  width: auto;
  box-shadow: 0 10px 30px #152d4926;
}
.creation-preview-panel .note {
  max-width: 420px;
  margin: 20px auto;
}
.creation-saved {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
#creation-warning {
  color: #854d0e;
}
#creation-form .actions {
  flex-wrap: wrap;
}
@media (max-width: 850px) {
  .creation-editor {
    grid-template-columns: 1fr;
  }
  .creation-preview-panel {
    position: static;
    grid-row: 1;
  }
  .creation-preview-panel canvas {
    max-height: 45vh;
  }
}

#creation-form input[type="color"] {
  height: 44px;
  padding: 5px;
  cursor: pointer;
}
.creation-preview-panel h2 {
  margin-bottom: 18px;
}

.creation-confirm {
  max-width: 440px;
  border: 0;
  border-radius: 16px;
  padding: 28px;
  color: #132746;
}
.creation-confirm p {
  margin: 0 0 24px;
}
.creation-confirm::backdrop {
  background: #071b3a66;
}

/* Guided composition editor */
.creation-layouts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 24px;
}
.creation-layout {
  background: #fff;
  border: 2px solid #dce4f0;
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  color: inherit;
  text-align: left;
  min-width: 0;
}
.creation-layout[aria-pressed="true"] {
  border-color: #2463eb;
  background: #edf3ff;
}
.creation-layout canvas {
  width: 100%;
  height: 110px;
  object-fit: contain;
  background: #f3f5f9;
  border-radius: 6px;
}
.creation-layout strong,
.creation-layout span {
  display: block;
  margin-top: 8px;
}
.creation-layout span {
  font-size: 12px;
  line-height: 1.4;
}
.creation-offer {
  border: 1px solid #dce4f0;
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
}
.creation-offer legend {
  font-weight: 600;
  padding: 0 6px;
}
.creation-layout:focus-visible {
  outline: 3px solid #153677;
  outline-offset: 3px;
}
@media (max-width: 500px) {
  .creation-layouts {
    grid-template-columns: 1fr;
  }
  .creation-layout canvas {
    height: 140px;
  }
}

#dialog.pixabay-dialog {
  width: min(900px, 94vw);
  max-width: 900px;
}
.pixabay-search {
  display: flex;
  align-items: end;
  gap: 12px;
}
.pixabay-search .field:first-child {
  flex: 1;
}
.pixabay-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.pixabay-results button {
  background: #fff;
  border: 1px solid #dce3ee;
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  text-align: left;
}
.pixabay-results img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
}
.pixabay-results span {
  display: block;
  padding: 6px;
  font-size: 13px;
}
.pixabay-preview {
  width: min(560px, 94vw);
  max-height: 85vh;
  overflow: auto;
  padding: 24px;
  border: 1px solid #dce3ee;
  border-radius: 16px;
}
.pixabay-preview::backdrop {
  background: #15223870;
}
.pixabay-preview > img {
  display: block;
  max-width: 100%;
  max-height: 40vh;
  margin: 16px auto;
}
.pixabay-preview .actions {
  justify-content: flex-end;
  margin-top: 20px;
}
#pixabay-more {
  margin-top: 16px;
}
@media (max-width: 600px) {
  .pixabay-search {
    flex-wrap: wrap;
  }
  .pixabay-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Pixabay uses the same inset and field rhythm as other portal dialogs. */
#dialog.pixabay-dialog {
  max-height: 90dvh;
  overflow: auto;
}
.pixabay-dialog .dialog-head {
  padding: 24px 28px;
}
.pixabay-dialog .pixabay-body {
  padding: 24px 28px 28px;
}
.pixabay-dialog .pixabay-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px auto;
  align-items: end;
  gap: 12px;
}
.pixabay-dialog .pixabay-search .field {
  margin: 0;
  min-width: 0;
}
.pixabay-dialog .pixabay-search input,
.pixabay-dialog .pixabay-search select,
.pixabay-dialog .pixabay-search > .btn {
  height: 44px;
  min-height: 44px;
  margin: 0;
}
.pixabay-dialog .pixabay-search input,
.pixabay-dialog .pixabay-search select {
  width: 100%;
}
.pixabay-dialog .pixabay-credit {
  font-size: 12px;
  color: var(--muted);
  margin: 16px 0 0;
}
.pixabay-dialog .pixabay-credit a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pixabay-dialog #pixabay-status {
  font-size: 14px;
  color: var(--muted);
  margin: 12px 0 16px;
  line-height: 1.5;
}
.pixabay-results button {
  min-width: 0;
}
.pixabay-results span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .pixabay-dialog .dialog-head {
    padding: 20px;
  }
  .pixabay-dialog .pixabay-body {
    padding: 20px;
  }
  .pixabay-dialog .pixabay-search {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .pixabay-dialog .pixabay-search .field:first-child {
    grid-column: 1/-1;
  }
  .pixabay-dialog .pixabay-search > .btn {
    min-width: 110px;
  }
}
/* Shared portal rhythm */
.workspace main {
  margin: 0;
  max-width: none;
  padding: 32px;
}
.topbar {
  padding-left: 32px;
  padding-right: 32px;
}
.page-title h1 {
  font-size: 30px;
  line-height: 1.2;
}
.page-title {
  margin-bottom: 24px;
  align-items: center;
}
.subtitle {
  font-size: 14px;
  line-height: 1.5;
}
.media-card-info h3 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}
.pixabay-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.pixabay-tabs [aria-pressed="true"] {
  background: #eaf0ff;
  border-color: #2455df;
  color: #2455df;
}
.pixabay-results video {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
}
.pixabay-preview > video {
  max-width: 100%;
  max-height: 40vh;
  display: block;
  margin: 16px auto;
}
.playlist-item-main {
  min-width: 0;
}
.playlist-item-main strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
}
.playlist-item video {
  width: 48px;
  height: 58px;
  object-fit: cover;
}
.duration-field {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.duration-field input {
  width: 64px !important;
}
.playlist-picker {
  width: min(900px, 94vw);
  max-height: 90vh;
  border: 1px solid #dce3ee;
  border-radius: 16px;
  padding: 24px;
  overflow: auto;
}
.playlist-picker::backdrop {
  background: #15223870;
}
.playlist-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.playlist-picker-grid label {
  border: 1px solid #dce3ee;
  border-radius: 10px;
  padding: 10px;
  min-width: 0;
  cursor: pointer;
}
.playlist-picker-grid img,
.playlist-picker-grid video {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: contain;
}
.playlist-picker-grid span {
  display: block;
  font-size: 13px;
  max-height: 40px;
  overflow: hidden;
}
.playlist-picker > .actions {
  justify-content: flex-end;
}
.playlist-item[draggable] {
  cursor: grab;
}
@media (max-width: 600px) {
  .workspace main {
    padding: 24px 16px;
  }
  .topbar {
    padding-left: 16px;
    padding-right: 16px;
  }
  .playlist-picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .playlist-item {
    flex-wrap: wrap;
  }
  .playlist-item-main {
    flex: 1;
    min-width: 120px;
  }
}
/* Creations use the portal shell and its standard controls. */
.unified-creation-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.unified-creation-tools .field {
  width: min(100%, 340px);
  margin: 0;
}
.unified-creation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
}
.unified-creation-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 0;
  overflow: visible;
}
.unified-creation-preview {
  display: flex;
  justify-content: center;
  background: #e9eef5;
  border-radius: 14px 14px 0 0;
  padding: 20px;
  overflow: hidden;
}
.unified-creation-preview iframe {
  width: 270px;
  height: 420px;
  border: 0;
  pointer-events: none;
  flex-shrink: 0;
}
.unified-creation-content {
  padding: 20px;
}
.unified-creation-content h2 {
  font-size: 18px;
  margin: 0;
  overflow-wrap: anywhere;
}
.unified-creation-content .actions {
  justify-content: space-between;
}
.unified-creation-content details {
  position: relative;
}
.unified-creation-content summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 24px;
  padding: 0 12px;
  min-height: 40px;
}
.unified-creation-menu {
  position: absolute;
  right: 0;
  bottom: 100%;
  padding: 6px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px #142b4520;
  z-index: 3;
  min-width: 160px;
}
.unified-creation-menu button {
  display: block;
  border: 0;
  background: white;
  padding: 12px;
  text-align: left;
  width: 100%;
  border-radius: 4px;
}
.unified-creation-menu button:hover {
  background: #f0f4fa;
}
.unified-creation-menu [data-action="delete"] {
  color: #b42318;
}
.unified-creation-dialog {
  width: min(760px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  max-height: 90dvh;
}
.unified-creation-dialog::backdrop {
  background: #10213b66;
}
.unified-creation-dialog .dialog-body {
  padding: 24px;
}
.unified-models {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.unified-models a {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}
.unified-models a:hover {
  border-color: var(--blue);
}
@media (max-width: 700px) {
  .unified-models {
    grid-template-columns: 1fr;
  }
  .unified-creation-grid {
    grid-template-columns: 1fr;
  }
  .unified-creation-tools {
    flex-wrap: wrap;
  }
}

@media (max-width: 700px) {
  .sites-table {
    border: 0;
    background: transparent;
    overflow: visible;
  }
  .sites-table table,
  .sites-table tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }
  .sites-table thead {
    display: none;
  }
  .sites-table tbody tr {
    display: block;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 16px;
    margin-bottom: 16px;
  }
  .sites-table td {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    white-space: normal;
    overflow-wrap: anywhere;
    border-bottom: 1px solid var(--border);
  }
  .sites-table td[data-label]::before {
    content: attr(data-label);
    font-weight: 500;
    color: var(--muted);
  }
  .sites-table td.site-actions {
    display: flex;
    justify-content: flex-end;
    border-bottom: 0;
  }
  .sites-table td[colspan] {
    display: block;
    border-bottom: 0;
  }
  .sites-table .site-actions .btn {
    min-height: 44px;
  }
  .page-title > .actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
.unified-models > .access-panel {
  margin: 0;
}
.unified-creation-dialog .dialog-head {
  position: sticky;
  top: 0;
  background: white;
  z-index: 2;
}

/* Group reorder controls independently from the media title. */
.playlist-item-controls {
  display: flex;
  gap: 6px;
  align-items: center;
}
@media (max-width: 600px) {
  .playlist-item {
    display: grid;
    grid-template-columns: 20px 32px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 12px;
  }
  .playlist-item > .meta {
    margin: 0;
    font-size: 12px;
  }
  .playlist-item > img,
  .playlist-item > video {
    width: 100%;
    height: 48px;
    object-fit: cover;
  }
  .playlist-item-main {
    min-width: 0;
  }
  .playlist-item-main strong {
    font-size: 14px;
    line-height: 1.4;
  }
  .playlist-item-controls {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: minmax(88px, 1fr) repeat(3, 44px);
    gap: 6px;
  }
  .playlist-item .duration-field {
    margin: 0;
    grid-column: 1;
  }
  .playlist-item .duration-field input {
    min-height: 44px;
    font-size: 16px;
    width: 64px !important;
  }
  .playlist-item-controls > button {
    min-width: 44px;
    min-height: 44px;
    font-size: 20px;
  }
  .playlist-item-controls > [data-dir="-1"] {
    grid-column: 2;
  }
  .playlist-item-controls > [data-dir="1"] {
    grid-column: 3;
  }
  .playlist-item-controls > [data-remove] {
    grid-column: 4;
  }
  #dialog .close {
    min-width: 44px;
    min-height: 44px;
    flex-shrink: 0;
  }
  #dialog .dialog-foot .btn {
    min-height: 44px;
  }
}
@media (max-width: 380px) {
  .playlist-item-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .playlist-item .duration-field {
    grid-column: 1/-1;
  }
  .playlist-item-controls > [data-dir="-1"] {
    grid-column: 1;
  }
  .playlist-item-controls > [data-dir="1"] {
    grid-column: 2;
  }
  .playlist-item-controls > [data-remove] {
    grid-column: 3;
  }
}

.playlist-picker .picker-empty {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
}
.playlist-picker .picker-selection {
  font-size: 13px;
  color: var(--muted);
}

.screen-site-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 20px;
  margin: 0 0 20px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.screen-site-context p {
  margin: 4px 0 0;
}
@media (max-width: 600px) {
  .screen-site-context .btn {
    min-height: 44px;
  }
}

/* Keep the active client visible without spending the first mobile screen on chrome. */
@media (max-width: 850px) {
  .page-title {
    align-items: stretch;
  }
  .page-title > .actions {
    justify-content: flex-start;
  }
}
@media (min-width: 581px) and (max-width: 700px) {
  .sidebar .brand {
    width: 100%;
    max-width: 100%;
  }
}
@media (max-width: 700px) {
  .field input:not([type="checkbox"]):not([type="radio"]),
  .field select,
  .field textarea,
  .search,
  .toolbar select {
    font-size: 16px;
    min-height: 44px;
  }
  .btn,
  .btn.small {
    min-height: 44px;
  }
}
@media (max-width: 580px) {
  .sidebar {
    padding: 12px 16px;
  }
  .sidebar .brand {
    width: 156px;
    max-width: calc(100% - 84px);
    padding: 8px 0;
    margin: 0 0 6px;
  }
  #menu-toggle {
    top: 12px;
    min-height: 44px;
    min-width: 64px;
  }
  #client-context .workspace-label {
    display: none;
  }
  #single-client {
    padding: 4px 0;
    font-size: 13px;
    line-height: 1.5;
  }
  .sidebar .client-select {
    min-height: 44px;
    margin: 4px 0 0;
    font-size: 16px;
  }
  .sidebar.menu-open nav {
    padding-top: 8px;
  }
  .topbar {
    padding: 8px 16px;
    min-height: 52px;
  }
  .topbar .icon-button {
    min-height: 44px;
    min-width: 44px;
  }
  .unified-creation-content summary {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
/* Preview actions remain visible on small screens, including portrait videos. */
dialog.pixabay-preview {
  padding: 0;
  overflow: hidden;
  width: min(620px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
}
dialog.pixabay-preview[open] {
  display: flex;
  flex-direction: column;
}
dialog.pixabay-preview > h2 {
  padding: 18px 20px;
  margin: 0;
  flex-shrink: 0;
}
.pixabay-preview-body {
  min-height: 0;
  overflow: auto;
  padding: 0 20px 16px;
  overscroll-behavior: contain;
}
.pixabay-preview-body > img,
.pixabay-preview-body > video {
  display: block;
  max-width: 100%;
  max-height: min(34dvh, 280px);
  margin: 0 auto 12px;
  object-fit: contain;
}
.pixabay-preview-body > p {
  font-size: 14px;
  line-height: 1.5;
}
dialog.pixabay-preview > .actions {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
dialog.pixabay-preview > .actions .btn {
  min-height: 44px;
  flex: 1 1 auto;
}
@media (max-width: 380px) {
  dialog.pixabay-preview > .actions {
    display: grid;
    grid-template-columns: 1fr;
    padding: 12px 16px;
  }
  .pixabay-preview-body {
    padding: 0 16px 12px;
  }
  dialog.pixabay-preview > h2 {
    padding: 16px;
  }
}
/* Long forms scroll their fields while retaining their title and commit controls. */
#dialog.form-dialog {
  max-height: calc(100dvh - 32px);
  max-width: calc(100% - 24px);
  overflow: hidden;
}
#dialog.form-dialog #dialog-content {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 32px);
  min-height: 0;
}
#dialog.form-dialog .dialog-head {
  flex-shrink: 0;
}
#dialog.form-dialog #modal-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
#dialog.form-dialog #modal-form > .dialog-body {
  overflow: auto;
  min-height: 0;
  overscroll-behavior: contain;
}
#dialog.form-dialog .dialog-foot {
  flex-shrink: 0;
}
.discard-warning {
  padding: 16px;
  border: 1px solid #e7c994;
  background: #fffbef;
  border-radius: 10px;
  margin-bottom: 20px;
}
.discard-warning p {
  font-size: 14px;
}
@media (max-width: 380px) {
  #dialog.form-dialog .dialog-head,
  #dialog.form-dialog .dialog-body {
    padding: 16px;
  }
  #dialog.form-dialog .dialog-foot {
    padding: 12px 16px;
  }
  .dialog-head h2 {
    font-size: 20px;
  }
}

/* Client → brands → sites → screens: shared directory layout. */
.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 20px;
}
.directory-card {
  min-width: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.directory-card-heading {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}
.directory-card-heading > div:not(.directory-symbol) {
  min-width: 0;
  flex: 1;
}
.directory-card h2 {
  font-size: 20px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.directory-card-heading p,
.directory-address {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.directory-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  height: 44px;
  border-radius: 12px;
  background: #eaf0ff;
  color: #2455df;
}
.directory-symbol svg {
  width: 24px;
  height: 24px;
}
.directory-kicker {
  display: block;
  color: #506783;
  font-size: 13px;
  margin-bottom: 5px;
}
.directory-card > .actions {
  margin-top: auto;
  gap: 8px;
}
.directory-links {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 6px 0;
}
.directory-site-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 0;
  min-height: 44px;
  background: none;
  border: 0;
  text-align: left;
  color: #31415b;
  font-size: 14px;
}
.directory-site-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.directory-site-link span:first-of-type {
  flex: 1;
  overflow-wrap: anywhere;
}
.directory-toolbar {
  display: flex;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.directory-toolbar > .field {
  width: min(100%, 360px);
  margin: 0;
}
.directory-toolbar > p {
  font-size: 14px;
  color: var(--muted);
  margin: 0 auto 12px 0;
}
.section-context {
  display: flex;
  align-items: center;
  gap: 12px 24px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: #edf2fa;
  border-radius: 10px;
  margin-bottom: 24px;
  color: #4d617d;
  font-size: 14px;
}
.section-context > span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-context svg {
  width: 18px;
  height: 18px;
}
.directory-card .section-context {
  margin: 0;
}
.schedule-detail .directory-card-heading {
  align-items: flex-start;
  flex-wrap: wrap;
}
.schedule-hours {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.schedule-hours strong {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}
.schedule-hours span {
  font-size: 13px;
  color: var(--muted);
}
.schedule-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}
.schedule-week span {
  padding: 9px 0;
  text-align: center;
  font-size: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  color: #526277;
  background: #f8fafc;
}
.schedule-week .on {
  background: #eaf0ff;
  border-color: #aac4fa;
  color: #174cb5;
  font-weight: 650;
}
@media (max-width: 600px) {
  .directory-card {
    padding: 18px;
    gap: 16px;
  }
  .directory-card > .actions .btn {
    flex: 1 1 auto;
  }
  .directory-toolbar {
    gap: 10px;
  }
  .directory-toolbar > .field {
    width: 100%;
  }
  .directory-toolbar > p {
    margin-bottom: 0;
  }
  .schedule-week {
    gap: 3px;
  }
  .schedule-week span {
    font-size: 11px;
  }
  .check-days {
    flex-wrap: wrap;
  }
  .check-days label {
    min-height: 44px;
  }
}
/* The content picker keeps its selection and confirmation visible. */
dialog.playlist-picker {
  padding: 18px;
  max-width: calc(100% - 24px);
  max-height: calc(100dvh - 24px);
  overflow: hidden;
}
dialog.playlist-picker[open] {
  display: flex;
  flex-direction: column;
}
.playlist-picker > h2,
.playlist-picker > p,
.playlist-picker > .picker-tabs,
.playlist-picker > input,
.playlist-picker > .actions {
  flex-shrink: 0;
}
.playlist-picker > h2 {
  font-size: 20px;
}
.playlist-picker > p {
  font-size: 13px;
  line-height: 1.4;
  margin: 8px 0;
}
.playlist-picker .picker-tabs {
  display: flex;
  gap: 6px;
  margin: 4px 0 10px;
}
.playlist-picker .picker-tabs .btn {
  flex: 1;
  padding: 8px;
  font-size: 12px;
}
.playlist-picker > input {
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 44px;
  padding: 10px;
  font-size: 16px;
  width: 100%;
}
.playlist-picker-grid {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  margin: 10px 0;
  gap: 8px;
}
.playlist-picker > .actions {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: flex;
}
.playlist-picker > .actions > .btn {
  flex: 1;
  padding: 10px 8px;
}

/* Brand cards: one clear action, compact identity and linked locations. */
.brand-directory {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 420px));
  align-items: start;
}
.brand-card {
  gap: 16px;
  padding: 24px;
  box-shadow: 0 3px 12px #17243b04;
}
.brand-monogram {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border: 1px solid #dce5f8;
  border-radius: 14px;
  background: #eef3ff;
  color: #2454bb;
  font-size: 26px;
  font-weight: 650;
}
.brand-card .directory-card-heading h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.4px;
}
.brand-card .directory-card-heading p {
  margin-top: 6px;
  font-size: 13px;
}
.brand-identity-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  color: #50617a;
  font-size: 14px;
  border-radius: 6px;
}
.brand-identity-link:hover {
  color: var(--blue);
}
.brand-card .directory-links {
  border-top: 1px solid var(--border);
  border-bottom: 0;
  padding: 10px 0 0;
}
.brand-card .directory-site-link {
  padding: 6px 0;
}
.brand-card > .actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding-top: 4px;
  gap: 10px;
}
.brand-card > .actions .btn {
  min-height: 44px;
  padding: 10px 12px;
  text-align: center;
  font-size: 14px;
  white-space: normal;
}
@media (max-width: 600px) {
  .brand-card {
    padding: 20px;
    gap: 12px;
  }
  .brand-directory {
    grid-template-columns: minmax(0, 1fr);
  }
  .brand-card > .actions .btn {
    padding: 10px 8px;
  }
}
.brand-card .directory-card-heading > .brand-monogram {
  flex: 0 0 52px;
  min-width: 52px;
}
.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 1040px;
  align-items: start;
}
.account-panel {
  padding: 28px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  min-width: 0;
}
.account-panel h2 {
  font-size: 20px;
  margin: 0 0 20px;
}
.account-panel > p,
.account-panel .meta {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 20px;
}
.account-panel input,
.account-panel select {
  width: 100%;
  min-height: 44px;
  font-size: 16px;
}
.account-panel input[readonly] {
  background: #f4f6fa;
  color: #526174;
}
.account-panel .password-visibility {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 14px;
  margin-bottom: 16px;
}
.account-panel .password-visibility input {
  width: 18px;
  min-height: 18px;
}
.account-feedback {
  font-size: 14px;
  line-height: 1.5;
  color: #17653b;
}
.account-feedback:empty {
  display: none;
}
.account-feedback.error {
  color: #ad2635;
}
.account-panel button {
  min-height: 44px;
}
.profile a {
  min-width: 0;
  overflow-wrap: anywhere;
  display: block;
}
.profile a small {
  display: block;
  margin-top: 6px;
  color: var(--blue);
}
@media (max-width: 850px) {
  .account-grid {
    grid-template-columns: 1fr;
  }
  .account-panel {
    padding: 20px;
  }
}
/* The brand editor uses the portal's actual navigation and header. */
.brand-editor-frame {
  display: block;
  width: 100%;
  height: calc(100dvh - 145px);
  min-height: 560px;
  border: 0;
  background: transparent;
}
#dialog.equipment-dialog {
  width: min(1180px, calc(100vw - 32px));
  height: calc(100dvh - 48px);
  max-height: 900px;
  overflow: hidden;
  padding: 0;
}
#dialog.equipment-dialog #dialog-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
#dialog.equipment-dialog .dialog-head {
  flex: none;
}
#dialog.equipment-dialog .equipment-tabs {
  flex: none;
  margin: 0;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}
#dialog.equipment-dialog .equipment-tabs button {
  min-height: 44px;
}
#dialog.equipment-dialog .dialog-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 24px 28px;
}
@media (max-width: 600px) {
  .brand-editor-frame {
    height: calc(100dvh - 100px);
    min-height: 540px;
  }
  #dialog.equipment-dialog {
    width: calc(100vw - 16px);
    height: calc(100dvh - 24px);
    max-height: none;
  }
  #dialog.equipment-dialog .equipment-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 12px;
    gap: 8px;
  }
  #dialog.equipment-dialog .equipment-tabs button {
    white-space: normal;
    padding: 8px;
    font-size: 12px;
  }
  #dialog.equipment-dialog .dialog-body {
    padding: 16px;
  }
  #dialog.equipment-dialog .display-layout {
    grid-template-columns: 1fr;
  }
}

.workspace-trail {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--muted);
}
.workspace-trail ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.workspace-trail li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
}
.workspace-trail li + li:before {
  content: "/";
  color: #9aa7ba;
}
.workspace-trail a {
  color: #315b9d;
  text-decoration: none;
  padding: 4px 0;
}
.workspace-trail a:hover {
  text-decoration: underline;
}
.workspace-trail [aria-current] {
  color: #17243b;
  font-weight: 600;
}
.workspace-trail + .brand-editor-frame {
  height: calc(100dvh - 195px);
}

.brand-section-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid #d5ddeb;
  margin-bottom: 24px;
}
.brand-section-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  color: #53627a;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  font-weight: 600;
}
.brand-section-nav a[aria-current="page"] {
  color: #2452dc;
  border-color: #2452dc;
}
.brand-section-nav a:hover {
  background: #edf2fa;
}
.brand-section-nav a:focus-visible {
  outline: 2px solid #2452dc;
  outline-offset: 2px;
}
.brand-section-nav span {
  padding: 2px 7px;
  background: #eaf0fa;
  border-radius: 12px;
  font-size: 12px;
}
.brand-section-nav + .brand-editor-frame {
  height: calc(100dvh - 255px);
}

/* Signature Montana : accent décoratif réservé aux titres de page. */
.workspace #main .page-title h1::after {
  content: "";
  display: inline-block;
  width: 0.17em;
  height: 0.17em;
  margin-left: 0.06em;
  border-radius: 50%;
  background: #1683f8;
  vertical-align: baseline;
}

/* Compact model choices and readable form controls on narrow screens. */
@media (max-width: 700px) {
  .unified-creation-dialog .dialog-body {
    padding: 16px;
  }
  .unified-creation-dialog .dialog-body > p:first-child {
    margin: 0 0 16px;
  }
  .unified-creation-dialog input,
  .unified-creation-dialog select {
    font-size: 16px;
    min-height: 44px;
  }
  .unified-models {
    gap: 10px;
  }
  .unified-models a {
    padding: 14px 16px;
    gap: 6px;
  }
  .unified-models a > strong {
    font-size: 16px;
  }
}

.account-extra {
  margin-top: 24px;
}
.account-panel .mfa-secret,
.account-panel .recovery-codes {
  font-family: monospace;
  letter-spacing: 0.06em;
  font-size: 16px;
  max-width: 100%;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.account-panel .storage-total {
  font-size: 32px;
}
.account-storage-list > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.account-storage-list dt {
  min-width: 0;
  overflow-wrap: anywhere;
}
.account-storage-list dd {
  margin: 0 0 0 auto;
  max-width: 100%;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.account-panel details > summary {
  cursor: pointer;
  padding: 12px 0;
  font-weight: 600;
}
.account-panel form > .btn {
  margin: 4px 4px 4px 0;
}

/* Mobile media controls: full-width search and equal filter columns. */
@media (max-width: 580px) {
  .toolbar:has(#media-filter) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .toolbar:has(#media-filter) > .search {
    grid-column: 1/-1;
    width: 100%;
    max-width: none;
    min-width: 0;
  }
  .toolbar:has(#media-filter) > label {
    min-width: 0;
  }
  .toolbar:has(#media-filter) > label > select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
  }
}

/* Mobile : le sélecteur de site de la page Écrans suit la largeur de sa plus longue option et faisait défiler la page latéralement. */
@media (max-width: 580px) {
  .toolbar:has(#screen-site-filter) > label {
    flex: 1 1 100%;
    min-width: 0;
    max-width: 100%;
  }
  .toolbar:has(#screen-site-filter) > label > select {
    width: 100%;
    min-width: 0;
  }
}

/* Screen cards: predictable rhythm and aligned actions across mixed player states. */
.screen-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.screen-card .screen-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
  padding: 18px;
}
.screen-card .screen-body h3 {
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.screen-card .screen-body > p {
  margin: 0;
}
.screen-card .screen-body > .meta {
  font-size: 12px;
  line-height: 1.5;
}
.screen-card .screen-site {
  min-height: 2.8em;
  line-height: 1.4;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}
.screen-card .screen-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  align-items: start;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
  line-height: 1.5;
}
.screen-card .screen-row strong {
  text-align: right;
  overflow-wrap: anywhere;
  font-size: 12px;
}
.screen-card .screen-site + .screen-row {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.screen-card .device-pillars {
  margin: 2px 0 8px;
  padding: 12px;
  gap: 12px;
}
.screen-card .device-pillars strong {
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.screen-card .screen-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}
.screen-card .screen-card-actions .btn {
  width: 100%;
  min-height: 42px;
  white-space: normal;
  line-height: 1.35;
  padding: 9px 10px;
}
.screen-card .screen-card-actions [data-action="equipment-state"] {
  background: #edf3ff;
  border-color: #d8e5ff;
  color: #2355bc;
}
.screen-card .screen-card-actions [data-action="preview-screen"] {
  border: 1px solid var(--border);
  color: #31415b;
  background: #fff;
}
@media (max-width: 380px) {
  .screen-card .screen-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .screen-card .screen-row strong {
    text-align: left;
  }
  .screen-card .screen-card-actions {
    grid-template-columns: 1fr;
  }
}

.ai-integrations-frame {
  display: block;
  width: 100%;
  height: calc(100dvh - 230px);
  min-height: 560px;
  border: 0;
  border-radius: 18px;
  background: white;
}
.account-integrations h3 {
  margin-top: 16px;
}
@media (max-width: 600px) {
  .ai-integrations-frame {
    height: calc(100dvh - 190px);
    min-height: 480px;
  }
}

/* Account: one task at a time, with persistent forms and keyboard navigation. */
.account-settings {
  max-width: 1100px;
}
.account-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.account-tabs [role="tab"] {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 9px;
  padding: 12px 18px;
  min-height: 44px;
  font-weight: 600;
  font-size: 14px;
}
.account-tabs [role="tab"]:hover {
  background: #edf2fa;
  color: #203149;
}
.account-tabs [aria-selected="true"] {
  background: #eaf1ff;
  color: var(--blue);
  border-color: #cbdcfc;
}
.account-section[hidden] {
  display: none;
}
.account-section .account-panel {
  padding: 24px;
}
.account-section .account-panel h2 {
  font-size: 18px;
  margin-bottom: 18px;
}
.account-section .account-panel .field {
  margin-bottom: 12px;
}
.account-profile-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
  margin-bottom: 20px;
}
.account-field-group {
  min-width: 0;
}
.account-field-group .meta {
  font-size: 12px;
  margin: 0;
  line-height: 1.5;
}
.account-section .account-integrations {
  display: flex;
  align-items: center;
  gap: 12px 20px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.account-section .account-integrations h2,
.account-section .account-integrations h3,
.account-section .account-integrations p {
  margin: 0;
}
.account-section .account-integrations p {
  flex: 1 1 240px;
}
.account-section .account-extra {
  max-width: none;
  gap: 16px;
  margin-top: 16px;
}
.account-section .account-panel details > summary {
  min-height: 44px;
  color: var(--blue);
}
.account-section .account-panel details[open] > summary {
  margin-bottom: 12px;
}
#account-section-notifications > .account-grid {
  display: block;
  max-width: 760px;
}
.account-section .account-feedback {
  scroll-margin: 24px;
}
@media (max-width: 650px) {
  .account-tabs {
    gap: 4px;
  }
  .account-tabs [role="tab"] {
    flex: 1 1 auto;
    padding: 10px;
    font-size: 13px;
  }
  .account-profile-fields {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .account-section .account-panel {
    padding: 18px;
  }
  .account-section .account-integrations {
    align-items: flex-start;
  }
  .account-section .account-integrations .btn {
    width: 100%;
  }
  .account-section .account-panel button[type="submit"] {
    width: 100%;
    white-space: normal;
  }
}
.account-section .notification-channel {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.account-section .notification-channel .password-visibility {
  margin: 0;
  font-weight: 600;
}
.account-section .notification-channel .meta {
  margin: 4px 0 0;
  font-size: 13px;
}
.account-section .notification-channel [data-push-settings] {
  margin-bottom: 0;
}
.account-section .notification-channel [data-push-settings] details {
  margin-bottom: 8px;
}

/* Sites share content rows so long names never offset addresses or counters. */
.directory-card:has(> .directory-address) > .directory-card-heading {
  align-items: flex-start;
}
.directory-card:has(> .directory-address) > .actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
}
.directory-card:has(> .directory-address) > .actions .btn {
  min-width: 0;
  white-space: normal;
  text-align: center;
}
.directory-card:has(> .directory-address) > .actions .btn.ghost {
  grid-column: 1/-1;
  justify-self: start;
}
@supports (grid-template-rows: subgrid) {
  .directory-card:has(> .directory-address) {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 5;
    row-gap: 18px;
  }
  .directory-card:has(> .directory-address) > .actions {
    margin-top: 0;
  }
}
@media (max-width: 600px) {
  .directory-card:has(> .directory-address) {
    row-gap: 16px;
  }
}

.monitor,
.display-frame,
.preview-display {
  position: relative;
}
.ticker-preview-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.publication-thumbnail {
  position: relative;
  flex: none;
  background: #101d30;
  overflow: hidden;
  width: 88px;
  aspect-ratio: 16/9;
  border-radius: 4px;
}
.publication-thumbnail.portrait {
  width: 42px;
  aspect-ratio: 9/16;
}
.publication-thumbnail > img,
.publication-thumbnail > video {
  width: 100%;
  height: 100%;
  object-fit: contain;
} /* The status badge keeps its full label; only the text column shrinks. On narrow screens the badge sits under the text instead of squeezing it; columns are explicit because a row may have no thumbnail. */
.pick-screen > span:not(.badge) {
  min-width: 0;
  overflow-wrap: anywhere;
}
.pick-screen .badge {
  flex: none;
}
@media (max-width: 580px) {
  .pick-screen {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 8px 0;
  }
  .pick-screen > .publication-thumbnail {
    grid-column: 1;
    margin-right: 12px;
  }
  .pick-screen > input {
    grid-column: 2;
    margin-right: 12px;
  }
  .pick-screen > span:not(.badge) {
    grid-column: 3;
  }
  .pick-screen .badge {
    grid-column: 3;
    grid-row: 2;
    justify-self: start;
    margin-left: 0;
    max-width: 100%;
    white-space: normal;
  }
}

.publication-thumbnail.cover > img,
.publication-thumbnail.cover > video {
  object-fit: cover;
}

/* Subscription overview: quota first, contract and storage details on demand. */
.subscription-layout {
  max-width: 1100px;
  display: grid;
  gap: 20px;
}
.subscription-layout .access-panel {
  margin: 0;
  padding: 24px;
  min-width: 0;
}
.subscription-summary-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.subscription-summary-heading h2 {
  margin: 0;
  font-size: 18px;
}
.subscription-quota {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 12px;
}
.subscription-quota strong {
  font-size: 24px;
  letter-spacing: -0.4px;
}
.subscription-quota > span {
  font-size: 14px;
  color: var(--muted);
}
.subscription-progress {
  display: block;
  width: 100%;
  height: 10px;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  accent-color: var(--blue);
  background: #edf2fa;
}
.subscription-progress::-webkit-progress-bar {
  background: #edf2fa;
  border-radius: 8px;
}
.subscription-progress::-webkit-progress-value {
  background: var(--blue);
  border-radius: 8px;
}
.subscription-progress::-moz-progress-bar {
  background: var(--blue);
  border-radius: 8px;
}
.subscription-help {
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 18px;
  line-height: 1.5;
}
.subscription-status-detail {
  padding: 12px 14px;
  background: #f1f5fb;
  border-radius: 8px;
  font-size: 14px;
}
.subscription-contract {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.subscription-layout summary {
  cursor: pointer;
  min-height: 44px;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #31415b;
}
.subscription-layout summary:focus-visible {
  outline: 3px solid #8cb5ff;
  outline-offset: 3px;
}
.subscription-contact {
  margin-top: 16px;
}
.subscription-contact p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.subscription-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.subscription-screen-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}
.subscription-screen-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  font-size: 14px;
}
.subscription-screen-list strong {
  font-weight: 500;
  overflow-wrap: anywhere;
}
.subscription-screen-list span {
  color: var(--muted);
  flex-shrink: 0;
}
.subscription-storage .account-panel h2 {
  font-size: 18px;
  margin-bottom: 12px;
}
.subscription-storage .account-panel > p {
  margin-bottom: 12px;
  font-size: 13px;
}
.subscription-storage .storage-total {
  display: block;
  margin: 12px 0 4px;
}
.subscription-storage details {
  margin-top: 12px;
}
.subscription-contract dd {
  overflow-wrap: anywhere;
  min-width: 0;
}
@media (max-width: 700px) {
  .subscription-columns {
    grid-template-columns: 1fr;
  }
  .subscription-layout .access-panel {
    padding: 18px;
  }
  .subscription-quota strong {
    font-size: 21px;
  }
  .subscription-layout {
    gap: 16px;
  }
  .subscription-contract .diagnostic-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .subscription-contract dd {
    margin: 0 0 12px;
  }
}

/* Align screen metadata across each row, independent of ticker presence. */
.screen-grid {
  row-gap: 12px;
}
.screen-grid > .screen-card {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 10;
  row-gap: 10px;
}
.screen-card .screen-card-top {
  padding: 16px 16px 0;
  min-width: 0;
  flex-wrap: wrap;
}
.screen-card-top label {
  min-width: 0;
  overflow-wrap: anywhere;
}
.screen-card-top input {
  flex-shrink: 0;
}
.screen-card .screen-preview {
  margin: 0 16px;
  height: 170px;
}
.screen-card .screen-body {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 8;
  gap: 10px;
  padding: 6px 16px 16px;
}
.screen-card .screen-site {
  min-height: 0;
  margin: 0;
}
.screen-card .screen-card-actions {
  margin-top: 0;
  padding-top: 4px;
  align-self: end;
}
.screen-card .screen-row strong {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
.screen-card .device-pillars {
  margin: 0;
  padding: 10px;
  gap: 8px;
}
.screen-ticker-link {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 11px;
  color: #2355bc;
  max-width: calc(100% - 12px);
}
.screen-ticker-link:hover {
  background: #edf3ff;
}
@supports not (grid-template-rows: subgrid) {
  .screen-grid > .screen-card {
    display: flex;
  }
  .screen-card .screen-body {
    display: flex;
  }
}

.screen-card .monitor:not(.landscape) {
  height: 116px;
  width: 66px;
}
.screen-ticker-link {
  top: 4px;
  padding: 4px 8px;
}

/* Screen status remains readable at narrow card widths. */
.screen-card .screen-row strong {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  min-width: 0;
}
/* Android management remains readable on narrow cards and at browser zoom. */
.screen-management {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}
.screen-management .btn {
  max-width: 100%;
  min-height: 44px;
  white-space: normal;
  text-align: left;
  overflow-wrap: anywhere;
}
.screen-management .btn span {
  min-width: 0;
}
.toolbar:has(#screen-management-filter) {
  flex-wrap: wrap;
}
.toolbar:has(#screen-management-filter) > label {
  min-width: 0;
  max-width: 100%;
}
.toolbar:has(#screen-management-filter) select {
  max-width: 100%;
  min-height: 44px;
}
.screen-card-top label {
  min-width: 0;
  overflow-wrap: anywhere;
}
.screen-ticker-details {
  font-size: 12px;
  color: var(--muted);
}
.screen-ticker-details summary,
.screen-advanced summary {
  cursor: pointer;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.screen-ticker-details .btn {
  margin-top: 8px;
}
.screen-advanced {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.screen-advanced .actions {
  margin-top: 12px;
}
.screen-advanced [data-action="delete-screen"] {
  color: #a3343d;
}

.media-usage {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: #eef4ff;
  color: #274a83;
  font-size: 13px;
}
.media-usage ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 5px 0;
  padding: 0;
  list-style: none;
}
.media-usage .btn {
  padding: 3px 0;
  min-height: 30px;
}
.media-usage-empty {
  margin: 10px 0;
}
/* UX: recent creations, scoped to overview */
#ux-recent {
  margin: 24px 0;
  padding: 22px;
  border: 1px solid var(--border, #dce3ec);
  border-radius: 14px;
  background: #fff;
}
#ux-recent .section-bar {
  margin: 0 0 16px;
  gap: 14px;
}
#ux-recent .section-bar h2 {
  margin: 0;
}
.ux-recent-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.ux-recent-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid #e1e7f0;
  border-radius: 10px;
  background: #f8faff;
  min-width: 0;
}
.ux-recent-card strong {
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.ux-recent-card .actions {
  margin: 0;
}
@media (max-width: 900px) {
  .ux-recent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .ux-recent-grid {
    grid-template-columns: 1fr;
  }
  #ux-recent {
    padding: 16px;
  }
  .ux-recent-card {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  .ux-recent-card .actions {
    flex-shrink: 0;
  }
}

@media (max-width: 600px) {
  .dashboard-columns > section,
  .dashboard-columns > aside {
    min-width: 0;
  }
  .dashboard-columns .screen-grid {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
  }
  .dashboard-columns .screen-card {
    min-width: 0;
  }
  .dashboard-columns .screen-card-top {
    flex-wrap: wrap;
  }
  .dashboard-columns .screen-card-top strong {
    overflow-wrap: anywhere;
    min-width: 0;
  }
  .dashboard-columns .section-bar {
    flex-wrap: wrap;
    gap: 10px;
  }
}

@media (max-width: 600px) {
  .dashboard-columns,
  .dashboard-side {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    max-width: 100%;
  }
  .dashboard-side .activity p {
    overflow-wrap: anywhere;
  }
  .dashboard-columns .screen-card-top label {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

.ux-recent-preview {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #edf1f6;
  border: 1px solid #e1e7f0;
  border-radius: 7px;
}
.ux-recent-preview iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}
.ux-recent-card time {
  font-size: 12px;
}
.ux-recent-card {
  gap: 12px;
}
@media (max-width: 600px) {
  .ux-recent-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 8px 12px;
    align-items: start;
  }
  .ux-recent-preview {
    grid-row: 1/4;
    aspect-ratio: 3/4;
  }
  .ux-recent-card strong,
  .ux-recent-card time,
  .ux-recent-card .actions {
    grid-column: 2;
  }
  .ux-recent-card .actions {
    justify-self: start;
  }
}

/* Screen actions work with the portal's strict style policy, including without Maps. */
.screen-actions-menu {
  position: relative;
  margin-left: auto;
}
.screen-actions-menu > summary {
  list-style: none;
  font-size: 22px;
  line-height: 1;
  padding: 6px 10px;
  cursor: pointer;
}
.screen-actions-menu > summary::-webkit-details-marker {
  display: none;
}
.screen-actions-popover {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 10;
  display: grid;
  gap: 4px;
  min-width: 190px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px #10213a26;
}
.screen-actions-popover .screen-action-danger {
  color: #b42318;
}

/* The client remains in the mobile selector; keep page navigation on one row. */
@media (max-width: 580px) {
  .topbar {
    flex-wrap: nowrap;
    align-items: center;
  }
  .topbar .breadcrumb {
    flex: 1;
    min-width: 0;
  }
  .topbar .breadcrumb #module-name,
  .topbar .breadcrumb > span:nth-child(2) {
    display: none;
  }
  .topbar .breadcrumb #client-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .topbar .topbar-right {
    flex-shrink: 0;
  }
}

/* Screen actions: viewing first, configuration second, maintenance on demand. */
.screen-card .screen-action-layout {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.screen-card .screen-view-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.screen-card .screen-action-layout .btn {
  min-height: 44px;
  white-space: normal;
  line-height: 1.4;
  padding: 10px 12px;
  font-size: 12px;
}
.screen-card .screen-view-actions [data-action="preview-screen"] {
  background: var(--blue);
  border: 1px solid var(--blue);
  color: white;
  font-weight: 650;
}
.screen-card .screen-manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.screen-card .screen-manage-actions .btn {
  flex: 1;
  background: #f5f7fa;
}
.screen-card .screen-more-actions {
  border-top: 1px solid var(--border);
  padding-top: 4px;
}
.screen-card .screen-more-actions summary {
  cursor: pointer;
  min-height: 44px;
  padding: 12px 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.screen-card .screen-more-actions summary:focus-visible {
  outline: 3px solid #8cb5ff;
  outline-offset: 2px;
  border-radius: 6px;
}
.screen-card .screen-secondary-actions {
  display: grid;
  gap: 6px;
  padding: 4px 0;
}
.screen-card .screen-secondary-actions .btn {
  justify-content: flex-start;
  border-color: transparent;
  background: #f5f7fa;
  text-align: left;
}
@media (max-width: 380px) {
  .screen-card .screen-view-actions {
    grid-template-columns: 1fr;
  }
}

/* Keep the capture timestamp and still-image status below the image. */
.screen-card .screen-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(140px, auto) auto;
  justify-items: center;
  gap: 12px;
  height: auto;
  min-height: 190px;
  padding: 16px 12px 12px;
}
.screen-card .screen-preview .monitor {
  align-self: center;
  max-width: 100%;
}
.screen-card .screen-preview .preview-orientation {
  position: static;
  display: block;
  max-width: 100%;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  color: #526277;
  overflow-wrap: anywhere;
}

/* Status color supplements explicit labels; unknown states remain neutral. */
.device-pillars strong.status-success {
  color: #146343;
}
.device-pillars strong.status-warning {
  color: #805000;
}
.device-pillars strong.status-error {
  color: #a12622;
}
.device-pillars strong.status-neutral {
  color: #526277;
}

/* Variable card content must stay in normal flow, including expanded maintenance. */
.screen-grid > .screen-card {
  display: flex;
  flex-direction: column;
  grid-row: auto;
  gap: 10px;
}
.screen-card .screen-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  grid-row: auto;
  gap: 10px;
  min-width: 0;
}
.screen-card .screen-body > * {
  flex-shrink: 0;
}
.screen-management {
  gap: 2px;
  font-size: 12px;
  line-height: 1.5;
}
.screen-management-link {
  display: inline-block;
  max-width: 100%;
  min-height: 44px;
  padding: 4px 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}
.screen-management-link:hover {
  color: var(--blue);
  text-decoration-style: solid;
}
.screen-management-link:focus-visible {
  outline: 3px solid #8cb5ff;
  outline-offset: 2px;
}
.device-pillars strong[class*="status-"]::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 5px;
  vertical-align: middle;
}

/* Shared content review */
.sharing-dialog {
  width: min(800px, calc(100vw - 24px));
  max-height: 90dvh;
  border: 1px solid #dce3ee;
  border-radius: 16px;
  padding: 0;
  color: #17263b;
}
.sharing-dialog::backdrop {
  background: #101d365e;
}
.sharing-dialog .dialog-head {
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
}
.sharing-dialog .dialog-body {
  padding: 24px;
}
.sharing-create {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 14px;
  margin: 20px 0;
}
.sharing-create .field {
  flex: 1;
  min-width: 145px;
}
.sharing-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 14px;
}
.sharing-check input {
  width: 18px;
  height: 18px;
}
.sharing-list {
  display: grid;
  gap: 8px;
}
.sharing-row {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start !important;
  gap: 5px;
  text-align: left;
  white-space: normal !important;
}
.sharing-row small {
  color: #607187;
  font-weight: 400;
}
.sharing-review {
  border-top: 1px solid #dde4ee;
  margin-top: 24px;
  padding-top: 14px;
}
.sharing-review input {
  width: 100%;
}
.sharing-feedback-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
}
.sharing-feedback {
  border: 1px solid #dde4ee;
  border-radius: 10px;
  padding: 16px;
  margin: 12px 0;
}
.sharing-feedback p {
  margin: 8px 0;
}
.sharing-message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.sharing-status {
  font-size: 14px;
  color: #34537d;
  overflow-wrap: anywhere;
}
.sharing-dialog .actions {
  flex-wrap: wrap;
}
.sharing-dialog .btn {
  white-space: normal;
}
.sharing-dialog h3 {
  overflow-wrap: anywhere;
}

.sharing-review .sharing-check input {
  width: 18px;
  flex: 0 0 18px;
}
.sharing-review textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  font: inherit;
  padding: 12px;
  border: 1px solid #dce3ee;
  border-radius: 8px;
}

/* Sharing review workspace */
.sharing-dialog {
  width: min(880px, calc(100vw - 32px));
  max-width: none;
  max-height: 90dvh;
  padding: 0;
  border: 1px solid #dce3ee;
  border-radius: 18px;
  color: #17263b;
  background: #fff;
  box-shadow: 0 24px 80px #17263b26;
  overflow: auto;
  font-size: 14px;
  line-height: 1.5;
}
.sharing-dialog::backdrop {
  background: #101d365e;
  backdrop-filter: blur(3px);
}
.sharing-dialog .dialog-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px;
  background: #fff;
  border-bottom: 1px solid #e9edf3;
}
.sharing-dialog .dialog-head h2 {
  font-size: 22px;
  line-height: 1.25;
  margin: 0;
  letter-spacing: -0.5px;
}
.sharing-dialog .sharing-subtitle {
  font-size: 13px;
  color: #64748b;
  margin: 5px 0 0;
}
.sharing-dialog .close {
  width: 36px;
  height: 36px;
  min-width: 36px;
  flex-shrink: 0;
  font-size: 24px;
  line-height: 1;
  border: 0;
  border-radius: 9px;
  background: #f3f5f8;
  color: #64748b;
}
.sharing-dialog .dialog-body {
  padding: 24px 28px;
}
.sharing-dialog h3,
.sharing-dialog h4,
.sharing-dialog p {
  margin: 0;
}
.sharing-dialog .btn {
  font-size: 13px;
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 8px;
  line-height: 1.4;
  white-space: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: none;
}
.sharing-dialog .btn.primary {
  background: #245fe5;
  border-color: #245fe5;
  color: #fff;
}
.sharing-dialog .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.sharing-dialog :is(button, a, input, select, summary, textarea):focus-visible {
  outline: 3px solid #7ba7ff;
  outline-offset: 3px;
}
.sharing-dialog .meta {
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
  margin-top: 5px;
}
.sharing-dialog .sharing-status:empty {
  display: none;
}
.sharing-dialog .sharing-status {
  font-size: 13px;
  background: #eef4ff;
  color: #24509b;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 16px;
  overflow-wrap: anywhere;
}
.sharing-dialog .sharing-list {
  display: block;
}
.sharing-dialog .sharing-list:empty {
  display: none;
}
.sharing-dialog .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #53627a;
}
.sharing-dialog .field :is(input, select, textarea) {
  font: inherit;
  font-size: 14px;
  border: 1px solid #dce3ee;
  border-radius: 8px;
  padding: 10px 12px;
  min-height: 40px;
  background: #fff;
  color: #17263b;
  width: 100%;
  box-sizing: border-box;
}
.sharing-dialog .sharing-switcher {
  margin-bottom: 20px;
}
.sharing-dialog .sharing-review {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.sharing-content-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.sharing-content-heading > div:first-child {
  min-width: 0;
  flex: 1;
}
.sharing-dialog .sharing-content-heading h3 {
  font-size: 17px;
  line-height: 1.4;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.sharing-main-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.sharing-content-heading .sharing-main-actions {
  flex-shrink: 0;
}
.sharing-dialog .sharing-settings {
  margin-top: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e9edf3;
}
.sharing-dialog summary {
  cursor: pointer;
  font-size: 13px;
  color: #53627a;
  padding: 8px 0;
  width: fit-content;
  min-height: 36px;
  box-sizing: border-box;
}
.sharing-settings-body {
  padding: 12px 16px;
  background: #f7f9fc;
  border: 1px solid #e9edf3;
  border-radius: 10px;
}
.sharing-settings-body .sharing-main-actions {
  margin-top: 14px;
}
.sharing-dialog .sharing-danger {
  color: #b83b3b;
  border-color: #ebd4d4;
  background: #fff;
}
.sharing-dialog .sharing-feedback-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 20px 0 4px;
}
.sharing-dialog h4 {
  font-size: 15px;
  line-height: 1.4;
  font-weight: 650;
}
.sharing-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  margin-left: 5px;
  border-radius: 7px;
  background: #edf1f6;
  color: #596a80;
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
}
.sharing-dialog .sharing-quiet {
  color: #526780;
  border-color: transparent;
  background: transparent;
  padding: 6px 8px;
  min-height: 34px;
}
.sharing-dialog .sharing-quiet:hover {
  background: #edf2f8;
  color: #17263b;
}
.sharing-dialog .sharing-selection-hint {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 14px;
}
.sharing-feedback-list {
  display: grid;
  gap: 10px;
}
.sharing-dialog .sharing-feedback {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #e1e7ef;
  border-radius: 12px;
  padding: 14px 16px 12px 8px;
  margin: 0;
  background: #fff;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.sharing-dialog .sharing-feedback.is-selected {
  border-color: #7ba7ff;
  background: #f6f9ff;
}
.sharing-pick {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  min-height: 36px;
  cursor: pointer;
}
.sharing-dialog .sharing-pick input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #245fe5;
  cursor: pointer;
}
.sharing-feedback-content {
  min-width: 0;
  flex: 1;
  padding-top: 5px;
}
.sharing-author {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.sharing-author strong {
  font-size: 14px;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.sharing-kind {
  font-size: 11px;
  color: #64748b;
  background: #f0f3f7;
  padding: 2px 7px;
  border-radius: 5px;
}
.sharing-dialog .sharing-feedback .meta {
  margin: 3px 0 0;
  font-size: 11px;
}
.sharing-dialog .sharing-message {
  font-size: 14px;
  line-height: 1.65;
  margin: 12px 0 6px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.sharing-feedback-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}
.sharing-resolved {
  font-size: 12px;
  color: #13714e;
}
.sharing-dialog .sharing-footnote {
  font-size: 11px;
  color: #64748b;
  margin: 14px 0;
  line-height: 1.5;
}
.sharing-selection-bar {
  position: sticky;
  bottom: -24px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid #cad9f3;
  border-radius: 10px;
  background: #eef4ff;
  box-shadow: 0 -6px 18px #fff;
  font-size: 13px;
  font-weight: 600;
  margin-top: 16px;
}
.sharing-selection-bar[hidden] {
  display: none;
}
.sharing-ai-ready {
  background: #f6f9ff;
  border: 1px solid #d4e1f7;
  border-radius: 12px;
  padding: 18px;
  margin-top: 16px;
}
.sharing-dialog .sharing-ai-ready p {
  font-size: 13px;
  line-height: 1.6;
  margin: 8px 0 14px;
  color: #53627a;
}
.sharing-ai-ready details {
  margin-top: 8px;
}
.sharing-dialog textarea {
  resize: vertical;
  line-height: 1.6;
}
.sharing-empty {
  text-align: center;
  padding: 36px 16px;
  color: #64748b;
  font-size: 14px;
  border: 1px dashed #dce3ee;
  border-radius: 12px;
  margin-top: 12px;
}
.sharing-new {
  border-bottom: 1px solid #e9edf3;
  padding-bottom: 12px;
  margin-bottom: 18px;
}
.sharing-create {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px;
  margin: 16px 0 4px;
}
.sharing-create .field {
  flex: 1;
  min-width: 140px;
}
.sharing-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  font-size: 13px;
}
.sharing-check input {
  width: 17px;
  height: 17px;
  accent-color: #245fe5;
}
.sharing-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 640px) {
  .sharing-dialog {
    width: calc(100vw - 16px);
    max-height: 94dvh;
    border-radius: 14px;
  }
  .sharing-dialog .dialog-head {
    padding: 18px 16px;
  }
  .sharing-dialog .dialog-body {
    padding: 18px 16px;
  }
  .sharing-dialog .dialog-head h2 {
    font-size: 20px;
  }
  .sharing-dialog .sharing-subtitle {
    max-width: 250px;
  }
  .sharing-content-heading {
    flex-direction: column;
    gap: 12px;
  }
  .sharing-content-heading .sharing-main-actions {
    width: 100%;
  }
  .sharing-content-heading .sharing-main-actions > .btn {
    flex: 1;
  }
  .sharing-dialog .btn {
    min-height: 42px;
  }
  .sharing-dialog .close {
    min-height: 40px;
    width: 40px;
  }
  .sharing-dialog .sharing-feedback {
    padding: 10px 12px 10px 4px;
    gap: 4px;
  }
  .sharing-pick {
    flex-basis: 36px;
    min-height: 44px;
  }
  .sharing-selection-bar {
    bottom: -18px;
    flex-wrap: wrap;
    padding: 12px;
  }
  .sharing-selection-bar .sharing-main-actions {
    width: 100%;
    justify-content: space-between;
  }
  .sharing-dialog .sharing-quiet {
    min-height: 40px;
  }
}
.sharing-selection-bar {
  flex-wrap: wrap;
}
.sharing-chat-link {
  width: 100%;
}

.playlist-art-more {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #cbd8eb;
  border-radius: 18px;
  background: #e1eafa;
  color: #405b82;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 1px 3px #1634580d;
}
/* Playlist cards: the media leads and opens the preview, publishing is the only filled action, the rarer actions sit in the overflow menu. */
.playlist-grid {
  align-items: stretch;
}
.playlist-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 16px;
  box-shadow:
    0 1px 2px #071b3b0d,
    0 8px 24px #071b3b0f;
  transition: box-shadow 0.16s ease;
}
.playlist-card:hover,
.playlist-card:focus-within {
  box-shadow:
    0 2px 4px #071b3b0f,
    0 18px 40px #071b3b1f;
}
.playlist-cover {
  position: relative;
}
.playlist-card .playlist-art {
  width: 100%;
  height: 200px;
  margin: 0;
  padding: 0 16px;
  box-sizing: border-box;
  border: 0;
  border-radius: 16px 16px 0 0;
  background: #e4ebf8;
  gap: 12px;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.playlist-card .playlist-art:disabled {
  cursor: default;
  opacity: 1;
}
.playlist-card .playlist-art:focus-visible {
  outline: 3px solid #2863db;
  outline-offset: -3px;
}
.playlist-card .playlist-art img,
.playlist-art-tile {
  flex: 0 1 86px;
  width: 86px;
  min-width: 0;
  max-width: none;
  height: 152px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 6px 16px #071b3b24;
}
.playlist-art-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #c7d4f1;
  color: #2454d6;
}
.playlist-card .playlist-art > svg {
  width: 44px;
  height: 44px;
  color: #7295cb;
}
.playlist-art-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #071b3b47;
  opacity: 0;
  transition: opacity 0.16s ease;
}
.playlist-card .playlist-art-play svg {
  width: 56px;
  height: 56px;
  padding: 17px;
  box-sizing: border-box;
  border-radius: 50%;
  background: #fff;
  color: #071b3b;
  box-shadow: 0 6px 18px #071b3b47;
}
.playlist-art:not(:disabled):hover .playlist-art-play,
.playlist-art:focus-visible .playlist-art-play {
  opacity: 1;
}
.playlist-card .playlist-art-more {
  right: 14px;
  bottom: 14px;
  min-width: 0;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: #243146;
  font-size: 12px;
  box-shadow: 0 1px 3px #071b3b29;
}
.playlist-card .playlist-status {
  position: absolute;
  left: 14px;
  top: 14px;
  max-width: calc(100% - 28px);
  box-sizing: border-box;
  gap: 7px;
  min-height: 28px;
  padding: 4px 11px 4px 9px;
  border-radius: 14px;
  background: #fff;
  color: #6b4300;
  font-size: 12px;
  white-space: normal;
  box-shadow: 0 1px 3px #071b3b29;
  pointer-events: none;
}
.playlist-card .playlist-status::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e08a00;
}
.playlist-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  padding: 20px 22px 18px;
}
.playlist-heading {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.playlist-body h3 {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.playlist-card .playlist-body p {
  margin: 6px 0 18px;
  font-size: 14px;
  line-height: 1.35;
}
.playlist-card .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}
.playlist-card .actions > .btn {
  min-width: 0;
  min-height: 44px;
  height: auto;
  padding: 10px 18px;
  border-radius: 10px;
  font:
    600 14px/1.2 Inter,
    system-ui,
    sans-serif;
}
.playlist-card .actions > .btn.tonal {
  border-color: transparent;
  background: #eaf0fd;
  color: #1d45b8;
}
.playlist-card .actions > .btn.tonal:hover {
  background: #dde7fc;
  border-color: transparent;
}
.playlist-card .actions > .btn.ghost {
  padding: 10px 12px;
  border-color: transparent;
  background: transparent;
  color: #1d45b8;
}
.playlist-card .actions > .btn.ghost:hover {
  background: #eef2fb;
  border-color: transparent;
}
.playlist-card .actions > .btn.ghost::before {
  display: none;
}
.playlist-heading > .playlist-menu {
  align-self: flex-start;
  flex: none;
  margin: -10px -10px -10px 0;
}
.playlist-card .playlist-menu > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  box-sizing: border-box;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #46546a;
  font-size: 24px;
  line-height: 1;
}
.playlist-card .playlist-menu > summary:hover,
.playlist-card .playlist-menu[open] > summary {
  background: #eef1f6;
}
.playlist-card .playlist-menu > summary:focus-visible {
  outline: 3px solid #2863db;
  outline-offset: 3px;
}
.playlist-menu .screen-actions-popover {
  top: calc(100% + 6px);
  min-width: 200px;
  padding: 6px;
  border: 0;
  border-radius: 12px;
  box-shadow:
    0 0 0 1px #071b3b0f,
    0 16px 40px #071b3b2e;
}
.playlist-menu .screen-actions-popover > .btn {
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  height: auto;
  padding: 8px 12px;
  border-color: transparent;
  border-radius: 8px;
  background: transparent;
  color: #243146;
  font:
    500 14px/1.2 Inter,
    system-ui,
    sans-serif;
  text-align: left;
}
.playlist-menu .screen-actions-popover > .btn[data-action="delete-playlist"] {
  color: #b42318;
}
.playlist-menu .screen-actions-popover > .btn:hover:not(:disabled) {
  background: #f2f5fb;
  border-color: transparent;
}
html[data-theme="dark"] .playlist-card {
  box-shadow:
    0 1px 2px #0006,
    0 8px 24px #0005;
}
html[data-theme="dark"] .playlist-card .playlist-art {
  background: #223149;
}
html[data-theme="dark"] .playlist-art-tile {
  background: #31456b;
  color: #a9c1ff;
}
html[data-theme="dark"] .playlist-card .actions > .btn.tonal {
  background: #24365a;
  border-color: transparent;
  color: #c9d8ff;
}
html[data-theme="dark"] .playlist-card .actions > .btn.ghost {
  background: transparent;
  border-color: transparent;
  color: #a9c1ff;
}
html[data-theme="dark"] .playlist-card .actions > .btn.tonal:hover {
  background: #2d4270;
}
html[data-theme="dark"] .playlist-card .actions > .btn.ghost:hover {
  background: #26344c;
}
html[data-theme="dark"] .playlist-card .playlist-art:focus-visible,
html[data-theme="dark"] .playlist-card .playlist-menu > summary:focus-visible {
  outline-color: #8fb0ff;
}
html[data-theme="dark"] .playlist-card .playlist-menu > summary {
  background: transparent;
  color: #c3cee0;
}
html[data-theme="dark"] .playlist-card .playlist-menu > summary:hover,
html[data-theme="dark"] .playlist-card .playlist-menu[open] > summary {
  background: #26344c;
}
html[data-theme="dark"] .playlist-menu .screen-actions-popover {
  background: #1c293e;
  box-shadow:
    0 0 0 1px #ffffff1f,
    0 16px 40px #0009;
}
html[data-theme="dark"] .playlist-menu .screen-actions-popover > .btn {
  background: transparent;
  border-color: transparent;
  color: #edf2ff;
}
html[data-theme="dark"]
  .playlist-menu
  .screen-actions-popover
  > .btn:hover:not(:disabled) {
  background: #26344c;
  border-color: transparent;
}
html[data-theme="dark"]
  .playlist-menu
  .screen-actions-popover
  > .btn[data-action="delete-playlist"] {
  color: #ff9aa5;
}
/* The app-wide focus ring is too dark on these surfaces in the dark theme. */
html[data-theme="dark"] .playlist-card :is(button, a).mt-action:focus-visible {
  outline-color: #8fb0ff;
}
@media (prefers-reduced-motion: reduce) {
  .playlist-card,
  .playlist-art-play {
    transition: none;
  }
}

/* Screens: the same card frame as the playlist, library and creation cards. What a card shows, its
   statuses and its actions are unchanged. */
article.screen-card {
  border-color: transparent;
  border-radius: 16px;
  box-shadow:
    0 1px 2px #071b3b0d,
    0 8px 24px #071b3b0f;
  transition: box-shadow 0.16s ease;
}
/* The header strip has its own background in the dark theme and is not clipped in the list view. */
article.screen-card > .screen-card-top {
  border-radius: 15px 15px 0 0;
}
article.screen-card:hover,
article.screen-card:focus-within {
  border-color: transparent;
  box-shadow:
    0 2px 4px #071b3b0f,
    0 18px 40px #071b3b1f;
}
html[data-theme="dark"] article.screen-card,
html[data-theme="dark"] article.screen-card:hover,
html[data-theme="dark"] article.screen-card:focus-within {
  border-color: transparent;
  box-shadow:
    0 1px 2px #0006,
    0 8px 24px #0005;
}
@media (prefers-reduced-motion: reduce) {
  article.screen-card {
    transition: none;
  }
}

/* Compact workspace chrome: keep content prominent and touch targets usable. */
.workspace > .topbar {
  height: auto;
  min-height: 56px;
  padding: 6px 32px;
  gap: 8px 16px;
  flex-wrap: wrap;
}
.topbar .breadcrumb {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 10px;
  line-height: 1.4;
}
.topbar .breadcrumb span {
  padding: 0;
}
.topbar .breadcrumb #module-name,
.topbar .breadcrumb #client-name {
  min-width: 0;
  overflow-wrap: anywhere;
}
.topbar .topbar-right {
  flex-shrink: 0;
  gap: 8px;
}
.topbar .icon-button {
  min-width: 44px;
  min-height: 44px;
}
.workspace > .connection-alert {
  padding: 8px 32px;
  border: 0;
  border-bottom: 1px solid #eadfc4;
  border-radius: 0;
  background: #fffbf2;
  color: #71521c;
  font-size: 13px;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.workspace > .connection-alert[hidden] {
  display: none;
}
@media (max-width: 700px) {
  .workspace > .topbar {
    padding: 6px 16px;
  }
  .workspace > .connection-alert {
    padding: 8px 16px;
  }
}

/* Notifications occupy header space only; details float over the workspace. */
.connection-notifications {
  position: relative;
  flex: none;
}
.notification-trigger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  cursor: pointer;
  color: #475569;
  list-style: none;
}
.notification-trigger::-webkit-details-marker {
  display: none;
}
.notification-trigger:hover,
.connection-notifications[open] .notification-trigger {
  background: #eef2f7;
}
.notification-trigger:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.notification-count {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 10px;
  background: #087f83;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  font-weight: 700;
  text-align: center;
}
.notification-count[hidden] {
  display: none;
}
.notification-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  width: min(360px, calc(100vw - 32px));
  padding: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 30px #15223824;
  color: #22314b;
  font-size: 14px;
}
.notification-message {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  max-height: 50vh;
  overflow: auto;
}
@media (max-width: 700px) {
  .topbar-right {
    position: relative;
  }
  .connection-notifications {
    position: static;
  }
  .notification-popover {
    right: 0;
  }
}

/* Quiet header actions, visible notification contents independent of overview. */
.topbar .topbar-right {
  gap: 4px;
}
.topbar #refresh-label:not(.refresh-error) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.topbar #refresh-label.refresh-error {
  display: block;
  font-size: 12px;
  color: #a54223;
  max-width: 180px;
  line-height: 1.4;
}
.topbar #refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  border-radius: 8px;
  color: #64748b;
}
.topbar #logout {
  width: auto;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  font-size: 13px;
  color: #64748b;
  margin-left: 4px;
}
.topbar #refresh:hover,
.topbar #logout:hover {
  background: #eef2f7;
  color: #22314b;
}
.topbar .notification-count {
  top: 2px;
  right: 1px;
  box-shadow: 0 0 0 2px #fff;
}
.topbar .notification-popover {
  width: min(360px, calc(100vw - 32px));
  padding: 0;
  overflow: hidden;
}
.notification-heading {
  display: block;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.notification-popover .notification-message {
  margin: 0;
  padding: 16px 18px;
  max-height: min(420px, 65vh);
}
.notification-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.notification-list li + li {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.notification-list strong {
  display: block;
  font-size: 13px;
  color: #22314b;
}
.notification-list p {
  font-size: 12px;
  line-height: 1.5;
  color: #64748b;
  margin: 5px 0 0;
}
@media (max-width: 700px) {
  .topbar #logout {
    padding: 0 8px;
    margin-left: 0;
  }
  .topbar #refresh-label.refresh-error {
    max-width: 100px;
    font-size: 11px;
  }
}

/* Account actions live in a compact disclosure, with a comfortable hit area. */
.header-account {
  position: relative;
  flex: none;
  margin-left: 4px;
}
.account-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 44px;
  height: 44px;
  padding: 0 4px;
  list-style: none;
  cursor: pointer;
  border-radius: 8px;
  color: #64748b;
}
.account-trigger::-webkit-details-marker {
  display: none;
}
.account-trigger:hover,
.header-account[open] .account-trigger {
  background: #eef2f7;
}
.account-trigger:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.account-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #edf1f6;
  color: #334155;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.account-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 192px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 30px #15223824;
  z-index: 21;
}
.account-popover .account-link,
.topbar .account-popover #logout {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  color: #334155;
  font-size: 13px;
}
.account-popover .account-link:hover,
.topbar .account-popover #logout:hover {
  background: #f1f5f9;
}
.topbar .account-popover #logout {
  color: #a33b32;
}

.notification-snooze {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 4px 0 -6px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
  cursor: pointer;
}
.notification-snooze:hover {
  background: #eef2f7;
}

/* Dashboard summaries use bounded cards rather than stretching three previews. */
#ux-recent .ux-recent-grid {
  grid-template-columns: repeat(3, minmax(0, 300px));
  gap: 16px;
  justify-content: start;
}
#ux-recent .ux-recent-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 12px;
  padding: 12px;
  min-width: 0;
}
#ux-recent .ux-recent-preview {
  position: relative;
  flex-shrink: 0;
  box-sizing: border-box;
  width: 100%;
  aspect-ratio: 4/3;
  padding: 0;
  grid-row: auto;
  background: #edf1f6;
}
#ux-recent .ux-recent-preview iframe {
  position: absolute;
  left: 5%;
  top: 5%;
  width: 90%;
  height: 90%;
  border: 0;
  pointer-events: none;
}
#ux-recent .ux-recent-card strong {
  flex: 1;
  font-size: 15px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
#ux-recent .ux-recent-card .actions {
  margin: 0;
  align-self: flex-start;
}
@media (max-width: 900px) {
  #ux-recent .ux-recent-grid {
    grid-template-columns: repeat(2, minmax(0, 300px));
  }
}
@media (max-width: 600px) {
  #ux-recent .ux-recent-grid {
    grid-template-columns: minmax(0, 300px);
  }
}

/* Media library bulk selection */
.media-select {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 5px;
  background: white;
  box-shadow: 0 1px 3px #17243b20;
  cursor: pointer;
  z-index: 1;
}
.media-select input[type="checkbox"] {
  width: 16px;
  height: 16px;
}
.media-select::before {
  content: "";
  position: absolute;
  inset: -8px;
}
.media-select:focus-within {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
.media-card.is-selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px var(--blue);
}
.media-selection {
  margin-bottom: 20px;
}
.media-selection .actions {
  flex-wrap: wrap;
}
.media-selection [data-action="delete-selected-media"] {
  color: #c52236;
}

.media-card:has(.media-select) {
  position: relative;
}

/* Context and personal identity stay separate, including on narrow screens. */
.account-identity {
  display: grid;
  gap: 4px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border, #dce3ee);
  white-space: normal;
  overflow-wrap: anywhere;
}
.account-identity small {
  font-size: 12px;
  color: var(--muted, #64748b);
}
.account-popover {
  width: min(320px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
}
.account-popover a {
  white-space: normal;
}
.breadcrumb [hidden] {
  display: none;
}
.reseller-workspace {
  display: grid;
  gap: 8px;
  margin: 0 16px 16px;
  overflow-wrap: anywhere;
}
.reseller-workspace[hidden] {
  display: none;
}
.reseller-workspace > span {
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 700px) {
  .workspace > .topbar .breadcrumb {
    flex: 1 0 100%;
    flex-wrap: wrap;
    gap: 6px 10px;
  }
  .workspace > .topbar .breadcrumb #module-name,
  .workspace > .topbar .breadcrumb #client-name {
    max-width: 100%;
  }
  .workspace > .topbar .topbar-right {
    flex: 1 1 100%;
    min-width: 0;
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}
/* User access directory */
.access-filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 16px;
  margin: 20px 0;
}
.access-filters .field {
  margin: 0;
  flex: 1 1 180px;
}
.access-filters .field:first-child {
  flex: 2 1 240px;
}
.access-filters output {
  font-size: 12px;
  color: var(--muted);
  padding-bottom: 12px;
}
.access-directory .access-table td:first-child {
  overflow-wrap: anywhere;
  min-width: 180px;
}
.access-directory .access-table th {
  white-space: nowrap;
}
.access-directory .access-actions {
  min-width: 140px;
  align-items: start;
}
.access-secondary summary {
  cursor: pointer;
  font-size: 13px;
  padding: 8px;
  border-radius: 6px;
}
.access-secondary summary:focus-visible {
  outline: 2px solid var(--accent, #2563eb);
  outline-offset: 2px;
}
.access-secondary-items {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  max-width: 220px;
}
.access-secondary-items .btn {
  white-space: normal;
  text-align: left;
}
.access-directory .access-table tbody tr:hover {
  background: var(--bg, #f8fafc);
}
@media (max-width: 700px) {
  .access-directory {
    padding: 16px;
  }
  .access-filters {
    gap: 12px;
  }
  .access-filters .field {
    flex-basis: 140px;
  }
  .access-filters .field:first-child {
    flex-basis: 100%;
  }
  .access-filters output {
    width: 100%;
    padding: 0;
  }
  .access-directory .access-table td {
    padding: 12px 8px;
  }
}

#reseller-choice {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  max-height: 240px;
  overflow: auto;
}
.reseller-workspace {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.reseller-workspace > span {
  font-size: 12px;
  color: var(--muted);
}
.reseller-workspace > strong {
  font-size: 13px;
  max-width: 200px;
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  .topbar {
    flex-wrap: wrap;
    height: auto;
    gap: 12px;
  }
  .topbar-right {
    flex-wrap: wrap;
  }
  .reseller-workspace {
    width: 100%;
  }
}

#reseller-workspace {
  width: auto;
  min-width: 0;
  max-width: calc(100% - 32px);
}
.ai-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 16px;
}
.ai-admin-card {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.ai-admin-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.ai-admin-heading h2 {
  font-size: 18px;
  margin: 0;
}
.ai-admin-card summary,
.ai-admin-models > summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 600;
}
.ai-admin-card dl > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 6px 0;
}
.ai-admin-card dd {
  margin: 0;
}
.ai-admin-card dt {
  color: var(--muted);
}
.ai-admin-card summary:focus-visible,
.ai-admin-models > summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.ai-admin-models {
  margin-top: 24px;
}
.ai-list-toolbar {
  display: flex;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
}
.ai-list-toolbar .field {
  flex: 1;
  min-width: 180px;
}
.ai-list-toolbar .ai-list-search {
  flex: 3;
  min-width: min(100%, 280px);
}
.ai-list-controls {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.ai-list-controls .field {
  max-width: 230px;
  margin: 0;
}
.ai-list-table table {
  min-width: 850px;
  width: 100%;
}
.ai-list-table th {
  white-space: nowrap;
}
.ai-list-table td {
  vertical-align: middle;
  padding: 12px 16px;
  max-width: 280px;
  overflow-wrap: anywhere;
}
.ai-list-table td small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.ai-list-table tbody tr:hover {
  background: #f5f7fc;
}
.ai-list-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.ai-list-pagination > div {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ai-list-help {
  color: var(--muted);
  margin-top: 24px;
}
.ai-list-help summary {
  cursor: pointer;
  padding: 12px 0;
}
.ai-list-detail {
  box-sizing: border-box;
  width: min(580px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 0 0 auto;
  border: 0;
  border-left: 1px solid #dce3ef;
  border-radius: 0;
  padding: 28px;
  overflow: auto;
}
.ai-list-detail::backdrop {
  background: #071b3b55;
}
.ai-detail-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}
.ai-detail-heading h2 {
  margin: 0;
  font-size: 22px;
  overflow-wrap: anywhere;
}
.ai-list-detail dl > div {
  padding: 12px 0;
  border-bottom: 1px solid #e5eaf2;
}
.ai-list-detail dt {
  font-size: 13px;
  color: var(--muted);
}
.ai-list-detail dd {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .ai-list-toolbar .field {
    min-width: 100%;
  }
  .ai-list-controls .field {
    flex: 1;
    min-width: 120px;
  }
  .ai-list-pagination > div {
    width: 100%;
    justify-content: space-between;
  }
  .ai-list-detail {
    padding: 20px;
  }
}

.display-frame .display-preview-unavailable {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 16px;
  color: #cbd5e1;
  text-align: center;
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* Site settings: compact rows on desktop, readable controls on narrow screens. */
#dialog.form-dialog:has([data-site-regional]) {
  width: min(780px, calc(100vw - 24px));
}
#dialog:has([data-site-regional]) .dialog-head {
  padding: 16px 24px;
}
#dialog:has([data-site-regional]) .dialog-foot {
  padding: 14px 24px;
}
#dialog.form-dialog:has([data-site-regional]) #modal-form > .dialog-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
  padding: 18px 24px;
}
#dialog:has([data-site-regional]) .dialog-body > * {
  grid-column: 1/-1;
  min-width: 0;
}
#dialog:has([data-site-regional])
  .dialog-body
  > .field:has([name="name"], [name="brand_id"], [name="country"]),
#dialog [data-site-regional] > .field {
  grid-column: auto;
}
#dialog [data-site-regional] {
  display: contents;
}
#dialog [data-site-regional] > :not(.field) {
  grid-column: 1/-1;
}
#dialog:has([data-site-regional]) .field {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}
#dialog:has([data-site-regional]) .field > span {
  margin-bottom: 6px;
}
#dialog:has([data-site-regional]) .field > select,
#dialog:has([data-site-regional]) .field > input {
  min-width: 0;
  min-height: 44px;
  font-weight: 400;
}
#dialog:has([data-site-regional]) .address-selection {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  align-items: center;
  padding: 12px 14px;
  margin: 0;
}
#dialog:has([data-site-regional]) .address-selection p {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  overflow-wrap: anywhere;
}
#dialog:has([data-site-regional])
  .address-selection
  .google-address-attribution {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
}
#dialog:has([data-site-regional]) .address-selection .btn {
  grid-column: 2;
  grid-row: 1/3;
  min-height: 44px;
}
#dialog [data-site-regional] > .note {
  margin: 0;
  padding: 0;
  background: none;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  font-weight: 400;
}
#dialog:has([data-site-regional]) .screen-advanced {
  margin: 0;
  padding-top: 12px;
}
#dialog:has([data-site-regional]) .screen-advanced > summary {
  min-height: 32px;
}
#dialog:has([data-site-regional]) [hidden] {
  display: none;
}
#dialog:has([data-site-regional]) .form-error:empty {
  display: none;
}
@media (max-width: 600px) {
  #dialog.form-dialog:has([data-site-regional]) #modal-form > .dialog-body {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px;
    gap: 12px;
  }
  #dialog:has([data-site-regional]) .dialog-head {
    padding: 14px 16px;
  }
  #dialog:has([data-site-regional]) .dialog-foot {
    padding: 12px 16px;
  }
  #dialog:has([data-site-regional]) .address-selection {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  #dialog:has([data-site-regional]) .address-selection .btn {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
  }
}

/* Keep the embedded brand editor within the available workspace height. */
body:has(main > .brand-section-nav + .brand-editor-frame) .shell {
  height: 100dvh;
  min-height: 0;
}
body:has(main > .brand-section-nav + .brand-editor-frame) .workspace {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100dvh;
}
body:has(main > .brand-section-nav + .brand-editor-frame) .topbar {
  flex-shrink: 0;
}
main:has(> .brand-section-nav + .brand-editor-frame) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding-top: 16px;
  padding-bottom: 16px;
}
main:has(> .brand-editor-frame) > .workspace-trail {
  margin-bottom: 8px;
  flex-shrink: 0;
}
main:has(> .brand-editor-frame) > .brand-section-nav {
  margin-bottom: 16px;
  flex-shrink: 0;
}
main > .brand-section-nav + .brand-editor-frame {
  flex: 1;
  min-height: 0;
  height: 100%;
  width: 100%;
}
body:has(main > .brand-section-nav + .brand-editor-frame) .workspace > footer {
  display: none;
}
@media (max-width: 580px) {
  body:has(main > .brand-section-nav + .brand-editor-frame) .shell {
    display: flex;
    flex-direction: column;
  }
  body:has(main > .brand-section-nav + .brand-editor-frame) .sidebar {
    flex-shrink: 0;
  }
  body:has(main > .brand-section-nav + .brand-editor-frame) .workspace {
    height: auto;
    flex: 1;
  }
  main:has(> .brand-section-nav + .brand-editor-frame) {
    padding: 8px 12px;
  }
  main:has(> .brand-editor-frame) > .workspace-trail {
    font-size: 12px;
    margin-bottom: 4px;
  }
  main:has(> .brand-editor-frame) > .brand-section-nav {
    gap: 0;
    margin-bottom: 10px;
  }
  main:has(> .brand-editor-frame) > .brand-section-nav a {
    padding: 8px;
    font-size: 13px;
  }
}

/* Brand context appears once, above the section navigation. */
.brand-context-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0 0 10px;
  flex-shrink: 0;
  min-width: 0;
}
.brand-context-header > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}
.brand-context-header > a:hover {
  color: var(--blue);
}
.brand-context-header h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.4px;
  overflow-wrap: anywhere;
  min-width: 0;
  flex: 1 1 220px;
}
.brand-context-separator {
  color: var(--muted);
}
body:has(.brand-context-header) .topbar .breadcrumb > :not(#module-name) {
  display: none;
}
body:has(.brand-context-header) .topbar #module-name {
  display: inline;
  overflow-wrap: anywhere;
}
@media (max-width: 580px) {
  .brand-context-header {
    gap: 4px 8px;
    margin-bottom: 8px;
  }
  .brand-context-header h1 {
    font-size: 20px;
    flex-basis: 180px;
  }
}
main:has(> .brand-context-header) {
  padding-top: 16px;
}
@media (max-width: 580px) {
  main:has(> .brand-context-header) {
    padding-top: 8px;
  }
}
.brand-context-header + .brand-section-nav {
  margin-bottom: 16px;
}
@media (max-width: 580px) {
  .brand-context-header + .brand-section-nav {
    gap: 0;
    margin-bottom: 10px;
  }
  .brand-context-header + .brand-section-nav a {
    padding: 8px;
    font-size: 13px;
  }
}

/* Directory cards share the same density and action hierarchy. */
.brand-directory,
.site-directory {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 440px));
  align-items: start;
  gap: 20px;
}
.brand-directory > .directory-card,
.site-directory > .directory-card {
  display: flex;
  flex-direction: column;
  grid-row: auto;
  gap: 16px;
  padding: 20px;
  box-shadow: none;
  color: #192538;
}
.brand-directory .directory-card-heading h2,
.site-directory .directory-card-heading h2 {
  font-size: 19px;
  margin: 0;
  line-height: 1.35;
  color: #192538;
}
.brand-directory .directory-card-heading p,
.site-directory .directory-address,
.site-directory .meta {
  margin: 0;
  color: #526174;
  font-size: 13px;
  line-height: 1.5;
}
.brand-directory .brand-monogram {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  font-size: 22px;
  border-radius: 12px;
}
.directory-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--muted);
}
.directory-main-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.directory-main-actions .btn {
  width: 100%;
  white-space: normal;
  text-align: center;
  min-height: 44px;
}
.directory-card-more {
  border-top: 1px solid #e3e8ef;
  padding-top: 4px;
}
.directory-card-more > summary {
  cursor: pointer;
  min-height: 44px;
  display: list-item;
  align-content: center;
  color: #526174;
  font-size: 13px;
}
.directory-card-more > summary:focus-visible {
  outline: 3px solid #8cb5ff;
  outline-offset: 2px;
  border-radius: 4px;
}
.directory-card-more > .actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.directory-card-more .btn {
  white-space: normal;
  min-height: 44px;
}
.site-directory .section-context {
  padding: 0;
  background: none;
  font-size: 13px;
  color: #526174;
}
.site-directory .directory-kicker {
  font-size: 12px;
  color: #526174;
  margin-bottom: 4px;
}
.site-directory .directory-card > .actions {
  margin-top: 0;
}
.site-directory .directory-card > .actions .btn {
  font-size: 13px;
  min-height: 44px;
  padding: 10px 12px;
}

.brand-card > .directory-main-actions {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}
html[data-theme="dark"]
  :is(.brand-directory, .site-directory)
  > .directory-card {
  background: #182232;
  border-color: #3a4961;
  color: #edf2ff;
}
html[data-theme="dark"]
  :is(.brand-directory, .site-directory)
  .directory-card-heading
  h2 {
  color: #edf2ff;
}
html[data-theme="dark"]
  :is(.brand-directory, .site-directory)
  :is(
    .directory-card-heading p,
    .directory-address,
    .meta,
    .directory-kicker,
    .section-context,
    .directory-card-more > summary
  ) {
  color: #b4c0d5;
}
html[data-theme="dark"] .directory-card-more {
  border-color: #3a4961;
}

/* Equipment: navigation stays visible; details remain close to their values. */
#dialog.equipment-dialog .equipment-tabs {
  gap: 4px;
  padding: 8px 28px;
  background: #fff;
}
#dialog.equipment-dialog .equipment-tabs [role="tab"] {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #53647b;
  box-shadow: none;
  padding: 10px 14px;
  font-size: 13px;
  white-space: normal;
}
#dialog.equipment-dialog .equipment-tabs [aria-selected="true"] {
  background: #edf2ff;
  color: #214fd6;
  box-shadow: inset 0 -3px #2454df;
}
#dialog.equipment-dialog
  :is(button, summary, input, [role="tabpanel"]):focus-visible {
  outline: 3px solid #2454df;
  outline-offset: 3px;
}
#dialog.equipment-dialog .diagnostic-grid {
  grid-template-columns: minmax(130px, min(40%, 240px)) minmax(0, 1fr);
  gap: 10px 20px;
  line-height: 1.5;
}
#dialog.equipment-dialog .asset-card {
  padding: 18px;
  margin: 0 0 16px;
  min-width: 0;
}
#dialog.equipment-dialog .asset-card h3 {
  font-size: 15px;
  margin: 0 0 12px;
}
#dialog.equipment-dialog .asset-card .meta {
  line-height: 1.6;
}
#dialog.equipment-dialog .equipment-inventory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
#dialog.equipment-dialog .equipment-inventory .diagnostic-grid {
  grid-template-columns: minmax(100px, 40%) minmax(0, 1fr);
}
#dialog.equipment-dialog .equipment-details > summary {
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  min-height: 28px;
  line-height: 1.6;
}
#dialog.equipment-dialog .equipment-details[open] > summary {
  margin-bottom: 16px;
}
#dialog.equipment-dialog .display-context h3 {
  margin-top: 0;
  font-size: 16px;
}
#dialog.equipment-dialog .display-context .diagnostic-grid {
  grid-template-columns: 110px minmax(0, 1fr);
}
#dialog.equipment-dialog .display-stage {
  padding: 16px;
  min-height: 240px;
}
#dialog.equipment-dialog .display-check > .note {
  font-size: 12px;
  line-height: 1.6;
  padding: 10px 12px;
  margin: 12px 0;
}
#dialog.equipment-dialog .display-check > .actions {
  gap: 8px;
  justify-content: flex-start;
}
#dialog.equipment-dialog .display-check > .actions .btn {
  font-size: 13px;
  min-height: 44px;
}
#dialog.equipment-dialog [hidden] {
  display: none !important;
}
@media (max-width: 850px) {
  #dialog.equipment-dialog .equipment-inventory {
    grid-template-columns: 1fr;
  }
  #dialog.equipment-dialog .display-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  #dialog.equipment-dialog .equipment-tabs {
    padding: 8px 12px;
    gap: 4px;
  }
  #dialog.equipment-dialog .equipment-tabs [role="tab"] {
    font-size: 12px;
    padding: 8px;
    min-height: 44px;
  }
  #dialog.equipment-dialog .dialog-body {
    padding: 16px 12px;
  }
  #dialog.equipment-dialog .asset-card {
    padding: 14px;
  }
  #dialog.equipment-dialog .diagnostic-grid,
  #dialog.equipment-dialog .equipment-inventory .diagnostic-grid,
  #dialog.equipment-dialog .display-context .diagnostic-grid {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  #dialog.equipment-dialog .diagnostic-grid dd {
    margin-bottom: 10px;
  }
  #dialog.equipment-dialog .device-pillars {
    grid-template-columns: 1fr;
  }
  #dialog.equipment-dialog .device-pillars span {
    display: flex;
    justify-content: space-between;
    gap: 12px;
  }
  #dialog.equipment-dialog .device-pillars strong {
    margin: 0;
    text-align: right;
  }
  #dialog.equipment-dialog .display-check > .actions .btn {
    width: 100%;
    justify-content: center;
  }
}
#dialog.equipment-dialog #hdmi-error:empty {
  display: none;
}
#dialog.equipment-dialog [data-hdmi="probe"] {
  margin-bottom: 16px;
}
#dialog.equipment-dialog .display-check {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}
#dialog.equipment-dialog .display-context {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}
@media (max-width: 850px) {
  #dialog.equipment-dialog .display-context {
    grid-column: 1;
    grid-row: 1;
  }
  #dialog.equipment-dialog .display-check {
    grid-column: 1;
    grid-row: 2;
  }
}
/* Hardware reports are metadata, rather than an informational alert. */
#dialog.equipment-dialog .equipment-hardware {
  max-width: 1000px;
  margin: 0 auto;
}
#dialog.equipment-dialog .equipment-reading {
  margin: 0 0 20px;
  color: #53647b;
  font-size: 12px;
  line-height: 1.6;
}
#dialog.equipment-dialog .equipment-inventory .diagnostic-grid {
  grid-template-columns: minmax(110px, 150px) minmax(0, 1fr);
  column-gap: 16px;
}
#dialog.equipment-dialog .equipment-empty {
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 12px;
  color: #22314b;
}
#dialog.equipment-dialog .equipment-video-details {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 16px;
}
#dialog.equipment-dialog .equipment-video-details > summary {
  font-size: 12px;
  color: #53647b;
  font-weight: 500;
  min-height: 32px;
  line-height: 32px;
}
#dialog.equipment-dialog .equipment-video-details[open] > summary {
  margin-bottom: 8px;
}
@media (max-width: 600px) {
  #dialog.equipment-dialog .equipment-inventory .diagnostic-grid {
    grid-template-columns: 1fr;
  }
  #dialog.equipment-dialog .equipment-reading {
    margin-bottom: 16px;
  }
}
#dialog.equipment-dialog .equipment-control-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
#dialog.equipment-dialog .equipment-control-cards .btn {
  white-space: normal;
  max-width: 100%;
  min-width: 0;
  text-align: left;
}
#dialog.equipment-dialog .equipment-image-controls .field {
  margin-top: 12px;
}
@media (max-width: 1000px) {
  #dialog.equipment-dialog .equipment-control-cards {
    grid-template-columns: 1fr;
  }
}
/* Short information views size to their content instead of leaving an empty panel. */
#dialog.equipment-dialog.equipment-compact {
  width: min(1040px, calc(100vw - 32px));
  height: fit-content;
  max-height: calc(100dvh - 48px);
}
#dialog.equipment-dialog.equipment-compact #dialog-content {
  height: auto;
  max-height: calc(100dvh - 48px);
}
#dialog.equipment-dialog.equipment-compact .dialog-body {
  flex: 0 1 auto;
}
@media (max-width: 600px) {
  #dialog.equipment-dialog.equipment-compact {
    width: calc(100vw - 16px);
    height: calc(100dvh - 24px);
    max-height: none;
  }
  #dialog.equipment-dialog.equipment-compact #dialog-content {
    height: 100%;
    max-height: none;
  }
  #dialog.equipment-dialog.equipment-compact .dialog-body {
    flex: 1;
  }
}

/* Management identity stays distinct from the client being edited. */
#workspace-context {
  display: grid;
  gap: 6px;
  margin: 0 12px 16px;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.5;
}
#workspace-context[hidden] {
  display: none;
}
#workspace-context > span {
  font-size: 12px;
  font-weight: 600;
}
#workspace-context .btn {
  justify-self: start;
  white-space: normal;
}
#space-switch .space-link {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
@media (max-width: 580px) {
  #workspace-context {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin: 4px 0 8px;
  }
  #workspace-context .btn {
    min-height: 44px;
  }
}

/* Keep account surfaces and feedback readable in the existing dark palette. */
html[data-theme="dark"] .account-panel {
  background: #182232;
  color: #edf2ff;
  border-color: #3a4961;
}
html[data-theme="dark"] .account-tabs [role="tab"]:hover {
  background: #24334a;
  color: #edf2ff;
}
html[data-theme="dark"] .account-tabs [aria-selected="true"] {
  background: #243858;
  color: #edf2ff;
  border-color: var(--blue);
}
html[data-theme="dark"] .account-feedback {
  color: inherit;
}
html[data-theme="dark"] .account-feedback.error {
  color: #ffadb6;
}

/* Lists keep the existing evidence and actions, with details on demand. */
.screen-list-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.screen-list-controls .btn {
  min-height: 44px;
}
.screen-list-controls [aria-pressed="true"] {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
}
.screen-list-count {
  margin-inline-start: auto;
  color: var(--muted);
  font-size: 14px;
}
#screen-results.screen-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.screen-list-overview {
  display: none;
}
.screen-list .screen-card {
  display: block;
  overflow: visible;
}
.screen-list .screen-card-top {
  gap: 12px;
  flex-wrap: wrap;
}
.screen-list .screen-card-top label {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-wrap: anywhere;
}
.screen-list .screen-card-top input {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.screen-list .screen-list-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 12px 24px;
  padding: 0 20px 12px;
  align-items: start;
}
.screen-list-overview h3,
.screen-list-overview p,
.screen-list-overview .screen-row {
  margin: 0;
  overflow-wrap: anywhere;
}
.screen-list-overview .device-pillars {
  grid-column: 1 / -1;
  margin: 0;
}
.screen-list-thumbnail {
  grid-row: span 2;
  width: 96px;
  height: 60px;
  object-fit: contain;
  justify-self: start;
}
.screen-list-detail > summary {
  min-height: 44px;
  padding: 12px 20px;
  cursor: pointer;
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
}
.screen-list-detail > summary:focus-visible,
.directory-more > summary:focus-visible,
.directory-demo-tools > summary:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 6px;
}
.screen-list-detail[open] > .screen-list-expanded {
  border-top: 1px solid var(--border);
}
.screen-list .screen-list-expanded {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr);
}
#screen-results:not(.screen-list) .screen-list-detail > summary {
  display: none;
}
#screen-results:not(.screen-list) .screen-list-expanded {
  border: 0;
}
.ux-directory-toolbar {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  margin: 20px 0;
}
.ux-directory-toolbar .directory-search {
  display: grid;
  gap: 8px;
  flex: 1 1 240px;
  max-width: 480px;
  margin: 0;
  font-size: 14px;
}
.ux-directory-toolbar input {
  width: 100%;
  min-height: 44px;
}
.ux-directory-toolbar output {
  padding-bottom: 12px;
  font-size: 14px;
  color: var(--muted);
}
.ux-directory-toolbar .btn,
.ux-directory .btn,
.ux-directory .directory-more > summary {
  min-height: 44px;
}
.ux-directory .directory-open {
  background: transparent;
  box-shadow: none;
  border-color: transparent;
  color: var(--blue);
  text-align: start;
  justify-content: flex-start;
  white-space: normal;
}
.ux-directory .directory-more {
  display: inline-block;
  vertical-align: top;
  margin: 4px;
}
.ux-directory .directory-more > summary {
  padding: 12px;
  cursor: pointer;
  border-radius: 6px;
  font-size: 14px;
}
.ux-directory .directory-more-items {
  display: grid;
  gap: 6px;
  padding: 8px 0;
}
.ux-directory .directory-more-items .btn {
  justify-content: flex-start;
  white-space: normal;
  text-align: start;
  margin: 0;
}
.ux-directory tr[hidden] {
  display: none;
}
.ux-directory td {
  overflow-wrap: anywhere;
  vertical-align: top;
}
.ux-directory .access-actions:empty {
  display: none;
}
.directory-demo-tools {
  margin: 0 0 20px;
}
.directory-demo-tools > summary {
  min-height: 44px;
  padding: 12px 0;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
}
.directory-demo-tools .actions {
  margin-top: 8px;
}
html[data-theme="dark"] .screen-list-controls .btn {
  color: #edf2ff;
  background: #182232;
  border-color: #667895;
}
html[data-theme="dark"] .screen-list-controls [aria-pressed="true"] {
  border-color: #82afff;
  box-shadow: inset 0 0 0 1px #82afff;
}
html[data-theme="dark"] .screen-list-detail > summary,
html[data-theme="dark"] .ux-directory .directory-open {
  color: #a8c8ff;
}
@media (max-width: 700px) {
  .screen-list .screen-list-overview {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 16px 12px;
  }
  .screen-list .screen-list-expanded {
    display: block;
  }
  .screen-list-thumbnail {
    grid-row: auto;
  }
  .screen-list .screen-card-top {
    padding: 12px 16px;
  }
  .screen-list-detail > summary {
    padding-inline: 16px;
  }
  .ux-directory {
    overflow: visible;
  }
  .ux-directory table,
  .ux-directory tbody,
  .ux-directory tr,
  .ux-directory td {
    display: block;
    width: 100%;
  }
  .ux-directory thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .ux-directory tr {
    border-bottom: 1px solid var(--border);
    padding: 12px;
  }
  .table-wrap.ux-directory td {
    padding: 8px 4px;
    border: 0;
    min-width: 0;
  }
  .ux-directory .directory-cell-label {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 6px;
  }
  .ux-directory-toolbar {
    align-items: stretch;
  }
  .ux-directory-toolbar output {
    padding: 0;
    align-self: center;
  }
  .ux-directory-toolbar .field {
    max-width: 100%;
  }
  .screen-list-controls {
    gap: 8px;
  }
  .screen-list-count {
    width: 100%;
    margin: 0;
  }
}
@media (forced-colors: active) {
  .screen-list-controls [aria-pressed="true"] {
    outline: 2px solid Highlight;
  }
  .screen-list-detail > summary,
  .ux-directory .directory-open {
    color: LinkText;
  }
}
.screen-list .screen-card.list-expanded > .screen-list-overview {
  display: none;
}
#screen-results .screen-view-actions [data-action="preview-screen"] {
  background: transparent;
  color: var(--blue);
  border: 1px solid var(--border);
  font-weight: 600;
}
html[data-theme="dark"] #screen-results .device-pillars > span,
html[data-theme="dark"] .screen-list-count {
  color: #b4c1d4;
}
html[data-theme="dark"]
  #screen-results
  .screen-view-actions
  [data-action="preview-screen"] {
  color: #a8c8ff;
  border-color: #667895;
}

.workspace-recovery {
  max-width: 760px;
  margin: 48px auto;
  padding: 32px;
  min-height: 0;
}
.workspace-recovery h1 {
  overflow-wrap: anywhere;
}
.workspace-recovery .actions {
  margin-top: 24px;
}

.directory-cell-label {
  display: none;
}
.screen-list-media {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}
.screen-list-media figcaption {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
#screen-results:not(.screen-list) .screen-list-expanded {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.screen-list-expanded .screen-actions-menu {
  align-self: flex-end;
}
html[data-theme="dark"] .screen-list-media figcaption {
  color: #b4c1d4;
}
