/* ===================== ES Start Page ===================== */
.esp-app, .esp-app * {
	box-sizing: border-box;
}
.esp-app {
	--esp-accent: #4f8cff;
	--esp-card-bg: rgba(10, 18, 32, 0.72);
	--esp-text: #ffffff;
	--esp-pill-bg: rgba(255,255,255,0.06);
	--esp-link-padding: 3px;
	--esp-bank-item-padding: 3px;
	--esp-section-min-width: 260px;
	--esp-bank-panel-width: 300px;
	--esp-news-panel-width: 320px;
	--esp-link-padding-mobile: 3px;
	--esp-bank-item-padding-mobile: 3px;
	--esp-section-border-width: 1px;
	--esp-section-border-color: rgba(255,255,255,0.08);
	--esp-section-border-radius: 18px;
	color-scheme: dark;

	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	position: fixed;
	inset: 0;
	z-index: 99999;
	color: var(--esp-text);
}

/* ---------- Login ---------- */
.esp-login {
	position: fixed;
	inset: 0;
	background: radial-gradient(circle at 50% 20%, #16243d 0%, #060c18 75%);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 5;
}
.esp-login-box {
	width: 380px;
	max-width: 90vw;
	text-align: center;
}
.esp-login-title {
	font-size: 28px;
	font-weight: 600;
	margin: 0 0 28px;
}
.esp-user-list {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	justify-content: center;
	margin-bottom: 24px;
}
.esp-user-chip {
	width: 84px;
	cursor: pointer;
	background: none;
	border: none;
	color: #fff;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}
.esp-user-avatar {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	font-weight: 600;
	border: 2px solid rgba(255,255,255,0.15);
	transition: transform .15s ease, border-color .15s ease;
}
.esp-user-chip:hover .esp-user-avatar {
	transform: translateY(-3px);
	border-color: rgba(255,255,255,0.5);
}
.esp-user-name {
	font-size: 13px;
	opacity: .85;
}
.esp-link-btn {
	background: none;
	border: none;
	color: #8fb4ff;
	cursor: pointer;
	font-size: 13px;
	text-decoration: underline;
	padding: 6px;
}
.esp-pin-pad-name {
	font-size: 18px;
	margin-bottom: 14px;
	opacity: .9;
}
.esp-pin-dots {
	display: flex;
	justify-content: center;
	gap: 14px;
	margin-bottom: 8px;
}
.esp-pin-dots span {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	border: 2px solid rgba(255,255,255,0.4);
	display: inline-block;
}
.esp-pin-dots span.filled {
	background: var(--esp-accent);
	border-color: var(--esp-accent);
}
.esp-pin-error {
	color: #ff6b6b;
	font-size: 13px;
	height: 18px;
	margin-bottom: 6px;
}
.esp-pin-keys {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	max-width: 240px;
	margin: 10px auto 16px;
}
.esp-pin-keys button {
	background: rgba(255,255,255,0.07);
	border: 1px solid rgba(255,255,255,0.1);
	color: #fff;
	font-size: 18px;
	border-radius: 12px;
	padding: 14px 0;
	cursor: pointer;
}
.esp-pin-keys button:hover {
	background: rgba(255,255,255,0.15);
}
.esp-register-form {
	text-align: left;
	max-width: 280px;
	margin: 0 auto;
}
.esp-register-form .esp-field input {
	width: 100%;
	padding: 9px 10px;
	border-radius: 8px;
	border: 1px solid rgba(255,255,255,0.15);
	background: rgba(255,255,255,0.06);
	color: #fff;
	font-size: 14px;
}
.esp-register-form .esp-field label {
	display: block;
	font-size: 12px;
	opacity: .7;
	margin-bottom: 5px;
}

/* ---------- Dashboard shell ---------- */
.esp-dashboard {
	position: fixed;
	inset: 0;
	overflow: hidden;
}
.esp-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-color: #0a1322;
	z-index: 0;
}
.esp-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(5,10,20,.55) 0%, rgba(5,10,20,.25) 35%, rgba(5,10,20,.65) 100%);
	z-index: 1;
}

