/* =========================================================
   Emirae — Provider Dashboard
   App-style shell: vertical sidebar + content area.
   Premium B2B dashboard. Clean, calm, structured.
   ========================================================= */

/* --- Shell ---- */
.uaec-dash {
	background: #F8F5EF;
	min-height: calc(100vh - 72px);
}

.uaec-dash__shell {
	display: flex;
	max-width: 1400px;
	margin: 0 auto;
	min-height: calc(100vh - 72px);
}

/* --- Sidebar ---- */
.uaec-dash__sidebar {
	width: 232px;
	flex-shrink: 0;
	background: #fff;
	border-right: 1px solid #f1f5f9;
	padding: 20px 0 16px;
	position: sticky;
	top: 72px;
	height: calc(100vh - 72px);
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #e2e8f0 transparent;
	display: flex;
	flex-direction: column;
}

.uaec-dash__sidebar::-webkit-scrollbar { width: 3px; }
.uaec-dash__sidebar::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 2px; }

/* Account block */
.uaec-sidebar-account {
	padding: 0 20px 14px;
	margin-bottom: 6px;
	border-bottom: 1px solid #f1f5f9;
}

.uaec-sidebar-account__name {
	font-size: 13px;
	font-weight: 700;
	color: #0F172A;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 188px;
	line-height: 1.3;
}

.uaec-sidebar-account__meta {
	font-size: 11px;
	color: #94a3b8;
	margin-top: 3px;
	line-height: 1;
}

/* Sidebar sections */
.uaec-sidebar-section {
	padding: 0 10px;
	margin-bottom: 2px;
}

.uaec-sidebar-section__label {
	padding: 10px 12px 5px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #c0c7d0;
	user-select: none;
}

/* Sidebar links */
.uaec-sidebar-link {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 7px 12px;
	margin: 1px 0;
	border-radius: 7px;
	font-size: 13px;
	font-weight: 500;
	color: #64748b;
	text-decoration: none;
	transition: background 0.12s, color 0.12s;
	line-height: 1.3;
}

.uaec-sidebar-link:hover {
	background: #f8fafc;
	color: #334155;
}

.uaec-sidebar-link--active {
	background: #eff6ff;
	color: #2563eb;
	font-weight: 600;
}

.uaec-sidebar-link--active:hover {
	background: #e0edff;
}

.uaec-sidebar-link__icon {
	width: 17px;
	height: 17px;
	flex-shrink: 0;
	opacity: 0.45;
}

.uaec-sidebar-link:hover .uaec-sidebar-link__icon {
	opacity: 0.65;
}

.uaec-sidebar-link--active .uaec-sidebar-link__icon {
	opacity: 0.85;
}

.uaec-sidebar-link__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 17px;
	height: 17px;
	padding: 0 5px;
	border-radius: 9px;
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
	color: #fff;
	margin-left: auto;
	flex-shrink: 0;
}

/* Sidebar bottom */
.uaec-sidebar-bottom {
	padding: 8px 10px 0;
	margin-top: auto;
	border-top: 1px solid #f1f5f9;
}

/* --- Content area ---- */
.uaec-dash__body {
	flex: 1;
	min-width: 0;
	padding: 28px 36px 60px;
	max-width: 100%;
}

/* Page header pattern for all dashboard pages */
.uaec-dash-page-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 24px;
}

.uaec-dash-page-header__left h2 {
	font-size: 18px;
	font-weight: 700;
	color: #0F172A;
	margin: 0 0 3px;
	line-height: 1.3;
}

.uaec-dash-page-header__left p {
	font-size: 13px;
	color: #94a3b8;
	margin: 0;
}

.uaec-dash-page-header__actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

/* --- Login/inactive states ---- */
.uaec-dash-login {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 60vh;
}

.uaec-dash-login__box {
	background: #fff;
	border: 1px solid #E5E7EB;
	border-radius: 12px;
	padding: 40px;
	text-align: center;
	max-width: 420px;
	width: 100%;
}

.uaec-dash__no-access {
	padding: 40px;
	text-align: center;
	color: #475569;
}

/* --- Notices ---- */
.uaec-dash-notice {
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 13px;
	margin: 0 0 20px;
}

