@charset "UTF-8";
@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");

/*
|--------------------------------------------------------------------------
| BASE UI - EXPERIMENTAL DESIGN SYSTEM
|--------------------------------------------------------------------------
| Purpose:
| - One consistent visual language for the admin platform.
| - Page CSS files should only contain exceptions.
| - No SCSS required, but structured like SCSS sections.
|--------------------------------------------------------------------------
*/


/*=========================================================
=
= DESIGN TOKENS
=
=========================================================*/

:root {

	/* Brand */

	--ui-brand: #faa61c;
	--ui-brand-hover: #e9950d;
	--ui-brand-soft: #fff3d6;
	--ui-brand-border: #ffd78a;

	/* Neutral Palette */

	--ui-white: #ffffff;
	--ui-black: #000000;

	--ui-gray-25: #fcfcfd;
	--ui-gray-50: #f8f9fa;
	--ui-gray-75: #f4f6f8;
	--ui-gray-100: #eef1f4;
	--ui-gray-150: #e9ecef;
	--ui-gray-200: #dee2e6;
	--ui-gray-300: #cfd6dd;
	--ui-gray-400: #adb5bd;
	--ui-gray-500: #6c757d;
	--ui-gray-600: #495057;
	--ui-gray-700: #343a40;
	--ui-gray-800: #282627;
	--ui-gray-900: #171717;

	/* Semantic */

	--ui-primary: #0d6efd;
	--ui-primary-hover: #0b5ed7;
	--ui-primary-soft: #e7f0ff;
	--ui-primary-border: #b7d4ff;

	--ui-success: #198754;
	--ui-success-soft: #dff5ea;
	--ui-success-border: #a9dfbf;

	--ui-warning: #ffc107;
	--ui-warning-soft: #fff6d8;
	--ui-warning-border: #ffe39a;

	--ui-danger: #dc3545;
	--ui-danger-soft: #fde8ea;
	--ui-danger-border: #f5b8bf;

	--ui-info: #0dcaf0;
	--ui-info-soft: #dff8fd;
	--ui-info-border: #a8ebf7;

	/* Application Surfaces */

	--ui-body-bg: #f5f7fb;
	--ui-content-bg: #f5f7fb;
	--ui-card-bg: #ffffff;
	--ui-card-soft: #f8f9fb;
	--ui-card-muted: #f1f3f5;

	--ui-sidebar-bg: #1f1d1e;
	--ui-sidebar-bg-soft: #282627;
	--ui-sidebar-text: #f8f9fa;
	--ui-sidebar-muted: #adb5bd;
	--ui-sidebar-active: #faa61c;

	--ui-topbar-bg: rgba(255, 255, 255, 0.92);
	--ui-border: #e1e6ec;
	--ui-border-strong: #cfd6dd;

	/* Text */

	--ui-text: #212529;
	--ui-text-strong: #111827;
	--ui-text-soft: #6c757d;
	--ui-text-muted: #8a94a3;

	/* Typography */

	--font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

	--font-size-xs: 0.75rem;
	--font-size-sm: 0.8125rem;
	--font-size-md: 0.9375rem;
	--font-size-lg: 1.125rem;
	--font-size-xl: 1.5rem;
	--font-size-2xl: 2rem;

	--line-height-tight: 1.15;
	--line-height-normal: 1.5;
	--line-height-relaxed: 1.7;

	/* Radius */

	--radius-xs: 6px;
	--radius-sm: 8px;
	--radius-md: 12px;
	--radius-lg: 16px;
	--radius-xl: 22px;
	--radius-pill: 999px;

	/* Shadows */

	--shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
	--shadow-sm: 0 4px 10px rgba(16, 24, 40, 0.06);
	--shadow-md: 0 10px 28px rgba(16, 24, 40, 0.08);
	--shadow-lg: 0 20px 50px rgba(16, 24, 40, 0.12);

	/* Spacing */

	--space-1: 4px;
	--space-2: 8px;
	--space-3: 12px;
	--space-4: 16px;
	--space-5: 20px;
	--space-6: 24px;
	--space-7: 28px;
	--space-8: 32px;
	--space-10: 40px;

	/* Shell */

	--shell-sidebar-width: 272px;
	--shell-sidebar-collapsed-width: 74px;
	--shell-topbar-height: 72px;
	--shell-content-max-width: none;

	/* Transitions */

	--transition-fast: 0.15s ease;
	--transition-base: 0.2s ease;
}


/*=========================================================
=
= RESET / BASE
=
=========================================================*/

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	min-height: 100%;
	scroll-behavior: smooth;
}

