/* The stock app logo is the stacked Dwaraka mark, whose wordmark sits in the
   bottom quarter of a near-square image; at Frappe's default 24px that text
   lands around five pixels tall. The navbar is pointed at a horizontal lockup
   instead (mark left, wordmark right, 4.56:1), which puts the wordmark at the
   full height of the logo rather than a quarter of it.

   Sizing by height with `width: auto` keeps the lockup's ratio intact -- a
   fixed width would squash it. 36px leaves 6px of breathing room inside the
   48px navbar. */
.navbar .app-logo {
	width: auto;
	height: 36px;
	max-height: 36px;
}

/* Login and other website pages reuse the same .app-logo class, but are styled
   by login.bundle.scss rather than the desk bundle -- there the logo is capped
   by height alone (max-height: 42px). That is fine for a square mark and wrong
   for a 4.56:1 lockup, which then runs to ~192px and can overflow the login
   card on a narrow screen. Capping width too lets it shrink to fit; Frappe
   already centres .page-card-head, so the alignment itself needs no help. */
.page-card-head img.app-logo {
	max-height: 48px;
	max-width: 100%;
	width: auto;
}

/* Export Management's sidebar links (public/js/export_sidebar.js) are not
   .sidebar-item-container, so repeat the stock nested-item indent here. */
.exports-sidebar-link {
	margin-left: 10px;
}

.exports-sidebar-link .standard-sidebar-item {
	justify-content: start;
}

/* Export document viewer (public/js/export_document_viewer.js). */
.edv { display: flex; gap: 16px; min-height: 60vh; }
.edv-list { flex: 0 0 230px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; max-height: 72vh; }
.edv-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; border: 1px solid var(--border-color);
	background: var(--card-bg); border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.edv-item.active { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.edv-item-name { font-weight: 500; word-break: break-all; }
.edv-item-meta { font-size: 12px; color: var(--text-muted); }
.edv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.edv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.edv-title-wrap { min-width: 0; }
.edv-title { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edv-meta { font-size: 12px; color: var(--text-muted); }
.edv-actions { display: flex; gap: 8px; flex: none; }
.edv-body { flex: 1; border: 1px solid var(--border-color); border-radius: 10px; overflow: hidden; background: var(--subtle-fg); }
.edv-frame { width: 100%; height: 70vh; border: 0; display: block; background: #fff; }
.edv-image { display: flex; align-items: center; justify-content: center; padding: 16px; max-height: 70vh; overflow: auto; }
.edv-image img { max-width: 100%; max-height: calc(70vh - 32px); object-fit: contain; }
.edv-none { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 40vh;
	text-align: center; padding: 32px; }
.edv-none-title { font-size: 15px; font-weight: 600; }
@media (max-width: 768px) {
	.edv { flex-direction: column; }
	.edv-list { flex: none; max-height: 180px; }
}

/* Desk splash (frappe/templates/includes/splash_screen.html): the logo shown in the
   middle of the screen right after login, while /app loads. Its inline style caps
   the image at 100px, which leaves the 4.56:1 Dwaraka lockup ~22px tall -- so lift
   the cap (!important beats the inline style), then animate it: it rises in from
   slightly small and blurred, and keeps a gentle "breathing" pulse until the desk
   replaces it. */
.splash img {
	max-width: min(420px, 80vw) !important;
	max-height: 140px !important;
	width: auto;
	height: auto;
	animation: es-splash-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both,
		es-splash-breathe 2.4s ease-in-out 0.7s infinite;
	will-change: transform, opacity;
}

@keyframes es-splash-in {
	from { opacity: 0; transform: translateY(14px) scale(0.82); filter: blur(6px); }
	to { opacity: 1; transform: none; filter: none; }
}

@keyframes es-splash-breathe {
	0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(79, 70, 229, 0)); }
	50% { transform: scale(1.04); filter: drop-shadow(0 8px 22px rgba(79, 70, 229, 0.22)); }
}

@media (prefers-reduced-motion: reduce) {
	.splash img { animation: none; }
}