/* ---------- Top bar ---------- */
.esp-topbar {
	position: relative;
	z-index: 3;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	height: 58px;
	padding: 0 16px;
	gap: 12px;
	background: var(--esp-topbar-bg, rgba(8,14,26,0.55));
	color: var(--esp-topbar-text, #ffffff);
	backdrop-filter: blur(6px);
	font-size: 13px;
}
.esp-clock {
	display: flex;
	align-items: baseline;
	gap: 8px;
	white-space: nowrap;
	flex: 0 0 auto;
	position: relative;
	z-index: 1;
	background: none;
	border: none;
	cursor: pointer;
	padding: 6px 8px;
	border-radius: 8px;
}
.esp-clock:hover {
	background: rgba(255,255,255,0.08);
}
.esp-clock-time {
	font-weight: 600;
	font-size: 15px;
}
.esp-clock-date {
	opacity: .7;
	font-size: 12px;
}
.esp-ticker-wrap {
	width: 100%;
	min-width: 0;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	white-space: nowrap;
	cursor: grab;
	touch-action: none;
	z-index: 1;
}
.esp-ticker-track {
	display: inline-flex;
	gap: 50px;
	white-space: nowrap;
	animation: esp-ticker-scroll linear infinite;
	animation-duration: 40s;
}
.esp-ticker-track .esp-ticker-item {
	opacity: .92;
	cursor: pointer;
}
.esp-ticker-track .esp-ticker-item:hover {
	text-decoration: underline;
	opacity: 1;
}
@keyframes esp-ticker-scroll {
	from { transform: translateX(0); }
	to   { transform: translateX(-100%); }
}
.esp-weather {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	white-space: nowrap;
	position: relative;
	z-index: 2;
	flex: 0 0 auto;
	padding: 4px 8px;
	border-radius: 8px;
}
.esp-weather:hover {
	background: rgba(255,255,255,0.08);
}
.esp-weather-current {
	font-weight: 600;
	min-width: 32px;
}
.esp-weather-locname {
	font-weight: 400;
	opacity: .75;
	font-size: 12px;
	max-width: 90px;
	display: inline-block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	vertical-align: middle;
}
.esp-weather-loc-btn {
	background: rgba(255,255,255,0.08);
	border: none;
	color: #fff;
	border-radius: 50%;
	width: 22px;
	height: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
}
.esp-weather-loc-btn:hover {
	background: var(--esp-accent);
}
.esp-weather-loc-btn .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
}
.esp-weather-strip {
	display: flex;
	align-items: center;
	gap: 12px;
}
.esp-weather-strip-day {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1px;
	font-size: 12px;
	opacity: .85;
}
.esp-weather-strip-day img {
	width: 20px;
	height: 20px;
}
.esp-weather-strip-dayname {
	font-size: 10px;
	opacity: .65;
	text-transform: uppercase;
}