body {
	min-height: 100vh;
	margin: 0;
	background:
		radial-gradient(circle at top left, rgba(250, 166, 28, 0.06), transparent 34rem),
		var(--ui-body-bg);
	color: var(--ui-text);
	font-family: var(--font-family);
	font-size: var(--font-size-md);
	font-weight: 400;
	line-height: var(--line-height-normal);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

a {
	color: inherit;
	text-decoration: none;
}

a:hover {
	color: inherit;
}

img,
svg,
video,
iframe {
	display: block;
	max-width: 100%;
}

button,
input,
select,
textarea {
	font: inherit;
}

button {
	color: inherit;
}

button:not(:disabled) {
	cursor: pointer;
}

input,
select,
textarea {
	color: var(--ui-text);
}

[hidden] {
	display: none !important;
}


/*=========================================================
=
= TYPE
=
=========================================================*/

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 0.65rem;
	color: var(--ui-text-strong);
	font-weight: 800;
	line-height: var(--line-height-tight);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
h5 { font-size: 0.95rem; }
h6 { font-size: 0.85rem; }

p {
	margin: 0 0 1rem;
}

small,
.small {
	color: var(--ui-text-soft);
	font-size: var(--font-size-xs);
}

.text-muted,
.muted {
	color: var(--ui-text-muted) !important;
}

.text-soft {
	color: var(--ui-text-soft) !important;
}

.text-strong {
	color: var(--ui-text-strong) !important;
	font-weight: 800;
}


/*=========================================================
=
= APP SHELL
=
=========================================================*/

.app-shell {
	display: grid;
	grid-template-columns: var(--shell-sidebar-width) minmax(0, 1fr);
	min-height: 100vh;
}

.main-area {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.content {
	width: 100%;
	max-width: var(--shell-content-max-width);
	padding: var(--space-6);
	background: var(--ui-content-bg);
}

body.sidebar-collapsed .app-shell {
	grid-template-columns: var(--shell-sidebar-collapsed-width) minmax(0, 1fr);
}


/*=========================================================
=
= GRID SYSTEM
=
=========================================================*/

.content-grid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: var(--space-4);
}

.col-1 { grid-column: span 1; }
.col-2 { grid-column: span 2; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-10 { grid-column: span 10; }
.col-11 { grid-column: span 11; }
.col-12 { grid-column: span 12; }


/*=========================================================
=
= SIDEBAR
=
=========================================================*/

.sidebar {
	position: sticky;
	top: 0;
	height: 100vh;
	overflow: auto;
	padding: 22px 16px;
	background:
		linear-gradient(180deg, rgba(250, 166, 28, 0.08), transparent 260px),
		var(--ui-sidebar-bg);
	color: var(--ui-sidebar-text);
	border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand,
.brand {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-bottom: 26px;
	color: var(--ui-sidebar-text);
	font-size: 20px;
	font-weight: 850;
	letter-spacing: -0.03em;
}

.sidebar-logo {
	width: 100%;
	max-width: 142px;
	height: auto;
}

.logo-mark,
.brand-badge {
	position: relative;
	width: 36px;
	height: 36px;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--ui-brand), #ffcf75);
	box-shadow: 0 10px 26px rgba(250, 166, 28, 0.3);
}

.sidebar-group {
	margin-top: 24px;
}

.sidebar-group-title {
	margin: 0 0 5px;
	padding: 0 12px;
	color: var(--ui-sidebar-muted);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.sidebar-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 36px;
	padding: 7px 12px;
	border-radius: var(--radius-md);
	color: rgba(255, 255, 255, 0.78);
	font-size: 14px;
	font-weight: 650;
	transition:
		background var(--transition-fast),
		color var(--transition-fast),
		transform var(--transition-fast);
}

.sidebar-link:hover {
	background: rgba(255, 255, 255, 0.08);
	color: var(--ui-sidebar-text);
	transform: translateX(2px);
}

.sidebar-link.is-active {
	background: linear-gradient(135deg, rgba(250, 166, 28, 0.18), rgba(250, 166, 28, 0.08));
	color: var(--ui-white);
	box-shadow: inset 3px 0 0 var(--ui-sidebar-active);
}

.sidebar-link-left {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.sidebar-icon {
	width: 9px;
	height: 9px;
	border-radius: var(--radius-pill);
	background: currentColor;
	opacity: 0.65;
	flex: 0 0 auto;
}

.sidebar-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 7px;
	border-radius: var(--radius-pill);
	background: var(--ui-brand);
	color: var(--ui-gray-900);
	font-size: 11px;
	font-weight: 850;
}

body.sidebar-collapsed .sidebar {
	padding-left: 10px;
	padding-right: 10px;
}

body.sidebar-collapsed .sidebar-group-title,
body.sidebar-collapsed .sidebar-link span:not(.sidebar-icon),
body.sidebar-collapsed .brand > :not(.brand-badge) {
	display: none;
}

body.sidebar-collapsed .sidebar-link,
body.sidebar-collapsed .sidebar-brand,
body.sidebar-collapsed .brand {
	justify-content: center;
}

body.sidebar-collapsed .sidebar-logo {
	max-width: 42px;
}


/*=========================================================
=
= TOPBAR
=
=========================================================*/

.topbar {
	position: sticky;
	top: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	min-height: var(--shell-topbar-height);
	padding: 0 22px;
	background: #ffffff;
	border-bottom: 1px solid #e4e8ef;
}

.topbar-left,
.topbar-right {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.topbar-right {
	justify-content: flex-end;
	margin-left: auto;
}

.topbar-left {
	flex: 1 1 auto;
}

.topbar-right {
	flex: 0 0 auto;
}

.page-title {
	display: block;
	margin: 0;
	color: var(--ui-text-strong);

	font-size: 1.6rem;
	font-weight: 800;
	line-height: 1;

	letter-spacing: -0.03em;
	white-space: nowrap;
}


/* ==========================================================================
   TOPBAR — GLOBAL SEARCH
   ========================================================================== */

.topbar-left {
	display: flex;
	align-items: center;
	flex: 1 1 auto;
	min-width: 0;
}

.topbar-search {
	display: flex;
	flex: 1 1 auto;
	align-items: flex-end;
	gap: 8px;
	min-width: 0;
}

.topbar-divider {
	flex: 0 0 auto;
	width: 1px;
	height: 28px;
	margin: 0 18px;
	background: var(--ui-border);
}

.topbar-search-group {
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.topbar-search-group-grow {
	flex: 1 1 720px;
	min-width: 260px;
	max-width: 720px;
}

.topbar-search-label {
	display: block;
	margin: 0;
	color: var(--ui-text-muted);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.035em;
	line-height: 1.2;
	text-transform: uppercase;
	white-space: nowrap;
}

.topbar-search-select {
	width: 150px;
	min-width: 150px;
	height: 38px;
	min-height: 38px;
}

.topbar-search-input {
	width: 100%;
	min-width: 260px;
	height: 38px;
	min-height: 38px;
}

.topbar-search-submit {
	display: inline-flex;
	flex: 0 0 38px;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	min-height: 38px;
	padding: 0;
	border: 1px solid var(--vs-accent, #faa61c);
	border-radius: 7px;
	background: var(--vs-accent, #faa61c);
	color: var(--vs-bg-darker, #1f1d1e);
	box-shadow: 0 5px 14px rgba(250, 166, 28, 0.22);
	cursor: pointer;
	transition:
		background-color 160ms ease,
		border-color 160ms ease,
		box-shadow 160ms ease,
		transform 160ms ease;
}

.topbar-search-submit:hover {
	border-color:
		var(--vs-accent-light, #ffb73f);
	background:
		var(--vs-accent-light, #ffb73f);
	box-shadow: 0 7px 18px rgba(250, 166, 28, 0.3);
	transform: translateY(-1px);
}

.topbar-search-submit:focus-visible {
	outline: 3px solid rgba(250, 166, 28, 0.25);
	outline-offset: 2px;
}

.topbar-search-submit i,
.topbar-search-submit svg {
	display: block;
	width: 18px;
	height: 18px;
	color: currentColor;
	stroke: currentColor;
	stroke-width: 2.4;
}

.visually-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

@media (max-width: 1450px) {
	.topbar-search-group-grow {
		flex-basis: 420px;
		max-width: 420px;
	}
}

@media (max-width: 1180px) {
	.topbar {
		align-items: flex-start;
		height: auto;
		padding-top: 12px;
		padding-bottom: 12px;
	}

	.topbar-left {
		flex-wrap: wrap;
	}

	.topbar-divider {
		display: none;
	}

	.topbar-search {
		flex: 1 1 100%;
		flex-wrap: wrap;
		margin-top: 10px;
	}

	.topbar-search-group-grow {
		flex: 1 1 360px;
		max-width: none;
	}
}

@media (max-width: 760px) {
	.topbar-search,
	.topbar-search-group,
	.topbar-search-group-grow,
	.topbar-search-select,
	.topbar-search-input,
	.topbar-search-submit {
		width: 100%;
		max-width: none;
		min-width: 0;
	}

	.topbar-search-submit {
		flex-basis: auto;
	}
}


/*=========================================================
=
= TOPBAR BUTTONS
=
=========================================================*/

.menu-button,
.icon-button,
.close-button,
.topbar-avatar-btn,
.topbar-profile-button {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid #d9e1ec;
	border-radius: 6px;
	background: #ffffff;
	color: #27364a;
	box-shadow: none;
	cursor: pointer;
	overflow: hidden;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.menu-button:hover,
.icon-button:hover,
.close-button:hover,
.topbar-avatar-btn:hover,
.topbar-profile-button:hover {
	background: #f6f8fb;
	border-color: #c9d3e0;
	transform: none;
}

.menu-button::before { top: 10px; }
.menu-button span { top: 16px; }
.menu-button::after { top: 22px; }

.close-button::before,
.close-button::after {
	content: "";
	position: absolute;
	width: 16px;
	height: 2px;
	border-radius: 999px;
	background: currentColor;
}

.close-button::before { transform: rotate(45deg); }
.close-button::after { transform: rotate(-45deg); }


/*=========================================================
=
= PARENT PORTAL STATUS — ADMIN TOPBAR
=
=========================================================*/

.topbar-parent-portal-status
{
	display: inline-flex;
	align-items: center;
	gap: 9px;

	min-height: 38px;
	padding: 6px 12px;

	border: 1px solid #d9e1ec;
	border-radius: 7px;

	background: #ffffff;

	color: var(--ui-text-strong);
	text-decoration: none;

	transition:
		border-color 160ms ease,
		background-color 160ms ease,
		box-shadow 160ms ease;
}

.topbar-parent-portal-status:hover
{
	border-color: #c9d3e0;
	background: #f8fafc;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.topbar-parent-portal-status-dot
{
	width: 10px;
	height: 10px;
	flex: 0 0 10px;

	border-radius: 50%;

	background: #16a34a;
	box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

.topbar-parent-portal-status-text
{
	display: flex;
	flex-direction: column;

	line-height: 1.05;
}

.topbar-parent-portal-status-text small
{
	color: var(--ui-text-muted);
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.topbar-parent-portal-status-text strong
{
	margin-top: 3px;

	color: var(--ui-text-strong);
	font-size: 12px;
	font-weight: 800;
}


/* Notice */

.topbar-parent-portal-status[data-mode="notice"]
	.topbar-parent-portal-status-dot
{
	background: #2563eb;
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.13);
}


/* Limited */

.topbar-parent-portal-status[data-mode="limited"]
	.topbar-parent-portal-status-dot
{
	background: #f59e0b;
	box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}


/* Maintenance */

.topbar-parent-portal-status[data-mode="maintenance"]
	.topbar-parent-portal-status-dot
{
	background: #ea580c;
	box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.15);
}


/* Closed */

.topbar-parent-portal-status[data-mode="closed"]
	.topbar-parent-portal-status-dot
{
	background: #dc2626;
	box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15);
}

/*=========================================================
=
= TOPBAR PROFILE
=
=========================================================*/

.topbar-user {
	position: relative;
}

.topbar-profile-button {
	overflow: visible;
}

.topbar-search-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.topbar-search-submit svg {
	width: 16px;
	height: 16px;
	stroke-width: 2.4;
	color: #ffffff;
}

.topbar-profile-image {
	width: 100%;
	height: 100%;
	border-radius: 6px;
	object-fit: cover;
}

.topbar-profile-initial {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border-radius: 6px;
	background: #1f2937;
	color: #ffffff;
	font-weight: 800;
}

.topbar-profile-status {
	position: absolute;
	right: -2px;
	bottom: -2px;
	width: 9px;
	height: 9px;
	border: 2px solid #ffffff;
	border-radius: 999px;
	background: #16a34a;
}


/*=========================================================
=
= TOPBAR USER DROPDOWN
=
=========================================================*/

.user-chip,
.user-dropdown-toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.user-name {
	display: none;
}

.avatar,
.topbar-avatar-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: 1px solid #d9e1ec;
	border-radius: 6px;
	background: #ffffff;
	color: #27364a;
	font-weight: 800;
	overflow: hidden;
}

.topbar-user-dropdown {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	z-index: 200;
	display: none;
	width: 250px;
	padding: 8px;
	border: 1px solid #d9e1ec;
	border-radius: 6px;
	background: #ffffff;
	box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

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

.topbar-user-dropdown-head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px;
	border-radius: 6px;
	background: #eef2f6;
}

.topbar-user-dropdown-name {
	color: #1f2937;
	font-size: 14px;
	font-weight: 700;
}

.topbar-user-dropdown-role {
	margin-top: 2px;
	color: #4b5563;
	font-size: 13px;
}

.topbar-user-dropdown a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px;
	border-radius: 5px;
	color: #374151;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
}

.topbar-user-dropdown a:hover {
	background: #f3f6fa;
}

.topbar-user-dropdown a.is-danger {
	color: #dc2626;
}

.topbar-user-dropdown-divider {
	height: 1px;
	margin: 8px 0;
	background: #e5e7eb;
}


/*=========================================================
=
= PAGE HEADER / TOOLBAR
=
=========================================================*/

.profile-header-bar,
.ui-page-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--space-4);
	flex-wrap: wrap;
	margin-bottom: var(--space-5);
	padding: var(--space-5);
	border: 1px solid var(--ui-border);
	border-radius: var(--radius-lg);
	background:
		linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 249, 251, 0.96)),
		var(--ui-card-bg);
	box-shadow: var(--shadow-sm);
}

.profile-header-left,
.ui-page-header-left {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	min-width: 0;
}

.profile-page-title,
.ui-page-title {
	color: var(--ui-text-strong);
	font-size: 24px;
	font-weight: 900;
	letter-spacing: -0.04em;
}

.profile-record-id,
.ui-page-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 32px;
	padding: 7px 12px;
	border: 1px solid var(--ui-brand-border);
	border-radius: var(--radius-pill);
	background: var(--ui-brand-soft);
	color: #815200;
	font-size: 12px;
	font-weight: 850;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.profile-empty-actions,
.ui-action-bar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	flex-wrap: wrap;
	margin-left: auto;
}


/*=========================================================
=
= CARDS
=
=========================================================*/

.card {
	min-width: 0;
	border: 1px solid var(--ui-border);
	border-radius: var(--radius-lg);
	background: var(--ui-card-bg);
	box-shadow: var(--shadow-sm);
	overflow: hidden;
}

.card-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--space-4);
	padding: 18px 20px;
	border-bottom: 1px solid var(--ui-border);
	background: linear-gradient(180deg, var(--ui-white), var(--ui-gray-50));
}

.card-title {
	margin: 0;
	color: var(--ui-text-strong);
	font-size: 16px;
	font-weight: 850;
	letter-spacing: -0.015em;
}

.card-subtitle {
	margin: 4px 0 0;
	color: var(--ui-text-soft);
	font-size: 13px;
	font-weight: 500;
}

.card-body {
	padding: 20px;
}

.card-footer {
	padding: 16px 20px;
	border-top: 1px solid var(--ui-border);
	background: var(--ui-card-soft);
}

.card-soft,
.ui-panel {
	border: 1px solid var(--ui-border);
	border-radius: var(--radius-lg);
	background: var(--ui-card-soft);
	padding: var(--space-4);
}

.card-accent-primary,
.card-accent-brand,
.card-accent-danger,
.card-accent-success {
	position: relative;
}

.card-accent-primary::before,
.card-accent-brand::before,
.card-accent-danger::before,
.card-accent-success::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
}

