/* ============================================
   Full-Width Dashboard Layout
   Collapsible Sidebar + Full-Width Content
   ============================================ */

/* Mobile browsers treat an edge-zone horizontal swipe as a back/forward
   navigation gesture, which wins the race against the touchstart/touchend
   swipe-to-open-sidebar handler below (dashboard.blade.php). Disabling the
   browser's horizontal overscroll navigation lets that handler get the
   gesture instead. Scoped to mobile widths only (matches isMobileWidth() in
   the swipe handler) - on desktop this must stay unset so trackpad
   back/forward swipe navigation keeps working normally. */
@media (max-width: 768px) {
	html,
	body {
		overscroll-behavior-x: none;
	}
}

/* ---- Layout Structure ----
   No gap and no padding-top: sidebar and content are one continuous white
   surface divided by a single hairline border (see .dashboard-sidebar
   .widget's border-right below), matching the flat, square-cornered
   topbar/menu-row above rather than floating as separate rounded cards. */
.dashboard-layout {
	display: flex;
	min-height: calc(100vh - 200px);
	position: relative;
}

/* ---- Page Background ----
   White, matching the topbar/menu-row/sidebar/content - one flat canvas,
   no grey negative space or card-on-canvas separation. */
.full-width-dashboard {
	min-height: calc(100vh - 160px);
	background: var(--ds-surface, #fff);
}

.full-width-dashboard .page-wrapper {
	width: 100%;
	background: transparent !important;
	padding: 0;
	min-height: auto;
}

.full-width-dashboard .page-content {
	background: transparent !important;
}

/* ============================================
   Dashboard Top Bar
   Replaces the public-site logo header + green nav on dashboard pages -
   see resources/views/includes/dashboardTopbar.blade.php. The public site
   layout (layouts/app.blade.php) still uses includes.logo/includes.nav
   unchanged, so none of this touches that.
   ============================================ */
.dashboard-topbar {
	height: 56px;
	background: linear-gradient(90deg, #0d9488 0%, #0284c7 55%, #6366f1 100%);
	background-size: 220% 220%;
	animation: ncsHeaderFlow 18s ease-in-out infinite;
	border-bottom: none;
	box-shadow: 0 2px 10px rgba(15, 23, 42, 0.14);
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 0 20px;
	position: sticky;
	top: 0;
	z-index: 200;
}

/* A soft diagonal highlight sweeping across the topbar, decelerating and
   fading out before it loops - same idea as a classic installer progress
   bar's shine, kept subtle enough not to fight the search box/text on top.
   Clipped via its own wrapper (not .dashboard-topbar) so the wrapper's
   overflow:hidden doesn't also clip the .topbar-user-menu dropdown, which
   is positioned below the topbar's own box. */
.topbar-shine-wrap {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
}

.topbar-shine {
	position: absolute;
	top: 0;
	left: 0;
	width: 50%;
	height: 100%;
	background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, 0) 100%);
	mix-blend-mode: screen;
	animation: ncsShine 7s linear infinite;
}

@keyframes ncsHeaderFlow {
	0% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
	100% { background-position: 0% 50%; }
}

@keyframes ncsShine {
	0% { transform: translateX(-130%); opacity: 1; }
	15% { transform: translateX(-60%); opacity: 1; }
	35% { transform: translateX(-5%); opacity: 1; }
	60% { transform: translateX(50%); opacity: 0.4; }
	100% { transform: translateX(85%); opacity: 0; }
}