/* ---------- Grid of sections ---------- */
.esp-grid {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(var(--esp-section-min-width), 1fr));
	gap: 20px;
	padding: 24px;
	height: calc(100% - 58px - 60px);
	overflow-y: auto;
	align-content: start;
	transition: padding-right .25s ease;
}
@media (min-width: 641px) {
	.esp-dashboard.esp-bank-open .esp-grid {
		padding-right: calc(var(--esp-bank-panel-width) + 24px);
	}
}
.esp-section {
	background: var(--esp-card-bg);
	border: var(--esp-section-border-width) solid var(--esp-section-border-color);
	border-radius: var(--esp-section-border-radius);
	padding: 18px 18px 8px;
}
.esp-section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
	gap: 8px;
}
.esp-section-head-left {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
	min-width: 0;
}
.esp-section-drag-handle {
	cursor: grab;
	color: rgba(255,255,255,0.4);
	flex-shrink: 0;
}
.esp-section-icon-btn {
	background: rgba(255,255,255,0.08);
	border: none;
	color: #fff;
	border-radius: 6px;
	width: 26px;
	height: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	cursor: default;
}
.esp-editing .esp-section-icon-btn {
	cursor: pointer;
}
.esp-editing .esp-section-icon-btn:hover {
	background: var(--esp-accent);
}
.esp-section-title {
	font-size: 15px;
	font-weight: 600;
	opacity: .95;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.esp-section-remove {
	display: none;
	background: none;
	border: none;
	color: #ff8a8a;
	cursor: pointer;
}
.esp-editing .esp-section-remove {
	display: inline-flex;
}
.esp-section-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid rgba(255,255,255,0.06);
}
.esp-section-move-arrows {
	display: flex;
	align-items: center;
	gap: 2px;
}
.esp-section-arrows-leftright {
	display: flex;
	gap: 2px;
}
.esp-small-arrow {
	background: rgba(255,255,255,0.06);
	border: none;
	border-radius: 5px;
	color: #cfd9ee;
	cursor: pointer;
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}
.esp-small-arrow:hover {
	background: var(--esp-accent);
	color: #fff;
}
.esp-small-arrow .dashicons {
	font-size: 13px;
	width: 13px;
	height: 13px;
}
@media (max-width: 640px) {
	.esp-section-arrows-leftright {
		display: none;
	}
}
.esp-link-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: var(--esp-link-padding) 4px;
	border-radius: 8px;
	cursor: pointer;
	position: relative;
}
.esp-link-row:hover {
	background: rgba(255,255,255,0.06);
}
.esp-link-icon {
	width: 20px;
	height: 20px;
	border-radius: 4px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background-size: cover;
	background-color: rgba(128,128,128,0.18);
	box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
	padding: 2px;
}
.esp-link-icon img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}
.esp-link-icon svg,
.esp-icon-grid-row button svg,
.esp-section-icon-btn svg,
#esp-default-icon-preview svg {
	width: 16px;
	height: 16px;
	display: block;
}
.esp-link-title {
	flex: 1;
	font-size: 14px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.esp-link-actions {
	display: none;
	gap: 4px;
}
.esp-editing .esp-link-actions {
	display: flex;
}
.esp-link-actions button {
	background: none;
	border: none;
	color: #cfd9ee;
	cursor: pointer;
	padding: 2px;
}
.esp-link-actions button.esp-remove-link {
	color: #ff8a8a;
}
.esp-link-drag {
	display: none;
	cursor: grab;
	color: rgba(255,255,255,0.4);
}
.esp-editing .esp-link-drag {
	display: inline-flex;
}
.esp-add-link-row {
	display: none;
	align-items: center;
	gap: 8px;
	padding: 8px 4px;
	color: #8fb4ff;
	cursor: pointer;
	font-size: 13px;
}
.esp-editing .esp-add-link-row {
	display: flex;
}
.esp-add-section-card {
	display: none;
	align-items: center;
	justify-content: center;
	border: 2px dashed rgba(255,255,255,0.2);
	border-radius: 18px;
	min-height: 100px;
	cursor: pointer;
	color: rgba(255,255,255,0.6);
	font-size: 14px;
}
.esp-editing-mode .esp-add-section-card {
	display: flex;
}

/* ---------- Bottom nav ---------- */
.esp-bottom-nav {
	position: relative;
	z-index: 3;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: rgba(8,14,26,0.55);
	backdrop-filter: blur(6px);
}
.esp-page-pill {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	border-radius: 20px;
	background: var(--esp-pill-bg);
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	border: 1px solid transparent;
}
.esp-page-pill.active {
	background: var(--esp-accent);
	border-color: var(--esp-accent);
}
.esp-page-pill .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

/* ---------- FABs ---------- */
.esp-fab-wrap {
	position: fixed;
	right: 22px;
	bottom: 76px;
	z-index: 2147483000;
	display: flex;
	flex-direction: column;
	gap: 12px;
	pointer-events: auto;
}
.esp-fab {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background: rgba(15, 23, 42, 0.85);
	border: 1px solid rgba(255,255,255,0.15);
	color: #fff;
	font-size: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}
.esp-fab:hover {
	background: var(--esp-accent);
}
.esp-fab.active {
	background: var(--esp-accent);
}

/* ---------- Modals ---------- */
.esp-modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.6);
	z-index: 2147483001;
	display: flex;
	align-items: center;
	justify-content: center;
}
/* Wide modals (Settings) stay at a fixed top position so they never jump
   when the active tab changes height */