.card-accent-primary::before { background: var(--ui-primary); }
.card-accent-brand::before { background: var(--ui-brand); }
.card-accent-danger::before { background: var(--ui-danger); }
.card-accent-success::before { background: var(--ui-success); }


/*=========================================================
=
= BUTTONS
=
=========================================================*/

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 40px;
	padding: 9px 14px;
	border: 1px solid var(--ui-border-strong);
	border-radius: var(--radius-md);
	background: var(--ui-white);
	color: var(--ui-text-strong);
	box-shadow: var(--shadow-xs);
	font-size: 13px;
	font-weight: 750;
	line-height: 1.2;
	white-space: nowrap;
	transition:
		background var(--transition-fast),
		border-color var(--transition-fast),
		box-shadow var(--transition-fast),
		transform var(--transition-fast),
		color var(--transition-fast);
}

.btn:hover {
	background: var(--ui-gray-50);
	border-color: var(--ui-gray-300);
	box-shadow: var(--shadow-sm);
	transform: translateY(-1px);
}

.btn:disabled,
.btn[disabled] {
	cursor: not-allowed;
	opacity: 0.55;
	transform: none;
	box-shadow: none;
}

.btn-primary {
	border-color: transparent;
	background: linear-gradient(135deg, var(--ui-gray-900), var(--ui-gray-800));
	color: var(--ui-white);
	box-shadow: 0 8px 20px rgba(23, 23, 23, 0.2);
}

