/* =========================================================================
 * Unbox News — Dashboard layout (sidebar, topbar, content grid)
 * ====================================================================== */

/* Full-screen takeover: reset theme body + html spacing. */
body.ubn-fullscreen-body {
	margin: 0 !important;
	padding: 0 !important;
	background: var(--bg0, #f0f0f4);
}

html { margin-top: 0 !important; }

.bicagalo-admin {
	display: block;
	background: var(--bg0);
	min-height: 100vh;
}

/* Reset the theme's container padding when the panel is present. */
.bicagalo-admin .ubn-shell {
	display: grid;
	grid-template-columns: var(--sidebar-w) 1fr;
	min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.ubn-sidebar {
	position: fixed;
	top: 0;
	left: 0;
	width: var(--sidebar-w);
	height: 100vh;
	background: var(--bg1);
	border-right: 1px solid var(--b1);
	display: flex;
	flex-direction: column;
	z-index: 50;
}

.ubn-sidebar__brand {
	height: var(--topbar-h);
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 18px;
	border-bottom: 1px solid var(--b1);
	font-weight: 700;
	font-size: 16px;
	color: var(--t1);
}

.ubn-sidebar__brand img { max-height: 42px; max-width: 150px; border-radius: 50%; }

.ubn-sidebar__brand-name {
	font-weight: 800;
	font-size: 18px;
	letter-spacing: .03em;
	color: #000;
	white-space: nowrap;
}

.ubn-sidebar__brand .ubn-dot {
	width: 9px; height: 9px; border-radius: 50%;
	background: var(--or);
	flex: 0 0 auto;
}

.ubn-nav {
	flex: 1;
	overflow-y: auto;
	padding: 12px 10px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ubn-nav__item {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 10px 12px;
	border-radius: var(--r-btn);
	font-size: 13px;
	font-weight: 500;
	transition: background .15s, color .15s;
}

.bicagalo-admin .ubn-nav__item { color: #111113; }
.bicagalo-admin .ubn-nav__item:hover { background: var(--bg3); color: var(--or); }

.bicagalo-admin .ubn-nav__item.is-active {
	background: var(--og);
	color: var(--or2);
	font-weight: 600;
}

.ubn-nav__item .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.ubn-sidebar__foot {
	padding: 14px 18px;
	border-top: 1px solid var(--b1);
	font-size: 11px;
	color: var(--t3);
}

.ubn-sidebar__foot img { max-height: 20px; vertical-align: middle; margin: 4px 0; }
.ubn-sidebar__foot .ubn-version { display: block; margin-top: 4px; font-family: "JetBrains Mono", monospace; }

/* ---------- Campeonatos toggle ---------- */
.ubn-cbf-toggle {
	width: 42px; height: 24px;
	border: none; border-radius: 24px;
	background: var(--b1, #e2e2e6);
	position: relative;
	cursor: pointer;
	transition: background .15s ease;
	padding: 0;
}
.ubn-cbf-toggle__knob {
	position: absolute; top: 3px; left: 3px;
	width: 18px; height: 18px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0,0,0,.25);
	transition: left .15s ease;
}
.ubn-cbf-toggle.is-on { background: var(--or, #f26522); }
.ubn-cbf-toggle.is-on .ubn-cbf-toggle__knob { left: 21px; }
.ubn-thumb--sm { width: 40px; height: 40px; }
.is-busy { opacity: .6; pointer-events: none; }

/* ---------- Main column ---------- */
.ubn-main {
	grid-column: 2;
	min-width: 0;
}

/* ---------- Topbar ---------- */
.ubn-topbar {
	position: sticky;
	top: 0;
	height: var(--topbar-h);
	background: var(--bg1);
	border-bottom: 1px solid var(--b1);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 24px;
	gap: 16px;
	z-index: 40;
}

.ubn-topbar__title {
	font-size: 18px;
	font-weight: 600;
	color: var(--t1);
}

.ubn-topbar__right {
	display: flex;
	align-items: center;
	gap: 12px;
}

.ubn-bell {
	position: relative;
	background: var(--bg3);
	border: 1px solid var(--b1);
	border-radius: var(--r-btn);
	width: 38px;
	height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--t2);
	cursor: pointer;
}

.ubn-bell__dot {
	position: absolute;
	top: 7px; right: 8px;
	width: 7px; height: 7px;
	background: var(--or);
	border-radius: 50%;
}

.ubn-chip {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 5px 12px 5px 6px;
	background: var(--bg3);
	border: 1px solid var(--b1);
	border-radius: var(--r-pill);
}

.ubn-chip__avatar {
	width: 30px; height: 30px;
	border-radius: 50%;
	object-fit: cover;
	background: var(--bg4);
}

.ubn-chip__meta { line-height: 1.2; }
.ubn-chip__name { font-size: 12px; font-weight: 600; color: var(--t1); }
.ubn-chip__role { font-size: 10px; color: var(--t3); }

.ubn-hamburger {
	display: none;
	background: var(--bg3);
	border: 1px solid var(--b1);
	border-radius: var(--r-btn);
	width: 38px; height: 38px;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: var(--t2);
}

/* ---------- Content ---------- */
.ubn-content {
	padding: 24px;
	max-width: none;
	width: 100%;
}

.ubn-page-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.ubn-page-head h1 { font-size: 20px; }

/* The header (topbar) already shows the page title — hide the in-page one,
   keeping any action buttons aligned to the right. */
.bicagalo-admin .ubn-page-head h1 { display: none; }
.bicagalo-admin .ubn-page-head { justify-content: flex-end; }

/* Tabs */
.ubn-tabs {
	display: flex;
	gap: 2px;
	border-bottom: 1px solid var(--b1);
	margin-bottom: 20px;
	flex-wrap: wrap;
}
.ubn-tab {
	background: none;
	border: none;
	padding: 12px 18px;
	font: inherit;
	font-weight: 600;
	font-size: 13px;
	color: var(--t3);
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}
.ubn-tab:hover { color: var(--t1); }
.bicagalo-admin .ubn-tab.is-active { color: var(--or2); border-bottom-color: var(--or); }
.ubn-tab-pane { display: none; }
.ubn-tab-pane.is-active { display: block; }

.ubn-section { margin-bottom: 26px; }
.ubn-section__title {
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--t3);
	margin-bottom: 12px;
}

.ubn-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ubn-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ubn-grid-form { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }

/* Tag input (capsules) */
.ubn-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	padding: 6px;
	background: var(--inp);
	border: 1px solid var(--inpb);
	border-radius: var(--r-btn);
}
.ubn-tags__input {
	border: none;
	background: transparent;
	outline: none;
	flex: 1;
	min-width: 90px;
	padding: 4px;
	font: inherit;
	font-size: 13px;
	color: var(--ti);
}
.ubn-tag-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--og);
	color: var(--or2);
	border-radius: var(--r-pill);
	padding: 3px 6px 3px 10px;
	font-size: 12px;
	font-weight: 600;
}
.ubn-tag-pill button {
	background: none;
	border: none;
	cursor: pointer;
	color: inherit;
	font-size: 15px;
	line-height: 1;
	padding: 0 2px;
}

.ubn-toolbar {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
	margin-bottom: 16px;
}

.ubn-toolbar .ubn-input,
.ubn-toolbar .ubn-select { width: auto; min-width: 160px; }

/* Align every control in a toolbar to the same height. */
.ubn-toolbar .ubn-input,
.ubn-toolbar .ubn-select,
.ubn-toolbar .ubn-btn { height: 42px; }

/* Push an action button to the right edge of the toolbar row. */
.ubn-toolbar .ubn-toolbar__push { margin-left: auto; }

/* List thumbnail cell. */
.ubn-thumb {
	width: 48px;
	height: 48px;
	border-radius: 8px;
	overflow: hidden;
	background: var(--bg4);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--b2);
}
.ubn-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Icon action buttons. */
.ubn-icon-btn {
	width: 34px;
	height: 34px;
	border-radius: var(--r-btn);
	border: 1px solid var(--b1);
	background: var(--bg1);
	color: var(--t2);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	text-decoration: none;
	transition: background .15s, color .15s, border-color .15s;
}
.ubn-icon-btn:hover { background: var(--bg3); color: var(--t1); }
.ubn-icon-btn .dashicons { font-size: 17px; width: 17px; height: 17px; }
.bicagalo-admin .ubn-icon-btn { color: var(--t2); }
.ubn-icon-btn--danger:hover { background: var(--rd); color: #fff; border-color: var(--rd); }

/* Star (destaque) toggle. */
.ubn-star .dashicons { color: var(--b2); }
.bicagalo-admin .ubn-star { color: var(--t3); }
.ubn-star.is-on { border-color: var(--am); }
.ubn-star.is-on .dashicons { color: var(--am); }
.ubn-star.is-on:hover { background: var(--am); border-color: var(--am); }
.ubn-star.is-on:hover .dashicons { color: #fff; }

/* Inline status select in the list. */
.ubn-row-status {
	height: 34px;
	padding: 4px 8px;
	font-size: 12px;
	font-weight: 600;
	width: auto;
	min-width: 130px;
}
.ubn-row-status--success { color: #15803d; }
.ubn-row-status--info { color: var(--bl); }
.ubn-row-status--warning { color: #b45309; }
.ubn-row-status--danger { color: var(--rd); }
.ubn-row-status--muted { color: var(--t2); }

/* Updated date under the posting date in list rows. */
.ubn-updated { display: block; font-size: 10px; color: var(--gr); margin-top: 2px; }

/* Urgente toggle: red icon + light red background when active. */
/* Promover coluna: bold "!" action (Colunas list only) */
.ubn-promote .ubn-promote__mark {
	font-weight: 800;
	font-size: 16px;
	line-height: 1;
	color: var(--t3);
}
.ubn-promote.is-on { background: rgba(124, 58, 237, .12); border-color: #7c3aed; }
.ubn-promote.is-on .ubn-promote__mark { color: #7c3aed; }
.ubn-promote.is-on:hover { background: #7c3aed; }
.ubn-promote.is-on:hover .ubn-promote__mark { color: #fff; }

.bicagalo-admin .ubn-urgent .dashicons { color: var(--t3); }
.ubn-urgent.is-on { background: rgba(239, 68, 68, .12); border-color: var(--rd); }
.ubn-urgent.is-on .dashicons { color: var(--rd); }
.ubn-urgent.is-on:hover { background: var(--rd); }
.ubn-urgent.is-on:hover .dashicons { color: #fff; }

/* Toggle switch */
.ubn-switch { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--t2); cursor: pointer; margin-top: 14px; }
.ubn-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.ubn-switch__track { position: relative; flex: none; width: 40px; height: 22px; border-radius: 999px; background: var(--b2); transition: background .15s; }
.ubn-switch__track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.ubn-switch input:checked + .ubn-switch__track { background: var(--or); }
.ubn-switch input:checked + .ubn-switch__track::after { transform: translateX(18px); }

/* Inside a .ubn-field the generic `.ubn-field > label { display:block }`
   (design-system) outranks .ubn-switch and stacks the track over the text —
   restore the flex layout with a more specific selector. */
.ubn-field > label.ubn-switch {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	font-weight: 600;
	margin: 0 0 4px;
}

/* ---------- Video cards ---------- */
.ubn-video-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 16px;
}

.ubn-video {
	background: var(--bg1);
	border: 1px solid var(--b1);
	border-radius: var(--r-card);
	overflow: hidden;
}

.ubn-video__thumb {
	aspect-ratio: 16/9;
	background: var(--bg4) center/cover no-repeat;
	display: block;
}

.ubn-video { display: flex; flex-direction: column; }
.ubn-video__body { padding: 12px; display: flex; flex-direction: column; flex: 1; }
.ubn-video__title { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.ubn-video__row { display: flex; gap: 6px; flex-wrap: wrap; }

/* Icon actions row: date on the left, icons on the right. */
.ubn-video__actions {
	display: flex;
	gap: 6px;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
	padding-top: 8px;
}
.ubn-video__date { font-size: 11px; color: var(--t3); font-family: "JetBrains Mono", monospace; }
.ubn-video__icons { display: flex; gap: 6px; }

/* YouTube page: filters left, sync button right (same line). */
.ubn-yt-filters {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
	margin-bottom: 16px;
}
.ubn-yt-sync { margin-left: auto; }

/* Eye toggle: show the crossed eye when the video is hidden (is-on). */
.ubn-eye .dashicons-hidden { display: none; }
.ubn-eye.is-on .dashicons-visibility { display: none; }
.ubn-eye.is-on .dashicons-hidden { display: inline-block; }
.ubn-eye.is-on .dashicons { color: var(--rd); }
.ubn-eye.is-on { border-color: var(--rd); }

/* YouTube icon button. */
.ubn-icon-btn--yt .dashicons { color: #ff0000; }
.ubn-icon-btn--yt:hover { border-color: #ff0000; }

/* Destaque star: outline by default, filled yellow when marked (is-on). */
.ubn-star .dashicons-star-filled { display: none; }
.ubn-star.is-on .dashicons-star-empty { display: none; }
.ubn-star.is-on .dashicons-star-filled { display: inline-block; }
.bicagalo-admin .ubn-star .dashicons-star-empty { color: var(--t3); }
.bicagalo-admin .ubn-star.is-on .dashicons-star-filled { color: #f5b301; }
.bicagalo-admin .ubn-star.is-on { border-color: #f5b301; }

/* ---------- Uploader ---------- */
.ubn-uploader {
	border: 1.5px dashed var(--inpb);
	border-radius: var(--r-card);
	padding: 18px;
	text-align: center;
	background: var(--inp);
	cursor: pointer;
}

.ubn-uploader img { max-width: 100%; border-radius: var(--r-mini); margin-bottom: 8px; }

/* Compact cover uploader (e.g. portal logo/favicon): bounded height so a square
   image doesn't blow the box up; content vertically centered. */
.ubn-uploader--cover { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 210px; }
.ubn-uploader--cover img { max-height: 190px; width: auto; object-fit: contain; }

/* Custom image picker + vertical focus. */
.ubn-imgpick__preview {
	aspect-ratio: 16 / 9;
	border: 1.5px dashed var(--inpb);
	border-radius: var(--r-card);
	background: var(--inp);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.ubn-imgpick__preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ubn-imgpick__placeholder { color: var(--t3); font-size: 13px; text-align: center; }
.ubn-imgpick__placeholder .dashicons { display: block; margin: 0 auto 4px; font-size: 28px; width: 28px; height: 28px; }
.ubn-imgpick__actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

.ubn-focus-viewport {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--r-mini);
	background: #000;
}
.ubn-focus-img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; display: block; }
.ubn-focus-range { width: 100%; margin: 14px 0 4px; accent-color: var(--or); }

/* Centered circular avatar uploader (profile). */
.ubn-uploader--avatar { text-align: center; }
.ubn-uploader--avatar .ubn-uploader__preview {
	width: 120px;
	height: 120px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
	margin: 0 auto 10px;
}

/* Social links repeater rows. */
.ubn-social-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}
.ubn-social-row__icon {
	flex: 0 0 auto;
	width: 40px;
	height: 42px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--bg3);
	border: 1px solid var(--b1);
	border-radius: var(--r-btn);
	color: var(--or2);
}
.ubn-social-row .ubn-select { flex: 0 0 140px; width: auto; }
.ubn-social-row .ubn-input { flex: 1; min-width: 0; }
.ubn-social-row [data-remove-social] { flex: 0 0 auto; height: 42px; }

/* ---------- Pagination ---------- */
.ubn-pager { display: flex; gap: 6px; margin-top: 18px; }
.ubn-pager a, .ubn-pager span {
	padding: 6px 11px;
	border: 1px solid var(--b1);
	border-radius: var(--r-btn);
	font-size: 12px;
	color: var(--t2);
	background: var(--bg1);
}
.ubn-pager .is-current { background: var(--or); color: #fff; border-color: var(--or); }

/* ---------- Gate screens ---------- */
.ubn-gate {
	max-width: 420px;
	margin: 60px auto;
	background: var(--bg1);
	border: 1px solid var(--b1);
	border-radius: var(--r-card);
	padding: 36px 30px;
	text-align: center;
}

.ubn-gate .dashicons {
	font-size: 44px; width: 44px; height: 44px;
	color: var(--or);
	margin-bottom: 12px;
}

.ubn-gate h2 { font-size: 19px; }
.ubn-gate p { color: var(--t2); margin: 8px 0 18px; }

/* ---------- Mobile ---------- */
.ubn-backdrop {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.4);
	z-index: 45;
}

@media (max-width: 980px) {
	.bicagalo-admin .ubn-shell { grid-template-columns: 1fr; }
	.ubn-sidebar {
		transform: translateX(-100%);
		transition: transform .22s ease;
		box-shadow: 0 0 40px rgba(0,0,0,.18);
	}
	.bicagalo-admin.ubn-menu-open .ubn-sidebar { transform: translateX(0); }
	.bicagalo-admin.ubn-menu-open .ubn-backdrop { display: block; }
	.ubn-main { grid-column: 1; }
	.ubn-hamburger { display: inline-flex; }
	.ubn-grid-2, .ubn-grid-3, .ubn-grid-form { grid-template-columns: 1fr; }
	.ubn-chip__meta { display: none; }
}

/* ---------------- Mensagens (contato inbox) ------------------------------- */
.ubn-msg.is-unread { border-left: 3px solid var(--or, #f97316); }

/* Mailbox layout: folder sidebar (full height) + message list. */
.ubn-mail { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: stretch; min-height: calc(100vh - 230px); }
.ubn-mail__nav {
	display: flex;
	flex-direction: column;
	gap: 4px;
	background: var(--bg2, #fff);
	border: 1px solid var(--b1, #e6e6ee);
	border-radius: var(--r-card, 10px);
	padding: 10px;
	align-self: stretch;
}
.ubn-mail__folder {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 12px;
	border-radius: var(--r-btn, 7px);
	font-size: 13px;
	font-weight: 600;
	color: #16130f;
	transition: color .12s, background .12s;
}
.ubn-mail__folder:hover { color: var(--or, #f97316); background: var(--bg3, #f4f4f8); }
.ubn-mail__folder.is-active { color: var(--or, #f97316); background: var(--og, rgba(249, 115, 22, .15)); }
.ubn-mail__folder .dashicons { font-size: 18px; width: 18px; height: 18px; }
.ubn-mail__count { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--t3, #9090a0); background: var(--bg3, #f4f4f8); border-radius: 999px; padding: 1px 8px; min-width: 22px; text-align: center; }
.ubn-mail__folder.is-active .ubn-mail__count { background: rgba(255, 255, 255, .7); color: var(--or, #f97316); }
/* Override the global `.bicagalo-admin a` orange so folders are black by default. */
.bicagalo-admin .ubn-mail__folder { color: #16130f; }
.bicagalo-admin .ubn-mail__folder:hover,
.bicagalo-admin .ubn-mail__folder.is-active { color: var(--or, #f97316); }

/* Left column: Unbox Mail logo above the folders. */
.ubn-mail__side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ubn-mail__side .ubn-mail__nav { flex: 1; }
/* Unbox Mail logo lives in the page-head, aligned with the action button,
   and matches the sidebar column width (220px). */
.ubn-mail__logo { width: 220px; height: auto; display: block; flex: none; }

/* Repeater (e.g. Configurações → Redes sociais). */
.ubn-repeater { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.ubn-repeater__row { display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.ubn-repeater__row .ubn-repeater__del { flex: none; }
.ubn-repeater:empty { margin-bottom: 0; }
@media (max-width: 560px) {
	.ubn-repeater__row { grid-template-columns: 1fr auto; }
	.ubn-repeater__row .ubn-select { grid-column: 1 / -1; }
}
.ubn-mail__list { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 860px) {
	.ubn-mail { grid-template-columns: 1fr; min-height: 0; }
	.ubn-mail__nav { flex-direction: row; flex-wrap: wrap; }
}

/* Columnar message list (header + sortable columns). */
.ubn-maillist { background: var(--bg2, #fff); border: 1px solid var(--b1, #e6e6ee); border-radius: var(--r-card, 10px); overflow: hidden; }
.ubn-maillist__head,
.ubn-maillist__row {
	display: grid;
	grid-template-columns: minmax(150px, 1.2fr) minmax(140px, 1.4fr) minmax(180px, 1.9fr) 135px;
	gap: 14px;
	align-items: center;
}
.ubn-maillist__head { padding: 9px 16px; background: var(--bg3, #f4f4f8); border-bottom: 1px solid var(--b1, #e6e6ee); }
.ubn-maillist__th { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; padding: 0; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--t3, #9090a0); cursor: pointer; }
.ubn-maillist__th--static { cursor: default; }
.ubn-maillist__th .ubn-sort::after { content: '⇅'; opacity: .5; font-size: 11px; }
.ubn-maillist__th.is-asc .ubn-sort::after { content: '↑'; opacity: 1; }
.ubn-maillist__th.is-desc .ubn-sort::after { content: '↓'; opacity: 1; }
.ubn-maillist__th.is-asc, .ubn-maillist__th.is-desc { color: var(--or, #f97316); }
.ubn-maillist__row {
	width: 100%;
	text-align: left;
	padding: 11px 16px;
	border: 0;
	border-bottom: 1px solid var(--b1, #e6e6ee);
	background: none;
	cursor: pointer;
}
.ubn-maillist__row:last-child { border-bottom: 0; }
.ubn-maillist__row:hover { background: var(--bg3, #f4f4f8); }
.ubn-maillist__row.is-unread { background: var(--og, rgba(249, 115, 22, .1)); }
.ubn-maillist__row.is-unread .ubn-maillist__from { font-weight: 800; }
.ubn-maillist__c { min-width: 0; font-size: 13px; color: var(--t2, #3a3a4a); overflow: hidden; }
.ubn-maillist__user { display: flex; align-items: center; gap: 9px; }
.ubn-maillist__from { color: var(--t1, #16130f); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ubn-maillist__lbl { font-size: 11px; font-weight: 700; color: var(--t3, #9090a0); text-transform: uppercase; letter-spacing: .03em; }
.ubn-maillist__subject, .ubn-maillist__snippet { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ubn-maillist__snippet { color: var(--t3, #9090a0); }
.ubn-maillist__date { font-size: 11.5px; color: var(--t3, #9090a0); white-space: nowrap; display: flex; align-items: center; gap: 7px; }
.ubn-maillist__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--or, #f97316); flex: none; }
.ubn-prio-ico { font-size: 16px; width: 16px; height: 16px; flex: none; }

/* Avatars (gravatar img or initials circle). */
.ubn-ava { flex: none; width: 34px; height: 34px; border-radius: 50%; }
.ubn-ava--ini { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: #fff; background: var(--or, #f97316); }

@media (max-width: 720px) {
	.ubn-maillist__head { display: none; }
	.ubn-maillist__row { grid-template-columns: 1fr; gap: 4px; }
}

/* Compose: message-type (priority) options. */
.ubn-prio { display: flex; flex-wrap: wrap; gap: 8px; }
.ubn-prio__opt {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 12px;
	border: 1px solid var(--b2, #cacad4);
	border-radius: 999px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--t2, #3a3a4a);
	cursor: pointer;
}
.ubn-prio__opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.ubn-prio__opt:has(input:checked) { border-color: var(--or, #f97316); background: var(--og, rgba(249, 115, 22, .15)); color: var(--or2, #e06810); }
.ubn-prio__opt .dashicons { font-size: 16px; width: 16px; height: 16px; }

/* Read modal: meta + clearly-bounded reading panel. */
.ubn-read__meta { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.ubn-read__avatar { flex: none; width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; background: var(--or, #f97316); }
.ubn-read__from { font-weight: 700; color: var(--t1, #16130f); }
.ubn-read__date { font-size: 12px; color: var(--t3, #9090a0); margin-top: 2px; }
.ubn-read__flag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.ubn-read__flag .dashicons { font-size: 16px; width: 16px; height: 16px; }
.ubn-read__panel { border: 1px solid var(--b1, #e6e6ee); border-radius: var(--r-card, 10px); background: var(--bg3, #f4f4f8); padding: 16px 18px; }
.ubn-read__panel-label { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--t3, #9090a0); margin-bottom: 8px; }
.ubn-read__body { color: var(--t1, #16130f); line-height: 1.65; white-space: pre-line; min-height: 80px; }

/* Read-modal avatar can be a real profile image (falls back to initials). */
.ubn-read__avatar { padding: 0; overflow: hidden; background: transparent; }
.ubn-ava--lg { width: 46px; height: 46px; flex: none; border-radius: 50%; font-size: 15px; }
.ubn-read__avatar .ubn-ava--lg { width: 46px; height: 46px; }
img.ubn-ava { object-fit: cover; }

/* Excluir: red background + white label/icon on hover (beats the ghost rule). */
.bicagalo-admin .ubn-btn.ubn-icon-btn--danger:hover,
.bicagalo-admin a.ubn-btn.ubn-icon-btn--danger:hover { background: var(--rd); border-color: var(--rd); color: #fff; }
.bicagalo-admin .ubn-btn.ubn-icon-btn--danger:hover .dashicons { color: #fff; }

/* Threaded conversation (replies of replies) inside the read modal. */
.ubn-thread { display: flex; flex-direction: column; gap: 14px; max-height: 52vh; overflow-y: auto; padding-right: 4px; }
.ubn-thread__msg { display: flex; gap: 10px; align-items: flex-start; }
.ubn-thread__msg.is-mine { flex-direction: row-reverse; }
.ubn-thread__bubble { flex: 1; min-width: 0; border: 1px solid var(--b1, #e6e6ee); border-radius: 12px; background: var(--bg3, #f4f4f8); padding: 10px 14px; }
.ubn-thread__msg.is-mine .ubn-thread__bubble { background: var(--og, rgba(249, 115, 22, .12)); border-color: var(--or, #f97316); }
.ubn-thread__head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 4px; }
.ubn-thread__head strong { color: var(--t1, #16130f); font-size: 13px; }
.ubn-thread__date { font-size: 11px; color: var(--t3, #9090a0); flex: none; }
.ubn-thread__body { color: var(--t1, #16130f); line-height: 1.6; white-space: pre-line; }

/* Recipients picker (Comunicação interna) — search + chips. */
.ubn-picker { position: relative; }
.ubn-picker__box {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	min-height: 42px;
	padding: 6px 8px;
	border: 1px solid var(--b2, #cacad4);
	border-radius: var(--r-btn, 7px);
	background: var(--bg2, #fff);
	cursor: text;
}
.ubn-picker__search { flex: 1; min-width: 130px; border: 0; outline: 0; background: transparent; font: inherit; padding: 4px; color: var(--t1, #16130f); }
.ubn-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--og, rgba(249, 115, 22, .18));
	color: var(--or2, #e06810);
	font-size: 12.5px;
	font-weight: 600;
	padding: 4px 6px 4px 10px;
	border-radius: 999px;
}
.ubn-chip button { border: 0; background: none; cursor: pointer; color: inherit; font-size: 15px; line-height: 1; padding: 0 2px; }
.ubn-picker__menu {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 6px);
	max-height: 230px;
	overflow-y: auto;
	background: var(--bg2, #fff);
	border: 1px solid var(--b2, #cacad4);
	border-radius: var(--r-card, 10px);
	box-shadow: 0 14px 34px rgba(0, 0, 0, .14);
	z-index: 10;
	display: none;
}
.ubn-picker.is-open .ubn-picker__menu { display: block; }
.ubn-picker__opt { padding: 9px 12px; cursor: pointer; font-size: 13px; color: var(--t1, #16130f); }
.ubn-picker__opt:hover { background: var(--bg3, #f4f4f8); }
.ubn-picker__opt small { color: var(--t3, #9090a0); }
.ubn-picker__opt.is-selected,
.ubn-picker__opt.is-filtered { display: none; }
.ubn-picker__all {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 9px 12px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	color: var(--or2, #e06810);
	border-bottom: 1px solid var(--b1, #e6e6ee);
	position: sticky;
	top: 0;
	background: var(--bg2, #fff);
}
.ubn-picker__all:hover { background: var(--bg3, #f4f4f8); }
.ubn-picker__all .dashicons { font-size: 16px; width: 16px; height: 16px; }

/* ---------------- Topbar notifications (bell dropdown) -------------------- */
.ubn-notif-wrap { position: relative; }
.ubn-notif {
	position: absolute;
	right: 0;
	top: calc(100% + 10px);
	width: 330px;
	max-height: 420px;
	overflow-y: auto;
	background: var(--bg2, #fff);
	border: 1px solid var(--b2, #cacad4);
	border-radius: var(--r-card, 10px);
	box-shadow: 0 18px 44px rgba(0, 0, 0, .18);
	display: none;
	z-index: 60;
}
.ubn-notif.is-open { display: block; }
.ubn-notif__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 12px 14px;
	font-size: 13px;
	font-weight: 700;
	color: var(--t1, #16130f);
	border-bottom: 1px solid var(--b1, #e6e6ee);
}
.ubn-notif__empty { padding: 18px 14px; font-size: 13px; color: var(--t3, #9090a0); }
.ubn-notif__item { display: block; padding: 11px 14px; border-bottom: 1px solid var(--b1, #e6e6ee); }
.ubn-notif__item:hover { background: var(--bg3, #f4f4f8); }
.ubn-notif__item:last-child { border-bottom: 0; }
.ubn-notif__from { display: block; font-size: 13px; font-weight: 700; color: var(--t1, #16130f); }
.ubn-notif__title { display: block; font-size: 12.5px; color: var(--t2, #3a3a4a); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ubn-notif__date { display: block; margin-top: 3px; font-size: 11px; color: var(--t3, #9090a0); }

/* ---------------- Páginas: spacing between stacked cards + stat cards ------ */
.ubn-card--stack { margin-bottom: 18px; }
.ubn-card--stack:last-child { margin-bottom: 0; }
.ubn-statcard {
	border: 1px solid var(--b1, #e6e6ee);
	border-radius: var(--r-card, 10px);
	padding: 14px 16px;
	background: var(--bg3, #f4f4f8);
}
.ubn-grid-4 {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
}
@media (max-width: 980px) {
	.ubn-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
	.ubn-grid-4 { grid-template-columns: 1fr; }
}

/* ---------------- "Quem Somos" two-column layout (image ~28% + editor) ---- */
.ubn-grid-about {
	display: grid;
	grid-template-columns: minmax(0, 28%) 1fr;
	gap: 24px;
	align-items: start;
}
@media (max-width: 860px) {
	.ubn-grid-about { grid-template-columns: 1fr; }
}

/* 25% / 75% two-column (e.g. Meu perfil: foto + bio). The bio textarea grows
   to match the photo column height. */
.ubn-grid-25-75 {
	display: grid;
	grid-template-columns: minmax(0, 25%) 1fr;
	gap: 24px;
	align-items: stretch;
}
.ubn-grid-25-75 > .ubn-field { display: flex; flex-direction: column; }
.ubn-grid-25-75 > .ubn-field > textarea { flex: 1; }
@media (max-width: 760px) {
	.ubn-grid-25-75 { grid-template-columns: 1fr; }
}

/* When the uploader already shows an image, hide the placeholder icon + label. */
.ubn-uploader:has(.ubn-uploader__preview) .dashicons,
.ubn-uploader:has(.ubn-uploader__preview) .ubn-uploader__hint { display: none; }

/* ---------------- Sidebar separator + modal-trigger button ---------------- */
.ubn-nav__sep {
	display: block;
	height: 1px;
	margin: 8px 12px;
	background: var(--b1, #e6e6ee);
}
button.ubn-nav__item {
	width: 100%;
	border: 0;
	background: none;
	font-family: inherit;
	text-align: left;
	cursor: pointer;
}

/* ---------------- "Layout destaques" picker ---------------- */
.ubn-layout-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 14px;
}
.ubn-layout-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 12px;
	border: 2px solid var(--b2, #cacad4);
	border-radius: var(--r-card, 10px);
	background: var(--bg2, #fff);
	text-align: left;
	cursor: pointer;
	transition: border-color .15s, box-shadow .15s;
}
.ubn-layout-card:hover { border-color: var(--or, #f97316); }
.ubn-layout-card.is-selected {
	border-color: var(--or, #f97316);
	box-shadow: 0 0 0 3px var(--og, rgba(249, 115, 22, .18));
}
.ubn-layout-card__name {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 13px;
	font-weight: 700;
	color: var(--t1, #16130f);
}
.ubn-layout-card__desc {
	font-size: 11.5px;
	line-height: 1.4;
	color: var(--t3, #9090a0);
}
.ubn-layout-card__check {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 20px;
	height: 20px;
	font-size: 16px;
	line-height: 20px;
	text-align: center;
	border-radius: 50%;
	background: var(--or, #f97316);
	color: #fff;
	opacity: 0;
	transform: scale(.6);
	transition: opacity .15s, transform .15s;
}
.ubn-layout-card.is-selected .ubn-layout-card__check { opacity: 1; transform: scale(1); }

/* wireframe mockup */
.ubn-lay-mock {
	display: flex;
	gap: 6px;
	height: 84px;
	padding: 8px;
	border-radius: 8px;
	background: #f3efe7;
}
.ubn-lay-col {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.ubn-lay-box {
	flex: 1;
	min-height: 0;
	border-radius: 5px;
	background: #d7d2c8;
}
.ubn-lay-box--row { flex: 1; }
.ubn-lay-box--lead,
.ubn-lay-box--card { position: relative; }
.ubn-lay-box--lead::after {
	content: '';
	position: absolute;
	left: 8px;
	bottom: 8px;
	width: 50%;
	height: 7px;
	border-radius: 3px;
	background: var(--or, #f97316);
}
.ubn-lay-box--card::after {
	content: '';
	position: absolute;
	left: 7px;
	bottom: 6px;
	width: 62%;
	height: 5px;
	border-radius: 3px;
	background: var(--or, #f97316);
}