.esp-modal-backdrop .esp-modal-wide {
	align-self: flex-start;
	margin-top: 5vh;
}
.esp-modal {
	background: #101a2c;
	border: 1px solid rgba(255,255,255,0.1);
	border-radius: 16px;
	width: 520px;
	max-width: 92vw;
	max-height: 86vh;
	overflow-y: auto;
	padding: 22px;
	color: #fff;
	position: relative;
}
.esp-modal.esp-modal-wide {
	width: 760px;
}
.esp-modal h2 {
	margin: 0 0 16px;
	font-size: 18px;
}
.esp-modal-close {
	position: absolute;
	top: 14px;
	right: 16px;
	background: none;
	border: none;
	color: #fff;
	font-size: 18px;
	cursor: pointer;
}
.esp-field {
	margin-bottom: 14px;
}
.esp-field label {
	display: block;
	font-size: 12px;
	opacity: .7;
	margin-bottom: 5px;
}
.esp-field input[type="text"],
.esp-field input[type="url"],
.esp-field input[type="search"],
.esp-field input[type="time"],
.esp-field input[type="range"],
.esp-field select {
	width: 100%;
	padding: 9px 10px;
	border-radius: 8px;
	border: 1px solid rgba(255,255,255,0.15);
	background: rgba(255,255,255,0.06);
	color: #fff;
	font-size: 14px;
}
.esp-color-swatch-wrap {
	display: inline-block;
	border-radius: 6px;
	border: 1px solid rgba(255,255,255,0.2);
	overflow: hidden;
	cursor: pointer;
	line-height: 0;
}
.esp-color-field .esp-color-swatch-wrap {
	width: 70px;
	height: 30px;
}
.esp-field .esp-color-swatch-wrap {
	width: 100%;
	height: 40px;
	display: block;
}
.esp-color-swatch-wrap input[type="color"] {
	width: calc(100% + 4px);
	height: calc(100% + 4px);
	margin: -2px;
	padding: 0;
	border: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	display: block;
}
.esp-color-swatch-wrap input[type="color"]::-webkit-color-swatch-wrapper {
	padding: 0;
	border: none;
}
.esp-color-swatch-wrap input[type="color"]::-webkit-color-swatch {
	border: none;
}
.esp-color-swatch-wrap input[type="color"]::-moz-color-swatch {
	border: none;
}
.esp-field-row {
	display: flex;
	align-items: center;
	gap: 8px;
}
.esp-field-row.esp-color-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(140px, 200px));
	gap: 20px;
	align-items: start;
	margin-bottom: 4px;
}
.esp-color-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.esp-color-field label {
	font-size: 12px;
	opacity: .7;
}
.esp-appearance-2col {
	display: grid;
	grid-template-columns: 1fr 200px;
	gap: 20px;
	align-items: start;
}
@media (max-width: 700px) {
	.esp-appearance-2col { grid-template-columns: 1fr; }
}
.esp-color-preview-wrap {
	margin: 0;
	padding: 14px;
	border-radius: 12px;
	background: rgba(255,255,255,0.03);
	border: 1px solid rgba(255,255,255,0.08);
}
.esp-color-preview-card {
	border-radius: 14px;
	padding: 14px;
	margin-bottom: 10px;
	width: 100%;
}
.esp-color-preview-card .esp-color-preview-title {
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 8px;
}
.esp-color-preview-card .esp-color-preview-link {
	font-size: 13px;
	opacity: .9;
}
.esp-color-preview-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.esp-color-preview-btn {
	border: none;
	padding: 8px 16px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	cursor: default;
}
.esp-color-preview-pill {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 16px;
	font-size: 12px;
	font-weight: 600;
}
.esp-compact-section-header {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #8fb4ff;
	margin: 14px 0 6px;
}
.esp-compact-hint {
	font-weight: 400;
	text-transform: none;
	opacity: .6;
	letter-spacing: 0;
	font-size: 11px;
}
.esp-slider-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 5px 0;
	border-bottom: 1px solid rgba(255,255,255,0.05);
	position: relative;
}
.esp-slider-row-label {
	flex: 1;
	font-size: 13px;
	white-space: nowrap;
}
.esp-slider-val-btn {
	background: rgba(255,255,255,0.08);
	border: 1px solid rgba(255,255,255,0.15);
	border-radius: 6px;
	color: #fff;
	font-size: 12px;
	padding: 4px 10px;
	cursor: pointer;
	white-space: nowrap;
	min-width: 52px;
	text-align: center;
}
.esp-slider-val-btn:hover {
	background: rgba(255,255,255,0.14);
}
.esp-slider-popover {
	display: none;
	position: absolute;
	right: 0;
	top: calc(100% + 4px);
	z-index: 300;
	background: #16243d;
	border: 1px solid rgba(255,255,255,0.15);
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(0,0,0,0.5);
	padding: 10px 14px;
}
.esp-slider-popover.open {
	display: block;
}
.esp-slider-popover-inner {
	display: flex;
	align-items: center;
	gap: 10px;
}
.esp-slider-live-val {
	font-size: 12px;
	opacity: .7;
	min-width: 36px;
	text-align: right;
}
.esp-slider-compact {
	width: 160px;
}
.esp-appearance-save-row {
	margin-top: 18px;
	display: flex;
	gap: 8px;
}
.esp-btn {
	background: var(--esp-accent);
	border: none;
	color: #fff;
	padding: 10px 16px;
	border-radius: 8px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
}
.esp-btn.secondary {
	background: rgba(255,255,255,0.08);
}
.esp-btn.danger {
	background: #c0392b;
}
.esp-file-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: rgba(255,255,255,0.08);
	color: #fff;
	padding: 10px 16px;
	border-radius: 8px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
}
.esp-file-btn:hover {
	background: rgba(255,255,255,0.15);
}
.esp-file-btn input[type="file"] {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
}
.esp-file-btn-name {
	font-weight: 400;
	opacity: .7;
	font-size: 12px;
}
.esp-tabs {
	display: flex;
	gap: 4px;
	margin-bottom: 16px;
	border-bottom: 1px solid rgba(255,255,255,0.1);
	flex-wrap: nowrap;
	overflow-x: auto;
	scrollbar-width: thin;
}
.esp-tab {
	padding: 8px 10px;
	cursor: pointer;
	opacity: .6;
	font-size: 12px;
	white-space: nowrap;
	flex-shrink: 0;
	border-bottom: 2px solid transparent;
}
.esp-tab.active {
	opacity: 1;
	border-color: var(--esp-accent);
}
.esp-tab-panel { display: none; }
.esp-tab-panel.active { display: block; }