.btn-primary:hover {
	background: linear-gradient(135deg, var(--ui-gray-800), var(--ui-gray-900));
	color: var(--ui-white);
	box-shadow: 0 12px 28px rgba(23, 23, 23, 0.26);
}

.btn-brand {
	border-color: transparent;
	background: linear-gradient(135deg, var(--ui-brand), #ffbf53);
	color: var(--ui-gray-900);
	box-shadow: 0 8px 22px rgba(250, 166, 28, 0.28);
}

.btn-brand:hover {
	background: linear-gradient(135deg, var(--ui-brand-hover), var(--ui-brand));
	color: var(--ui-gray-900);
}

.btn-soft {
	background: var(--ui-gray-50);
	color: var(--ui-text-strong);
}

.btn-danger,
.btn-danger-soft {
	border-color: var(--ui-danger-border);
	background: var(--ui-danger-soft);
	color: #9f1d2a;
}

.btn-success-soft {
	border-color: var(--ui-success-border);
	background: var(--ui-success-soft);
	color: #0f5132;
}

.btn-square {
	width: 40px;
	padding: 0;
}

.btn-sm,
.order-action-btn {
	min-height: 32px;
	padding: 6px 10px;
	border-radius: var(--radius-sm);
	font-size: 12px;
}


/*=========================================================
=
= FORMS
=
=========================================================*/

.form-grid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: var(--space-4);
}

.field-label,
.form-label,
.topbar-search-label {
	display: block;
	margin-bottom: 6px;
	color: var(--ui-text-soft);
	font-size: 11px;
	font-weight: 850;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.field-control,
.select-control,
.form-control,
.form-select,
textarea,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="password"],
select {
	display: block;
	width: 100%;
	min-height: 42px;
	padding: 9px 12px;
	border: 1px solid var(--ui-border);
	border-radius: var(--radius-md);
	background: var(--ui-white);
	color: var(--ui-text);
	box-shadow: var(--shadow-xs);
	font-size: 14px;
	font-weight: 500;
	outline: none;
	transition:
		border-color var(--transition-fast),
		box-shadow var(--transition-fast),
		background var(--transition-fast);
}

select,
.select-control,
.form-select {
	padding-right: 36px;
	background-image:
		linear-gradient(45deg, transparent 50%, var(--ui-text-soft) 50%),
		linear-gradient(135deg, var(--ui-text-soft) 50%, transparent 50%);
	background-position:
		calc(100% - 18px) 18px,
		calc(100% - 13px) 18px;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	appearance: none;
}

textarea {
	min-height: 120px;
	resize: vertical;
}

.field-control:focus,
.select-control:focus,
.form-control:focus,
.form-select:focus,
textarea:focus,
input:focus,
select:focus {
	border-color: var(--ui-brand);
	box-shadow: 0 0 0 4px rgba(250, 166, 28, 0.16);
}

.field-help {
	margin-top: 6px;
	color: var(--ui-text-muted);
	font-size: 12px;
}

.form-actions,
.modal-foot {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	flex-wrap: wrap;
}


/*=========================================================
=
= TABLES
=
=========================================================*/

.table,
.order-viewer-table,
.po-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	background: var(--ui-white);
	font-size: 13px;
}

.table th,
.table td,
.order-viewer-table th,
.order-viewer-table td,
.po-table th,
.po-table td {
	padding: 13px 14px;
	border-bottom: 1px solid var(--ui-border);
	color: var(--ui-text);
	text-align: left;
	vertical-align: middle;
}

.table thead th,
.order-viewer-table thead th,
.po-table thead th {
	position: sticky;
	top: 0;
	z-index: 1;
	background: var(--ui-gray-50);
	color: var(--ui-text-soft);
	font-size: 11px;
	font-weight: 850;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	white-space: nowrap;
}

.table tbody tr,
.order-viewer-table tbody tr,
.po-table tbody tr {
	transition: background var(--transition-fast);
}

.table tbody tr:hover,
.order-viewer-table tbody tr:hover,
.po-table tbody tr:hover {
	background: #fffaf0;
}

.table tbody tr:last-child td,
.order-viewer-table tbody tr:last-child td,
.po-table tbody tr:last-child td {
	border-bottom: 0;
}

.table small,
.order-viewer-table small,
.po-table small {
	color: var(--ui-text-muted);
	font-weight: 500;
}

.table-responsive,
.po-table-wrapper {
	width: 100%;
	overflow-x: auto;
	border: 1px solid var(--ui-border);
	border-radius: var(--radius-lg);
	background: var(--ui-white);
	box-shadow: var(--shadow-xs);
}


/*=========================================================
=
= PILLS / BADGES / STATUS
=
=========================================================*/

.pill,
.badge,
.profile-tab-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 24px;
	padding: 4px 9px;
	border: 1px solid transparent;
	border-radius: var(--radius-pill);
	font-size: 11px;
	font-weight: 850;
	line-height: 1;
	letter-spacing: 0.01em;
	white-space: nowrap;
}

.badge-primary,
.pill-primary {
	border-color: var(--ui-primary-border);
	background: var(--ui-primary-soft);
	color: #084298;
}

.badge-success,
.pill-success,
.pill-payment-paid,
.pill-order-completed,
.pill-order-ready,
.pill-order-received {
	border-color: var(--ui-success-border);
	background: var(--ui-success-soft);
	color: #0f5132;
}

.badge-warning,
.pill-warning,
.pill-order-captured,
.pill-order-pending,
.pill-order-in_production,
.pill-order-in-production,
.pill-order-preparing_artwork,
.pill-order-preparing-artwork {
	border-color: var(--ui-warning-border);
	background: var(--ui-warning-soft);
	color: #7a4f00;
}

.badge-danger,
.pill-danger,
.pill-payment-unpaid,
.pill-order-cancelled,
.pill-order-void {
	border-color: var(--ui-danger-border);
	background: var(--ui-danger-soft);
	color: #842029;
}