.uaec-dash-notice--success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.uaec-dash-notice--error   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.uaec-dash-notice--warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.uaec-dash-notice--info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* --- Section ---- */
.uaec-dash-section { padding-top: 0; }

.uaec-dash-section__header {
	margin-bottom: 20px;
}

.uaec-dash-section__header h2 {
	font-size: 18px;
	font-weight: 700;
	color: #0F172A;
	margin: 0 0 3px;
}

.uaec-dash-section__header p {
	font-size: 13px;
	color: #94a3b8;
	margin: 0;
}

.uaec-dash-back {
	font-size: 13px;
	margin-bottom: 16px;
}

.uaec-dash-back a {
	color: #2563EB;
	text-decoration: none;
	font-weight: 500;
}

/* --- Cards ---- */
.uaec-dash-card {
	background: #fff;
	border: 1px solid #e8ecf1;
	border-radius: 10px;
	padding: 20px 24px;
	margin-bottom: 16px;
}

.uaec-dash-card--meta { background: #F8FAFC; }
.uaec-dash-card--actions { border-color: #CBD5E1; }

.uaec-dash-card--table {
	padding: 0;
	overflow: hidden;
}

.uaec-dash-card__title {
	font-size: 15px;
	font-weight: 600;
	color: #0F172A;
	margin: 0 0 14px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.uaec-dash-card__titlebar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
	flex-wrap: wrap;
}

.uaec-dash-card__titlebar .uaec-dash-card__title {
	margin-bottom: 0;
}

.uaec-dash-card__desc {
	font-size: 13px;
	color: #64748b;
	margin: -8px 0 14px;
}

/* --- Forms ---- */
.uaec-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin-bottom: 18px;
}

.uaec-form-row {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.uaec-form-row--full { grid-column: 1 / -1; }

.uaec-form-row label {
	font-size: 13px;
	font-weight: 500;
	color: #374151;
}

.uaec-form-row input[type="text"],
.uaec-form-row input[type="email"],
.uaec-form-row input[type="url"],
.uaec-form-row input[type="number"],
.uaec-form-row select,
.uaec-form-row textarea {
	border: 1px solid #d4d9e1;
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 14px;
	color: #0F172A;
	background: #fff;
	width: 100%;
	box-sizing: border-box;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.uaec-form-row input:focus,
.uaec-form-row select:focus,
.uaec-form-row textarea:focus {
	outline: none;
	border-color: #2563EB;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.uaec-form-row textarea { resize: vertical; }

.uaec-form-row__checkbox { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #475569; cursor: pointer; }
.uaec-form-row__checkbox input[type="checkbox"] { width: auto; }

.uaec-form-inline { display: flex; gap: 8px; }
.uaec-form-inline input { flex: 1; }
.uaec-form-inline select { width: 90px; }

.uaec-form-hint { font-size: 12px; color: #94a3b8; margin: 2px 0 0; }
.uaec-form-actions { display: flex; gap: 10px; align-items: center; padding-top: 4px; }
.uaec-required { color: #ef4444; }

/* --- Capabilities ---- */
.uaec-cap-fieldset { border: 1px solid #e8ecf1; border-radius: 8px; padding: 12px 16px; margin-bottom: 12px; }
.uaec-cap-fieldset legend { font-size: 13px; font-weight: 600; color: #374151; padding: 0 6px; }
.uaec-cap-grid { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; }
.uaec-cap-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #374151; cursor: pointer; white-space: nowrap; }

/* --- Request grid ---- */
.uaec-request-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.uaec-req-card { background: #fff; border: 1px solid #e8ecf1; border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 8px; transition: border-color 0.15s, box-shadow 0.15s; }
.uaec-req-card:hover { border-color: #CBD5E1; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.uaec-req-card--offered { border-color: #93c5fd; background: #f8fbff; }
.uaec-req-card__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.uaec-req-card__id { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: #94a3b8; font-family: monospace; }
.uaec-req-card__score { font-size: 11px; color: #92400e; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 4px; padding: 1px 6px; }
.uaec-req-card__meta { font-size: 13px; color: #64748b; }
.uaec-req-card__desc { font-size: 13px; color: #374151; line-height: 1.55; flex: 1; }
.uaec-req-card__foot { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.uaec-req-card__date { font-size: 11px; color: #94a3b8; }
.uaec-req-card__offers { font-size: 11px; font-weight: 600; color: #2563EB; margin-left: auto; }

/* --- Offers ---- */
.uaec-offers-list { display: flex; flex-direction: column; gap: 10px; }
.uaec-offer-row { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f1f5f9; }
.uaec-offer-row:last-child { border-bottom: none; }
.uaec-offer-row__provider { font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.uaec-offer-row__price { font-size: 14px; color: #374151; white-space: nowrap; }
.uaec-offer-row__status { display: flex; gap: 6px; flex-wrap: wrap; }

/* --- Tables ---- */
.uaec-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.uaec-table th { background: #fafbfc; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: #94a3b8; padding: 9px 16px; text-align: left; border-bottom: 1px solid #e8ecf1; }
.uaec-table td { padding: 11px 16px; border-bottom: 1px solid #f5f6f8; color: #374151; }
.uaec-table tbody tr:last-child td { border-bottom: none; }
.uaec-table tbody tr:hover td { background: #fafbfc; }

.uaec-meta-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 14px; }
.uaec-meta-table th { font-size: 12px; font-weight: 500; color: #94a3b8; padding: 5px 12px 5px 0; vertical-align: top; white-space: nowrap; width: 150px; }
.uaec-meta-table td { padding: 5px 0; color: #0F172A; vertical-align: top; }

/* --- Badges ---- */
.uaec-badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; background: #f1f5f9; color: #64748b; }
.uaec-badge--sm { font-size: 10px; padding: 1px 6px; }
.uaec-badge--approved, .uaec-badge--active, .uaec-badge--accepted { background: #dcfce7; color: #166534; }
.uaec-badge--sent, .uaec-badge--pending_moderation { background: #eff6ff; color: #1d4ed8; }
.uaec-badge--viewed, .uaec-badge--shortlisted { background: #fefce8; color: #854d0e; }
.uaec-badge--closed_accepted { background: #dcfce7; color: #166534; }
.uaec-badge--rejected, .uaec-badge--withdrawn, .uaec-badge--closed, .uaec-badge--closed_rejected, .uaec-badge--suspended { background: #fee2e2; color: #991b1b; }
.uaec-badge--expired { background: #f1f5f9; color: #94a3b8; }
.uaec-badge--unlocked { background: #d1fae5; color: #065f46; }

/* --- Dashboard buttons ---- */
.uaec-dash .uaec-btn { border-radius: 8px; font-size: 13px; }
.uaec-btn--primary { background: #2563EB; color: #fff; }
.uaec-btn--primary:hover { background: #1D4ED8; color: #fff; }
.uaec-btn--secondary { background: #f1f5f9; color: #374151; border: 1px solid #e8ecf1; }
.uaec-btn--secondary:hover { background: #e8ecf1; }
.uaec-btn--ghost { background: transparent; color: #374151; border: 1px solid #d4d9e1; }
.uaec-btn--ghost:hover { background: #f8fafc; }
.uaec-btn--accept { background: #16a34a; color: #fff; }
.uaec-btn--accept:hover { background: #15803d; color: #fff; }
.uaec-btn--danger { background: #fff; color: #dc2626; border: 1px solid #fca5a5; }
.uaec-btn--danger:hover { background: #fef2f2; }
.uaec-btn--sm { padding: 5px 12px; font-size: 12px; }

/* --- Filter tabs ---- */
.uaec-filter-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; }
.uaec-filter-tab { padding: 5px 12px; border-radius: 6px; font-size: 12px; font-weight: 500; color: #64748b; text-decoration: none; background: #fff; border: 1px solid #e8ecf1; transition: all 0.12s; }
.uaec-filter-tab:hover { background: #f8fafc; color: #334155; }
.uaec-filter-tab--active { background: #2563EB; color: #fff; border-color: #2563EB; }

/* --- Empty states ---- */
.uaec-dash-empty { background: #fff; border: 1px solid #e8ecf1; border-radius: 10px; padding: 48px 24px; text-align: center; color: #64748b; }
.uaec-dash-empty p { margin-bottom: 14px; font-size: 13px; }
.uaec-dash-empty-inline { font-size: 13px; color: #94a3b8; padding: 8px 0; }

/* --- Offer detail ---- */
.uaec-offer-provider { display: flex; align-items: flex-start; gap: 14px; padding: 14px; background: #fafbfc; border-radius: 10px; margin-bottom: 14px; }
.uaec-offer-provider__logo { width: 52px; height: 52px; object-fit: contain; border-radius: 8px; border: 1px solid #e8ecf1; flex-shrink: 0; }
.uaec-offer-provider__meta { font-size: 12px; color: #94a3b8; margin-top: 3px; }
.uaec-offer-provider__overview { font-size: 13px; color: #64748b; margin-top: 4px; }

.uaec-offer-block { margin-top: 14px; padding-top: 14px; border-top: 1px solid #f1f5f9; }
.uaec-offer-block h3 { font-size: 13px; font-weight: 600; color: #374151; margin: 0 0 6px; }
.uaec-offer-block p { font-size: 13px; color: #475569; margin: 0; }

.uaec-action-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* --- Contact unlock ---- */
.uaec-unlock-banner { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; padding: 18px 22px; margin-bottom: 16px; }
.uaec-unlock-banner--done { background: #f0fdf4; border-color: #bbf7d0; }
.uaec-unlock-banner__title { font-size: 15px; font-weight: 700; color: #0F172A; margin: 0 0 10px; }
.uaec-unlock-contacts { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: #0F172A; }
.uaec-unlock-contacts a { color: #2563EB; }

/* --- Request detail ---- */
.uaec-req-desc { margin-top: 14px; padding-top: 14px; border-top: 1px solid #f1f5f9; }
.uaec-req-desc h3 { font-size: 13px; font-weight: 600; color: #374151; margin: 0 0 6px; }
.uaec-req-id { font-size: 13px; font-family: monospace; font-weight: 700; color: #94a3b8; }
.uaec-req-actions { margin-top: 14px; padding-top: 14px; border-top: 1px solid #f1f5f9; }

/* --- Mobile sidebar toggle ---- */
.uaec-dash__sidebar-toggle {
	display: none;
	position: fixed;
	bottom: 20px;
	left: 20px;
	z-index: 35;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: #2563eb;
	color: #fff;
	border: none;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
	align-items: center;
	justify-content: center;
	transition: transform 0.15s;
}
.uaec-dash__sidebar-toggle:active { transform: scale(0.94); }

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1024px) {
	.uaec-dash__sidebar {
		position: fixed;
		top: 72px;
		left: 0;
		bottom: 0;
		z-index: 35;
		transform: translateX(-100%);
		transition: transform 0.2s ease;
		box-shadow: none;
	}
	.uaec-dash__sidebar--open {
		transform: translateX(0);
		box-shadow: 4px 0 24px rgba(0,0,0,0.08);
	}
	.uaec-dash__sidebar-toggle { display: flex; }
	.uaec-dash__sidebar-overlay {
		display: none;
		position: fixed;
		inset: 0;
		top: 72px;
		background: rgba(0,0,0,0.25);
		z-index: 34;
	}
	.uaec-dash__sidebar--open ~ .uaec-dash__sidebar-overlay { display: block; }
	.uaec-dash__body { padding: 20px 20px 48px; }
}

@media (max-width: 640px) {
	.uaec-dash__body { padding: 16px 14px 40px; }
	.uaec-dash-card { padding: 16px; border-radius: 8px; }
	.uaec-form-grid { grid-template-columns: 1fr; }
	.uaec-meta-table th { width: 100px; font-size: 11px; }
	.uaec-meta-table td { font-size: 12px; }
	.uaec-dash-section__header h2,
	.uaec-dash-page-header__left h2 { font-size: 16px; }
	.uaec-dash-page-header { flex-direction: column; }
	.uaec-req-card { padding: 14px; }
	.uaec-dash__sidebar-toggle { bottom: 16px; left: 16px; width: 40px; height: 40px; border-radius: 10px; }
}

@media (min-width: 1025px) {
	/* Sidebar visible, FAB hidden */
	.uaec-dash__sidebar-toggle { display: none !important; }
	.uaec-dash__sidebar-overlay { display: none !important; }
}