.esp-icon-grid {
	margin-top: 8px;
}
.esp-icon-search {
	width: 100%;
	padding: 8px 10px;
	border-radius: 6px;
	border: 1px solid rgba(255,255,255,0.15);
	background: rgba(255,255,255,0.06);
	color: #fff;
	font-size: 13px;
	margin-bottom: 8px;
}
.esp-icon-grid-body {
	max-height: 220px;
	overflow-y: auto;
	padding-right: 2px;
}
.esp-icon-category {
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #8fb4ff;
	padding: 8px 2px 4px;
}
.esp-icon-grid-row {
	display: grid;
	grid-template-columns: repeat(8, 1fr);
	gap: 6px;
}
.esp-icon-grid-row button {
	background: rgba(255,255,255,0.05);
	border: 1px solid transparent;
	border-radius: 6px;
	color: #fff;
	padding: 6px 0;
	cursor: pointer;
}
.esp-icon-grid-row button:hover {
	background: rgba(255,255,255,0.12);
}
.esp-icon-grid-row button.selected {
	border-color: var(--esp-accent);
	background: rgba(79,140,255,0.25);
}

.esp-image-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	max-height: 320px;
	overflow-y: auto;
}
.esp-image-grid img {
	width: 100%;
	height: 80px;
	object-fit: cover;
	border-radius: 8px;
	cursor: pointer;
	border: 2px solid transparent;
}
.esp-image-grid img:hover {
	border-color: var(--esp-accent);
}