.badge-info,
.pill-info,
.pill-order-source,
.pill-order-waiting_for_supplier,
.pill-order-waiting-for-supplier {
	border-color: var(--ui-info-border);
	background: var(--ui-info-soft);
	color: #055160;
}

.badge-dark,
.pill-dark,
.pill-neutral {
	border-color: var(--ui-gray-300);
	background: var(--ui-gray-100);
	color: var(--ui-gray-700);
}


/*=========================================================
=
= ALERTS
=
=========================================================*/

.alert {
	position: relative;
	margin-bottom: var(--space-4);
	padding: 14px 16px;
	border: 1px solid var(--ui-border);
	border-radius: var(--radius-lg);
	background: var(--ui-white);
	color: var(--ui-text);
	box-shadow: var(--shadow-xs);
	font-size: 14px;
	font-weight: 600;
}

.alert.success {
	border-color: var(--ui-success-border);
	background: var(--ui-success-soft);
	color: #0f5132;
}

.alert.warning {
	border-color: var(--ui-warning-border);
	background: var(--ui-warning-soft);
	color: #7a4f00;
}

.alert.danger {
	border-color: var(--ui-danger-border);
	background: var(--ui-danger-soft);
	color: #842029;
}

.alert.info {
	border-color: var(--ui-info-border);
	background: var(--ui-info-soft);
	color: #055160;
}


/*=========================================================
=
= TABS
=
=========================================================*/

.tabs,
.profile-main-tabs,
.ui-tabs {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	margin-bottom: var(--space-5);
	padding: 6px;
	border: 1px solid var(--ui-border);
	border-radius: var(--radius-lg);
	background: var(--ui-gray-50);
}

.tab,
.profile-main-tab,
.ui-tab {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 38px;
	padding: 9px 13px;
	border: 1px solid transparent;
	border-radius: var(--radius-md);
	background: transparent;
	color: var(--ui-text-soft);
	font-size: 13px;
	font-weight: 800;
	white-space: nowrap;
	transition:
		background var(--transition-fast),
		color var(--transition-fast),
		box-shadow var(--transition-fast);
}

.tab:hover,
.profile-main-tab:hover,
.ui-tab:hover {
	background: var(--ui-white);
	color: var(--ui-text-strong);
}

.tab.is-active,
.profile-main-tab.is-active,
.ui-tab.is-active {
	background: var(--ui-white);
	color: var(--ui-text-strong);
	box-shadow: var(--shadow-xs);
}

.profile-tab-count {
	min-width: 22px;
	height: 22px;
	padding: 0 7px;
	background: var(--ui-gray-100);
	color: var(--ui-text-soft);
}

.profile-main-tab.is-active .profile-tab-count,
.tab.is-active .profile-tab-count {
	background: var(--ui-brand);
	color: var(--ui-gray-900);
}


/*=========================================================
=
= DETAIL CARDS / SUMMARY BLOCKS
=
=========================================================*/

.profile-detail-item,
.ui-detail-card,
.dashboard-summary-card,
.order-compact-summary > div {
	height: 100%;
	padding: 16px;
	border: 1px solid var(--ui-border);
	border-radius: var(--radius-lg);
	background:
		linear-gradient(180deg, var(--ui-white), var(--ui-gray-50));
	box-shadow: var(--shadow-xs);
}

.profile-detail-label,
.ui-detail-label,
.dashboard-summary-label,
.order-compact-summary span {
	display: block;
	margin-bottom: 7px;
	color: var(--ui-text-soft);
	font-size: 11px;
	font-weight: 850;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.profile-detail-value,
.ui-detail-value,
.dashboard-summary-value,
.order-compact-summary strong {
	display: block;
	color: var(--ui-text-strong);
	font-size: 15px;
	font-weight: 850;
	line-height: var(--line-height-tight);
	word-break: break-word;
}

.order-compact-summary {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--space-4);
}

.order-compact-summary small {
	display: block;
	margin-top: 6px;
	color: var(--ui-text-muted);
	font-size: 12px;
	line-height: 1.45;
}


/*=========================================================
=
= PROFILE / MEDIA CARDS
=
=========================================================*/

.profile-viewer-layout {
	display: grid;
	grid-template-columns: 320px minmax(0, 1fr);
	gap: var(--space-5);
	align-items: start;
}

.profile-main-column {
	display: grid;
	gap: var(--space-5);
	min-width: 0;
}

.profile-summary-card {
	position: sticky;
	top: calc(var(--shell-topbar-height) + var(--space-5));
	border-radius: var(--radius-xl);
	overflow: hidden;
}

.profile-summary-photo {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 370px;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	border-bottom: 1px solid var(--ui-border);
	background: linear-gradient(135deg, var(--ui-gray-100), var(--ui-gray-50));
	color: var(--ui-text-muted);
	font-size: 42px;
	font-weight: 900;
}

.profile-summary-photo-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
}

.profile-summary-head,
.profile-summary-body {
	padding: 18px 20px;
}

.profile-summary-head {
	border-bottom: 1px solid var(--ui-border);
	background: var(--ui-white);
}

.profile-summary-name {
	margin: 0;
	color: var(--ui-text-strong);
	font-size: 22px;
	font-weight: 900;
	letter-spacing: -0.04em;
}

.profile-summary-subtitle {
	margin-top: 6px;
	color: var(--ui-text-soft);
	font-size: 13px;
	font-weight: 650;
}

.profile-summary-status {
	margin-top: 12px;
}

.profile-summary-body {
	background: var(--ui-gray-50);
}

.profile-summary-meta {
	display: grid;
	gap: 10px;
}

.profile-summary-meta-row {
	display: grid;
	grid-template-columns: 105px minmax(0, 1fr);
	gap: 10px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--ui-border);
	font-size: 13px;
}

.profile-summary-meta-row:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.profile-summary-meta-label {
	color: var(--ui-text-soft);
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.profile-summary-meta-value {
	color: var(--ui-text-strong);
	font-weight: 750;
	word-break: break-word;
}


/*=========================================================
=
= LIST CARDS / TICKETS / NOTES
=
=========================================================*/

.profile-parent-list,
.profile-ticket-list,
.profile-note-list {
	display: grid;
	gap: var(--space-4);
}

.profile-parent-item,
.profile-ticket-card {
	display: block;
	padding: 17px;
	border: 1px solid var(--ui-border);
	border-radius: var(--radius-lg);
	background: var(--ui-white);
	box-shadow: var(--shadow-xs);
	transition:
		background var(--transition-fast),
		border-color var(--transition-fast),
		box-shadow var(--transition-fast),
		transform var(--transition-fast);
}

.profile-ticket-card-link:hover,
.profile-ticket-card:hover {
	border-color: var(--ui-brand-border);
	box-shadow: var(--shadow-sm);
	transform: translateY(-1px);
}

.profile-ticket-card-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--space-4);
	margin-bottom: var(--space-3);
}