.topbar-brand {
	display: flex;
	align-items: center;
	gap: 9px;
	font-weight: 700;
	font-size: 14px;
	color: var(--ds-text, #2d3748);
	text-decoration: none;
	white-space: nowrap;
	flex-shrink: 0;
	background: linear-gradient(180deg, #ffffff 0%, #e9ecf0 100%);
	padding: 3px 10px 3px 3px;
	border-radius: 8px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.14), 0 6px 14px rgba(15, 23, 42, 0.3);
}

.topbar-brand:hover {
	color: var(--ds-text, #2d3748);
	text-decoration: none;
}

.topbar-logo {
	height: 34px;
	width: auto;
	display: block;
}

.topbar-search {
	flex: 1;
	max-width: 420px;
}

.topbar-spacer {
	flex: 1;
}

.topbar-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.topbar-user {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 10px 4px 4px;
	border-radius: 999px;
	cursor: pointer;
	position: relative;
}

.topbar-user:hover {
	background: rgba(255, 255, 255, 0.16);
}

.topbar-user .avatar,
.topbar-user .avatar-img {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	flex-shrink: 0;
}

.topbar-user .avatar {
	background: #ffffff;
	color: #0d9488;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 800;
}

.topbar-user .avatar-img {
	object-fit: cover;
}

.topbar-user .name {
	display: block;
	font-size: 12.5px;
	font-weight: 600;
	color: #ffffff;
}

.topbar-user .role {
	display: block;
	font-size: 10.5px;
	color: rgba(255, 255, 255, 0.8);
	margin-top: -1px;
}

.dashboard-topbar .sidebar-toggle-btn {
	color: #ffffff;
}

.dashboard-topbar .sidebar-toggle-btn:hover {
	background: rgba(255, 255, 255, 0.18);
}

.dashboard-topbar .topbar-chevron {
	color: rgba(255, 255, 255, 0.8) !important;
}

.dashboard-topbar .global-search-input {
	background: #ffffff;
	border-color: rgba(255, 255, 255, 0.6);
}

.dashboard-topbar .global-search-input:focus-within {
	border-color: #ffffff;
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
	background: #ffffff;
}

.topbar-user-menu {
	display: none;
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	min-width: 190px;
	background: var(--ds-surface, #fff);
	border: 1px solid var(--ds-border, #e2e8f0);
	border-radius: var(--ds-radius-md, 12px);
	box-shadow: var(--ds-shadow-modal, 0 20px 25px -5px rgba(0, 0, 0, 0.1));
	padding: 6px;
	z-index: 300;
}

.topbar-user-menu.is-open {
	display: block;
}

.topbar-user-menu a {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 8px 10px;
	border-radius: 8px;
	font-size: 13px;
	color: var(--ds-text, #2d3748);
	text-decoration: none;
}

.topbar-user-menu a:hover {
	background: var(--ds-accent-tint, rgba(67, 213, 177, 0.14));
	color: var(--ds-accent-dark, #2fb996);
	text-decoration: none;
}

.topbar-user-menu a i {
	width: 14px;
	color: var(--ds-text-faint, #a0aec0);
}

/* ---- Global search (resources/components/topbar/GlobalSearch.vue) ---- */
.global-search {
	position: relative;
	width: 100%;
}

.global-search-input {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--ds-bg, #f9fbfb);
	border: 1px solid var(--ds-border, #e2e8f0);
	border-radius: 8px;
	padding: 7px 12px;
	transition: all 0.2s ease;
}

.global-search-input:focus-within {
	border-color: var(--ds-accent, #43d5b1);
	box-shadow: 0 0 0 3px var(--ds-accent-tint, rgba(67, 213, 177, 0.14));
	background: var(--ds-surface, #fff);
}

.global-search-input i.fa-search {
	font-size: 12px;
	color: var(--ds-text-faint, #a0aec0);
	flex-shrink: 0;
}

.global-search-input input {
	border: none;
	background: transparent;
	outline: none;
	font-size: 12.5px;
	color: var(--ds-text, #2d3748);
	width: 100%;
	min-width: 0;
}

.global-search-input input::placeholder {
	color: var(--ds-text-faint, #a0aec0);
}

.global-search-clear {
	background: transparent;
	border: none;
	padding: 2px 4px;
	color: var(--ds-text-faint, #a0aec0);
	cursor: pointer;
	font-size: 11px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	border-radius: 50%;
	flex-shrink: 0;
	transition: color 0.15s ease;
}

.global-search-clear:hover {
	color: var(--ds-text, #2d3748);
}

.global-search-results {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	width: 100%;
	min-width: 340px;
	max-height: 420px;
	overflow-y: auto;
	background: var(--ds-surface, #fff);
	border: 1px solid var(--ds-border, #e2e8f0);
	border-radius: var(--ds-radius-md, 12px);
	box-shadow: var(--ds-shadow-modal, 0 20px 25px -5px rgba(0, 0, 0, 0.1));
	padding: 6px;
	z-index: 300;
}

.global-search-empty {
	padding: 14px 10px;
	font-size: 12.5px;
	color: var(--ds-text-faint, #a0aec0);
	text-align: center;
}

.global-search-group-label {
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--ds-text-faint, #a0aec0);
	padding: 8px 10px 4px;
}

.global-search-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 8px;
	text-decoration: none;
	color: var(--ds-text, #2d3748);
}

.global-search-item:hover,
.global-search-item.keynav-active {
	background: var(--ds-accent-tint, rgba(67, 213, 177, 0.14));
	text-decoration: none;
	color: var(--ds-text, #2d3748);
}

.global-search-item i {
	width: 16px;
	text-align: center;
	color: var(--ds-accent, #43d5b1);
	flex-shrink: 0;
}

.global-search-item .title {
	display: block;
	font-size: 13px;
	font-weight: 600;
}

.global-search-item .desc {
	display: block;
	font-size: 11.5px;
	color: var(--ds-text-muted, #4a5568);
}

@media (max-width: 768px) {
	.dashboard-topbar {
		padding: 0 10px;
		gap: 8px;
		transition: all 0.2s ease;
	}

	.topbar-logo {
		height: 28px;
	}

	.topbar-brand {
		transition: opacity 0.2s ease, max-width 0.25s ease;
	}

	.topbar-search {
		flex: 1;
		min-width: 0;
		max-width: none;
		transition: flex 0.25s ease;
	}

	/* When search is selected / focused on mobile:
	   Expand search bar and hide logo brand so search has full room */
	.dashboard-topbar.search-expanded .topbar-brand,
	.dashboard-topbar:has(.global-search.is-active) .topbar-brand,
	.dashboard-topbar:has(.global-search-input input:focus) .topbar-brand {
		display: none !important;
	}

	.dashboard-topbar.search-expanded .topbar-spacer,
	.dashboard-topbar:has(.global-search.is-active) .topbar-spacer,
	.dashboard-topbar:has(.global-search-input input:focus) .topbar-spacer {
		display: none !important;
	}

	.dashboard-topbar.search-expanded .topbar-search,
	.dashboard-topbar:has(.global-search.is-active) .topbar-search,
	.dashboard-topbar:has(.global-search-input input:focus) .topbar-search {
		flex: 1 1 auto;
		width: 100%;
	}

	.global-search-results {
		position: fixed;
		top: 56px;
		left: 8px;
		right: 8px;
		width: auto;
		min-width: 0;
		max-width: calc(100vw - 16px);
		max-height: calc(100vh - 70px);
		z-index: 1000;
	}

	.topbar-user .name,
	.topbar-user .role {
		display: none;
	}

	.topbar-user .fa-chevron-down {
		display: none;
	}
}

/* ---- Public-site menu row ----
   resources/views/includes/dashboardMenuRow.blade.php - the same DB-backed
   menu (Menu::where('platform', 0), see AppServiceProvider) that drives the
   public site's nav, so dashboard users don't lose one-click access to it
   now that the marketing header/nav is gone from this layout. */
.dashboard-menu-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 2px;
	padding: 6px 20px;
	background: linear-gradient(90deg, #0f766e 0%, #075985 55%, #4338ca 100%);
	background-size: 220% 220%;
	animation: ncsHeaderFlow 18s ease-in-out infinite reverse;
	border-bottom: none;
	position: relative;
	z-index: 190;
}

.menu-row-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 11px;
	border-radius: 7px;
	font-size: 12.5px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.92);
	text-decoration: none;
	white-space: nowrap;
}

.menu-row-item:hover {
	background: rgba(255, 255, 255, 0.14);
	color: #ffffff;
	text-decoration: none;
}

.menu-row-item.active {
	background: rgba(255, 255, 255, 0.22);
	color: #ffffff;
}

.menu-row-item.menu-row-cta {
	background: #ffffff;
	color: #0f766e;
	margin-right: 6px;
}

.menu-row-item.menu-row-cta:hover {
	background: #f0fdfa;
	color: #0f766e;
}

.menu-row-dropdown {
	position: relative;
	padding: 0;
}

.menu-row-dropdown.active > .dropdown-toggle {
	color: #ffffff;
	background: rgba(255, 255, 255, 0.22);
}

.menu-row-dropdown > .dropdown-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 11px;
	border-radius: 7px;
	font-size: 12.5px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.92);
	text-decoration: none;
}

.menu-row-dropdown > .dropdown-toggle:hover,
.menu-row-dropdown > .dropdown-toggle:focus {
	background: rgba(255, 255, 255, 0.14);
	color: #ffffff;
	text-decoration: none;
}

.menu-row-dropdown .dropdown-toggle .fa-angle-down {
	font-size: 10px;
}

.menu-row-dropdown .dropdown-menu {
	border: 1px solid var(--ds-border, #e2e8f0);
	border-radius: var(--ds-radius-md, 12px);
	box-shadow: var(--ds-shadow-modal, 0 20px 25px -5px rgba(0, 0, 0, 0.1));
	padding: 6px;
	margin-top: 6px;
}

.menu-row-dropdown .dropdown-menu li > a {
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 13px;
	color: var(--ds-text, #2d3748);
}

.menu-row-dropdown .dropdown-menu li > a:hover,
.menu-row-dropdown .dropdown-menu li > a:focus {
	background: var(--ds-accent-tint, rgba(67, 213, 177, 0.14));
	color: var(--ds-accent-dark, #2fb996);
}

@media (max-width: 768px) {
	.dashboard-menu-row {
		overflow-x: auto;
		flex-wrap: nowrap;
		padding: 6px 12px;
	}
}

/* ---- Sidebar Panel ---- */
.dashboard-sidebar {
	width: 280px;
	min-width: 280px;
	max-width: 280px;
	transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
	overflow: hidden;
	position: relative;
	z-index: 100;
	flex-shrink: 0;
	border-right: 1px solid var(--ds-border, #e2e8f0);
	/* Soft elevation on the divider edge only (not a full card shadow/radius) -
	   enough to read as a distinct panel without going back to the floating
	   rounded-card look. */
	box-shadow: 2px 0 8px -4px rgba(15, 25, 22, 0.08);
}

.dashboard-sidebar .sidebar-inner {
	width: 280px;
	min-width: 280px;
}

/* ---- Main Content Area ----
   Flush and square - no card boundary of its own, since the page canvas
   behind it is the same white. The only visual divider is the sidebar's
   own border-right (below), matching the flat topbar/menu-row look. Still
   the default "wrapper" for every page's content regardless of whether the
   page opts into .box/.ds-section itself. */
.dashboard-main-content {
	flex: 1;
	min-width: 0;
	padding: 24px;
	background: var(--ds-surface, #fff);
	display: flex;
	flex-direction: column;
}

/* Let the last card of a page stretch to fill the sidebar's height instead
   of leaving a gap below it on short pages. */
.dashboard-main-content > .ds-section:last-child {
	flex: 1;
}

/* ---- Toggle Button ----
   Visible at every width now: collapses to an icon-only rail on desktop,
   opens/closes the slide-in drawer on mobile (see the sidebar rules below). */
.sidebar-toggle-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	min-width: 34px;
	border: none;
	border-radius: var(--ds-radius-sm, 8px);
	background: transparent;
	color: var(--ds-text-muted, #4a5568);
	font-size: 15px;
	cursor: pointer;
	flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
	background: var(--ds-bg, #f9fbfb);
}

/* ---- Page Heading Adjustments ---- */
.page-heading.clearfix {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

.page-heading .heading-title {
	flex: 1;
	min-width: 0;
}

/* Override the container class for full width */
.content.container.full-width-dashboard {
	width: 100% !important;
	max-width: 100% !important;
	padding-left: 20px;
	padding-right: 20px;
}

/* layouts/dashboard.blade.php's instance of this wrapper also contains
   .dashboard-sidebar as a direct sibling of .dashboard-main-content (see
   .dashboard-layout below) - .dashboard-main-content already carries its
   own padding, so this wrapper's padding was only insetting the sidebar
   away from the browser edge, leaving a visible gap. layouts/app.blade.php's
   sidebar-less public pages still need the base padding above - this is
   scoped to .dashboard-shell (dashboard.blade.php's own marker class) so
   only the sidebar layout loses it. */
.content.container.full-width-dashboard.dashboard-shell {
	padding-left: 0;
}

/* ---- Fix left/right margin bleed on .row ----
   Bootstrap's .row carries -15px left/right margins, meant to be canceled
   by a parent .container/.page-row's matching horizontal padding. Some
   pages combine .row directly onto the same element as .box/.page-row
   (class="row box" or class="row page-row"), or use a bare .row as the
   top-level content wrapper - in both cases nothing cancels the negative
   margin, so the content bleeds past its card's edges. Neutralize it at
   the source instead of restructuring markup per page. */
.row.box,
.box.row,
.row.page-row,
.page-row.row {
	margin-left: 0;
	margin-right: 0;
}

.dashboard-main-content > .row {
	margin-left: 0;
	margin-right: 0;
}

/* ---- Override page-row for full width ---- */
.dashboard-main-content .page-row {
	width: 100%;
}

/* ---- Responsive ---- */
@media (max-width: 992px) {
	.dashboard-sidebar {
		width: 260px;
		min-width: 260px;
		max-width: 260px;
	}

	.dashboard-sidebar .sidebar-inner {
		width: 260px;
		min-width: 260px;
		position: static;
	}

	.dashboard-main-content {
		padding: 18px;
	}
}

/* ---- Desktop collapsed = icon-only rail ----
   One icon per section header; a header's items open as a flyout on hover -
   see .sidebar-collapsed-groups / groupedNodes in SidebarMenu.vue. */
.sidebar-collapsed-groups {
	display: none;
}

@media (min-width: 769px) {
	.dashboard-sidebar.collapsed {
		width: 72px;
		min-width: 72px;
		max-width: 72px;
	}

	/* Absolutely positioned so it can widen on hover without resizing
	   .dashboard-sidebar (the flex item that sizes the content column) -
	   the hover-expand is then a pure overlay that never pushes content. */
	.dashboard-sidebar.collapsed .sidebar-inner {
		position: absolute;
		top: 0;
		left: 0;
		/* min-height not bottom:0: a fixed height would still let content
		   render past it (overflow is visible), just with no background
		   under it. min-height keeps the full-height look while still
		   growing for longer content. */
		min-height: 100%;
		width: 72px;
		min-width: 72px;
		z-index: 550;
		transition: width 0.2s ease, box-shadow 0.2s ease;
		background: var(--ds-surface, #fff);
		/* Right-edge shadow so the icon rail reads as floating above the
		   content column instead of flush with it, now that it's an
		   absolutely-positioned overlay rather than a flow sibling. */
		box-shadow: 10px 0 32px -4px rgba(15, 25, 22, 0.35);
	}

	/* Hovering .sidebar-inner itself, not the fixed-width .dashboard-sidebar -
	   otherwise the hoverable area stays 72px even after the panel visually
	   widens, so the cursor "falls out" the moment it passes that edge. */
	.dashboard-sidebar.collapsed .sidebar-inner:hover {
		width: 240px;
		min-width: 240px;
		box-shadow: var(--ds-shadow-modal, 0 20px 25px -5px rgba(0, 0, 0, 0.18));
	}

	/* .dashboard-sidebar/.widget clip overflow elsewhere; lift that only
	   while collapsed so the popover can render outside the 72px rail. */
	.dashboard-sidebar.collapsed,
	.dashboard-sidebar.collapsed .sidebar-inner,
	.dashboard-sidebar.collapsed .widget {
		overflow: visible;
	}

	.dashboard-sidebar.collapsed .search-container,
	.dashboard-sidebar.collapsed .user-name-link,
	.dashboard-sidebar.collapsed .sidebar-decoration,
	.dashboard-sidebar.collapsed .sidebar-flat-list {
		display: none;
	}

	.dashboard-sidebar.collapsed .widget h2 {
		padding-left: 4px;
		padding-right: 4px;
	}

	.dashboard-sidebar.collapsed .sidebar-avatar-img,
	.dashboard-sidebar.collapsed .sidebar-avatar-icon {
		width: 28px;
		height: 28px;
		font-size: 28px;
	}

	.dashboard-sidebar.collapsed .sidebar-collapsed-groups {
		display: block;
		padding: 6px 0;
	}

	.collapsed-group {
		position: relative;
	}

	.collapsed-group-trigger {
		display: flex;
		align-items: center;
		justify-content: center;
		padding-left: 0;
		padding-right: 0;
		overflow: hidden;
		white-space: nowrap;
	}

	.collapsed-group-trigger i {
		margin-right: 0;
	}

	.collapsed-group-trigger .item-label {
		display: none;
	}

	.dashboard-sidebar.collapsed .sidebar-inner:hover .collapsed-group-trigger {
		justify-content: flex-start;
		padding-left: 14px;
		padding-right: 14px;
	}

	.dashboard-sidebar.collapsed .sidebar-inner:hover .collapsed-group-trigger i {
		margin-right: 10px;
	}

	.dashboard-sidebar.collapsed .sidebar-inner:hover .collapsed-group-trigger .item-label {
		display: inline;
	}

	.collapsed-group-popover {
		display: none;
		position: absolute;
		left: 100%;
		top: 0;
		width: 230px;
		max-height: none;
		background: var(--ds-surface, #fff);
		border: 1px solid var(--ds-border, #e2e8f0);
		border-radius: var(--ds-radius-md, 12px);
		box-shadow: var(--ds-shadow-modal, 0 20px 25px -5px rgba(0, 0, 0, 0.1));
		padding: 6px;
		z-index: 500;
	}

	.collapsed-group:hover .collapsed-group-popover,
	.collapsed-group:focus-within .collapsed-group-popover {
		display: block;
	}

	.collapsed-group-popover-title {
		padding: 8px 12px 6px;
		font-size: 11px;
		font-weight: 700;
		text-transform: uppercase;
		letter-spacing: 1px;
		color: #999;
	}

	.collapsed-group-subheading {
		padding: 10px 14px 4px;
		font-size: 11px;
		font-weight: 700;
		text-transform: uppercase;
		color: #999;
	}

	.collapsed-group-popover .list-group-item {
		justify-content: flex-start;
		padding-left: 14px;
		padding-right: 14px;
		white-space: nowrap;
	}

	.collapsed-group-popover .list-group-item i {
		margin-right: 10px;
	}
}

/* ---- Mobile = slide-in/out drawer ----
   The sidebar comes out of normal flex flow entirely and becomes a
   fixed-position panel that slides over the content, with a dimmed backdrop
   behind it (see .dashboard-sidebar-backdrop, layouts/dashboard.blade.php).
   Collapsed = off-screen (closed); the default on first mobile load, same
   as before, so the sidebar doesn't dominate the screen above the content. */
@media (max-width: 768px) {
	.dashboard-sidebar {
		position: fixed;
		top: 56px;
		left: 0;
		bottom: 0;
		width: 280px !important;
		min-width: 280px !important;
		max-width: 85vw !important;
		transform: translateX(-100%);
		transition: transform 0.3s ease;
		overflow-y: auto;
		overflow-x: hidden;
		/* Right-edge shadow (drawer slides in from the left, so depth reads
		   on the edge facing the dimmed content) layered under the existing
		   all-around modal shadow for a proper floating-panel look. */
		box-shadow: 10px 0 36px rgba(15, 25, 22, 0.35), var(--ds-shadow-modal, 0 20px 25px -5px rgba(0, 0, 0, 0.25));
		z-index: 460;
	}

	.dashboard-sidebar:not(.collapsed) {
		transform: translateX(0);
	}

	.dashboard-sidebar .sidebar-inner {
		width: 100%;
		min-width: 100%;
		position: static;
		padding-right: 0;
	}

	.dashboard-sidebar-backdrop {
		display: none;
		position: fixed;
		inset: 0;
		top: 56px;
		background: rgba(15, 25, 22, 0.4);
		z-index: 450;
	}

	.dashboard-sidebar-backdrop.is-visible {
		display: block;
	}

	.dashboard-main-content {
		padding: 16px;
	}

	.content.container.full-width-dashboard {
		padding-left: 15px;
		padding-right: 15px;
	}

	.content.container.full-width-dashboard.dashboard-shell {
		padding-left: 0;
		padding-right: 0;
	}
}

@media (max-width: 480px) {
	.sidebar-toggle-btn {
		width: 36px;
		height: 36px;
		min-width: 36px;
		font-size: 14px;
		border-radius: 10px;
	}

	.content.container.full-width-dashboard {
		padding-left: 10px;
		padding-right: 10px;
	}

	.content.container.full-width-dashboard.dashboard-shell {
		padding-left: 0;
		padding-right: 0;
	}
}

/* ---- Smooth transition for admin dashboard grid on resize ---- */
.dashboard-main-content .admin-dashboard-grid {
	transition: all 0.35s ease;
}

/* ---- Sidebar panel ----
   Flush and square, same as .dashboard-main-content - a single hairline
   border-right (on .dashboard-sidebar itself, which flexbox already
   stretches to match the content column's height) is the only thing
   separating it from the content column, matching the flat topbar/menu-row
   look instead of a floating rounded card. */
.dashboard-sidebar .widget {
	margin-bottom: 0;
	background: var(--ds-surface, #fff) !important;
}

/* ---- Content sections in main area - flat, not their own card ----
   .dashboard-main-content (above) is already the one card for the page.
   .box/.ds-section used to also carry their own background+border+shadow,
   which now stacks a second card inside the first. Flatten them here to
   plain sections (just spacing, .ds-section's own header/divider still
   separates blocks) so there's exactly one card layer, not two. Scoped to
   .dashboard-main-content so .ds-section keeps its normal card look where
   it's used outside the dashboard column (e.g. editUserModal). */
.dashboard-main-content .box,
.dashboard-main-content .dashboard-section,
.dashboard-main-content .ds-section {
	background: transparent !important;
	border: none;
	box-shadow: none;
	border-radius: 0;
	padding: 0;
}

.dashboard-main-content .page-row .box {
	background: transparent !important;
	border: none;
	box-shadow: none;
	border-radius: 0;
	padding: 0;
}

/* ---- Public pages with page-sidebar (staticPages, admissions) ---- */
.full-width-dashboard .page-row .page-sidebar {
	transition: all 0.3s ease;
}