.esp-list-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 0;
	border-bottom: 1px solid rgba(255,255,255,0.06);
}
.esp-list-row input[type="text"] {
	flex: 1;
	background: rgba(255,255,255,0.06);
	border: 1px solid rgba(255,255,255,0.1);
	border-radius: 6px;
	color: #fff;
	padding: 6px 8px;
}
.esp-list-row select {
	background: rgba(255,255,255,0.06);
	border: 1px solid rgba(255,255,255,0.1);
	border-radius: 6px;
	color: #fff;
	padding: 6px 8px;
}
.esp-custom-select {
	position: relative;
	flex-shrink: 0;
}
.esp-custom-select-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	background: rgba(255,255,255,0.06);
	border: 1px solid rgba(255,255,255,0.15);
	border-radius: 6px;
	color: #fff;
	padding: 6px 8px;
	font-size: 12px;
	cursor: pointer;
	max-width: 170px;
}
.esp-custom-select-btn .esp-custom-select-label {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.esp-custom-select-btn .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	opacity: .6;
}
.esp-custom-select-list {
	position: fixed;
	max-height: 300px;
	overflow: hidden;
	background: #16243d;
	border: 1px solid rgba(255,255,255,0.15);
	border-radius: 8px;
	box-shadow: 0 8px 20px rgba(0,0,0,0.5);
	z-index: 2147483005;
	display: none;
	flex-direction: column;
}
.esp-custom-select-list.open {
	display: flex;
}
.esp-custom-select-search {
	margin: 8px;
	padding: 7px 10px;
	border-radius: 6px;
	border: 1px solid rgba(255,255,255,0.15);
	background: rgba(255,255,255,0.06);
	color: #fff;
	font-size: 13px;
	flex-shrink: 0;
}
.esp-custom-select-items {
	overflow-y: auto;
	flex: 1;
}
.esp-custom-select-category {
	padding: 8px 12px 4px;
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #8fb4ff;
}
.esp-custom-select-option {
	padding: 8px 12px;
	font-size: 13px;
	color: #fff;
	cursor: pointer;
}
.esp-custom-select-option:hover {
	background: rgba(255,255,255,0.1);
}
.esp-custom-select-option.selected {
	background: var(--esp-accent);
}
.esp-list-row .esp-drag-handle {
	cursor: grab;
	opacity: .5;
}
.esp-list-row button {
	background: none;
	border: none;
	color: #cfd9ee;
	cursor: pointer;
}
.esp-list-row button.esp-row-delete {
	color: #ff8a8a;
}
.esp-list-row .esp-row-active-badge {
	font-size: 11px;
	background: var(--esp-accent);
	padding: 2px 8px;
	border-radius: 10px;
	white-space: nowrap;
}

.esp-drag-over {
	outline: 2px dashed var(--esp-accent);
}

/* ---------- Calendar / alarms ---------- */
.esp-calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	margin-bottom: 16px;
	text-align: center;
	font-size: 13px;
}
.esp-calendar-grid .esp-cal-head {
	opacity: .5;
	font-size: 11px;
	padding-bottom: 4px;
}
.esp-calendar-grid .esp-cal-day {
	padding: 8px 0;
	border-radius: 8px;
}
.esp-calendar-grid .esp-cal-day.esp-cal-today {
	background: var(--esp-accent);
	font-weight: 600;
}
.esp-calendar-grid .esp-cal-day.esp-cal-empty {
	opacity: 0;
}
.esp-alarm-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
	border-bottom: 1px solid rgba(255,255,255,0.06);
}
.esp-alarm-row .esp-alarm-time {
	font-size: 16px;
	font-weight: 600;
	min-width: 56px;
}
.esp-alarm-row .esp-alarm-label {
	flex: 1;
	font-size: 13px;
	opacity: .85;
}
.esp-toggle {
	position: relative;
	display: inline-block;
	width: 36px;
	height: 20px;
}
.esp-toggle input { display: none; }
.esp-toggle-slider {
	position: absolute;
	inset: 0;
	background: rgba(255,255,255,0.2);
	border-radius: 20px;
	cursor: pointer;
	transition: background .15s;
}
.esp-toggle-slider:before {
	content: '';
	position: absolute;
	width: 16px;
	height: 16px;
	left: 2px;
	top: 2px;
	background: #fff;
	border-radius: 50%;
	transition: transform .15s;
}
.esp-toggle input:checked + .esp-toggle-slider {
	background: var(--esp-accent);
}
.esp-toggle input:checked + .esp-toggle-slider:before {
	transform: translateX(16px);
}
.esp-repeat-days {
	display: flex;
	gap: 4px;
	margin-top: 6px;
}
.esp-repeat-days button {
	flex: 1;
	background: rgba(255,255,255,0.06);
	border: 1px solid rgba(255,255,255,0.1);
	color: #fff;
	border-radius: 6px;
	padding: 6px 0;
	font-size: 11px;
	cursor: pointer;
}
.esp-repeat-days button.selected {
	background: var(--esp-accent);
}