.profile-ticket-ref {
	margin-bottom: 5px;
	color: var(--ui-text-soft);
	font-size: 11px;
	font-weight: 850;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.profile-ticket-subject,
.profile-parent-name {
	margin: 0;
	color: var(--ui-text-strong);
	font-size: 16px;
	font-weight: 850;
}

.profile-ticket-badges {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
	flex-wrap: wrap;
}

.profile-ticket-description,
.profile-parent-meta {
	margin-top: 10px;
	padding: 13px 14px;
	border: 1px solid var(--ui-border);
	border-radius: var(--radius-md);
	background: var(--ui-gray-50);
	color: var(--ui-text);
	font-size: 13px;
	line-height: 1.6;
}

.profile-ticket-date {
	margin-top: 10px;
	color: var(--ui-text-soft);
	font-size: 12px;
	font-weight: 600;
}

.profile-pinned-note-card {
	border-color: var(--ui-warning-border);
	background: var(--ui-warning-soft);
}

.profile-pinned-note-body {
	display: grid;
	gap: 10px;
}

.profile-pinned-note-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.profile-pinned-note-meta {
	color: #7a4f00;
	font-size: 12px;
	font-weight: 700;
}

.profile-pinned-note-text {
	color: var(--ui-text-strong);
	font-size: 14px;
	font-weight: 650;
	line-height: 1.7;
}


/*=========================================================
=
= PHOTO CARDS
=
=========================================================*/

.profile-photo-grid,
.profile-photo-grid-rich {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: var(--space-4);
}

.profile-photo-card,
.profile-photo-card-rich {
	border: 1px solid var(--ui-border);
	border-radius: var(--radius-lg);
	background: var(--ui-white);
	box-shadow: var(--shadow-xs);
	overflow: hidden;
}

.profile-photo-thumb-button {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
}

.profile-photo-thumb-wrap,
.profile-photo-thumb-wrap-rich {
	position: relative;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: var(--ui-gray-100);
}

.profile-photo-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	transition: transform var(--transition-base);
}

.profile-photo-card:hover .profile-photo-thumb {
	transform: scale(1.025);
}

.profile-photo-letter-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: var(--radius-pill);
	background: var(--ui-brand);
	color: var(--ui-gray-900);
	box-shadow: var(--shadow-sm);
	font-weight: 900;
}

.profile-photo-meta,
.profile-photo-meta-rich {
	display: grid;
	gap: 12px;
	padding: 14px;
}

.profile-photo-title-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
}

.profile-photo-title {
	color: var(--ui-text-strong);
	font-size: 15px;
	font-weight: 850;
}

.profile-photo-subtitle {
	margin-top: 3px;
	color: var(--ui-text-soft);
	font-size: 12px;
	font-weight: 600;
}

.profile-photo-status-list,
.profile-photo-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

.profile-photo-status-chip {
	display: inline-flex;
	padding: 4px 8px;
	border-radius: var(--radius-pill);
	background: var(--ui-gray-100);
	color: var(--ui-text-soft);
	font-size: 11px;
	font-weight: 750;
}


/*=========================================================
=
= MODALS
=
=========================================================*/

.modal-shell {
	position: fixed;
	inset: 0;
	z-index: 1200;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--space-6);
	background: rgba(17, 24, 39, 0.52);
	backdrop-filter: blur(8px);
}

.modal-panel {
	width: min(720px, 100%);
	max-height: 92vh;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: var(--radius-xl);
	background: var(--ui-white);
	box-shadow: var(--shadow-lg);
}

.modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	padding: 18px 20px;
	border-bottom: 1px solid var(--ui-border);
	background: linear-gradient(180deg, var(--ui-white), var(--ui-gray-50));
}

.modal-head strong {
	color: var(--ui-text-strong);
	font-size: 16px;
	font-weight: 850;
}

.modal-body {
	padding: 20px;
	overflow-y: auto;
}

.modal-foot {
	padding: 16px 20px;
	border-top: 1px solid var(--ui-border);
	background: var(--ui-gray-50);
}


/*=========================================================
=
= ACTIVITY / LOGS
=
=========================================================*/

.profile-log-table {
	border: 1px solid var(--ui-border);
	border-radius: var(--radius-lg);
	background: var(--ui-white);
	box-shadow: var(--shadow-xs);
	overflow: hidden;
}

.profile-log-table-head,
.profile-log-row-summary {
	display: grid;
	grid-template-columns: 180px 220px 170px minmax(0, 1fr);
}

.profile-log-table-head {
	background: var(--ui-gray-50);
	border-bottom: 1px solid var(--ui-border);
	color: var(--ui-text-soft);
	font-size: 11px;
	font-weight: 850;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.profile-log-table-head > div,
.profile-log-col {
	padding: 12px 14px;
}

.profile-log-row {
	border-bottom: 1px solid var(--ui-border);
}

.profile-log-row:last-child {
	border-bottom: 0;
}

.profile-log-row-summary {
	list-style: none;
	cursor: pointer;
	background: var(--ui-white);
}

.profile-log-row-summary::-webkit-details-marker {
	display: none;
}

.profile-log-row-summary:hover,
.profile-log-row[open] .profile-log-row-summary {
	background: #fffaf0;
}

.profile-log-row-details {
	display: grid;
	gap: 12px;
	padding: 14px;
	border-top: 1px solid var(--ui-border);
	background: var(--ui-gray-50);
}

.profile-log-json {
	margin: 0;
	padding: 12px;
	border-radius: var(--radius-md);
	background: #111827;
	color: #e5e7eb;
	font-size: 12px;
	line-height: 1.5;
	overflow-x: auto;
}


/*=========================================================
=
= ORDER HELPERS
=
=========================================================*/

.orders-unallocated-cell,
.order-footer-action-cell,
.orders-action-cell {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	width: 100%;
}

.orders-allocation-dot {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: var(--radius-pill);
	background: var(--ui-success);
	box-shadow: 0 0 0 4px rgba(25, 135, 84, 0.14);
}

.order-summary-pill-row {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	margin-top: 10px;
}

.order-total-row th {
	background: var(--ui-gray-50);
}

.order-payment-row th {
	background: var(--ui-success-soft);
	color: #0f5132;
}

.order-outstanding-row.is-paid th {
	background: var(--ui-success-soft);
	color: #0f5132;
}

.order-outstanding-row.is-outstanding th {
	background: var(--ui-danger-soft);
	color: #842029;
}

.order-unallocated-row th {
	background: var(--ui-info-soft);
	color: #055160;
}

.order-discount-row th {
	background: #fff1e5;
	color: #9a3412;
}

.order-group-heading-row td {
	background: var(--ui-gray-100);
	color: var(--ui-text-strong);
	font-weight: 850;
}

.order-group-child-row td:first-child {
	padding-left: 28px;
}

.order-group-child-marker {
	margin-right: 6px;
	color: var(--ui-text-muted);
	font-weight: 900;
}


/*=========================================================
=
= UTILITIES
=
=========================================================*/

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--space-1) !important; }
.mt-2 { margin-top: var(--space-2) !important; }
.mt-3 { margin-top: var(--space-3) !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.mt-5 { margin-top: var(--space-5) !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--space-1) !important; }
.mb-2 { margin-bottom: var(--space-2) !important; }
.mb-3 { margin-bottom: var(--space-3) !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }
.mb-5 { margin-bottom: var(--space-5) !important; }

