/**
 * File Name: aca-agent-dashboard.css
 * Purpose: Front-end RTL styles for ACA agent dashboard.
 * Developer: ACA
 */
a:hover{
    cursor: pointer;
}
.aca-agent-dashboard {
	background: #f6f7fb;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	display: grid;
	font-family: inherit;
	gap: 0;
	grid-template-columns: 260px minmax(0, 1fr);
	margin: 24px 0;
	min-height: 640px;
	overflow: hidden;
	width: 100%;
}

.aca-agent-dashboard,
.aca-agent-dashboard * {
	box-sizing: border-box;
}
a.aca-agent-link {
    margin-left: 1rem !important;
}
.aca-agent-sidebar {
	background: #172033;
	color: #fff;
	padding: 22px;
}

.aca-agent-profile {
	border-bottom: 1px solid rgba(255, 255, 255, 0.16);
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 18px;
	padding-bottom: 18px;
}

.aca-agent-profile span {
	color: #cbd5e1;
	font-size: 13px;
}

.aca-agent-nav {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.aca-agent-nav a {
	border-radius: 8px;
	color: #e5e7eb;
	padding: 10px 12px;
	text-decoration: none;
}

.aca-agent-nav a:hover,
.aca-agent-nav a.is-active {
	background: #26344f;
	color: #fff;
}

.aca-agent-main {
	min-width: 0;
	padding: 24px;
}

.aca-agent-section-title {
	align-items: flex-start;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	margin-bottom: 16px;
}

.aca-agent-section-title h2 {
	font-size: 24px;
	margin: 0;
}

.aca-agent-section-title p,
.aca-agent-muted {
	color: #64748b;
	margin: 4px 0 0;
}

.aca-agent-cards {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.aca-agent-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
	margin-bottom: 16px;
	padding: 18px;
}

.aca-agent-card-heading {
	align-items: center;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	margin-bottom: 14px;
}

.aca-agent-card-heading h3 {
	margin: 0;
}

.aca-agent-card span {
	color: #64748b;
	display: block;
	font-size: 13px;
	margin-bottom: 8px;
}

.aca-agent-card strong {
	color: #0f172a;
	font-size: 24px;
}

.aca-agent-grid {
	display: grid;
	gap: 16px;
}

.aca-agent-grid.two {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.aca-agent-table-wrap {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	overflow-x: auto;
}

.aca-agent-table {
	border-collapse: collapse;
	min-width: 900px;
	width: 100%;
}

.aca-agent-table th,
.aca-agent-table td {
	border-bottom: 1px solid #e2e8f0;
	padding: 12px;
	text-align: right;
	vertical-align: middle;
}

.aca-agent-table th {
	background: #f8fafc;
	color: #334155;
	font-weight: 700;
}

.aca-agent-badge {
	background: #eef2ff;
	border-radius: 999px;
	color: #3730a3;
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	padding: 6px 10px;
}

.aca-agent-badge.status-کم {
	background: #fff7ed;
	color: #c2410c;
}

.aca-agent-badge.status-ناموجود {
	background: #fee2e2;
	color: #991b1b;
}

.aca-agent-link {
	color: #2563eb;
	font-weight: 700;
	text-decoration: none;
}

.aca-agent-table-actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.aca-agent-print-link {
	align-items: center;
	border-radius: 999px;
	display: inline-flex;
	font-size: 16px;
	height: 32px;
	justify-content: center;
	line-height: 1;
	padding: 0;
	width: 32px;
}

.aca-agent-filters {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 14px;
}

.aca-agent-filters input,
.aca-agent-filters select,
.aca-agent-form input,
.aca-agent-form textarea,
.aca-agent-form select {
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	min-height: 40px;
	padding: 8px 10px;
}

#aca-contact-history .aca-agent-form label { display: flex; flex-direction: column; gap: 8px; }
#aca-order-history { margin-top: 20px; }
#aca-order-history > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; cursor: pointer; list-style: none; font-size: 16px; font-weight: 600; line-height: 1.8; }
#aca-order-history > summary::-webkit-details-marker { display: none; }
#aca-order-history > summary:focus-visible { outline: 2px solid #245b36; outline-offset: 6px; border-radius: 4px; }
#aca-order-history .aca-order-history-chevron { display: block; flex: 0 0 9px; width: 9px; height: 9px; margin: 0 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 240ms ease; }
#aca-order-history[open] .aca-order-history-chevron { transform: rotate(225deg); }
#aca-order-history .aca-order-history-content { margin-top: 18px; padding-top: 18px; border-top: 1px solid #edf1ee; }
@media (prefers-reduced-motion: reduce) { #aca-order-history .aca-order-history-chevron { transition: none; } }
.aca-order-history .aca-history-entry { border: 1px solid #dce5df; border-radius: 10px; margin: 0 0 14px; padding: 18px 20px; background: #fff; text-align: right; }
.aca-order-history .aca-history-entry-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid #edf1ee; }
.aca-order-history .aca-history-entry-heading h4 { font-size: 16px; line-height: 1.7; font-weight: 600; margin: 0; }
.aca-order-history .aca-history-result { display: inline-block; border-radius: 6px; padding: 5px 10px; font-size: 13px; line-height: 1.7; font-weight: 500; }
.aca-order-history .aca-history-result.is-success { color: #215b38; background: #edf6ef; }
.aca-order-history .aca-history-result.is-unanswered { color: #795018; background: #fff5e5; }
.aca-order-history .aca-history-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px 28px; margin: 18px 0 0; padding: 0; }
.aca-order-history .aca-history-fields > div { min-width: 0; }
.aca-order-history .aca-history-fields dt { margin: 0 0 5px; font-size: 13px; line-height: 1.7; color: #64748b; font-weight: 400; }
.aca-order-history .aca-history-fields dd { margin: 0; font-size: 15px; line-height: 1.8; color: #24352b; font-weight: 500; overflow-wrap: anywhere; }
.aca-order-history .aca-history-fields bdi { font-variant-numeric: tabular-nums; }
.aca-order-history .aca-history-notes { margin-top: 18px; padding: 12px 14px; background: #f7f9f7; border-radius: 7px; }
.aca-order-history .aca-history-notes > span { color: #64748b; font-size: 13px; }
.aca-order-history .aca-history-notes p { margin: 6px 0 0; font-size: 14px; line-height: 1.9; color: #24352b; overflow-wrap: anywhere; }
@media(max-width:600px){.aca-order-history .aca-history-fields{grid-template-columns:1fr;gap:14px}.aca-order-history .aca-history-entry{padding:14px}}
#aca-contact-history .aca-agent-grid { margin: 8px 0; }
#aca-contact-history .aca-contact-followup { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; grid-column: 1 / -1; }
#aca-contact-history [hidden] { display: none !important; }
#aca-contact-history .aca-agent-form input, #aca-contact-history .aca-agent-form select { width: 100%; min-width: 0; }
@media (max-width: 600px) { #aca-contact-history .aca-contact-followup { grid-template-columns: 1fr; } }

.aca-agent-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.aca-agent-form-row {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.aca-agent-form-row label {
	color: #334155;
	font-weight: 700;
}

.aca-agent-help {
	color: #64748b;
	font-size: 13px;
	line-height: 1.8;
	margin: 0;
}

.aca-agent-readonly-row {
	align-items: center;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	padding: 12px;
}

.aca-agent-readonly-row span {
	color: #64748b;
	font-size: 13px;
}

.aca-agent-readonly-row strong {
	color: #0f172a;
	font-size: 16px;
}

.aca-agent-form-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-start;
}

.aca-agent-button,
.aca-agent-filters button {
	background: #334155;
	border: 0;
	border-radius: 8px;
	color: #fff;
	cursor: pointer;
	font-weight: 700;
	padding: 10px 14px;
	text-decoration: none;
}

.aca-agent-button.primary {
    background: #15803d;
    color: #fff;
    border-radius: 0.5rem;
}

.aca-agent-button-secondary {
	background: #0f766e;
	display: inline-flex;
	white-space: nowrap;
}

.aca-agent-button.danger {
	background: #b91c1c;
}

.aca-agent-dashboard-message {
	align-items: center;
	display: flex;
	justify-content: center;
	min-height: 260px;
	text-align: center;
}

.aca-agent-dashboard-message .aca-agent-card {
	max-width: 460px;
	width: 100%;
}

.aca-agent-notice {
	border-radius: 8px;
	font-weight: 700;
	margin-bottom: 14px;
	padding: 12px 14px;
}

.aca-agent-notice.is-success {
	background: #dcfce7;
	color: #166534;
}

.aca-agent-notice.is-error {
	background: #fee2e2;
	color: #991b1b;
}

.aca-agent-pagination {
	display: flex;
	gap: 8px;
	margin-top: 14px;
}

.aca-agent-pagination a {
	background: #fff;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 8px 12px;
	text-decoration: none;
}

.aca-agent-pagination a.is-active {
	background: #334155;
	color: #fff;
}

.aca-agent-money {
	direction: ltr;
	text-align: left;
}

@media (max-width: 900px) {
	.aca-agent-dashboard {
		grid-template-columns: 1fr;
	}

	.aca-agent-cards,
	.aca-agent-grid.two {
		grid-template-columns: 1fr;
	}

	.aca-agent-sidebar {
		padding: 16px;
	}

	.aca-agent-main {
		padding: 16px;
	}
}

/* Order filters: scoped to avoid changing other dashboard forms. */
.aca-agent-filters.aca-agent-orders-filters {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	align-items: end;
	gap: 16px;
	padding: 20px;
	margin-bottom: 24px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	box-sizing: border-box;
}
.aca-agent-orders-filters .aca-order-filter {
	display: flex;
	flex-direction: column;
	gap: 7px;
	min-width: 0;
	margin: 0;
	color: #334155;
	font-size: 13px;
	font-weight: 600;
}
.aca-agent-orders-filters .aca-order-filter-search { grid-column: span 2; }
label.aca-order-filter.aca-order-filter-search input[type="search"] {
	width: -webkit-fill-available;
}
.aca-order-filter small { color: #64748b; font-size: 11px; font-weight: 400; }
.aca-agent-orders-filters .aca-order-filter input,
.aca-agent-orders-filters .aca-order-filter select {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	height: 44px;
	margin: 0;
	padding: 9px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	background-color: #fff;
	color: #172033;
	font: inherit;
	font-weight: 400;
	line-height: 1.5;
	box-shadow: none;
}
.aca-agent-orders-filters .aca-order-filter select { padding-inline-end: 30px; }
.aca-agent-orders-filters input::placeholder { color: #64748b; opacity: 1; }
.aca-agent-orders-filters input:focus,
.aca-agent-orders-filters select:focus,
.aca-order-filter-actions button:focus-visible,
.aca-order-filter-actions a:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 2px;
}
.aca-order-filter-actions { display: flex; align-items: center; gap: 12px; min-height: 44px; flex-wrap: wrap; }
.aca-agent-orders-filters .aca-order-filter-actions button {
	min-height: 44px;
	flex: 1;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid #334155;
	border-radius: 8px;
	background: #334155;
	color: #fff;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
}
.aca-agent-orders-filters .aca-order-filter-actions button:hover { background: #172033; }
.aca-order-filter-actions a { display: inline-flex; align-items: center; min-height: 44px; color: #475569; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 1100px) {
	.aca-agent-filters.aca-agent-orders-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.aca-agent-orders-filters .aca-order-filter-actions { grid-column: 1 / -1; justify-content: flex-start; }
	.aca-agent-orders-filters .aca-order-filter-actions button { flex: 0 1 auto; min-width: 140px; }
}
@media (max-width: 540px) {
	.aca-agent-orders-section .aca-agent-section-title { flex-direction: column; gap: 4px; }
	.aca-agent-orders-section .aca-agent-section-title p { font-size: 12px; line-height: 1.8; }
	.aca-agent-filters.aca-agent-orders-filters { padding: 14px; gap: 14px 10px; }
	.aca-agent-orders-filters .aca-order-filter { grid-column: 1 / -1; }
	.aca-agent-orders-filters .aca-order-filter-actions button { flex: 1; }
}

/* Keep dark dashboard actions readable when theme link states apply. */
.aca-agent-dashboard .aca-agent-button:is(:hover, :focus-visible, :active),
.aca-agent-dashboard .aca-agent-button-secondary:is(:hover, :focus-visible, :active),
.aca-agent-dashboard .aca-agent-filters button:is(:hover, :focus-visible, :active),
.aca-agent-dashboard .aca-order-filter-actions button:is(:hover, :focus-visible, :active) {
    color: #fff !important;
    text-decoration: none;
}

/* Order states retain their text labels; color is a supplementary cue. */
.aca-agent-table .aca-order-status{display:inline-block;border:1px solid #cbd5e1;border-radius:8px;padding:6px 10px;font-weight:600;line-height:1.7;min-width:74px;background:#f1f5f9;color:#334155;text-align:center}
.aca-order-identity{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.aca-agent-table .aca-order-manual-marker{display:inline-flex;align-items:center;gap:4px;white-space:nowrap;border:1px solid #99c9ca;border-radius:5px;padding:2px 6px;background:#ecfeff;color:#155e75;font-size:11px;font-weight:700;line-height:1.7}
.aca-agent-table .aca-order-status[data-status="pending"],.aca-agent-table .aca-order-status[data-status="aca-await-pay"]{background:#fffbeb;color:#92400e;border-color:#fcd34d}
.aca-agent-table .aca-order-status[data-status="on-hold"],.aca-agent-table .aca-order-status[data-status="aca-pay-review"]{background:#fff7ed;color:#9a3412;border-color:#fdba74}
.aca-agent-table .aca-order-status[data-status="aca-await-call"]{background:#fefce8;color:#713f12;border-color:#fde047}
.aca-agent-table .aca-order-status[data-status="processing"],.aca-agent-table .aca-order-status[data-status="aca-paid"],.aca-agent-table .aca-order-status[data-status="aca-agent-ok"]{background:#eff6ff;color:#1e40af;border-color:#93c5fd}
.aca-agent-table .aca-order-status[data-status="aca-preparing"]{background:#f5f3ff;color:#5b21b6;border-color:#c4b5fd}
.aca-agent-table .aca-order-status[data-status="aca-ready"]{background:#f0fdfa;color:#115e59;border-color:#5eead4}
.aca-agent-table .aca-order-status[data-status="aca-shipped"]{background:#f0f9ff;color:#075985;border-color:#7dd3fc}
.aca-agent-table .aca-order-status[data-status="aca-delivered"],.aca-agent-table .aca-order-status[data-status="completed"]{background:#f0fdf4;color:#166534;border-color:#86efac}
.aca-agent-table .aca-order-status[data-status="cancelled"],.aca-agent-table .aca-order-status[data-status="failed"],.aca-agent-table .aca-order-status[data-status="aca-agent-cancel"]{background:#fef2f2;color:#991b1b;border-color:#fca5a5}
.aca-agent-table .aca-order-status[data-status="aca-returned"],.aca-agent-table .aca-order-status[data-status="refunded"]{background:#fdf2f8;color:#9d174d;border-color:#f9a8d4}

.aca-agent-dashboard .aca-performance-report { line-height:1.9; }
.aca-agent-dashboard .aca-performance-report .aca-asm-table-scroll { overflow-x:auto; margin:20px 0; }
.aca-agent-dashboard .aca-performance-report table { width:100%; border-collapse:collapse; font-size:13px; }
.aca-agent-dashboard .aca-performance-report td,.aca-agent-dashboard .aca-performance-report th { padding:12px; text-align:right; vertical-align:top; border-bottom:1px solid #e2e8f0; }
.aca-agent-dashboard .aca-performance-report h2 { font-size:18px; }
.aca-agent-dashboard .aca-performance-history article { padding:12px 0; border-bottom:1px solid #e2e8f0; }

/* Representative metrics only: counts and WooCommerce prices share one type scale. */
.aca-metrics-section { margin-bottom: 28px; }
.aca-metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 16px; }
.aca-metric { --metric-ink: #245d92; --metric-tint: #ecf4fc; display: flex; flex-direction: column; min-width: 0; padding: 22px; border: 1px solid #e2e8f0; border-radius: 16px; background: #fff; box-shadow: 0 3px 12px rgb(15 23 42 / 3%); }
.aca-metric--green { --metric-ink: #226849; --metric-tint: #eaf6ef; }
.aca-metric--amber { --metric-ink: #8b5b14; --metric-tint: #fff5e4; }
.aca-metric--violet { --metric-ink: #655098; --metric-tint: #f2eef9; }
.aca-metric-heading { display: flex; align-items: center; gap: 12px; min-height: 46px; margin-bottom: 20px; }
.aca-agent-dashboard .aca-metric-heading h3 { margin: 0; color: #475569; font-family: inherit; font-size: 14px; line-height: 1.8; font-weight: 600; }
.aca-metric-icon { display: inline-flex; flex: 0 0 42px; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 12px; color: var(--metric-ink); background: var(--metric-tint); }
.aca-metric-icon svg { display: block; width: 24px; height: 24px; }
.aca-agent-dashboard .aca-metric-value { display: block; margin-top: auto; color: #172033; font-family: inherit; font-size: clamp(24px, 1.8vw, 28px); font-weight: 750; line-height: 1.6; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.aca-agent-dashboard .aca-metric-value .woocommerce-Price-amount,
.aca-agent-dashboard .aca-metric-value bdi { color: inherit; font-size: inherit; font-weight: inherit; line-height: inherit; }
.aca-agent-dashboard .aca-metric-value .woocommerce-Price-currencySymbol { color: #64748b; font-size: 12px; font-weight: 500; margin-inline-start: 4px; white-space: nowrap; }
.aca-agent-dashboard .aca-metric-hint { margin: 8px 0 0; color: #64748b; font-size: 12px; line-height: 1.9; }
.aca-metric-section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.aca-agent-dashboard .aca-metric-section-heading h3 { margin: 0; font-size: 17px; font-weight: 700; }
.aca-agent-dashboard a.aca-metric-report-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: #245d92; font-size: 13px; font-weight: 600; }
.aca-metric-report-link:focus-visible { outline: 2px solid #245d92; outline-offset: 4px; border-radius: 4px; }
.aca-agent-dashboard .aca-metric-period { color: #64748b; font-size: 13px; line-height: 1.9; margin: 4px 0 16px; }
.aca-agent-dashboard .aca-metric-note { color: #64748b; font-size: 12px; line-height: 2; margin: 14px 0 0; }
.aca-metric-breakdown { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding: 20px 22px; margin: 16px 0 0; background: #eef2f7; border-radius: 14px; }
.aca-metric-breakdown > div { min-width: 0; }
.aca-metric-breakdown dt { color: #475569; font-weight: 500; font-size: 13px; margin-bottom: 8px; }
.aca-metric-breakdown dd { margin: 0; font-weight: 600; }
.aca-agent-dashboard .aca-metric-breakdown .amount { color: #172033; font-size: 17px; font-weight: 600; }
.aca-agent-dashboard .aca-metric-breakdown .woocommerce-Price-currencySymbol { font-size: 12px; font-weight: 500; }
.aca-account-summary > .aca-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.aca-account-table { margin-top: 20px; }
.aca-account-table caption { text-align: start; padding: 16px 18px; color: #475569; background: #fff; font-size: 14px; font-weight: 600; }
.aca-account-table th[scope="row"] { background: #fff; color: #334155; font-weight: 600; }
.aca-account-table .amount { white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
    .aca-metric-grid, .aca-account-summary > .aca-metric-grid { grid-template-columns: 1fr; gap: 12px; }
    .aca-metric { padding: 18px; }
    .aca-metric-heading { margin-bottom: 14px; }
    .aca-agent-dashboard .aca-metric-value { font-size: 26px; }
    .aca-metric-breakdown { grid-template-columns: 1fr; gap: 16px; padding: 18px; }
    .aca-metric-breakdown > div + div { border-top: 1px solid #dce3ec; padding-top: 14px; }
}

/* Monthly performance in the representative panel; admin reports stay unchanged. */
.aca-agent-dashboard .aca-own-performance { padding: 24px; margin-top: 24px; border: 1px solid #dfe6ef; border-radius: 16px; background: #fff; scroll-margin-top: 90px; }
.aca-own-performance .aca-performance-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.aca-agent-dashboard .aca-own-performance h2 { margin: 0 0 6px; font-size: 20px; }
.aca-agent-dashboard .aca-own-performance h3 { font-family: inherit; }
.aca-own-performance .aca-performance-heading p { color: #64748b; font-size: 13px; margin: 0; }
.aca-agent-dashboard .aca-report-month-filter { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; padding: 18px; border-radius: 12px; background: #f4f7fb; margin: 0; }
.aca-agent-dashboard .aca-report-month-filter label { display: flex; flex: 0 1 160px; flex-direction: column; gap: 6px; margin: 0; color: #334155; font-size: 13px; font-weight: 600; }
.aca-agent-dashboard .aca-report-month-filter select { width: 100%; min-height: 44px; margin: 0; padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: #172033; font: inherit; appearance: auto; }
.aca-agent-dashboard .aca-report-month-filter button { min-height: 44px; margin: 0; font-size: 13px; font-family: inherit; }
.aca-agent-dashboard .aca-report-month-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-inline-start: auto; }
.aca-agent-dashboard .aca-report-month-nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 12px; border-radius: 8px; color: #245d92; font-size: 13px; font-weight: 600; text-decoration: none; }
.aca-agent-dashboard .aca-report-month-nav a:hover { background: #e7edf6; }
.aca-own-performance :is(select, button, a, summary):focus-visible { outline: 2px solid #245d92; outline-offset: 3px; }
.aca-own-performance .aca-performance-period { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 20px; margin: 16px 0; color: #64748b; font-size: 12px; }
.aca-own-performance .aca-performance-period p { margin: 0; }
.aca-own-performance .aca-metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.aca-own-performance .aca-metric { padding: 18px; box-shadow: none; background: #fbfcfe; }
.aca-own-performance .aca-metric-heading { align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.aca-own-performance .aca-metric-icon { width: 34px; height: 34px; flex-basis: 34px; border-radius: 10px; }
.aca-own-performance .aca-metric-icon svg { width: 20px; height: 20px; }
.aca-agent-dashboard .aca-own-performance .aca-metric-heading h3 { font-size: 13px; line-height: 1.8; }
.aca-agent-dashboard .aca-own-performance .aca-metric-value { font-size: 22px; line-height: 1.8; }
.aca-own-performance .aca-metric-hint { font-size: 12px; }
.aca-own-performance .aca-performance-secondary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 20px 0 28px; padding: 18px 0; border-block: 1px solid #e2e8f0; }
.aca-own-performance .aca-performance-secondary dt { color: #475569; font-size: 13px; font-weight: 500; margin-bottom: 8px; }
.aca-own-performance .aca-performance-secondary dd { margin: 0; color: #172033; font-size: 16px; font-weight: 650; }
.aca-own-performance .aca-performance-secondary p { margin: 6px 0 0; color: #64748b; font-size: 12px; line-height: 1.9; }
.aca-own-performance .aca-performance-detail-heading { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.aca-own-performance .aca-performance-detail-heading h3 { margin: 0; font-size: 16px; font-weight: 700; }
.aca-own-performance .aca-performance-detail-heading > span { color: #64748b; font-size: 12px; }
.aca-own-performance .aca-performance-task-wrap { border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; }
.aca-own-performance .aca-performance-tasks { margin: 0; table-layout: fixed; line-height: 1.9; }
.aca-agent-dashboard .aca-own-performance .aca-performance-tasks :is(th,td) { padding: 14px 12px; font-size: 12px; vertical-align: middle; overflow-wrap: anywhere; }
.aca-own-performance .aca-performance-tasks thead th { background: #f4f7fb; color: #475569; font-weight: 600; }
.aca-own-performance .aca-performance-tasks th:first-child { width: 24%; }
.aca-own-performance .aca-performance-tasks tbody th { font-weight: 500; color: #172033; }
.aca-own-performance .aca-performance-tasks tbody tr:last-child > * { border-bottom: 0; }
.aca-own-performance .aca-performance-tasks tbody tr:nth-child(even) { background: #fafbfd; }
.aca-own-performance .aca-performance-tasks strong { display: block; margin-top: 4px; font-size: 13px; font-weight: 600; }
.aca-own-performance .aca-performance-order { color: #475569; font-size: 12px; }
.aca-own-performance .aca-performance-tasks small { display: block; margin-top: 4px; font-size: 11px; color: #64748b; }
.aca-own-performance .aca-performance-muted { color: #64748b; }
.aca-own-performance .aca-performance-state { display: inline-flex; padding: 4px 9px; border-radius: 8px; color: #475569; background: #edf2f7; font-size: 12px; font-weight: 600; }
.aca-own-performance .aca-performance-state[data-state="late"] { color: #a33226; background: #fff0ec; }
.aca-own-performance .aca-performance-state:is([data-state="on_time"], [data-state="reviewed"]) { color: #226849; background: #eaf6ef; }
.aca-own-performance .aca-performance-state:is([data-state="unconfirmed"], [data-state="review_pending"]) { color: #80520e; background: #fff5df; }
.aca-own-performance .aca-performance-state[data-state="pending"] { color: #245d92; background: #eaf3fc; }
.aca-own-performance .aca-performance-cell-label { display: none; }
.aca-own-performance .aca-performance-disclosure { margin-top: 12px; border: 1px solid #e2e8f0; border-radius: 12px; }
.aca-own-performance .aca-performance-disclosure summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 14px 16px; color: #334155; cursor: pointer; list-style: none; font-size: 13px; font-weight: 600; }
.aca-own-performance .aca-performance-disclosure summary::-webkit-details-marker { display: none; }
.aca-own-performance .aca-performance-disclosure summary::after { content: ''; flex: 0 0 7px; width: 7px; height: 7px; margin-inline-start: auto; border-right: 2px solid #64748b; border-bottom: 2px solid #64748b; transform: rotate(45deg); }
.aca-own-performance .aca-performance-disclosure[open] summary::after { transform: rotate(225deg); }
.aca-own-performance .aca-performance-disclosure summary > span { font-size: 12px; font-weight: 400; color: #64748b; }
.aca-own-performance .aca-performance-disclosure > div { padding: 0 18px 16px; color: #475569; font-size: 13px; }
.aca-own-performance .aca-performance-disclosure ul { padding-inline-start: 20px; margin: 8px 0 0; }
.aca-own-performance .aca-performance-disclosure li + li { margin-top: 8px; }
.aca-own-performance .aca-performance-disclosure p { margin: 8px 0; }
.aca-own-performance .aca-performance-disclosure article h3 { font-size: 15px; }
.aca-own-performance .aca-performance-decision-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 14px; background: #f4f7fb; border-radius: 10px; }
.aca-own-performance .aca-performance-decision-values dd { margin: 4px 0 0; font-weight: 600; }
.aca-own-performance .aca-performance-empty { border-radius: 12px; background: #f4f7fb; color: #475569; padding: 20px; font-size: 13px; }
.aca-own-performance .aca-performance-empty[role="alert"] { background: #fff0ec; color: #a33226; }
.aca-own-performance .aca-performance-pagination { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.aca-own-performance .aca-performance-pagination .page-numbers { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px; border: 1px solid #dfe6ef; border-radius: 8px; font-size: 13px; }
.aca-own-performance .aca-performance-pagination .current { background: #245d92; color: #fff; }
@media (max-width: 1200px) {
    .aca-own-performance .aca-metric-grid, .aca-own-performance .aca-performance-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .aca-agent-dashboard .aca-own-performance { padding: 16px; }
    .aca-agent-dashboard .aca-report-month-filter { padding: 12px; gap: 10px; }
    .aca-agent-dashboard .aca-report-month-filter label { flex: 1 1 calc(50% - 10px); }
    .aca-agent-dashboard .aca-report-month-filter button { width: 100%; }
    .aca-agent-dashboard .aca-report-month-nav { width: 100%; justify-content: space-between; margin: 0; }
    .aca-own-performance .aca-performance-period { display: block; }
    .aca-own-performance .aca-metric-grid { grid-template-columns: 1fr; }
    .aca-own-performance .aca-performance-secondary { grid-template-columns: 1fr; gap: 16px; }
    .aca-own-performance .aca-performance-secondary > div + div { border-top: 1px solid #e2e8f0; padding-top: 14px; }
    .aca-own-performance .aca-performance-tasks, .aca-own-performance .aca-performance-tasks tbody { display: block; width: 100%; }
    .aca-own-performance .aca-performance-tasks thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .aca-own-performance .aca-performance-tasks tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid #dfe6ef; padding: 12px; gap: 12px; }
    .aca-agent-dashboard .aca-own-performance .aca-performance-tasks tbody :is(th,td) { display: block; width: auto; padding: 0; border: 0; }
    .aca-own-performance .aca-performance-tasks tbody th { grid-column: 1 / -1; }
    .aca-own-performance .aca-performance-tasks tbody tr:last-child { border: 0; }
    .aca-own-performance .aca-performance-cell-label { display: block; color: #64748b; font-size: 11px; margin-bottom: 4px; }
    .aca-own-performance .aca-performance-task-wrap { overflow: visible; }
    .aca-own-performance .aca-performance-disclosure summary { flex-wrap: wrap; padding: 12px; }
    .aca-own-performance .aca-performance-decision-values { grid-template-columns: 1fr; }
}

/* Independent monthly sales and settlement controls. */
.aca-agent-dashboard .aca-sales-report .aca-metric-period { margin-top: 18px; }
.aca-agent-dashboard .aca-report-month-filter { margin-bottom: 18px; }
.aca-sales-settled-total { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; background: #eaf6ef; border: 1px solid #c7e4d2; border-radius: 12px; padding: 18px 22px; color: #226849; }
.aca-sales-settled-total > span { font-size: 14px; }
.aca-sales-settled-total strong { font-size: 24px; }
.aca-sales-settled-total .woocommerce-Price-currencySymbol { font-size: 12px; }
.aca-sales-settlement-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 22px 0 14px; }
.aca-sales-settlement-filter label { display: flex; flex-direction: column; gap: 8px; margin: 0; min-width: 220px; font-size: 13px; color: #475569; }
.aca-sales-settlement-filter select { min-height: 44px; margin: 0; border-radius: 8px; padding: 8px 12px; background: #fff; border: 1px solid #cbd5e1; color: #172033; font: inherit; }
.aca-sales-settlement-filter button { min-height: 44px; margin: 0; }
.aca-sales-settlement-filter > span { color: #64748b; font-size: 12px; padding-bottom: 10px; margin-inline-start: auto; }
.aca-sales-settlement-table .aca-agent-table { min-width: 0; table-layout: fixed; font-size: 13px; }
.aca-sales-settlement-table th:nth-child(1) { width: 23%; }
.aca-sales-settlement-table th:nth-child(2) { width: 22%; }
.aca-sales-settlement-table th:nth-child(3) { width: 20%; }
.aca-sales-settlement-table td { overflow-wrap: anywhere; }
.aca-sales-settlement-table small { display: block; margin-top: 5px; color: #64748b; font-size: 11px; }
.aca-sales-cell-label { display: none; }
.aca-sales-all-time { border: 1px solid #dfe6ef; background: #fff; border-radius: 14px; margin-top: 24px; }
.aca-sales-all-time > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; min-height: 56px; padding: 16px 20px; color: #334155; font-weight: 650; list-style: none; cursor: pointer; }
.aca-sales-all-time > summary::-webkit-details-marker { display: none; }
.aca-sales-all-time > summary > span { font-size: 12px; color: #64748b; font-weight: 400; }
.aca-sales-all-time > summary::after { content: ''; width: 7px; height: 7px; margin-inline-start: auto; border: solid #64748b; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.aca-sales-all-time[open] > summary::after { transform: rotate(225deg); }
.aca-sales-all-time-body { padding: 0 20px 20px; }
.aca-sales-pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.aca-sales-pagination .page-numbers { min-width: 44px; min-height: 44px; display: inline-flex; justify-content: center; align-items: center; padding: 8px 12px; border: 1px solid #dfe6ef; border-radius: 8px; }
.aca-sales-pagination .current { background: #245d92; color: #fff; }
.aca-agent-dashboard :is(.aca-report-month-filter, .aca-sales-settlement-filter, .aca-sales-all-time) :is(select, button, a, summary):focus-visible { outline: 2px solid #245d92; outline-offset: 3px; }
@media (max-width: 700px) {
    .aca-sales-settlement-filter label, .aca-sales-settlement-filter button { width: 100%; min-width: 0; }
    .aca-sales-settlement-filter > span { margin-inline-start: 0; }
    .aca-sales-settlement-table .aca-agent-table, .aca-sales-settlement-table tbody { display: block; width: 100%; }
    .aca-sales-settlement-table thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
    .aca-sales-settlement-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); padding: 16px; gap: 14px; border-bottom: 1px solid #e2e8f0; }
    .aca-sales-settlement-table tbody td { display: block; padding: 0; border: 0; }
    .aca-sales-settlement-table tbody td:last-child { grid-column: 1/-1; }
    .aca-sales-settlement-table .aca-sales-cell-label { display: block; color: #64748b; font-size: 11px; margin-bottom: 6px; }
    .aca-sales-settlement-table .aca-agent-badge { padding: 4px 8px; font-size: 11px; }
}

/* Monthly settlement state comes from the same ledger as the manager account. */
.aca-agent-dashboard .aca-settlement-state { display:flex; align-items:flex-start; gap:12px; padding:16px; margin:16px 0; border:1px solid #cbd5e1; border-radius:10px; background:#f8fafc; color:#334155; }
.aca-agent-dashboard .aca-settlement-state strong { display:block; font-size:16px; line-height:1.8; }
.aca-agent-dashboard .aca-settlement-state p { margin:4px 0 0; font-size:13px; line-height:1.8; }
.aca-agent-dashboard .aca-settlement-state-icon { font-size:24px; line-height:1.2; }
.aca-agent-dashboard .aca-settlement-state.is-complete { color:#166534; background:#f0fdf4; border-color:#86efac; }
.aca-agent-dashboard .aca-settlement-state:is(.is-partial,.is-review) { color:#92400e; background:#fffbeb; border-color:#fcd34d; }