.esp-version-tag {
	position: fixed;
	left: 10px;
	bottom: 6px;
	z-index: 40;
	font-size: 11px;
	color: rgba(255,255,255,0.35);
	pointer-events: none;
	user-select: none;
}

/* ---------- News stories sidebar (mirrors the bank panel, but on the left) ---------- */
.esp-news-panel {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	width: var(--esp-news-panel-width);
	max-width: 86vw;
	background: #0d1626;
	border-right: 1px solid rgba(255,255,255,0.1);
	z-index: 2147482001;
	transform: translateX(-100%);
	transition: transform .25s ease;
	display: flex;
	flex-direction: column;
}
.esp-news-panel.open {
	transform: translateX(0);
}
.esp-news-handle {
	position: absolute;
	right: -30px;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(15,23,42,0.85);
	border: 1px solid rgba(255,255,255,0.15);
	border-left: none;
	border-radius: 0 10px 10px 0;
	color: #fff;
	width: 30px;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 2147482000;
}
.esp-news-handle:hover {
	background: var(--esp-accent);
}
.esp-news-width-handle {
	position: absolute;
	right: -4px;
	top: 0;
	bottom: 0;
	width: 8px;
	cursor: ew-resize;
	touch-action: none;
	z-index: 5;
}
.esp-news-list {
	flex: 1;
	overflow-y: auto;
	padding: 8px;
}
.esp-news-list-item {
	padding: 8px 10px;
	border-radius: 8px;
	cursor: pointer;
	font-size: 13px;
	margin-bottom: 2px;
	line-height: 1.35;
}
.esp-news-list-item:hover {
	background: rgba(255,255,255,0.08);
}
.esp-news-list-item.active {
	background: rgba(79,140,255,0.25);
}
.esp-news-list-feed {
	display: block;
	font-size: 10px;
	opacity: .55;
	text-transform: uppercase;
	letter-spacing: .03em;
	margin-top: 2px;
}
.esp-news-filters {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 10px;
	border-bottom: 1px solid rgba(255,255,255,0.08);
}
.esp-news-search-input {
	width: 100%;
	padding: 7px 10px;
	border-radius: 6px;
	border: 1px solid rgba(255,255,255,0.15);
	background: rgba(255,255,255,0.06);
	color: #fff;
	font-size: 13px;
}
.esp-news-filters .esp-custom-select {
	width: 100%;
}
.esp-news-filters .esp-custom-select-btn {
	width: 100%;
	max-width: none;
}
@media (min-width: 641px) {
	.esp-dashboard.esp-news-open .esp-grid {
		padding-left: calc(var(--esp-news-panel-width) + 24px);
	}
}