.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }

.nowrap { white-space: nowrap !important; }
.w-100 { width: 100% !important; }


/*=========================================================
=
= RESPONSIVE
=
=========================================================*/

@media (max-width: 1280px) {

	.order-compact-summary {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.profile-summary-photo {
		min-height: 330px;
	}

}

@media (max-width: 1180px) {

	.profile-viewer-layout {
		grid-template-columns: 1fr;
	}

	.profile-summary-card {
		position: relative;
		top: 0;
	}

}

@media (max-width: 980px) {

	.app-shell {
		grid-template-columns: 1fr;
	}

	.sidebar {
		position: fixed;
		inset: 0 auto 0 0;
		z-index: 1100;
		width: min(310px, 88vw);
		transform: translateX(-100%);
		transition: transform var(--transition-base);
	}

	body.sidebar-mobile-open .sidebar {
		transform: translateX(0);
	}

	.content {
		padding: var(--space-4);
	}

	.content-grid,
	.form-grid {
		grid-template-columns: 1fr;
	}

	[class^="col-"],
	[class*=" col-"] {
		grid-column: span 1;
	}

	.profile-header-bar,
	.ui-page-header {
		padding: var(--space-4);
	}

	.profile-empty-actions,
	.ui-action-bar {
		justify-content: flex-start;
		margin-left: 0;
	}

}

@media (max-width: 760px) {

	.topbar {
		padding: 0 var(--space-4);
	}

	.profile-page-title,
	.ui-page-title {
		font-size: 21px;
	}

	.order-compact-summary {
		grid-template-columns: 1fr;
	}

	.tabs,
	.profile-main-tabs {
		flex-wrap: nowrap;
		overflow-x: auto;
	}

	.profile-ticket-card-top,
	.profile-pinned-note-head {
		flex-direction: column;
		align-items: flex-start;
	}

	.profile-log-table-head {
		display: none;
	}

	.profile-log-row-summary {
		grid-template-columns: 1fr;
	}

	.profile-summary-meta-row {
		grid-template-columns: 1fr;
	}

}

/*=========================================================
=
= VOTION UI ICON SYSTEM
=
=========================================================*/

:root {
	--icon-xs: 14px;
	--icon-sm: 16px;
	--icon-md: 18px;
	--icon-lg: 20px;
	--icon-xl: 24px;
}

.ui-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	line-height: 1;
}

.ui-icon svg,
[data-lucide] {
	width: var(--icon-md);
	height: var(--icon-md);
	stroke-width: 2;
}

.ui-icon-button,
.menu-button,
.icon-button,
.topbar-icon-button,
.topbar-profile-button,
.topbar-avatar-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid var(--ui-border);
	border-radius: var(--radius-md);
	background: var(--ui-card-bg);
	color: var(--ui-text-muted);
	cursor: pointer;
	overflow: hidden;
	transition:
		background var(--transition-fast),
		border-color var(--transition-fast),
		color var(--transition-fast);
}

.ui-icon-button:hover,
.menu-button:hover,
.icon-button:hover,
.topbar-icon-button:hover,
.topbar-profile-button:hover,
.topbar-avatar-btn:hover {
	background: var(--ui-card-soft);
	border-color: var(--ui-border-strong);
	color: var(--ui-text-strong);
}

.ui-icon-button svg,
.menu-button svg,
.icon-button svg,
.topbar-icon-button svg {
	width: var(--icon-md);
	height: var(--icon-md);
	stroke-width: 2;
}

.profile-page-header {
	display: grid;
	grid-template-columns: 300px minmax(0, 1fr);
	gap: var(--space-4);
	align-items: stretch;
	margin-bottom: var(--space-4);
}

.profile-page-identity-card {
	display: grid;
	gap: 10px;
	align-content: center;
	min-height: 120px;
	padding: 22px;
	border-radius: var(--radius-lg);
	background: #2b292a;
	color: #ffffff;
}

.profile-page-name {
	font-size: 1.7rem;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.03em;
}

.profile-page-meta {
	color: rgba(255,255,255,.72);
	font-size: .95rem;
	font-weight: 600;
}

.profile-page-actions {
	display: flex;
	align-items: stretch;
	gap: 18px;
	min-height: 120px;
	padding: 18px;
	border-radius: var(--radius-lg);
	background: #2b292a;
	color: #ffffff;
}


.profile-action-group {
	display: grid;
	align-content: start;
	gap: 10px;
	min-width: 0;
}

.profile-action-group:first-child {
	flex: 1 1 auto;
}

.profile-action-group:last-child {
	flex: 0 0 260px;
}

.profile-page-actions .btn {
	min-height: 38px;
	border-radius: var(--radius-md);
	background: var(--ui-card-soft);
	color: var(--ui-text);
	box-shadow: none;
}

.profile-page-actions .btn:hover {
	background: var(--ui-card-bg);
	border-color: var(--ui-border-strong);
}

@media (max-width: 1180px) {
	.profile-page-header {
		grid-template-columns: 1fr;
	}
}

.profile-action-group-title {
	color: rgba(255,255,255,.62);
	font-size: .78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
}

.profile-action-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.profile-action-divider {
	width: 1px;
	background: rgba(255,255,255,.14);
}

.profile-page-actions .btn {
	min-height: 36px;
	padding: 8px 13px;
	border: 1px solid rgba(255,255,255,.18);
	border-radius: var(--radius-md);
	background: #ffffff;
	color: #2b292a;
	box-shadow: none;
	font-size: .88rem;
	font-weight: 700;
}

.profile-page-actions .btn:hover {
	background: #f4f4f4;
	border-color: rgba(255,255,255,.3);
}

@media (max-width: 900px) {
	.profile-page-actions {
		flex-direction: column;
	}

	.profile-action-group:last-child {
		flex-basis: auto;
	}

	.profile-action-divider {
		width: 100%;
		height: 1px;
	}
}

.profile-main-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--ui-border);
}

.profile-main-tab {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 38px;
	padding: 0 16px;
	border: 1px solid var(--ui-border);
	border-radius: 6px;
	background: #ffffff;
	color: var(--ui-text);
	font-size: .95rem;
	font-weight: 700;
	cursor: pointer;
}

.profile-main-tab:hover {
	background: var(--ui-card-soft);
}

.profile-main-tab.is-active {
	border-color: #1f73b7;
	background: #1f73b7;
	color: #ffffff;
}

.profile-tab-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: #e11d48;
	color: #ffffff;
	font-size: 11px;
	font-weight: 800;
	line-height: 1;
}

.profile-main-tab.is-active .profile-tab-count {
	background: #ffffff;
	color: #1f73b7;
}

.ui-detail-list {
	display: grid;
	gap: 10px;
}

.ui-detail-row {
	display: grid;
	grid-template-columns: 140px 1fr;
	align-items: center;
	gap: 18px;

	padding: 10px 0;

	border-bottom: 1px solid var(--ui-border-light);
}

.ui-detail-row:last-child {
	border-bottom: 0;
}

.ui-detail-label {
	color: var(--ui-text-muted);
	font-size: .9rem;
	font-weight: 600;
}