/* ---------- Link bank sidebar ---------- */
.esp-bank-handle {
	position: absolute;
	left: -30px;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(15,23,42,0.85);
	border: 1px solid rgba(255,255,255,0.15);
	border-right: none;
	border-radius: 10px 0 0 10px;
	color: #fff;
	width: 30px;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 2147482000;
}
.esp-bank-handle:hover {
	background: var(--esp-accent);
}
.esp-bank-panel {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: var(--esp-bank-panel-width);
	max-width: 86vw;
	background: #0d1626;
	border-left: 1px solid rgba(255,255,255,0.1);
	z-index: 2147482001;
	transform: translateX(100%);
	transition: transform .25s ease;
	display: flex;
	flex-direction: column;
}
.esp-bank-panel.open {
	transform: translateX(0);
}
.esp-bank-width-handle {
	position: absolute;
	left: -4px;
	top: 0;
	bottom: 0;
	width: 8px;
	cursor: ew-resize;
	touch-action: none;
	z-index: 5;
}
.esp-bank-resize-handle {
	display: none;
	align-items: center;
	justify-content: center;
	height: 18px;
	cursor: grab;
	touch-action: none;
}
.esp-bank-resize-handle span {
	width: 36px;
	height: 4px;
	border-radius: 2px;
	background: rgba(255,255,255,0.25);
}
.esp-bank-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 10px 0;
}
.esp-bank-tabs {
	display: flex;
	gap: 6px;
}
.esp-bank-tab {
	background: rgba(255,255,255,0.06);
	border: none;
	color: #fff;
	padding: 7px 14px;
	border-radius: 16px;
	font-size: 13px;
	cursor: pointer;
	opacity: .7;
}
.esp-bank-tab.active {
	background: var(--esp-accent);
	opacity: 1;
}
.esp-bank-sort {
	background: rgba(255,255,255,0.08);
	border: none;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	padding: 6px 10px;
	border-radius: 14px;
	cursor: pointer;
}
.esp-bank-sort:hover {
	background: var(--esp-accent);
}
.esp-bank-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 18px;
	cursor: pointer;
}
.esp-bank-hint {
	font-size: 11px;
	opacity: .6;
	padding: 8px 12px 0;
	line-height: 1.4;
}
.esp-bank-search-wrap {
	padding: 8px 10px 0;
}
.esp-bank-body {
	flex: 1;
	display: flex;
	overflow: hidden;
}
.esp-bank-list {
	flex: 1;
	overflow-y: auto;
	padding: 8px;
}
.esp-bank-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: var(--esp-bank-item-padding) 8px;
	border-radius: 8px;
	cursor: grab;
	margin-bottom: 4px;
	background: rgba(255,255,255,0.04);
}
.esp-bank-item:hover {
	background: rgba(255,255,255,0.09);
}
.esp-bank-item .esp-link-icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}
.esp-bank-item .esp-bank-item-title {
	flex: 1;
	font-size: 13px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.esp-bank-item button {
	background: none;
	border: none;
	color: #ff8a8a;
	cursor: pointer;
	flex-shrink: 0;
}
.esp-bank-empty {
	font-size: 12px;
	opacity: .5;
	padding: 16px 8px;
	text-align: center;
}
.esp-section.esp-bank-drop-target {
	outline: 2px dashed var(--esp-accent);
}
.esp-section.esp-link-drop-hover {
	outline: 2px dashed rgba(255,255,255,0.4);
}

@media (max-width: 640px) {
	.esp-bank-handle {
		position: fixed;
		right: 22px;
		bottom: 200px;
		left: auto;
		top: auto;
		transform: none;
		width: 50px;
		height: 50px;
		border-radius: 50%;
		border: 1px solid rgba(255,255,255,0.15);
		background: rgba(15, 23, 42, 0.85);
		box-shadow: 0 4px 14px rgba(0,0,0,0.4);
	}
	.esp-bank-panel {
		top: auto;
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		max-width: none;
		height: 50vh;
		border-left: none;
		border-top: 1px solid rgba(255,255,255,0.1);
		border-radius: 16px 16px 0 0;
		transform: translateY(100%);
	}
	.esp-bank-panel.open {
		transform: translateY(0);
	}
	.esp-bank-resize-handle {
		display: flex;
	}
	.esp-news-handle {
		position: fixed;
		right: 22px;
		bottom: 262px;
		left: auto;
		top: auto;
		transform: none;
		width: 50px;
		height: 50px;
		border-radius: 50%;
		border: 1px solid rgba(255,255,255,0.15);
		background: rgba(15, 23, 42, 0.85);
		box-shadow: 0 4px 14px rgba(0,0,0,0.4);
	}
	.esp-news-panel {
		top: auto;
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		max-width: none;
		height: 50vh;
		border-right: none;
		border-top: 1px solid rgba(255,255,255,0.1);
		border-radius: 16px 16px 0 0;
		transform: translateY(100%);
	}
	.esp-news-panel.open {
		transform: translateY(0);
	}
}

@media (max-width: 640px) {
	.esp-grid { grid-template-columns: 1fr; padding: 14px; height: calc(100% - 86px - 60px); }
	.esp-topbar {
		height: auto;
		grid-template-columns: auto auto;
		grid-template-rows: auto auto;
		grid-template-areas: "clock weather" "ticker ticker";
		padding: 6px 12px;
		row-gap: 4px;
		font-size: 11px;
	}
	.esp-clock { grid-area: clock; }
	.esp-weather { grid-area: weather; justify-self: end; }
	.esp-ticker-wrap {
		grid-area: ticker;
		width: 100% !important;
		justify-content: flex-start;
	}
	.esp-weather-strip { display: none; }
	.esp-link-row { padding: var(--esp-link-padding-mobile) 4px; }
	.esp-bank-item { padding: var(--esp-bank-item-padding-mobile) 8px; }
}