.ui-detail-value {
	color: var(--ui-text);
	font-size: .95rem;
	font-weight: 600;
}

.ui-detail-list {
	display: grid;
	gap: 0;
}

.ui-detail-row {
	display: grid;
	grid-template-columns: 190px minmax(0, 1fr);
	align-items: center;
	gap: 18px;
	padding: 7px 0;
	border-bottom: 1px solid var(--ui-border-light);
}

.ui-detail-row:last-child {
	border-bottom: 0;
}

.ui-detail-label {
	color: var(--ui-text-muted);
	font-size: 0.88rem;
	font-weight: 600;
	white-space: nowrap;
}

.ui-detail-value {
	color: var(--ui-text-strong);
	font-size: 1.05rem;
	font-weight: 650;
	line-height: 1.35;
	word-break: break-word;
}

.profile-page-header,
.profile-viewer-layout {
	grid-template-columns: 320px minmax(0, 1fr);
}

.profile-summary-card .ui-detail-row {
	display: block;
	padding: 8px 0;
}

.profile-summary-card .ui-detail-label {
	display: block;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
}

.profile-summary-card .ui-detail-value {
	display: block;
	margin-top: 2px;
	font-size: 0.88rem;
	font-weight: 700;
	line-height: 1.25;
}

.ui-record {
    border: 1px solid var(--ui-border);
    border-radius: var(--radius-lg);
    background: var(--ui-card-bg);
    overflow: hidden;
}

.ui-record + .ui-record {
    margin-top: 1.5rem;
}

.ui-record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 1rem 1.25rem;

    border-bottom: 1px solid var(--ui-border);

    background: var(--ui-card-header-bg);
}

.ui-record-title {
    font-size: 1.05rem;
    font-weight: 700;
}

.ui-record-badges {
    display: flex;
    gap: .5rem;
}

/* ==========================================================================
   GLOBAL TABLE SYSTEM
   ========================================================================== */

/*
|--------------------------------------------------------------------------
| Responsive Table Container
|--------------------------------------------------------------------------
|
| Keeps wide tables inside their card and allows horizontal scrolling on
| smaller screens.
|
*/

.table-responsive {
	width: 100%;
	overflow-x: auto;
	border: 1px solid var(--ui-border, #d8dde5);
	border-radius: 12px;
	background: var(--ui-white, #ffffff);
	-webkit-overflow-scrolling: touch;
}


/*
|--------------------------------------------------------------------------
| Standard Data Table
|--------------------------------------------------------------------------
*/

.ui-table {
	width: 100%;
	min-width: 760px;
	border-collapse: collapse;
	border-spacing: 0;
	background: var(--ui-white, #ffffff);
	color: var(--ui-text, #1f1d1e);
	font-size: 13px;
}


/*
|--------------------------------------------------------------------------
| Table Header
|--------------------------------------------------------------------------
*/

.ui-table thead {
	background:
		linear-gradient(
			180deg,
			var(--ui-white, #ffffff) 0%,
			var(--ui-gray-50, #f7f8fa) 100%
		);
}

.ui-table thead th {
	padding: 13px 16px;
	border-bottom: 1px solid var(--ui-border, #d8dde5);
	color: var(--ui-text-soft, #68707c);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.045em;
	line-height: 1.3;
	text-align: left;
	text-transform: uppercase;
	white-space: nowrap;
}


/*
|--------------------------------------------------------------------------
| Table Body
|--------------------------------------------------------------------------
*/

.ui-table tbody td {
	padding: 14px 16px;
	border-bottom: 1px solid var(--ui-border, #d8dde5);
	color: var(--ui-text, #1f1d1e);
	line-height: 1.45;
	text-align: left;
	vertical-align: middle;
}

.ui-table tbody tr:last-child td {
	border-bottom: 0;
}

.ui-table tbody tr {
	transition:
		background-color 150ms ease,
		box-shadow 150ms ease;
}

.ui-table tbody tr:hover {
	background: var(--ui-gray-50, #f7f8fa);
}


/*
|--------------------------------------------------------------------------
| Table Links and Actions
|--------------------------------------------------------------------------
*/

.ui-table .link-primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 32px;
	padding: 6px 12px;
	border: 1px solid rgba(250, 166, 28, 0.4);
	border-radius: 7px;
	background: rgba(250, 166, 28, 0.1);
	color: #9a5c00;
	font-size: 12px;
	font-weight: 800;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition:
		background-color 150ms ease,
		border-color 150ms ease,
		transform 150ms ease;
}

.ui-table .link-primary:hover {
	border-color: var(--vs-accent, #faa61c);
	background: rgba(250, 166, 28, 0.18);
	transform: translateY(-1px);
}


/*
|--------------------------------------------------------------------------
| Table Column Behaviour
|--------------------------------------------------------------------------
*/

.ui-table th:last-child,
.ui-table td:last-child {
	width: 1%;
	text-align: right;
	white-space: nowrap;
}

/* ==========================================================================
   Dashboard Metrics
   ========================================================================== */

.dashboard-metric-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--space-3);
}

.dashboard-metric {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 132px;
	padding: var(--space-4);
	color: inherit;
	text-decoration: none;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	transition:
		border-color 160ms ease,
		box-shadow 160ms ease,
		transform 160ms ease;
}

.dashboard-metric:hover {
	color: inherit;
	text-decoration: none;
	border-color: var(--border-strong);
	box-shadow: var(--shadow-sm);
	transform: translateY(-1px);
}

.dashboard-metric-top {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	min-width: 0;
}

.dashboard-metric-indicator {
	width: 8px;
	height: 8px;
	flex: 0 0 8px;
	border-radius: 999px;
	background: var(--text-muted);
}

.dashboard-metric-indicator[data-tone="info"] {
	background: var(--info);
}

.dashboard-metric-indicator[data-tone="warning"] {
	background: var(--warning);
}

.dashboard-metric-indicator[data-tone="success"] {
	background: var(--success);
}

.dashboard-metric-indicator[data-tone="danger"] {
	background: var(--danger);
}

.dashboard-metric-indicator[data-tone="accent"] {
	background: var(--primary);
}

.dashboard-metric-label {
	min-width: 0;
	color: var(--text-muted);
	font-size: var(--text-sm);
	font-weight: 600;
	line-height: 1.3;
}

.dashboard-metric-value {
	margin-top: var(--space-3);
	color: var(--text);
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.03em;
}

.dashboard-metric-meta {
	margin-top: auto;
	padding-top: var(--space-3);
	color: var(--text-muted);
	font-size: var(--text-xs);
	line-height: 1.4;
}

@media (max-width: 1100px) {
	.dashboard-metric-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.dashboard-metric-grid {
		grid-template-columns: 1fr;
	}

	.dashboard-metric {
		min-height: auto;
	}
}


/*
|--------------------------------------------------------------------------
| Responsive Table
|--------------------------------------------------------------------------
*/

@media (max-width: 760px) {
	.table-responsive {
		border-radius: 10px;
	}

	.ui-table {
		min-width: 680px;
	}

	.ui-table thead th,
	.ui-table tbody td {
		padding: 12px 13px;
	}
}
