/*
|--------------------------------------------------------------------------
| AGMULA Shared Theme — Phase 1
|--------------------------------------------------------------------------
| Loaded after agmula.css. This layer standardizes shared public and portal
| shells without changing routes, permissions, validation, or workflows.
*/

:root {
    --theme-green-950: #073d25;
    --theme-green-900: #0b4a2b;
    --theme-green-800: #126335;
    --theme-green-700: #1d7a42;
    --theme-green-600: #2d8c4d;
    --theme-green-500: #4c9d63;
    --theme-green-200: #cfe7d2;
    --theme-green-100: #e9f4e7;
    --theme-green-50: #f4f9f1;
    --theme-lime: #c8ef7c;
    --theme-cream: #f7f5ed;
    --theme-surface: #ffffff;
    --theme-surface-soft: #f7faf5;
    --theme-line: #dce6d9;
    --theme-line-strong: #c7d6c4;
    --theme-ink: #173326;
    --theme-muted: #6f7e74;
    --theme-warning: #8a5b12;
    --theme-warning-bg: #fff5dc;
    --theme-danger: #a33b32;
    --theme-danger-bg: #fff0ee;
    --theme-info: #24638a;
    --theme-info-bg: #edf7fc;
    --theme-radius-sm: 10px;
    --theme-radius-md: 14px;
    --theme-radius-lg: 20px;
    --theme-radius-xl: 26px;
    --theme-shadow-sm: 0 7px 22px rgba(12, 63, 34, .055);
    --theme-shadow-md: 0 16px 42px rgba(12, 63, 34, .085);
    --theme-shadow-lg: 0 28px 70px rgba(7, 61, 37, .13);
    --theme-focus: 0 0 0 4px rgba(29, 122, 66, .14);
    --theme-sidebar-width: 258px;
    --theme-content-max: 1540px;
}

/* Foundation */
.agmula-theme {
    background: var(--theme-cream);
    color: var(--theme-ink);
    font-family:
        Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    text-rendering: optimizeLegibility;
}

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

.agmula-theme a {
    text-underline-offset: 3px;
}

.agmula-theme :where(a, button, input, select, textarea, summary):focus-visible {
    outline: 0;
    box-shadow: var(--theme-focus);
}

.agmula-theme ::selection {
    background: var(--theme-green-200);
    color: var(--theme-green-950);
}

/* Shared buttons */
.agmula-theme .button,
.agmula-theme button.button,
.agmula-theme input[type="submit"].button {
    min-height: 44px;
    gap: 8px;
    padding-inline: 18px;
    border: 1px solid var(--theme-green-800);
    border-radius: var(--theme-radius-sm);
    background: var(--theme-green-800);
    color: #fff;
    font-weight: 850;
    letter-spacing: -.01em;
    box-shadow: 0 7px 18px rgba(18, 99, 53, .13);
    transition:
        transform 150ms ease,
        background 150ms ease,
        border-color 150ms ease,
        box-shadow 150ms ease;
}

.agmula-theme .button:hover,
.agmula-theme button.button:hover,
.agmula-theme input[type="submit"].button:hover {
    transform: translateY(-1px);
    border-color: var(--theme-green-900);
    background: var(--theme-green-900);
    color: #fff;
    box-shadow: 0 12px 25px rgba(18, 99, 53, .2);
}

.agmula-theme .button:active,
.agmula-theme button.button:active {
    transform: translateY(0);
}

.agmula-theme .button-small {
    min-height: 38px;
    padding-inline: 14px;
    border-radius: 9px;
    font-size: .79rem;
}

.agmula-theme .button-secondary {
    border-color: var(--theme-line-strong);
    background: #fff;
    color: var(--theme-green-800);
    box-shadow: none;
}

.agmula-theme .button-secondary:hover {
    border-color: var(--theme-green-700);
    background: var(--theme-green-50);
    color: var(--theme-green-950);
    box-shadow: none;
}

.agmula-theme .button:disabled,
.agmula-theme button:disabled,
.agmula-theme .is-disabled {
    cursor: not-allowed;
}

/* Shared controls */
.agmula-theme :where(
    .form-card,
    .admin-content,
    .role-dashboard-content,
    .marketplace-detail-page,
    .marketplace-page-section
) :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    min-height: 43px;
    border: 1px solid var(--theme-line-strong);
    border-radius: var(--theme-radius-sm);
    background: #fff;
    color: var(--theme-ink);
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.agmula-theme :where(
    .form-card,
    .admin-content,
    .role-dashboard-content,
    .marketplace-detail-page,
    .marketplace-page-section
) :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea):hover {
    border-color: #afc5ac;
}

.agmula-theme :where(
    .form-card,
    .admin-content,
    .role-dashboard-content,
    .marketplace-detail-page,
    .marketplace-page-section
) :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea):focus {
    border-color: var(--theme-green-700);
    outline: 0;
    box-shadow: var(--theme-focus);
}

.agmula-theme :where(input[type="checkbox"], input[type="radio"]) {
    accent-color: var(--theme-green-700);
}

.agmula-theme label > span:first-child,
.agmula-theme legend {
    color: var(--theme-green-950);
}

/* Alerts and messages */
.agmula-theme .flash {
    border-radius: var(--theme-radius-md);
    box-shadow: var(--theme-shadow-sm);
}

.agmula-theme .flash-success {
    border-color: #b9dcbf;
    background: #edf8ee;
    color: #1d6b34;
}

.agmula-theme .flash-error {
    border-color: #efc4bf;
    background: var(--theme-danger-bg);
    color: var(--theme-danger);
}

/* Public shared shell */
.agmula-theme:not(.admin-page) .site-header {
    border-bottom-color: rgba(7, 61, 37, .08);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 8px 28px rgba(12, 63, 34, .045);
}

.agmula-theme:not(.admin-page) .header-inner {
    min-height: 76px;
}

.agmula-theme:not(.admin-page) .main-nav > a,
.agmula-theme:not(.admin-page) .main-nav .nav-button {
    border-radius: 9px;
    font-weight: 760;
}

.agmula-theme:not(.admin-page) .main-nav > a:hover {
    color: var(--theme-green-800);
}

.agmula-theme:not(.admin-page) .main-nav > a.is-active {
    background: var(--theme-green-50);
    color: var(--theme-green-950);
}

.agmula-theme:not(.admin-page) .site-footer {
    background:
        radial-gradient(circle at 12% 10%, rgba(200, 239, 124, .08), transparent 26%),
        var(--theme-green-950);
}

.agmula-theme:not(.admin-page) .footer-grid {
    gap: clamp(34px, 6vw, 90px);
}

.agmula-theme:not(.admin-page) .footer-links a {
    transition: color 150ms ease, transform 150ms ease;
}

.agmula-theme:not(.admin-page) .footer-links a:hover {
    transform: translateX(2px);
    color: #fff;
}

/* Authentication */
.agmula-theme .auth-section {
    background:
        radial-gradient(circle at 12% 14%, rgba(200, 239, 124, .2), transparent 28%),
        linear-gradient(145deg, var(--theme-cream), #edf5ea);
}

.agmula-theme .auth-grid {
    gap: clamp(28px, 6vw, 90px);
}

.agmula-theme .form-card {
    border-color: var(--theme-line);
    border-radius: var(--theme-radius-xl);
    background: rgba(255, 255, 255, .97);
    box-shadow: var(--theme-shadow-lg);
}

.agmula-theme .form-card h2 {
    color: var(--theme-green-950);
}

/* Portal shell */
.agmula-theme.admin-page {
    background: #eef3ec;
}

.agmula-theme.admin-page > .site-header,
.agmula-theme.admin-page > .site-footer {
    display: none;
}

.agmula-theme .admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--theme-sidebar-width) minmax(0, 1fr);
    background:
        radial-gradient(circle at 88% 0%, rgba(200, 239, 124, .13), transparent 23%),
        #eef3ec;
}

.agmula-theme .admin-main {
    min-width: 0;
    background: transparent;
}

.agmula-theme .admin-topbar {
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 17px clamp(22px, 3vw, 44px);
    border-bottom: 1px solid var(--theme-line);
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 7px 24px rgba(12, 63, 34, .04);
    backdrop-filter: blur(18px);
}

.agmula-theme .admin-topbar h1 {
    margin: 2px 0 0;
    color: var(--theme-green-950);
    font-size: clamp(1.42rem, 2.2vw, 2rem);
    letter-spacing: -.035em;
}

.agmula-theme .admin-kicker {
    margin: 0;
    color: var(--theme-green-700);
    font-size: .65rem;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.agmula-theme .admin-profile {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 9px 6px 7px;
    border: 1px solid var(--theme-line);
    border-radius: 999px;
    background: #fff;
    box-shadow: var(--theme-shadow-sm);
}

.agmula-theme .admin-profile > span:last-child {
    min-width: 0;
}

.agmula-theme .admin-profile strong,
.agmula-theme .admin-profile small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agmula-theme .admin-profile strong {
    color: var(--theme-green-950);
    font-size: .75rem;
}

.agmula-theme .admin-profile small {
    color: var(--theme-muted);
    font-size: .61rem;
}

.agmula-theme .admin-avatar,
.agmula-theme .role-sidebar-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background:
        linear-gradient(145deg, var(--theme-lime), #78b95a);
    color: var(--theme-green-950);
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(7, 61, 37, .12);
}

.agmula-theme .admin-avatar {
    width: 36px;
    height: 36px;
}

.agmula-theme .admin-content {
    width: min(100%, var(--theme-content-max));
    margin: 0 auto;
    padding: clamp(20px, 2.6vw, 36px);
}

.agmula-theme .role-dashboard-content {
    padding-top: clamp(20px, 2.4vw, 32px);
}

/* Sidebar */
.agmula-theme .admin-sidebar {
    position: sticky;
    top: 0;
    z-index: 25;
    height: 100vh;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 20px 14px 16px;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, .1);
    background:
        radial-gradient(circle at 40% -4%, rgba(200, 239, 124, .15), transparent 28%),
        linear-gradient(180deg, #0b4a2b 0%, #073d25 60%, #052f1d 100%);
    color: #fff;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .22) transparent;
}

.agmula-theme .admin-brand {
    min-height: 56px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 10px;
    border-radius: var(--theme-radius-md);
    color: #fff;
}

.agmula-theme .admin-brand:hover {
    background: rgba(255, 255, 255, .07);
    color: #fff;
}

.agmula-theme .admin-brand strong,
.agmula-theme .admin-brand small {
    display: block;
}

.agmula-theme .admin-brand strong {
    color: #fff;
    font-size: .92rem;
    letter-spacing: .08em;
}

.agmula-theme .admin-brand small {
    margin-top: 1px;
    color: rgba(255, 255, 255, .66);
    font-size: .61rem;
}

.agmula-theme .admin-brand-mark {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 12px;
    background: rgba(255, 255, 255, .09);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
}

.agmula-theme .role-sidebar-account {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin: 14px 4px 10px;
    padding: 11px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--theme-radius-md);
    background: rgba(255, 255, 255, .065);
}

.agmula-theme .role-sidebar-avatar {
    width: 40px;
    height: 40px;
}

.agmula-theme .role-sidebar-account strong,
.agmula-theme .role-sidebar-account small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agmula-theme .role-sidebar-account strong {
    color: #fff;
    font-size: .72rem;
}

.agmula-theme .role-sidebar-account small {
    margin-top: 2px;
    color: rgba(255, 255, 255, .62);
    font-size: .59rem;
}

.agmula-theme .admin-nav {
    display: grid;
    gap: 4px;
    margin-top: 12px;
}

.agmula-theme .admin-nav-link,
.agmula-theme .admin-logout button {
    position: relative;
    min-height: 43px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
    width: 100%;
    padding: 5px 10px 5px 7px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: rgba(255, 255, 255, .75);
    font: inherit;
    font-size: .72rem;
    font-weight: 720;
    text-align: left;
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.agmula-theme .admin-nav-link:hover,
.agmula-theme .admin-logout button:hover {
    transform: translateX(2px);
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.agmula-theme .admin-nav-link.is-active {
    background: linear-gradient(90deg, rgba(200, 239, 124, .21), rgba(255, 255, 255, .08));
    color: #fff;
    box-shadow: inset 3px 0 0 var(--theme-lime);
}

.agmula-theme .admin-nav-link.is-disabled {
    opacity: .42;
    cursor: not-allowed;
}

.agmula-theme .admin-nav-link.is-disabled:hover {
    transform: none;
    background: transparent;
}

.agmula-theme .admin-nav-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(255, 255, 255, .07);
    color: currentColor;
    font-size: .93rem;
}

.agmula-theme .admin-nav-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.agmula-theme .admin-nav-link.is-active .admin-nav-icon {
    background: rgba(200, 239, 124, .18);
    color: var(--theme-lime);
}

.agmula-theme .admin-nav-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agmula-theme .notification-nav-count {
    min-width: 21px;
    height: 21px;
    display: inline-grid;
    place-items: center;
    padding-inline: 5px;
    border-radius: 999px;
    background: var(--theme-lime);
    color: var(--theme-green-950);
    font-size: .56rem;
    font-weight: 950;
}

.agmula-theme .admin-logout {
    margin-top: auto;
    padding-top: 14px;
}

.agmula-theme .admin-logout button {
    border-top: 1px solid rgba(255, 255, 255, .08);
    border-radius: 0;
    color: rgba(255, 255, 255, .72);
}

/* Role accents stay subtle */
.agmula-theme .role-sidebar-buyer .admin-nav-link.is-active {
    box-shadow: inset 3px 0 0 #a8e2ff;
}

.agmula-theme .role-sidebar-seller .admin-nav-link.is-active {
    box-shadow: inset 3px 0 0 var(--theme-lime);
}

.agmula-theme .role-sidebar-rider .admin-nav-link.is-active {
    box-shadow: inset 3px 0 0 #ffd774;
}

/* Dashboard intros and cards */
.agmula-theme .role-dashboard-intro {
    position: relative;
    overflow: hidden;
    padding: clamp(22px, 3vw, 34px);
    border: 1px solid var(--theme-line);
    border-radius: var(--theme-radius-xl);
    background:
        radial-gradient(circle at 94% 8%, rgba(200, 239, 124, .28), transparent 30%),
        #fff;
    box-shadow: var(--theme-shadow-md);
}

.agmula-theme .role-dashboard-intro::after {
    content: "";
    position: absolute;
    right: -42px;
    bottom: -55px;
    width: 180px;
    height: 180px;
    border: 28px solid rgba(29, 122, 66, .055);
    border-radius: 50%;
    pointer-events: none;
}

.agmula-theme .role-dashboard-intro > * {
    position: relative;
    z-index: 1;
}

.agmula-theme .role-dashboard-intro h2 {
    color: var(--theme-green-950);
    letter-spacing: -.035em;
}

.agmula-theme .role-dashboard-intro p {
    color: var(--theme-muted);
}

.agmula-theme .admin-card,
.agmula-theme .panel,
.agmula-theme .admin-metrics > article,
.agmula-theme .metric-card {
    border: 1px solid var(--theme-line);
    border-radius: var(--theme-radius-lg);
    background: #fff;
    box-shadow: var(--theme-shadow-sm);
}

.agmula-theme .admin-card {
    overflow: hidden;
}

.agmula-theme .admin-card:hover,
.agmula-theme .role-card-link:hover {
    border-color: #c6d9c2;
    box-shadow: var(--theme-shadow-md);
}

.agmula-theme .admin-card-heading {
    gap: 18px;
    padding-bottom: 13px;
    border-bottom: 1px solid #e7ede4;
}

.agmula-theme .admin-card-heading h2 {
    color: var(--theme-green-950);
    letter-spacing: -.025em;
}

.agmula-theme .admin-card-heading > div > span,
.agmula-theme .admin-card-heading > span:first-child {
    color: var(--theme-green-700);
    font-weight: 900;
}

.agmula-theme .admin-card-link,
.agmula-theme .admin-card-badge {
    border-radius: 999px;
    background: var(--theme-green-50);
    color: var(--theme-green-800);
    font-weight: 850;
}

.agmula-theme .admin-card-link:hover,
.agmula-theme .admin-card-badge:hover {
    background: var(--theme-green-100);
    color: var(--theme-green-950);
}

/* Metrics */
.agmula-theme .admin-metrics {
    gap: 13px;
}

.agmula-theme .admin-metrics > article {
    position: relative;
    overflow: hidden;
    padding: 18px;
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.agmula-theme .admin-metrics > article::after {
    content: "";
    position: absolute;
    right: -22px;
    bottom: -34px;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: rgba(29, 122, 66, .055);
}

.agmula-theme .admin-metrics > article:hover {
    transform: translateY(-2px);
    box-shadow: var(--theme-shadow-md);
}

.agmula-theme .admin-metrics > article > * {
    position: relative;
    z-index: 1;
}

.agmula-theme .admin-metrics span {
    color: var(--theme-muted);
    font-size: .65rem;
    font-weight: 850;
    letter-spacing: .025em;
    text-transform: uppercase;
}

.agmula-theme .admin-metrics strong {
    color: var(--theme-green-950);
    letter-spacing: -.035em;
}

.agmula-theme .admin-metrics small {
    color: var(--theme-muted);
}

/* Lists */
.agmula-theme .dashboard-order-list > a,
.agmula-theme .verification-list li,
.agmula-theme .category-summary-list li,
.agmula-theme .role-action-list li {
    border-color: #e7ede4;
    transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.agmula-theme .dashboard-order-list > a:hover,
.agmula-theme .verification-list li:hover,
.agmula-theme .category-summary-list li:hover,
.agmula-theme .role-action-list li:hover {
    transform: translateX(2px);
    border-color: #cfdccb;
    background: var(--theme-green-50);
}

/* Tables */
.agmula-theme :where(.admin-content, .role-dashboard-content) table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid var(--theme-line);
    border-radius: var(--theme-radius-md);
    background: #fff;
    box-shadow: var(--theme-shadow-sm);
}

.agmula-theme :where(.admin-content, .role-dashboard-content) thead th {
    padding: 12px 14px;
    border-bottom: 1px solid var(--theme-line);
    background: var(--theme-green-50);
    color: var(--theme-green-950);
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-align: left;
    text-transform: uppercase;
}

.agmula-theme :where(.admin-content, .role-dashboard-content) tbody td {
    padding: 13px 14px;
    border-bottom: 1px solid #edf1eb;
    color: var(--theme-ink);
    font-size: .76rem;
    vertical-align: middle;
}

.agmula-theme :where(.admin-content, .role-dashboard-content) tbody tr:last-child td {
    border-bottom: 0;
}

.agmula-theme :where(.admin-content, .role-dashboard-content) tbody tr:hover td {
    background: #fbfdf9;
}

/* Status chips */
.agmula-theme :where(
    .status-badge,
    .order-status,
    .delivery-status,
    .payment-status,
    .marketplace-availability
) {
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 850;
}

.agmula-theme .status-active,
.agmula-theme .order-status-delivered,
.agmula-theme .delivery-status-delivered,
.agmula-theme .payment-status-paid {
    border-color: #c6e2cb;
    background: #edf8ee;
    color: #1e6a35;
}

.agmula-theme .status-pending,
.agmula-theme .order-status-pending,
.agmula-theme .payment-status-pending {
    border-color: #ead7a8;
    background: var(--theme-warning-bg);
    color: var(--theme-warning);
}

.agmula-theme .status-suspended,
.agmula-theme .status-rejected,
.agmula-theme .order-status-cancelled,
.agmula-theme .payment-status-failed {
    border-color: #efc8c3;
    background: var(--theme-danger-bg);
    color: var(--theme-danger);
}

/* Empty states */
.agmula-theme :where(
    .admin-empty-list,
    .admin-empty-row,
    .catalog-empty-state,
    .marketplace-empty-state,
    .role-empty-card
) {
    border-radius: var(--theme-radius-md);
}

.agmula-theme .catalog-empty-state,
.agmula-theme .marketplace-empty-state {
    border: 1px dashed var(--theme-line-strong);
    background: var(--theme-surface-soft);
}

/* Pagination */
.agmula-theme :where(
    .marketplace-pager-control,
    .marketplace-pager-page,
    .catalog-pagination a,
    .catalog-pagination span
) {
    border-color: var(--theme-line);
    border-radius: 9px;
    background: #fff;
    color: var(--theme-green-800);
}

.agmula-theme :where(
    .marketplace-pager-page.is-current,
    .catalog-pagination .active,
    .catalog-pagination [aria-current="page"]
) {
    border-color: var(--theme-green-700);
    background: var(--theme-green-700);
    color: #fff;
}

/* Motion safety */
@media (prefers-reduced-motion: reduce) {
    .agmula-theme *,
    .agmula-theme *::before,
    .agmula-theme *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Portal tablet */
@media (max-width: 1100px) {
    :root {
        --theme-sidebar-width: 226px;
    }

    .agmula-theme .admin-content {
        padding: 22px;
    }

    .agmula-theme .admin-topbar {
        padding-inline: 24px;
    }

    .agmula-theme .admin-nav-link,
    .agmula-theme .admin-logout button {
        padding-right: 7px;
    }
}

/* Portal compact/mobile shell */
@media (max-width: 900px) {
    .agmula-theme .admin-shell {
        grid-template-columns: 1fr;
    }

    .agmula-theme .admin-sidebar {
        position: relative;
        top: auto;
        height: auto;
        max-height: none;
        padding: 12px 14px;
        overflow: visible;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .1);
    }

    .agmula-theme .admin-brand {
        min-height: 48px;
    }

    .agmula-theme .role-sidebar-account {
        margin-block: 8px;
    }

    .agmula-theme .admin-nav {
        display: flex;
        gap: 6px;
        margin-top: 9px;
        padding-bottom: 4px;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .agmula-theme .admin-nav-link {
        min-width: max-content;
        grid-template-columns: 31px auto auto;
        flex: 0 0 auto;
        padding-inline: 7px 11px;
    }

    .agmula-theme .admin-nav-link.is-active {
        box-shadow: inset 0 -3px 0 var(--theme-lime);
    }

    .agmula-theme .admin-logout {
        margin-top: 8px;
        padding-top: 0;
    }

    .agmula-theme .admin-logout button {
        width: auto;
        min-width: max-content;
        grid-template-columns: 31px auto;
        border-top: 0;
        border-radius: 10px;
    }

    .agmula-theme .admin-topbar {
        position: sticky;
        top: 0;
        z-index: 20;
    }
}

/* Phones */
@media (max-width: 640px) {
    .agmula-theme:not(.admin-page) .header-inner {
        min-height: 68px;
    }

    .agmula-theme .admin-topbar {
        min-height: 74px;
        padding: 12px 16px;
    }

    .agmula-theme .admin-profile {
        max-width: 48%;
    }

    .agmula-theme .admin-profile small {
        display: none;
    }

    .agmula-theme .admin-content {
        padding: 16px 12px 26px;
    }

    .agmula-theme .role-dashboard-intro {
        padding: 20px;
        border-radius: 18px;
    }

    .agmula-theme .admin-card,
    .agmula-theme .panel,
    .agmula-theme .admin-metrics > article,
    .agmula-theme .metric-card {
        border-radius: 16px;
    }

    .agmula-theme :where(.admin-content, .role-dashboard-content) table {
        min-width: 720px;
    }

    .agmula-theme :where(.admin-content, .role-dashboard-content) .table-wrap,
    .agmula-theme :where(.admin-content, .role-dashboard-content) .admin-table-wrap,
    .agmula-theme :where(.admin-content, .role-dashboard-content) .responsive-table {
        overflow-x: auto;
        border-radius: 16px;
    }
}

/*
|--------------------------------------------------------------------------
| AGMULA Public Website — Phase 2
|--------------------------------------------------------------------------
| Public-only presentation layer. Marketplace queries, authentication fields,
| routes, permissions, validation, and portal workflows remain unchanged.
*/

/* Public foundation and shell */
body.public-theme-page {
    background:
        radial-gradient(circle at 8% 3%, rgba(200, 239, 124, .12), transparent 21rem),
        var(--theme-cream);
}

body.public-theme-page main {
    min-height: 58vh;
}

.agmula-theme:not(.admin-page) .site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid rgba(7, 61, 37, .08);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 8px 30px rgba(7, 61, 37, .055);
    backdrop-filter: blur(18px);
}

.agmula-theme:not(.admin-page) .header-inner {
    width: min(1480px, calc(100% - 40px));
    min-height: 74px;
}

.agmula-theme:not(.admin-page) .site-header .brand {
    gap: 10px;
}

.agmula-theme:not(.admin-page) .site-header .brand-mark {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 13px;
    box-shadow: 0 10px 24px rgba(18, 99, 53, .14);
}

.agmula-theme:not(.admin-page) .site-header .brand-copy strong {
    color: var(--theme-green-950);
    letter-spacing: .08em;
}

.agmula-theme:not(.admin-page) .site-header .brand-copy small {
    color: var(--theme-muted);
}

.agmula-theme:not(.admin-page) .main-nav {
    gap: 3px;
}

.agmula-theme:not(.admin-page) .main-nav > a,
.agmula-theme:not(.admin-page) .main-nav .nav-button {
    min-height: 40px;
    padding-inline: 10px;
    color: #4f6356;
    font-size: .75rem;
}

.agmula-theme:not(.admin-page) .main-nav > a:hover,
.agmula-theme:not(.admin-page) .main-nav .nav-button:hover {
    background: var(--theme-green-50);
    color: var(--theme-green-950);
}

.agmula-theme:not(.admin-page) .main-nav > a.is-active {
    background: var(--theme-green-100);
    color: var(--theme-green-950);
}

.agmula-theme:not(.admin-page) .main-nav > a.is-active::after {
    background: var(--theme-green-700);
}

.agmula-theme:not(.admin-page) .main-nav .nav-create-account {
    min-height: 40px;
    padding-inline: 15px;
    border-color: var(--theme-green-800);
    background: var(--theme-green-800);
    color: #fff;
}

.agmula-theme .global-flash-stack {
    position: fixed;
    z-index: 10000;
    top: max(14px, env(safe-area-inset-top));
    left: 50%;
    width: min(480px, calc(100vw - 32px));
    display: grid;
    gap: 10px;
    transform: translateX(-50%);
    pointer-events: none;
}

.agmula-theme .global-flash {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    margin: 0;
    padding: 14px 14px 14px 16px;
    border-width: 1px;
    border-style: solid;
    box-shadow: 0 18px 46px rgba(10, 51, 31, .18);
    pointer-events: auto;
    animation: agmula-global-flash-slide-down 220ms ease-out both;
}

.agmula-theme .global-flash.is-dismissing {
    animation: agmula-global-flash-slide-up 180ms ease-in both;
}

.agmula-theme .global-flash-message {
    min-width: 0;
    align-self: center;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.agmula-theme .global-flash-close {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    margin: -5px -5px -5px 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: currentColor;
    font: inherit;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    opacity: .72;
}

.agmula-theme .global-flash-close:hover {
    background: rgba(0, 0, 0, .07);
    opacity: 1;
}

.agmula-theme .global-flash-close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    opacity: 1;
}

@keyframes agmula-global-flash-slide-down {
    from {
        opacity: 0;
        transform: translateY(-28px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes agmula-global-flash-slide-up {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(-20px) scale(.98);
    }
}

/* Homepage hero */
body.public-home-page .market-hero.public-hero {
    padding: 22px 0 0;
    background:
        radial-gradient(circle at 90% 8%, rgba(200, 239, 124, .15), transparent 27rem),
        linear-gradient(180deg, #f8f7ef 0%, #f3f7ef 100%);
}

body.public-home-page .market-hero > .shell {
    width: min(1480px, calc(100% - 40px));
}

body.public-home-page .market-hero-card.public-hero-card {
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(420px, .94fr);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 32px 32px 0 0;
    background:
        radial-gradient(circle at 88% 10%, rgba(200, 239, 124, .21), transparent 29%),
        radial-gradient(circle at 8% 95%, rgba(93, 149, 72, .24), transparent 32%),
        linear-gradient(132deg, #073d25 0%, #0d5130 52%, #247041 100%);
    box-shadow: 0 32px 80px rgba(7, 61, 37, .19);
}

body.public-home-page .market-hero-card.public-hero-card::before {
    right: auto;
    bottom: -220px;
    left: -120px;
    width: 520px;
    height: 520px;
    border: 70px solid rgba(200, 239, 124, .055);
    border-radius: 50%;
    background: transparent;
}

body.public-home-page .market-hero-card.public-hero-card::after {
    top: -190px;
    right: -170px;
    bottom: auto;
    left: auto;
    width: 460px;
    height: 460px;
    border: 62px solid rgba(255, 255, 255, .045);
    border-radius: 50%;
    background: transparent;
}

body.public-home-page .public-hero-copy {
    position: relative;
    z-index: 2;
    align-self: center;
    padding: 66px 36px 66px 68px;
}

body.public-home-page .public-hero-copy h1 {
    max-width: 720px;
    margin: 20px 0 18px;
    color: #fff;
    font-size: clamp(3.15rem, 5.4vw, 5.65rem);
    line-height: .94;
    letter-spacing: -.065em;
}

body.public-home-page .public-hero-copy h1 em {
    color: var(--theme-lime);
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 500;
    letter-spacing: -.045em;
}

body.public-home-page .public-hero-copy > p {
    max-width: 640px;
    margin: 0;
    color: rgba(255, 255, 255, .78);
    font-size: 1rem;
    line-height: 1.72;
}

.public-hero-search {
    width: min(100%, 680px);
    min-height: 60px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    margin-top: 28px;
    padding: 7px 7px 7px 17px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 16px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 22px 48px rgba(3, 37, 18, .19);
}

.public-hero-search > span {
    color: var(--theme-green-700);
    font-size: 1.16rem;
}

.public-hero-search input {
    min-width: 0;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--theme-ink);
    font: inherit;
    font-size: .82rem;
    outline: 0;
}

.public-hero-search input::placeholder {
    color: #849188;
}

.public-hero-search button {
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid var(--theme-green-800);
    border-radius: 11px;
    background: var(--theme-green-800);
    color: #fff;
    font: inherit;
    font-size: .72rem;
    font-weight: 900;
    cursor: pointer;
    transition: background 150ms ease, transform 150ms ease;
}

.public-hero-search button:hover {
    transform: translateY(-1px);
    background: var(--theme-green-950);
}

body.public-home-page .public-hero-copy .hero-actions {
    margin-top: 22px;
}

body.public-home-page .public-hero-copy .home-hero-primary {
    border-color: var(--theme-lime);
    background: var(--theme-lime);
    color: var(--theme-green-950);
    box-shadow: 0 14px 34px rgba(2, 31, 16, .18);
}

body.public-home-page .public-hero-copy .home-hero-primary:hover {
    border-color: #ddf8a7;
    background: #ddf8a7;
    color: var(--theme-green-950);
}

body.public-home-page .public-hero-copy .home-hero-secondary {
    border-color: rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .09);
    color: #fff;
    box-shadow: none;
}

body.public-home-page .public-hero-copy .home-hero-secondary:hover {
    border-color: rgba(255, 255, 255, .45);
    background: rgba(255, 255, 255, .16);
    color: #fff;
}

body.public-home-page .public-hero-copy .hero-trust-row {
    margin-top: 24px;
}

body.public-home-page .public-hero-art {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: grid;
    align-items: center;
    padding: 58px 58px 58px 18px;
}

body.public-home-page .public-hero-art::before {
    content: "";
    position: absolute;
    inset: 11% 4% 10% 6%;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 40% 60% 48% 52% / 48% 39% 61% 52%;
    background: rgba(255, 255, 255, .055);
    transform: rotate(4deg);
}

body.public-home-page .public-hero-art .hero-image-frame {
    position: relative;
    z-index: 2;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 28px;
    background: rgba(255, 255, 255, .11);
    box-shadow: 0 34px 70px rgba(2, 34, 18, .29);
    transform: rotate(1.25deg);
}

body.public-home-page .public-hero-art img {
    width: 100%;
    height: 430px;
    display: block;
    object-fit: cover;
    object-position: center;
}

.hero-floating-card {
    position: absolute;
    z-index: 4;
    min-width: 172px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .62);
    border-radius: 14px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 18px 42px rgba(2, 34, 18, .18);
    backdrop-filter: blur(14px);
}

.hero-floating-card > span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--theme-green-100);
    color: var(--theme-green-800);
    font-weight: 950;
}

.hero-floating-card strong,
.hero-floating-card small {
    display: block;
}

.hero-floating-card strong {
    color: var(--theme-green-950);
    font-size: .7rem;
}

.hero-floating-card small {
    margin-top: 2px;
    color: var(--theme-muted);
    font-size: .58rem;
}

.hero-floating-card-top {
    top: 78px;
    right: 25px;
}

.hero-floating-card-bottom {
    right: 40px;
    bottom: 72px;
}

body.public-home-page .public-benefit-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--theme-line);
    border-top: 0;
    border-radius: 0 0 28px 28px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(7, 61, 37, .08);
}

body.public-home-page .public-benefit-strip article {
    min-height: 92px;
    padding: 18px;
    border-right: 1px solid #e7ede4;
}

body.public-home-page .public-benefit-strip article:last-child {
    border-right: 0;
}

body.public-home-page .public-benefit-strip .benefit-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: var(--theme-green-50);
}

body.public-home-page .public-benefit-strip strong {
    color: var(--theme-green-950);
    font-size: .72rem;
}

body.public-home-page .public-benefit-strip small {
    margin-top: 3px;
    color: var(--theme-muted);
    font-size: .62rem;
    line-height: 1.45;
}

/* Homepage sections */
body.public-home-page .market-section {
    padding: 82px 0;
}

body.public-home-page .market-section-soft {
    background:
        radial-gradient(circle at 90% 5%, rgba(200, 239, 124, .11), transparent 24rem),
        #eef4eb;
}

body.public-home-page .public-section-heading {
    align-items: end;
    margin-bottom: 30px;
}

body.public-home-page .public-section-heading h2 {
    max-width: 760px;
    margin: 7px 0 0;
    color: var(--theme-green-950);
    font-size: clamp(2rem, 3.4vw, 3.35rem);
    line-height: 1.02;
    letter-spacing: -.05em;
}

body.public-home-page .public-section-heading p {
    max-width: 700px;
    margin-top: 12px;
    color: var(--theme-muted);
    font-size: .88rem;
    line-height: 1.7;
}

body.public-home-page .section-note {
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid var(--theme-line);
    border-radius: 999px;
    background: #fff;
    color: var(--theme-green-800);
    box-shadow: var(--theme-shadow-sm);
    font-weight: 850;
}

body.public-home-page .section-note:hover {
    border-color: var(--theme-green-200);
    background: var(--theme-green-50);
    color: var(--theme-green-950);
}

body.public-home-page .category-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
}

body.public-home-page .category-card {
    min-height: 176px;
    padding: 18px;
    border: 1px solid var(--theme-line);
    border-radius: 20px;
    background:
        radial-gradient(circle at 100% 0%, rgba(200, 239, 124, .16), transparent 45%),
        #fff;
    box-shadow: var(--theme-shadow-sm);
}

body.public-home-page .category-card:hover {
    transform: translateY(-4px);
    border-color: #b9d0b6;
    box-shadow: var(--theme-shadow-md);
}

body.public-home-page .category-card .category-card-icon {
    width: 58px;
    height: 58px;
    border: 1px solid #e1eadf;
    border-radius: 18px;
    background: linear-gradient(145deg, #f1f8ed, #fbf6e7);
}

body.public-home-page .category-card-copy strong {
    color: var(--theme-green-950);
}

body.public-home-page .marketplace-home-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

body.public-home-page .marketplace-product-card,
body.public-marketplace-page .marketplace-product-card {
    overflow: hidden;
    border: 1px solid var(--theme-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--theme-shadow-sm);
    transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

body.public-home-page .marketplace-product-card:hover,
body.public-marketplace-page .marketplace-product-card:hover {
    transform: translateY(-4px);
    border-color: #bfd3bc;
    box-shadow: 0 22px 46px rgba(7, 61, 37, .11);
}

body.public-home-page .marketplace-product-image,
body.public-marketplace-page .marketplace-product-image {
    min-height: 218px;
    background:
        radial-gradient(circle at 50% 40%, #f8fbf5, #eaf2e6);
}

body.public-home-page .marketplace-product-image img,
body.public-marketplace-page .marketplace-product-image img {
    height: 228px;
    transition: transform 260ms ease;
}

body.public-home-page .marketplace-product-card:hover .marketplace-product-image img,
body.public-marketplace-page .marketplace-product-card:hover .marketplace-product-image img {
    transform: scale(1.035);
}

body.public-home-page .marketplace-product-body,
body.public-marketplace-page .marketplace-product-body {
    padding: 17px;
}

body.public-home-page .marketplace-product-body h3,
body.public-marketplace-page .marketplace-product-body h3 {
    color: var(--theme-green-950);
    font-size: 1rem;
    line-height: 1.3;
}

body.public-home-page .marketplace-product-description,
body.public-marketplace-page .marketplace-product-description {
    color: var(--theme-muted);
    line-height: 1.55;
}

body.public-home-page .marketplace-product-footer,
body.public-marketplace-page .marketplace-product-footer {
    border-top-color: #e7ede4;
}

body.public-home-page .marketplace-view-button,
body.public-marketplace-page .marketplace-view-button {
    border-radius: 9px;
    background: var(--theme-green-50);
    color: var(--theme-green-800);
}

body.public-home-page .marketplace-view-button:hover,
body.public-marketplace-page .marketplace-view-button:hover {
    background: var(--theme-green-800);
    color: #fff;
}

body.public-home-page .marketplace-farm-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

body.public-home-page .marketplace-farm-card {
    overflow: hidden;
    border: 1px solid var(--theme-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--theme-shadow-sm);
}

body.public-home-page .marketplace-farm-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--theme-shadow-md);
}

body.public-home-page .marketplace-farm-card-image {
    height: 210px;
    background:
        radial-gradient(circle at 50% 35%, #f8fbf5, #e7f0e2);
}

body.public-home-page .marketplace-farm-card > div {
    padding: 20px;
}

body.public-home-page .marketplace-farm-card h3 {
    color: var(--theme-green-950);
    font-size: 1.12rem;
}

body.public-home-page .farm-card-link {
    margin-top: 14px;
    color: var(--theme-green-800);
    font-weight: 850;
}

/* Public process and role sections */
.public-process-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}

.public-process-grid article {
    position: relative;
    min-height: 270px;
    padding: 22px;
    overflow: hidden;
    border: 1px solid var(--theme-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--theme-shadow-sm);
}

.public-process-grid article::after {
    content: "";
    position: absolute;
    right: -38px;
    bottom: -50px;
    width: 130px;
    height: 130px;
    border: 22px solid rgba(29, 122, 66, .05);
    border-radius: 50%;
}

.public-process-number {
    position: absolute;
    top: 18px;
    right: 18px;
    color: #b0beb2;
    font-size: .65rem;
    font-weight: 950;
    letter-spacing: .12em;
}

.public-process-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    background: var(--theme-green-50);
    font-size: 1.55rem;
}

.public-process-grid h3 {
    margin: 38px 0 10px;
    color: var(--theme-green-950);
    font-size: 1rem;
}

.public-process-grid p {
    margin: 0;
    color: var(--theme-muted);
    font-size: .76rem;
    line-height: 1.65;
}

body.public-home-page .public-role-section {
    background: #fff;
}

body.public-home-page .public-role-showcase {
    padding: clamp(30px, 4.2vw, 58px);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 28px;
    background:
        radial-gradient(circle at 90% 12%, rgba(200, 239, 124, .2), transparent 28%),
        linear-gradient(135deg, var(--theme-green-950), #126335);
    box-shadow: var(--theme-shadow-lg);
}

body.public-home-page .public-role-showcase .eyebrow {
    color: var(--theme-lime);
}

body.public-home-page .public-role-showcase h2,
body.public-home-page .public-role-showcase p {
    color: #fff;
}

body.public-home-page .public-role-showcase p {
    color: rgba(255, 255, 255, .72);
}

body.public-home-page .public-role-showcase .role-mini-card {
    border: 1px solid rgba(255, 255, 255, .13);
    background: rgba(255, 255, 255, .09);
    box-shadow: none;
}

body.public-home-page .public-role-showcase .role-mini-card strong {
    color: #fff;
}

body.public-home-page .public-role-showcase .role-mini-card small {
    color: rgba(255, 255, 255, .68);
}

body.public-home-page .public-role-showcase .role-mini-icon {
    background: rgba(200, 239, 124, .14);
}

.public-contact-section {
    padding-top: 28px !important;
}

.public-contact-card {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
    gap: 48px;
    align-items: center;
    padding: clamp(30px, 4.2vw, 58px);
    border: 1px solid var(--theme-line);
    border-radius: 28px;
    background:
        radial-gradient(circle at 90% 10%, rgba(200, 239, 124, .2), transparent 31%),
        #fff;
    box-shadow: var(--theme-shadow-md);
}

.public-contact-card h2 {
    max-width: 760px;
    margin: 8px 0 12px;
    color: var(--theme-green-950);
    font-size: clamp(2rem, 3.6vw, 3.4rem);
    line-height: 1.02;
    letter-spacing: -.05em;
}

.public-contact-card p {
    max-width: 760px;
    margin: 0;
    color: var(--theme-muted);
    line-height: 1.7;
}

.public-contact-actions {
    display: grid;
    gap: 10px;
}

.public-contact-actions .button {
    width: 100%;
    justify-content: center;
}

.public-text-link {
    padding: 7px;
    color: var(--theme-green-800);
    font-size: .72rem;
    font-weight: 850;
    text-align: center;
}

/* Public marketplace landing */
body.public-marketplace-page {
    background:
        radial-gradient(circle at 92% 2%, rgba(200, 239, 124, .14), transparent 28rem),
        #f4f7f1;
}

body.public-marketplace-page .public-marketplace-hero {
    padding: 28px 0 0;
    background: transparent;
}

body.public-marketplace-page .public-marketplace-hero > .shell,
body.public-marketplace-page .marketplace-app-catalog-section > .shell {
    width: min(1480px, calc(100% - 40px));
}

body.public-marketplace-page .public-marketplace-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr);
    gap: 42px;
    align-items: center;
    padding: clamp(30px, 4vw, 52px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 28px;
    background:
        radial-gradient(circle at 90% 10%, rgba(200, 239, 124, .22), transparent 29%),
        linear-gradient(132deg, #073d25, #126335 64%, #2c7a46);
    box-shadow: 0 30px 70px rgba(7, 61, 37, .16);
}

.public-marketplace-hero-copy .eyebrow {
    color: var(--theme-lime);
}

.public-marketplace-hero-copy h1 {
    max-width: 850px;
    margin: 10px 0 14px;
    color: #fff;
    font-size: clamp(2.45rem, 4.4vw, 4.7rem);
    line-height: .98;
    letter-spacing: -.06em;
}

.public-marketplace-hero-copy p {
    max-width: 760px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, .75);
    font-size: .92rem;
    line-height: 1.7;
}

.public-marketplace-hero-copy .button-secondary {
    border-color: rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.public-marketplace-hero-copy .button-secondary:hover {
    border-color: rgba(255, 255, 255, .45);
    background: rgba(255, 255, 255, .17);
    color: #fff;
}

.public-marketplace-trust {
    display: grid;
    gap: 10px;
}

.public-marketplace-trust > span {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 11px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 15px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.public-marketplace-trust > span > b {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(200, 239, 124, .18);
    color: var(--theme-lime);
}

.public-marketplace-trust strong,
.public-marketplace-trust small {
    display: block;
}

.public-marketplace-trust strong {
    color: #fff;
    font-size: .71rem;
}

.public-marketplace-trust small {
    margin-top: 2px;
    color: rgba(255, 255, 255, .63);
    font-size: .59rem;
    line-height: 1.4;
}

body.public-marketplace-page .marketplace-page-section {
    padding: 28px 0 84px;
}

body.public-marketplace-page .marketplace-default-filter-panel {
    gap: 13px;
    margin-bottom: 22px;
    padding: 18px;
    border: 1px solid var(--theme-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--theme-shadow-md);
}

body.public-marketplace-page .marketplace-default-filter-panel input,
body.public-marketplace-page .marketplace-default-filter-panel select {
    min-height: 48px;
    border-color: var(--theme-line-strong);
    border-radius: 11px;
    background: #fbfdf9;
}

body.public-marketplace-page .marketplace-default-filter-submit {
    min-height: 48px;
}

body.public-marketplace-page .marketplace-catalog-layout {
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}

body.public-marketplace-page .marketplace-filter-sidebar {
    position: sticky;
    top: 94px;
    overflow: hidden;
    border: 1px solid var(--theme-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--theme-shadow-sm);
}

body.public-marketplace-page .marketplace-filter-sidebar > summary {
    background: var(--theme-green-50);
}

body.public-marketplace-page .marketplace-sidebar-heading {
    border-bottom-color: #e5ece2;
}

body.public-marketplace-page .marketplace-sidebar-section {
    border-bottom-color: #e8eee5;
}

body.public-marketplace-page .marketplace-filter-choice {
    border-radius: 9px;
}

body.public-marketplace-page .marketplace-filter-choice:hover {
    background: var(--theme-green-50);
}

body.public-marketplace-page .marketplace-catalog-results {
    min-width: 0;
}

body.public-marketplace-page .marketplace-catalog-toolbar {
    margin-bottom: 20px;
    padding: 19px 20px;
    border: 1px solid var(--theme-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--theme-shadow-sm);
}

body.public-marketplace-page .marketplace-catalog-toolbar h2 {
    color: var(--theme-green-950);
}

body.public-marketplace-page .marketplace-sort-form,
body.public-marketplace-page .marketplace-view-switcher {
    border-color: var(--theme-line);
    background: var(--theme-green-50);
}

body.public-marketplace-page .marketplace-view-switch.is-active {
    background: var(--theme-green-800);
    color: #fff;
}

body.public-marketplace-page .marketplace-catalog-results .marketplace-product-grid.is-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

/* Public product and farm details */
body.public-marketplace-detail-page {
    background:
        radial-gradient(circle at 90% 2%, rgba(200, 239, 124, .12), transparent 25rem),
        #f4f7f1;
}

body.public-marketplace-detail-page .marketplace-detail-page {
    padding: 28px 0 86px;
}

body.public-marketplace-detail-page .marketplace-detail-page > .shell {
    width: min(1320px, calc(100% - 40px));
}

body.public-marketplace-detail-page .marketplace-detail-header {
    margin-bottom: 18px;
}

body.public-marketplace-detail-page .marketplace-back-row a,
body.public-marketplace-detail-page .marketplace-detail-trust {
    border-radius: 999px;
}

body.public-product-detail-page .marketplace-product-detail {
    gap: 28px;
    align-items: start;
}

body.public-product-detail-page .marketplace-product-gallery {
    position: sticky;
    top: 100px;
}

body.public-product-detail-page .marketplace-main-photo-wrap {
    overflow: hidden;
    border: 1px solid var(--theme-line);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--theme-shadow-md);
}

body.public-product-detail-page .marketplace-product-main-photo {
    min-height: 520px;
    max-height: 620px;
    object-fit: cover;
}

body.public-product-detail-page .marketplace-product-thumbnails {
    gap: 10px;
    margin-top: 10px;
}

body.public-product-detail-page .marketplace-product-thumbnails img {
    border: 1px solid var(--theme-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--theme-shadow-sm);
}

body.public-product-detail-page .marketplace-product-summary {
    padding: clamp(24px, 3vw, 38px);
    border-radius: 24px;
    box-shadow: var(--theme-shadow-md);
}

body.public-product-detail-page .marketplace-product-summary h1 {
    color: var(--theme-green-950);
    font-size: clamp(2rem, 3.4vw, 3.4rem);
    line-height: 1.02;
    letter-spacing: -.05em;
}

body.public-product-detail-page .marketplace-summary-farm-link {
    border-color: var(--theme-line);
    border-radius: 15px;
    background: var(--theme-green-50);
}

body.public-product-detail-page .marketplace-detail-price {
    padding-block: 22px;
    border-block-color: #e6ece3;
}

body.public-product-detail-page .marketplace-detail-price strong {
    color: var(--theme-green-800);
}

body.public-product-detail-page .marketplace-detail-benefits {
    border-color: var(--theme-line);
    border-radius: 15px;
    background: #fbfdf9;
}

body.public-product-detail-page .marketplace-detail-list > div,
body.public-farm-detail-page .marketplace-detail-list > div {
    border-color: #e7ede4;
}

body.public-product-detail-page .marketplace-purchase-panel {
    border-color: #cfe1ca;
    border-radius: 18px;
    background:
        radial-gradient(circle at 90% 10%, rgba(200, 239, 124, .15), transparent 34%),
        var(--theme-green-50);
}

body.public-product-detail-page .marketplace-farm-callout {
    margin-top: 28px;
    padding: 24px;
    border-radius: 22px;
    box-shadow: var(--theme-shadow-sm);
}

body.public-marketplace-detail-page .marketplace-related-section {
    margin-top: 52px;
}

body.public-marketplace-detail-page .marketplace-app-section-heading h2 {
    color: var(--theme-green-950);
    font-size: clamp(1.7rem, 3vw, 2.7rem);
    letter-spacing: -.04em;
}

body.public-farm-detail-page .marketplace-farm-profile {
    overflow: hidden;
    border: 1px solid var(--theme-line);
    border-radius: 26px;
    background: #fff;
    box-shadow: var(--theme-shadow-md);
}

body.public-farm-detail-page .marketplace-farm-cover {
    min-height: 300px;
}

body.public-farm-detail-page .marketplace-farm-overview {
    margin: -66px 24px 24px;
    padding: 28px;
    border-radius: 22px;
    box-shadow: var(--theme-shadow-md);
}

body.public-farm-detail-page .marketplace-farm-avatar {
    border: 5px solid #fff;
    box-shadow: 0 14px 32px rgba(7, 61, 37, .16);
}

body.public-farm-detail-page .marketplace-farm-overview h1 {
    color: var(--theme-green-950);
    font-size: clamp(2rem, 3.7vw, 3.5rem);
    letter-spacing: -.05em;
}

body.public-farm-detail-page .marketplace-farm-stats {
    overflow: hidden;
    border: 1px solid var(--theme-line);
    border-radius: 16px;
    background: var(--theme-green-50);
}

body.public-farm-detail-page .marketplace-farm-stats > div {
    border-right-color: var(--theme-line);
}

body.public-farm-detail-page .marketplace-farm-gallery img {
    border-radius: 16px;
    box-shadow: var(--theme-shadow-sm);
}

/* Public authentication */
body.auth-page {
    background:
        radial-gradient(circle at 10% 10%, rgba(200, 239, 124, .19), transparent 27rem),
        linear-gradient(145deg, #f8f6ed, #edf4ea);
}

body.auth-page .public-auth-section {
    min-height: calc(100vh - 74px);
    display: grid;
    align-items: center;
    padding: 54px 0 72px;
    background:
        radial-gradient(circle at 90% 9%, rgba(29, 122, 66, .08), transparent 30rem),
        transparent;
}

body.auth-page .public-auth-grid {
    width: min(1180px, calc(100% - 40px));
    grid-template-columns: minmax(0, .92fr) minmax(430px, 1.08fr);
    gap: clamp(48px, 7vw, 96px);
    align-items: center;
}

body.auth-page .public-auth-intro {
    color: var(--theme-ink);
}

body.auth-page .public-auth-intro .eyebrow {
    color: var(--theme-green-700);
}

body.auth-page .public-auth-intro h1 {
    max-width: 670px;
    margin: 12px 0 18px;
    color: var(--theme-green-950);
    font-size: clamp(2.8rem, 5vw, 5rem);
    line-height: .96;
    letter-spacing: -.065em;
}

body.auth-page .public-auth-intro > p {
    max-width: 610px;
    margin: 0;
    color: var(--theme-muted);
    font-size: .92rem;
    line-height: 1.75;
}

.auth-benefit-list,
.auth-role-guide {
    display: grid;
    gap: 10px;
    margin-top: 28px;
}

.auth-benefit-list article,
.auth-role-guide article {
    display: grid;
    grid-template-columns: 43px minmax(0, 1fr);
    gap: 11px;
    align-items: center;
    padding: 11px 12px;
    border: 1px solid rgba(199, 214, 196, .8);
    border-radius: 15px;
    background: rgba(255, 255, 255, .66);
    backdrop-filter: blur(10px);
}

.auth-benefit-list article > span,
.auth-role-guide article > span {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--theme-green-100);
    color: var(--theme-green-800);
    font-weight: 950;
}

.auth-benefit-list strong,
.auth-benefit-list small,
.auth-role-guide strong,
.auth-role-guide small {
    display: block;
}

.auth-benefit-list strong,
.auth-role-guide strong {
    color: var(--theme-green-950);
    font-size: .72rem;
}

.auth-benefit-list small,
.auth-role-guide small {
    margin-top: 2px;
    color: var(--theme-muted);
    font-size: .61rem;
    line-height: 1.45;
}

body.auth-page .public-auth-card {
    width: 100%;
    padding: clamp(26px, 3.4vw, 42px);
    border: 1px solid rgba(199, 214, 196, .92);
    border-radius: 26px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 30px 72px rgba(7, 61, 37, .14);
}

.auth-card-heading {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    margin-bottom: 24px;
}

.auth-card-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border: 1px solid #dce8d8;
    border-radius: 16px;
    background: var(--theme-green-50);
    font-size: 1.45rem;
}

.auth-card-heading h2 {
    margin: 4px 0 4px;
    color: var(--theme-green-950);
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    letter-spacing: -.04em;
}

.auth-card-heading p {
    margin: 0;
    line-height: 1.5;
}

.auth-form-error {
    display: grid;
    gap: 4px;
    margin-bottom: 20px;
}

.auth-form-error strong,
.auth-form-error span {
    display: block;
}

body.auth-page .public-auth-form {
    gap: 17px;
}

body.auth-page .public-auth-form label > span:first-child,
body.auth-page .public-role-picker > legend {
    margin-bottom: 7px;
    color: var(--theme-green-950);
    font-size: .69rem;
    font-weight: 850;
}

body.auth-page .public-auth-form input:not([type="checkbox"]):not([type="radio"]) {
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid var(--theme-line-strong);
    border-radius: 11px;
    background: #fbfdf9;
}

.password-field {
    position: relative;
    display: block;
}

.password-field input {
    width: 100%;
    padding-right: 70px !important;
}

.password-field > button {
    position: absolute;
    top: 50%;
    right: 7px;
    min-width: 54px;
    min-height: 34px;
    padding: 0 8px;
    border: 0;
    border-radius: 8px;
    background: var(--theme-green-50);
    color: var(--theme-green-800);
    font: inherit;
    font-size: .64rem;
    font-weight: 900;
    cursor: pointer;
    transform: translateY(-50%);
}

.password-field > button:hover {
    background: var(--theme-green-100);
    color: var(--theme-green-950);
}

.auth-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.auth-form-options .check-row {
    margin: 0;
}

.auth-form-options > a {
    color: var(--theme-green-800);
    font-size: .69rem;
    font-weight: 850;
}

body.auth-page .public-auth-form > .button {
    min-height: 50px;
    margin-top: 2px;
}

body.auth-page .form-footer {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e5ece2;
}

body.auth-page .form-footer a {
    color: var(--theme-green-800);
    font-weight: 850;
}

body.register-page .public-register-grid {
    width: min(1280px, calc(100% - 40px));
    grid-template-columns: minmax(0, .82fr) minmax(560px, 1.18fr);
}

body.register-page .public-register-card {
    max-width: none;
}

body.register-page .public-role-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

body.register-page .public-role-picker .role-option {
    position: relative;
    min-height: 132px;
    display: grid;
    grid-template-columns: 1fr;
    align-content: center;
    justify-items: start;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--theme-line);
    border-radius: 16px;
    background: #fbfdf9;
}

body.register-page .public-role-picker .role-option:hover {
    border-color: #abc7a7;
    background: var(--theme-green-50);
}

body.register-page .public-role-picker .role-option:has(input:checked) {
    border-color: var(--theme-green-700);
    background: var(--theme-green-50);
    box-shadow: 0 0 0 3px rgba(29, 122, 66, .1);
}

body.register-page .public-role-picker .role-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

body.register-page .public-role-picker .role-option-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: #fff;
    font-size: 1.25rem;
}

body.register-page .public-role-picker .role-option strong,
body.register-page .public-role-picker .role-option small {
    display: block;
}

body.register-page .public-role-picker .role-option strong {
    color: var(--theme-green-950);
    font-size: .72rem;
}

body.register-page .public-role-picker .role-option small {
    margin-top: 3px;
    color: var(--theme-muted);
    font-size: .6rem;
    line-height: 1.4;
}

.role-option-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    display: none;
    place-items: center;
    border-radius: 50%;
    background: var(--theme-green-700);
    color: #fff;
    font-size: .6rem;
    font-weight: 950;
}

body.register-page .public-role-picker .role-option:has(input:checked) .role-option-check {
    display: grid;
}

.auth-password-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -2px 0 0;
    color: var(--theme-muted);
    font-size: .64rem;
}

.auth-password-note > span {
    width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: var(--theme-info-bg);
    color: var(--theme-info);
    font-size: .58rem;
    font-weight: 950;
}

/* Footer refinements */
.agmula-theme:not(.admin-page) .site-footer {
    background:
        radial-gradient(circle at 10% 0%, rgba(200, 239, 124, .1), transparent 25rem),
        linear-gradient(145deg, #073d25, #052f1d);
}

.agmula-theme:not(.admin-page) .footer-grid {
    width: min(1480px, calc(100% - 40px));
    grid-template-columns: minmax(0, 1.45fr) repeat(2, minmax(170px, .55fr));
    gap: clamp(36px, 7vw, 100px);
    padding-top: 58px;
    padding-bottom: 46px;
}

.footer-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.footer-trust-row span {
    padding: 6px 9px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    background: rgba(255, 255, 255, .05);
    color: rgba(255, 255, 255, .68);
    font-size: .58rem;
    font-weight: 750;
}

.agmula-theme:not(.admin-page) .footer-bottom {
    width: min(1480px, calc(100% - 40px));
}

/* Public responsive layouts */
@media (max-width: 1280px) {
    body.public-home-page .market-hero-card.public-hero-card {
        grid-template-columns: minmax(0, 1fr) minmax(380px, .88fr);
    }

    body.public-home-page .public-hero-copy {
        padding-left: 48px;
    }

    body.public-home-page .public-hero-art {
        padding-right: 36px;
    }

    body.public-home-page .marketplace-home-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    body.public-marketplace-page .marketplace-catalog-results .marketplace-product-grid.is-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1120px) {
    .agmula-theme:not(.admin-page) .header-inner {
        width: min(100% - 32px, 1480px);
    }

    .agmula-theme:not(.admin-page) .site-header .main-nav {
        top: 78px;
        right: 16px;
        left: 16px;
        border-color: var(--theme-line);
    }

    body.public-home-page .market-hero-card.public-hero-card {
        min-height: auto;
        grid-template-columns: minmax(0, 1fr) 380px;
    }

    body.public-home-page .public-hero-copy {
        padding: 52px 24px 52px 42px;
    }

    body.public-home-page .public-hero-art {
        min-height: 540px;
        padding: 42px 32px 42px 10px;
    }

    body.public-home-page .public-hero-art img {
        height: 380px;
    }

    .hero-floating-card-top {
        top: 62px;
        right: 12px;
    }

    .hero-floating-card-bottom {
        right: 22px;
        bottom: 60px;
    }

    body.public-home-page .public-benefit-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.public-home-page .public-benefit-strip article:nth-child(2) {
        border-right: 0;
    }

    body.public-home-page .public-benefit-strip article:nth-child(-n+2) {
        border-bottom: 1px solid #e7ede4;
    }

    .public-process-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.public-marketplace-page .public-marketplace-hero-card {
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: 28px;
    }

    body.auth-page .public-auth-grid,
    body.register-page .public-register-grid {
        grid-template-columns: minmax(0, .8fr) minmax(480px, 1.2fr);
        gap: 38px;
    }
}

@media (max-width: 980px) {
    body.public-home-page .market-hero > .shell,
    body.public-marketplace-page .public-marketplace-hero > .shell,
    body.public-marketplace-page .marketplace-app-catalog-section > .shell,
    body.public-marketplace-detail-page .marketplace-detail-page > .shell {
        width: min(100% - 32px, 1480px);
    }

    body.public-home-page .market-hero-card.public-hero-card {
        grid-template-columns: 1fr;
    }

    body.public-home-page .public-hero-copy {
        padding: 54px 42px 28px;
    }

    body.public-home-page .public-hero-art {
        min-height: auto;
        padding: 16px 42px 54px;
    }

    body.public-home-page .public-hero-art::before {
        inset: 4% 10% 8%;
    }

    body.public-home-page .public-hero-art .hero-image-frame {
        max-width: 700px;
        width: 100%;
        margin: 0 auto;
        transform: none;
    }

    .hero-floating-card-top {
        top: 30px;
        right: 24px;
    }

    .hero-floating-card-bottom {
        right: 38px;
        bottom: 68px;
    }

    body.public-home-page .marketplace-farm-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.public-marketplace-page .public-marketplace-hero-card {
        grid-template-columns: 1fr;
    }

    .public-marketplace-trust {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .public-marketplace-trust > span {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .public-marketplace-trust > span > b {
        width: 36px;
        height: 36px;
    }

    body.public-marketplace-page .marketplace-catalog-layout {
        grid-template-columns: 1fr;
    }

    body.public-marketplace-page .marketplace-filter-sidebar {
        position: static;
        top: auto;
    }

    body.public-product-detail-page .marketplace-product-gallery {
        position: static;
    }

    body.auth-page .public-auth-grid,
    body.register-page .public-register-grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    body.auth-page .public-auth-intro {
        max-width: 760px;
    }

    body.auth-page .public-auth-card {
        max-width: 760px;
    }
}

@media (max-width: 760px) {
    body.public-home-page .market-hero.public-hero,
    body.public-marketplace-page .public-marketplace-hero {
        padding-top: 14px;
    }

    body.public-home-page .market-hero-card.public-hero-card {
        border-radius: 24px 24px 0 0;
    }

    body.public-home-page .public-hero-copy {
        padding: 42px 24px 22px;
    }

    body.public-home-page .public-hero-copy h1 {
        font-size: clamp(2.65rem, 12vw, 4.2rem);
    }

    .public-hero-search {
        grid-template-columns: 24px minmax(0, 1fr);
        padding: 8px 12px;
    }

    .public-hero-search button {
        grid-column: 1 / -1;
        width: 100%;
    }

    body.public-home-page .public-hero-art {
        padding: 12px 24px 38px;
    }

    body.public-home-page .public-hero-art img {
        height: 330px;
    }

    .hero-floating-card {
        display: none;
    }

    body.public-home-page .market-section {
        padding: 62px 0;
    }

    body.public-home-page .public-section-heading {
        align-items: start;
    }

    body.public-home-page .public-section-heading,
    .public-contact-card {
        grid-template-columns: 1fr;
    }

    body.public-home-page .marketplace-home-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .public-contact-card {
        gap: 26px;
        border-radius: 22px;
    }

    .public-marketplace-trust {
        grid-template-columns: 1fr;
    }

    body.public-marketplace-page .public-marketplace-hero-card {
        padding: 28px 24px;
        border-radius: 22px;
    }

    body.public-marketplace-page .marketplace-catalog-toolbar {
        align-items: start;
    }

    body.public-product-detail-page .marketplace-product-main-photo {
        min-height: 380px;
    }

    body.public-farm-detail-page .marketplace-farm-overview {
        margin: -44px 14px 14px;
        padding: 21px;
    }

    body.auth-page .public-auth-section {
        padding: 38px 0 56px;
    }

    body.auth-page .public-auth-grid,
    body.register-page .public-register-grid {
        width: min(100% - 28px, 760px);
    }

    body.auth-page .public-auth-intro h1 {
        font-size: clamp(2.55rem, 11vw, 4rem);
    }

    body.register-page .public-role-picker {
        grid-template-columns: 1fr;
    }

    body.register-page .public-role-picker .role-option {
        min-height: 92px;
        grid-template-columns: 42px minmax(0, 1fr);
        align-content: center;
        align-items: center;
    }

    body.register-page .public-role-picker .role-option-icon {
        grid-row: 1;
    }

    body.register-page .public-role-picker .role-option > span:nth-of-type(2) {
        grid-column: 2;
    }
}

@media (max-width: 560px) {
    .agmula-theme:not(.admin-page) .header-inner {
        width: calc(100% - 24px);
        min-height: 66px;
    }

    .agmula-theme:not(.admin-page) .site-header .brand-mark {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .agmula-theme:not(.admin-page) .site-header .brand-copy small {
        display: none;
    }

    .agmula-theme:not(.admin-page) .site-header .main-nav {
        top: 70px;
        right: 12px;
        left: 12px;
    }

    body.public-home-page .market-hero > .shell,
    body.public-marketplace-page .public-marketplace-hero > .shell,
    body.public-marketplace-page .marketplace-app-catalog-section > .shell,
    body.public-marketplace-detail-page .marketplace-detail-page > .shell {
        width: calc(100% - 22px);
    }

    body.public-home-page .public-hero-copy {
        padding: 36px 18px 20px;
    }

    body.public-home-page .public-hero-copy > p {
        font-size: .88rem;
    }

    body.public-home-page .public-hero-copy .hero-actions {
        display: grid;
    }

    body.public-home-page .public-hero-copy .hero-actions .button {
        width: 100%;
        justify-content: center;
    }

    body.public-home-page .public-hero-art {
        padding: 10px 18px 30px;
    }

    body.public-home-page .public-hero-art img {
        height: 270px;
    }

    body.public-home-page .public-benefit-strip {
        grid-template-columns: 1fr;
    }

    body.public-home-page .public-benefit-strip article {
        border-right: 0;
        border-bottom: 1px solid #e7ede4;
    }

    body.public-home-page .public-benefit-strip article:last-child {
        border-bottom: 0;
    }

    body.public-home-page .marketplace-home-grid,
    body.public-home-page .marketplace-farm-card-grid,
    .public-process-grid,
    body.public-marketplace-page .marketplace-catalog-results .marketplace-product-grid.is-grid {
        grid-template-columns: 1fr;
    }

    body.public-home-page .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.public-home-page .category-card {
        min-height: 152px;
        padding: 15px;
    }

    body.public-home-page .category-card .category-card-icon {
        width: 50px;
        height: 50px;
    }

    body.public-home-page .public-role-showcase,
    .public-contact-card {
        padding: 24px 20px;
    }

    .public-contact-card h2 {
        font-size: 2rem;
    }

    body.public-marketplace-page .public-marketplace-hero-card {
        padding: 26px 20px;
    }

    .public-marketplace-hero-copy h1 {
        font-size: 2.5rem;
    }

    body.public-marketplace-page .marketplace-default-filter-panel,
    body.public-marketplace-page .marketplace-catalog-toolbar {
        padding: 14px;
        border-radius: 16px;
    }

    body.public-product-detail-page .marketplace-product-main-photo {
        min-height: 300px;
    }

    body.public-product-detail-page .marketplace-product-summary,
    body.public-product-detail-page .marketplace-farm-callout {
        padding: 20px;
        border-radius: 18px;
    }

    body.public-farm-detail-page .marketplace-farm-cover {
        min-height: 220px;
    }

    body.public-farm-detail-page .marketplace-farm-overview {
        margin: -34px 10px 10px;
        padding: 18px;
    }

    body.auth-page .public-auth-card {
        padding: 22px 18px;
        border-radius: 20px;
    }

    .auth-card-heading {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .auth-card-icon {
        width: 44px;
        height: 44px;
        border-radius: 13px;
    }

    .auth-form-options {
        align-items: flex-start;
        flex-direction: column;
    }

    body.auth-page .form-columns {
        grid-template-columns: 1fr;
    }

    .agmula-theme:not(.admin-page) .footer-grid {
        width: calc(100% - 28px);
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .agmula-theme:not(.admin-page) .footer-bottom {
        width: calc(100% - 28px);
    }
}

@media (max-width: 390px) {
    body.public-home-page .category-grid {
        grid-template-columns: 1fr;
    }

    body.public-home-page .category-card {
        min-height: 132px;
    }

    body.public-home-page .public-hero-copy h1,
    .public-marketplace-hero-copy h1 {
        overflow-wrap: anywhere;
    }
}

/* Reset late legacy homepage positioning before applying the Phase 2 grid. */
body.public-home-page .home-site-header {
    padding-top: 0;
}

body.public-home-page .home-header-inner {
    width: min(1480px, calc(100% - 40px));
    max-width: 1480px;
    padding-inline: 0;
}

body.public-home-page .market-hero-card.public-hero-card::before {
    top: auto;
}

body.public-home-page .public-hero-copy {
    width: auto;
    min-height: 0;
    display: block;
    justify-content: initial;
    background: transparent;
    color: #fff;
}

body.public-home-page .public-hero-art {
    inset: auto;
    overflow: visible;
    background: transparent;
}

body.public-home-page .public-hero-art::before {
    width: auto;
    height: auto;
    display: block;
}

body.public-home-page .public-hero-art img {
    min-height: 0;
    max-height: none;
}

@media (max-width: 1120px) {
    body.public-home-page .home-header-inner {
        width: min(100% - 32px, 1480px);
    }
}

@media (max-width: 560px) {
    body.public-home-page .home-site-header {
        padding-top: 0;
    }

    body.public-home-page .home-header-inner {
        width: calc(100% - 24px);
        padding-inline: 0;
    }
}

/*
|--------------------------------------------------------------------------
| AGMULA Theme — Phase 3 Buyer Portal
|--------------------------------------------------------------------------
| Buyer-only presentation layer. Business rules, routes, form names,
| payment calculations, inventory handling, and tracking behavior remain
| controlled by the existing Laravel application.
*/

/* Buyer portal identity */
.agmula-theme.buyer-dashboard-page {
    --buyer-accent: #176f8f;
    --buyer-accent-strong: #0f5874;
    --buyer-accent-soft: #e9f7fb;
    --buyer-accent-line: #c8e7f0;
    --buyer-warm: #fff7e6;
    --buyer-warm-line: #eed8a8;
}

.agmula-theme.buyer-dashboard-page .admin-shell {
    background:
        radial-gradient(circle at 92% 2%, rgba(145, 218, 239, .17), transparent 25%),
        radial-gradient(circle at 67% 100%, rgba(200, 239, 124, .11), transparent 28%),
        #eef4f2;
}

.agmula-theme.buyer-dashboard-page .role-sidebar-buyer {
    background:
        radial-gradient(circle at 34% -5%, rgba(158, 226, 245, .22), transparent 28%),
        linear-gradient(180deg, #0b4a40 0%, #073d37 55%, #052e2b 100%);
}

.agmula-theme.buyer-dashboard-page .role-sidebar-buyer .admin-nav-link.is-active {
    background: rgba(226, 249, 255, .13);
    color: #fff;
    box-shadow: inset 3px 0 0 #9ee2f5;
}

.agmula-theme.buyer-dashboard-page .admin-topbar {
    border-bottom-color: #d8e8e5;
}

.agmula-theme.buyer-dashboard-page .admin-kicker {
    color: var(--buyer-accent);
}

.agmula-theme.buyer-dashboard-page .admin-content {
    max-width: 1480px;
}

.agmula-theme.buyer-dashboard-page .marketplace-back-row a {
    color: var(--buyer-accent-strong);
    font-weight: 800;
}

.agmula-theme.buyer-dashboard-page .marketplace-back-row a:hover {
    color: var(--theme-green-900);
}

/* Buyer dashboard */
.agmula-theme.buyer-dashboard-page .buyer-dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-color: var(--buyer-accent-line);
    background:
        radial-gradient(circle at 93% 7%, rgba(145, 218, 239, .34), transparent 28%),
        radial-gradient(circle at 74% 105%, rgba(200, 239, 124, .22), transparent 31%),
        linear-gradient(135deg, #fff 0%, #f4fbfa 100%);
}

.agmula-theme.buyer-dashboard-page .buyer-dashboard-hero::after {
    border-color: rgba(23, 111, 143, .07);
}

.agmula-theme.buyer-dashboard-page .buyer-dashboard-hero .button {
    flex: 0 0 auto;
    border-color: var(--buyer-accent-strong);
    background: var(--buyer-accent-strong);
}

.agmula-theme.buyer-dashboard-page .buyer-dashboard-hero .button:hover {
    border-color: #0a485f;
    background: #0a485f;
}

.agmula-theme.buyer-dashboard-page .role-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.agmula-theme.buyer-dashboard-page .buyer-metric-card {
    min-height: 142px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-content: start;
    gap: 5px 12px;
    border-top: 3px solid var(--buyer-accent-line);
}

.agmula-theme.buyer-dashboard-page .buyer-metric-card > i {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--buyer-accent-line);
    border-radius: 13px;
    background: var(--buyer-accent-soft);
    font-size: 1.15rem;
    font-style: normal;
}

.agmula-theme.buyer-dashboard-page .buyer-metric-card > span,
.agmula-theme.buyer-dashboard-page .buyer-metric-card > strong,
.agmula-theme.buyer-dashboard-page .buyer-metric-card > small {
    grid-column: 1;
}

.agmula-theme.buyer-dashboard-page .buyer-metric-card > strong {
    margin-top: 4px;
}

.agmula-theme.buyer-dashboard-page .buyer-metric-card > small {
    align-self: end;
    line-height: 1.45;
}

.agmula-theme.buyer-dashboard-page .buyer-metric-cart {
    border-top-color: #e6c56e;
}

.agmula-theme.buyer-dashboard-page .buyer-metric-cart > i {
    border-color: var(--buyer-warm-line);
    background: var(--buyer-warm);
}

.agmula-theme.buyer-dashboard-page .buyer-metric-active {
    border-top-color: #8ccf9a;
}

.agmula-theme.buyer-dashboard-page .buyer-metric-active > i {
    border-color: #c8e4cd;
    background: #eff9f0;
}

.agmula-theme.buyer-dashboard-page .buyer-metric-orders {
    border-top-color: #b9acd9;
}

.agmula-theme.buyer-dashboard-page .buyer-metric-orders > i {
    border-color: #dbd3ec;
    background: #f5f1fb;
}

.agmula-theme.buyer-dashboard-page .role-dashboard-grid {
    align-items: stretch;
}

.agmula-theme.buyer-dashboard-page .dashboard-order-list > a {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 14px;
    border-radius: 12px;
}

.agmula-theme.buyer-dashboard-page .dashboard-order-list > a b {
    color: var(--theme-green-950);
    white-space: nowrap;
}

.agmula-theme.buyer-dashboard-page .role-action-list li {
    min-height: 76px;
    border-radius: 13px;
}

.agmula-theme.buyer-dashboard-page .role-action-list li > span {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--buyer-accent-line);
    border-radius: 12px;
    background: var(--buyer-accent-soft);
}

.agmula-theme.buyer-dashboard-page .role-action-list a {
    color: var(--theme-green-950);
}

.agmula-theme.buyer-dashboard-page .role-action-list a:hover {
    color: var(--buyer-accent-strong);
}

.agmula-theme.buyer-dashboard-page .buyer-recommendations-card {
    padding: clamp(18px, 2.5vw, 28px);
}

/* Buyer marketplace */
.agmula-theme.buyer-dashboard-page .buyer-marketplace-app-content {
    display: grid;
    gap: 22px;
}

.agmula-theme.buyer-dashboard-page .buyer-marketplace-app-intro {
    border-color: var(--buyer-accent-line);
    background:
        radial-gradient(circle at 91% 8%, rgba(145, 218, 239, .34), transparent 29%),
        linear-gradient(135deg, #fff, #f2fbfd);
}

.agmula-theme.buyer-dashboard-page .buyer-marketplace-intro-icon {
    border: 1px solid var(--buyer-accent-line);
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 16px 35px rgba(15, 88, 116, .12);
}

.agmula-theme.buyer-dashboard-page .marketplace-app-filter-panel,
.agmula-theme.buyer-dashboard-page .marketplace-filter-panel {
    border-color: var(--buyer-accent-line);
}

.agmula-theme.buyer-dashboard-page .marketplace-product-card {
    border-color: #dbe8e4;
}

.agmula-theme.buyer-dashboard-page .marketplace-product-card:hover {
    border-color: #acd5df;
    box-shadow: 0 18px 40px rgba(15, 88, 116, .12);
}

.agmula-theme.buyer-dashboard-page .marketplace-view-button {
    border-color: var(--buyer-accent-strong);
    background: var(--buyer-accent-strong);
}

.agmula-theme.buyer-dashboard-page .marketplace-view-button:hover {
    border-color: #0a485f;
    background: #0a485f;
}

/* Cart */
.agmula-theme.buyer-dashboard-page .buyer-cart-layout {
    align-items: start;
    gap: clamp(18px, 2.5vw, 30px);
}

.agmula-theme.buyer-dashboard-page .buyer-cart-farms {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.agmula-theme.buyer-dashboard-page .cart-farm-card {
    padding: 0;
    border-color: #d7e6e2;
}

.agmula-theme.buyer-dashboard-page .cart-farm-heading {
    padding: 20px clamp(18px, 2.5vw, 28px);
    border-bottom: 1px solid #e4ece9;
    background:
        linear-gradient(90deg, #f7fbfa, #fff);
}

.agmula-theme.buyer-dashboard-page .cart-farm-heading > strong {
    border: 1px solid var(--buyer-accent-line);
    border-radius: 999px;
    background: var(--buyer-accent-soft);
    color: var(--buyer-accent-strong);
}

.agmula-theme.buyer-dashboard-page .cart-item-list {
    padding: 4px clamp(14px, 2vw, 22px);
}

.agmula-theme.buyer-dashboard-page .cart-item-row {
    gap: 16px;
    padding: 18px 4px;
    border-bottom-color: #e8efec;
}

.agmula-theme.buyer-dashboard-page .cart-item-row:last-child {
    border-bottom: 0;
}

.agmula-theme.buyer-dashboard-page .cart-item-row.has-cart-issue {
    margin: 8px 0;
    padding-inline: 12px;
    border: 1px solid #efc8c3;
    border-radius: 13px;
    background: var(--theme-danger-bg);
}

.agmula-theme.buyer-dashboard-page .cart-item-photo {
    overflow: hidden;
    border: 1px solid #dce7e3;
    border-radius: 14px;
    background: #f5faf7;
}

.agmula-theme.buyer-dashboard-page .cart-item-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agmula-theme.buyer-dashboard-page .cart-item-identity strong {
    color: var(--theme-green-950);
}

.agmula-theme.buyer-dashboard-page .cart-quantity-form {
    align-items: end;
}

.agmula-theme.buyer-dashboard-page .cart-quantity-form input {
    min-width: 96px;
}

.agmula-theme.buyer-dashboard-page .cart-quantity-form button,
.agmula-theme.buyer-dashboard-page .cart-remove-form button,
.agmula-theme.buyer-dashboard-page .cart-clear-form button {
    border-radius: 9px;
    font-weight: 800;
}

.agmula-theme.buyer-dashboard-page .cart-line-total strong {
    color: var(--theme-green-950);
}

.agmula-theme.buyer-dashboard-page .cart-summary-card,
.agmula-theme.buyer-dashboard-page .checkout-summary-card {
    position: sticky;
    top: 106px;
    border-color: var(--buyer-accent-line);
    box-shadow: 0 20px 45px rgba(15, 88, 116, .1);
}

.agmula-theme.buyer-dashboard-page .cart-summary-total,
.agmula-theme.buyer-dashboard-page .checkout-estimated-total {
    border-radius: 13px;
    background: linear-gradient(135deg, var(--buyer-accent-soft), #f5fbf8);
}

.agmula-theme.buyer-dashboard-page .cart-summary-total strong,
.agmula-theme.buyer-dashboard-page .checkout-estimated-total strong {
    color: var(--buyer-accent-strong);
}

.agmula-theme.buyer-dashboard-page .cart-checkout-warning {
    border: 1px solid var(--buyer-warm-line);
    border-radius: 11px;
    background: var(--buyer-warm);
}

/* Checkout */
.agmula-theme.buyer-dashboard-page .checkout-layout,
.agmula-theme.buyer-dashboard-page .checkout-review-layout {
    align-items: start;
    gap: clamp(18px, 2.5vw, 30px);
}

.agmula-theme.buyer-dashboard-page .checkout-form-column,
.agmula-theme.buyer-dashboard-page .checkout-review-column {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.agmula-theme.buyer-dashboard-page .checkout-section-card {
    padding: clamp(18px, 2.5vw, 28px);
}

.agmula-theme.buyer-dashboard-page .checkout-section-card .admin-card-heading > div > span {
    display: inline-flex;
    padding: 4px 9px;
    border: 1px solid var(--buyer-accent-line);
    border-radius: 999px;
    background: var(--buyer-accent-soft);
    color: var(--buyer-accent-strong);
}

.agmula-theme.buyer-dashboard-page .checkout-form-grid {
    gap: 17px;
}

.agmula-theme.buyer-dashboard-page .checkout-form-grid label > span {
    margin-bottom: 7px;
}

.agmula-theme.buyer-dashboard-page .checkout-location-picker {
    border: 1px solid var(--buyer-accent-line);
    border-radius: 17px;
    background: #f7fcfd;
}

.agmula-theme.buyer-dashboard-page .checkout-location-heading {
    gap: 18px;
}

.agmula-theme.buyer-dashboard-page .agmula-checkout-map,
.agmula-theme.buyer-dashboard-page .agmula-live-map {
    overflow: hidden;
    border: 1px solid #cfe0dc;
    border-radius: 15px;
}

.agmula-theme.buyer-dashboard-page .checkout-payment-option {
    border-color: #d6e4e0;
    border-radius: 14px;
    transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.agmula-theme.buyer-dashboard-page .checkout-payment-option:hover {
    border-color: var(--buyer-accent-line);
    background: #f7fcfd;
}

.agmula-theme.buyer-dashboard-page .checkout-payment-option:has(input:checked) {
    border-color: var(--buyer-accent);
    background: var(--buyer-accent-soft);
    box-shadow: 0 0 0 3px rgba(23, 111, 143, .09);
}

.agmula-theme.buyer-dashboard-page .checkout-review-details > div {
    border-radius: 11px;
    background: #f8fbf9;
}

.agmula-theme.buyer-dashboard-page .checkout-phase-notice {
    border-color: #c9e2ce;
    background: #f0f9f1;
}

/* Orders */
.agmula-theme.buyer-dashboard-page .order-filter-bar {
    gap: 10px;
    padding: 14px;
    border: 1px solid #d8e6e2;
    border-radius: 15px;
    background: rgba(255, 255, 255, .82);
    box-shadow: var(--theme-shadow-sm);
}

.agmula-theme.buyer-dashboard-page .order-filter-bar input {
    min-width: min(100%, 260px);
}

.agmula-theme.buyer-dashboard-page .order-filter-bar a {
    color: var(--buyer-accent-strong);
    font-weight: 800;
}

.agmula-theme.buyer-dashboard-page .order-list {
    display: grid;
    gap: 13px;
}

.agmula-theme.buyer-dashboard-page .order-list-card {
    gap: 18px;
    border-color: #d9e7e3;
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.agmula-theme.buyer-dashboard-page .order-list-card:hover {
    transform: translateY(-2px);
    border-color: var(--buyer-accent-line);
    box-shadow: 0 16px 34px rgba(15, 88, 116, .1);
}

.agmula-theme.buyer-dashboard-page .order-list-card > strong {
    color: var(--theme-green-950);
    white-space: nowrap;
}

.agmula-theme.buyer-dashboard-page .order-hero {
    border-color: var(--buyer-accent-line);
    background:
        radial-gradient(circle at 94% 12%, rgba(145, 218, 239, .28), transparent 31%),
        linear-gradient(135deg, #fff, #f5fbfc);
}

.agmula-theme.buyer-dashboard-page .order-hero-status {
    align-items: flex-end;
}

.agmula-theme.buyer-dashboard-page .order-hero-status > strong {
    color: var(--buyer-accent-strong);
}

.agmula-theme.buyer-dashboard-page .grouped-orders-card {
    border-color: #d9e7e3;
}

.agmula-theme.buyer-dashboard-page .grouped-orders-card a {
    border-radius: 9px;
    color: var(--buyer-accent-strong);
}

.agmula-theme.buyer-dashboard-page .order-detail-grid {
    align-items: start;
    gap: clamp(18px, 2.5vw, 28px);
}

.agmula-theme.buyer-dashboard-page .order-detail-main,
.agmula-theme.buyer-dashboard-page .order-detail-side {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.agmula-theme.buyer-dashboard-page .order-detail-side {
    position: sticky;
    top: 106px;
}

.agmula-theme.buyer-dashboard-page .order-payment-card {
    border-color: var(--buyer-accent-line);
    background: linear-gradient(145deg, #fff, #f5fbfc);
}

.agmula-theme.buyer-dashboard-page .order-payment-card > strong {
    color: var(--buyer-accent-strong);
}

.agmula-theme.buyer-dashboard-page .order-action-form {
    border-color: #efc8c3;
    background: #fffafa;
}

.agmula-theme.buyer-dashboard-page .danger-action-button {
    border-radius: 10px;
}

/* Reviews */
.agmula-theme.buyer-dashboard-page .buyer-review-orders {
    display: grid;
    gap: 20px;
}

.agmula-theme.buyer-dashboard-page .order-review-card {
    padding: clamp(18px, 2.5vw, 28px);
}

.agmula-theme.buyer-dashboard-page .order-review-list {
    display: grid;
    gap: 16px;
}

.agmula-theme.buyer-dashboard-page .order-review-item {
    gap: 20px;
    padding: 18px;
    border: 1px solid #dfe9e5;
    border-radius: 15px;
    background: #fbfdfc;
}

.agmula-theme.buyer-dashboard-page .order-review-subject img,
.agmula-theme.buyer-dashboard-page .order-review-subject > span:first-child {
    border: 1px solid #d8e6e2;
    border-radius: 13px;
    background: #f1f8f4;
}

.agmula-theme.buyer-dashboard-page .review-form {
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--buyer-accent-line);
    border-radius: 14px;
    background: #f7fcfd;
}

.agmula-theme.buyer-dashboard-page .review-form-error {
    grid-column: 1 / -1;
    margin: 0;
}

.agmula-theme.buyer-dashboard-page .submitted-review-summary {
    border-radius: 13px;
    background: #fff;
}

.agmula-theme.buyer-dashboard-page .review-moderation-note {
    border-radius: 12px;
}

/* Notifications */
.agmula-theme.buyer-dashboard-page .notification-page-heading {
    border-color: var(--buyer-accent-line);
}

.agmula-theme.buyer-dashboard-page .notification-list {
    display: grid;
    gap: 12px;
}

.agmula-theme.buyer-dashboard-page .notification-card {
    border-color: #dbe7e3;
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.agmula-theme.buyer-dashboard-page .notification-card:hover {
    transform: translateY(-1px);
    border-color: var(--buyer-accent-line);
}

.agmula-theme.buyer-dashboard-page .notification-card.is-unread {
    border-left: 4px solid var(--buyer-accent);
    background: linear-gradient(90deg, var(--buyer-accent-soft), #fff 28%);
}

.agmula-theme.buyer-dashboard-page .notification-card-icon {
    border: 1px solid var(--buyer-accent-line);
    background: var(--buyer-accent-soft);
    color: var(--buyer-accent-strong);
}

.agmula-theme.buyer-dashboard-page .notification-read-button {
    border-radius: 9px;
    color: var(--buyer-accent-strong);
}

/* Live tracking */
.agmula-theme.buyer-dashboard-page .tracking-delivery-list {
    display: grid;
    gap: 13px;
}

.agmula-theme.buyer-dashboard-page .tracking-delivery-card {
    gap: 18px;
    border-color: #d8e6e2;
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.agmula-theme.buyer-dashboard-page .tracking-delivery-card:hover {
    transform: translateY(-2px);
    border-color: var(--buyer-accent-line);
    box-shadow: 0 16px 34px rgba(15, 88, 116, .1);
}

.agmula-theme.buyer-dashboard-page .tracking-delivery-card > strong {
    color: var(--buyer-accent-strong);
}

.agmula-theme.buyer-dashboard-page .live-tracking-card {
    padding: clamp(18px, 2.5vw, 28px);
    border-color: var(--buyer-accent-line);
}

.agmula-theme.buyer-dashboard-page .live-tracking-heading {
    gap: 20px;
}

.agmula-theme.buyer-dashboard-page .tracking-connection-status {
    border: 1px solid #d5e4e0;
    border-radius: 999px;
    background: #fff;
}

.agmula-theme.buyer-dashboard-page .tracking-map-legend {
    border-radius: 12px;
    background: #f7faf8;
}

/* Buyer empty and loading-safe states */
.agmula-theme.buyer-dashboard-page .cart-empty-state,
.agmula-theme.buyer-dashboard-page .catalog-empty-state {
    border-color: #cbdeda;
    background:
        radial-gradient(circle at 50% 0%, rgba(145, 218, 239, .15), transparent 45%),
        #f9fcfb;
}

.agmula-theme.buyer-dashboard-page :where(.cart-empty-state, .catalog-empty-state) > span:first-child {
    filter: saturate(.9);
}

.agmula-theme.buyer-dashboard-page .button[disabled] {
    border-color: #c7d2cf;
    background: #dfe7e4;
    color: #71807a;
    box-shadow: none;
}

/* Buyer desktop compaction */
@media (max-width: 1240px) {
    .agmula-theme.buyer-dashboard-page .role-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .agmula-theme.buyer-dashboard-page .buyer-cart-layout,
    .agmula-theme.buyer-dashboard-page .checkout-layout,
    .agmula-theme.buyer-dashboard-page .checkout-review-layout {
        grid-template-columns: minmax(0, 1fr) minmax(280px, 34%);
    }

    .agmula-theme.buyer-dashboard-page .order-list-card {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .agmula-theme.buyer-dashboard-page .order-list-card > strong,
    .agmula-theme.buyer-dashboard-page .order-list-card > .button {
        justify-self: start;
    }
}

/* Buyer tablet */
@media (max-width: 980px) {
    .agmula-theme.buyer-dashboard-page .buyer-cart-layout,
    .agmula-theme.buyer-dashboard-page .checkout-layout,
    .agmula-theme.buyer-dashboard-page .checkout-review-layout,
    .agmula-theme.buyer-dashboard-page .order-detail-grid {
        grid-template-columns: 1fr;
    }

    .agmula-theme.buyer-dashboard-page .cart-summary-card,
    .agmula-theme.buyer-dashboard-page .checkout-summary-card,
    .agmula-theme.buyer-dashboard-page .order-detail-side {
        position: static;
    }

    .agmula-theme.buyer-dashboard-page .buyer-cart-layout > aside,
    .agmula-theme.buyer-dashboard-page .checkout-layout > aside,
    .agmula-theme.buyer-dashboard-page .checkout-review-layout > aside {
        order: 2;
    }
}

/* Buyer phones and narrow tablets */
@media (max-width: 720px) {
    .agmula-theme.buyer-dashboard-page .buyer-dashboard-hero,
    .agmula-theme.buyer-dashboard-page .role-dashboard-intro {
        align-items: flex-start;
        flex-direction: column;
    }

    .agmula-theme.buyer-dashboard-page .buyer-dashboard-hero .button,
    .agmula-theme.buyer-dashboard-page .role-dashboard-intro > .button {
        width: 100%;
    }

    .agmula-theme.buyer-dashboard-page .role-metrics {
        grid-template-columns: 1fr;
    }

    .agmula-theme.buyer-dashboard-page .buyer-metric-card {
        min-height: 124px;
    }

    .agmula-theme.buyer-dashboard-page .dashboard-order-list > a {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .agmula-theme.buyer-dashboard-page .dashboard-order-list > a b {
        grid-column: 1 / -1;
    }

    .agmula-theme.buyer-dashboard-page .cart-farm-heading,
    .agmula-theme.buyer-dashboard-page .checkout-location-heading,
    .agmula-theme.buyer-dashboard-page .live-tracking-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .agmula-theme.buyer-dashboard-page .cart-item-row {
        grid-template-columns: 74px minmax(0, 1fr);
        gap: 12px;
    }

    .agmula-theme.buyer-dashboard-page .cart-quantity-form,
    .agmula-theme.buyer-dashboard-page .cart-quantity-readonly,
    .agmula-theme.buyer-dashboard-page .cart-line-total,
    .agmula-theme.buyer-dashboard-page .cart-remove-form {
        grid-column: 2;
        justify-self: stretch;
    }

    .agmula-theme.buyer-dashboard-page .cart-quantity-form {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .agmula-theme.buyer-dashboard-page .cart-quantity-form label {
        min-width: 0;
    }

    .agmula-theme.buyer-dashboard-page .cart-quantity-form input {
        width: 100%;
        min-width: 0;
    }

    .agmula-theme.buyer-dashboard-page .cart-remove-form button {
        width: 100%;
    }

    .agmula-theme.buyer-dashboard-page .checkout-form-grid {
        grid-template-columns: 1fr;
    }

    .agmula-theme.buyer-dashboard-page .checkout-field-full {
        grid-column: auto;
    }

    .agmula-theme.buyer-dashboard-page .order-filter-bar {
        grid-template-columns: 1fr;
    }

    .agmula-theme.buyer-dashboard-page .order-filter-bar :where(input, select, .button, a) {
        width: 100%;
    }

    .agmula-theme.buyer-dashboard-page .order-list-card {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .agmula-theme.buyer-dashboard-page .order-list-statuses {
        justify-content: flex-start;
    }

    .agmula-theme.buyer-dashboard-page .order-list-card > .button {
        width: 100%;
    }

    .agmula-theme.buyer-dashboard-page .order-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .agmula-theme.buyer-dashboard-page .order-hero-status {
        width: 100%;
        align-items: flex-start;
    }

    .agmula-theme.buyer-dashboard-page .order-review-item {
        grid-template-columns: 1fr;
    }

    .agmula-theme.buyer-dashboard-page .review-form {
        grid-template-columns: 1fr;
    }

    .agmula-theme.buyer-dashboard-page .review-form-full,
    .agmula-theme.buyer-dashboard-page .review-form .button,
    .agmula-theme.buyer-dashboard-page .review-form-error {
        grid-column: auto;
    }

    .agmula-theme.buyer-dashboard-page .review-form .button {
        width: 100%;
    }

    .agmula-theme.buyer-dashboard-page .notification-card,
    .agmula-theme.buyer-dashboard-page .tracking-delivery-card {
        grid-template-columns: 1fr;
    }

    .agmula-theme.buyer-dashboard-page .notification-read-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .agmula-theme.buyer-dashboard-page .cart-item-row {
        grid-template-columns: 1fr;
    }

    .agmula-theme.buyer-dashboard-page .cart-item-photo {
        width: 100%;
        height: 180px;
    }

    .agmula-theme.buyer-dashboard-page .cart-item-identity,
    .agmula-theme.buyer-dashboard-page .cart-quantity-form,
    .agmula-theme.buyer-dashboard-page .cart-quantity-readonly,
    .agmula-theme.buyer-dashboard-page .cart-line-total,
    .agmula-theme.buyer-dashboard-page .cart-remove-form {
        grid-column: 1;
    }

    .agmula-theme.buyer-dashboard-page .cart-quantity-form {
        grid-template-columns: 1fr;
    }

    .agmula-theme.buyer-dashboard-page .checkout-payment-option {
        align-items: flex-start;
    }

    .agmula-theme.buyer-dashboard-page .admin-profile {
        max-width: 44%;
    }
}

/* Public full-width navigation — reference-aligned header */
body.agmula-theme .site-header.public-fullwidth-header,
body.public-home-page .site-header.public-fullwidth-header {
    position: sticky;
    top: 0;
    z-index: 90;
    padding-top: 0;
    border: 0;
    border-bottom: 1px solid #e5e9e1;
    background: #fff;
    box-shadow: 0 3px 16px rgba(16, 58, 34, .055);
    backdrop-filter: none;
}

body.agmula-theme .site-header.public-fullwidth-header .public-header-row,
body.public-home-page .site-header.public-fullwidth-header .public-header-row {
    width: 100%;
    max-width: none;
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: clamp(18px, 2.1vw, 38px);
    margin: 0;
    padding: 0 clamp(22px, 3vw, 58px);
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.site-header.public-fullwidth-header .brand {
    flex: 0 0 auto;
    gap: 10px;
}

.site-header.public-fullwidth-header .brand-mark {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 12px;
}

.site-header.public-fullwidth-header .brand-copy strong {
    color: #123d25;
    font-size: 1.04rem;
    letter-spacing: .07em;
}

.site-header.public-fullwidth-header .brand-copy small {
    display: none;
}

.site-header.public-fullwidth-header .public-header-navigation {
    min-width: 0;
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: auto minmax(220px, 1fr) auto;
    align-items: center;
    gap: clamp(18px, 2vw, 34px);
}

.site-header.public-fullwidth-header .public-header-menu {
    min-width: max-content;
    display: flex;
    align-items: center;
    gap: clamp(16px, 1.55vw, 28px);
}

.site-header.public-fullwidth-header .public-header-menu a {
    position: relative;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 0;
    color: #46574c;
    font-size: .78rem;
    font-weight: 750;
    white-space: nowrap;
}

.site-header.public-fullwidth-header .public-header-menu a:hover,
.site-header.public-fullwidth-header .public-header-menu a.is-active {
    background: transparent;
    color: #0e4d2a;
}

.site-header.public-fullwidth-header .public-header-menu a.is-active::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 4px;
    left: 0;
    height: 2px;
    border-radius: 999px;
    background: #2d7c43;
}

.site-header.public-fullwidth-header .public-header-search {
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: 460px;
    justify-self: end;
    margin: 0;
}

.site-header.public-fullwidth-header .public-header-search input {
    width: 100%;
    height: 42px;
    padding: 0 44px 0 15px;
    border: 1px solid #dfe5dd;
    border-radius: 10px;
    background: #fff;
    color: #213d2c;
    font-size: .75rem;
    outline: 0;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.site-header.public-fullwidth-header .public-header-search input::placeholder {
    color: #8a978e;
}

.site-header.public-fullwidth-header .public-header-search input:focus {
    border-color: #4f8c5e;
    box-shadow: 0 0 0 3px rgba(45, 124, 67, .1);
}

.site-header.public-fullwidth-header .public-header-search button {
    position: absolute;
    top: 50%;
    right: 7px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #64756a;
    cursor: pointer;
    transform: translateY(-50%);
}

.site-header.public-fullwidth-header .public-header-search button:hover {
    background: #eef6ed;
    color: #14532d;
}

.site-header.public-fullwidth-header .public-header-search svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.site-header.public-fullwidth-header .public-header-actions {
    min-width: max-content;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.site-header.public-fullwidth-header .public-header-cart {
    position: relative;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 10px;
    color: #184f2d;
}

.site-header.public-fullwidth-header .public-header-cart:hover,
.site-header.public-fullwidth-header .public-header-cart.is-active {
    background: #eef6ed;
    color: #0b3d22;
}

.site-header.public-fullwidth-header .public-header-cart svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.site-header.public-fullwidth-header .public-header-cart-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.site-header.public-fullwidth-header .public-header-auth {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 15px;
    border-radius: 9px;
    background: #12602f;
    box-shadow: 0 6px 15px rgba(18, 96, 47, .14);
    color: #fff;
    font-size: .74rem;
    font-weight: 800;
    white-space: nowrap;
}

.site-header.public-fullwidth-header .public-header-auth a {
    color: #fff;
}

.site-header.public-fullwidth-header .public-header-auth a:hover,
.site-header.public-fullwidth-header .public-header-auth a.is-active {
    color: #d9f99d;
}

.site-header.public-fullwidth-header .public-header-dashboard,
.site-header.public-fullwidth-header .public-header-signout .nav-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 0 13px;
    border-radius: 9px;
    font-size: .74rem;
    font-weight: 800;
    white-space: nowrap;
}

.site-header.public-fullwidth-header .public-header-dashboard {
    color: #31503d;
}

.site-header.public-fullwidth-header .public-header-dashboard:hover,
.site-header.public-fullwidth-header .public-header-dashboard.is-active {
    background: #eef6ed;
    color: #0b3d22;
}

.site-header.public-fullwidth-header .public-header-signout {
    margin: 0;
}

.site-header.public-fullwidth-header .public-header-signout .nav-button {
    border: 0;
    background: #12602f;
    color: #fff;
    cursor: pointer;
}

.site-header.public-fullwidth-header .public-header-signout .nav-button:hover {
    background: #0b4a27;
    color: #fff;
}

.site-header.public-fullwidth-header .sr-only {
    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: 1320px) and (min-width: 1121px) {
    body.agmula-theme .site-header.public-fullwidth-header .public-header-row,
    body.public-home-page .site-header.public-fullwidth-header .public-header-row {
        gap: 18px;
        padding-inline: 24px;
    }

    .site-header.public-fullwidth-header .public-header-navigation {
        gap: 18px;
    }

    .site-header.public-fullwidth-header .public-header-menu {
        gap: 15px;
    }

    .site-header.public-fullwidth-header .public-header-menu a {
        font-size: .72rem;
    }

    .site-header.public-fullwidth-header .public-header-search {
        max-width: 380px;
    }
}

@media (max-width: 1120px) {
    body.agmula-theme .site-header.public-fullwidth-header .public-header-row,
    body.public-home-page .site-header.public-fullwidth-header .public-header-row {
        width: 100%;
        min-height: 68px;
        padding-inline: 18px;
    }

    .site-header.public-fullwidth-header .mobile-nav-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .site-header.public-fullwidth-header .public-header-navigation {
        position: fixed;
        top: 68px;
        right: 14px;
        left: 14px;
        max-height: calc(100vh - 84px);
        display: none;
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 12px;
        padding: 16px;
        overflow-y: auto;
        border: 1px solid #dfe6dc;
        border-radius: 16px;
        background: rgba(255, 255, 255, .99);
        box-shadow: 0 24px 60px rgba(13, 59, 35, .18);
    }

    .site-header.public-fullwidth-header .public-header-navigation.is-open {
        display: grid;
    }

    .site-header.public-fullwidth-header .public-header-menu {
        min-width: 0;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px;
    }

    .site-header.public-fullwidth-header .public-header-menu a {
        min-height: 44px;
        padding: 0 12px;
        border-radius: 9px;
    }

    .site-header.public-fullwidth-header .public-header-menu a:hover,
    .site-header.public-fullwidth-header .public-header-menu a.is-active {
        background: #eef6ed;
    }

    .site-header.public-fullwidth-header .public-header-menu a.is-active::after {
        display: none;
    }

    .site-header.public-fullwidth-header .public-header-search {
        max-width: none;
        justify-self: stretch;
    }

    .site-header.public-fullwidth-header .public-header-actions {
        min-width: 0;
        justify-content: stretch;
        flex-wrap: wrap;
    }

    .site-header.public-fullwidth-header .public-header-cart {
        width: auto;
        min-width: 84px;
        flex: 0 0 auto;
        display: inline-flex;
        justify-content: center;
        gap: 8px;
        padding-inline: 12px;
        border: 1px solid #dfe6dc;
    }

    .site-header.public-fullwidth-header .public-header-cart-label {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip: auto;
        clip-path: none;
    }

    .site-header.public-fullwidth-header .public-header-auth,
    .site-header.public-fullwidth-header .public-header-dashboard,
    .site-header.public-fullwidth-header .public-header-signout {
        flex: 1 1 auto;
    }

    .site-header.public-fullwidth-header .public-header-auth,
    .site-header.public-fullwidth-header .public-header-dashboard,
    .site-header.public-fullwidth-header .public-header-signout .nav-button {
        justify-content: center;
    }

    .site-header.public-fullwidth-header .public-header-signout .nav-button {
        width: 100%;
    }
}

@media (max-width: 560px) {
    body.agmula-theme .site-header.public-fullwidth-header .public-header-row,
    body.public-home-page .site-header.public-fullwidth-header .public-header-row {
        min-height: 64px;
        padding-inline: 12px;
    }

    .site-header.public-fullwidth-header .brand-mark {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .site-header.public-fullwidth-header .brand-copy strong {
        font-size: .94rem;
    }

    .site-header.public-fullwidth-header .public-header-navigation {
        top: 64px;
        right: 10px;
        left: 10px;
        max-height: calc(100vh - 76px);
    }

    .site-header.public-fullwidth-header .public-header-menu {
        grid-template-columns: 1fr;
    }

    .site-header.public-fullwidth-header .public-header-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .site-header.public-fullwidth-header .public-header-cart,
    .site-header.public-fullwidth-header .public-header-auth,
    .site-header.public-fullwidth-header .public-header-dashboard,
    .site-header.public-fullwidth-header .public-header-signout {
        width: 100%;
    }
}

/*
|--------------------------------------------------------------------------
| AGMULA Theme — Phase 4 Seller / Farmer Portal
|--------------------------------------------------------------------------
| Seller-only presentation layer. Existing routes, authorization, validation,
| inventory, approval, order, payment, review, and tracking rules are preserved.
*/

.agmula-theme.seller-dashboard-page {
    --seller-accent: #2f7d3c;
    --seller-accent-strong: #185b2b;
    --seller-accent-deep: #0d4422;
    --seller-accent-soft: #edf7ea;
    --seller-accent-line: #cfe4ca;
    --seller-harvest: #c8932f;
    --seller-harvest-soft: #fff7df;
    --seller-harvest-line: #ead8a6;
    --seller-earth: #725237;
    --seller-earth-soft: #f8f1e8;
}

.agmula-theme.seller-dashboard-page .admin-shell {
    background:
        radial-gradient(circle at 92% 0%, rgba(200, 239, 124, .16), transparent 25%),
        radial-gradient(circle at 72% 100%, rgba(200, 147, 47, .08), transparent 27%),
        #f1f5ee;
}

.agmula-theme.seller-dashboard-page .role-sidebar-seller {
    background:
        radial-gradient(circle at 22% -8%, rgba(200, 239, 124, .2), transparent 30%),
        linear-gradient(180deg, #174f2a 0%, #103f24 56%, #0a321d 100%);
}

.agmula-theme.seller-dashboard-page .role-sidebar-seller .admin-nav-link.is-active {
    background: rgba(238, 251, 220, .13);
    color: #fff;
    box-shadow: inset 3px 0 0 #c8ef7c;
}

.agmula-theme.seller-dashboard-page .role-sidebar-seller .admin-nav-link:not(.is-disabled):hover {
    background: rgba(255, 255, 255, .08);
}

.agmula-theme.seller-dashboard-page .admin-topbar {
    border-bottom-color: #d9e5d4;
    background: rgba(255, 255, 255, .93);
    backdrop-filter: blur(14px);
}

.agmula-theme.seller-dashboard-page .admin-kicker {
    color: var(--seller-accent);
}

.agmula-theme.seller-dashboard-page .admin-avatar,
.agmula-theme.seller-dashboard-page .role-sidebar-avatar {
    background: linear-gradient(145deg, var(--seller-accent), var(--seller-accent-deep));
    color: #fff;
}

.agmula-theme.seller-dashboard-page .admin-content {
    max-width: 1480px;
}

.agmula-theme.seller-dashboard-page .role-dashboard-content {
    gap: clamp(18px, 2.2vw, 28px);
}

.agmula-theme.seller-dashboard-page .role-dashboard-intro {
    border-color: var(--seller-accent-line);
    background:
        radial-gradient(circle at 93% 10%, rgba(200, 239, 124, .32), transparent 27%),
        radial-gradient(circle at 79% 116%, rgba(200, 147, 47, .12), transparent 29%),
        linear-gradient(135deg, #fff 0%, #f5fbf1 100%);
}

.agmula-theme.seller-dashboard-page .role-dashboard-intro::after {
    border-color: rgba(47, 125, 60, .07);
}

.agmula-theme.seller-dashboard-page .role-dashboard-intro .eyebrow {
    color: var(--seller-accent);
}

.agmula-theme.seller-dashboard-page .role-dashboard-intro .button:not(.button-secondary) {
    border-color: var(--seller-accent-strong);
    background: var(--seller-accent-strong);
}

.agmula-theme.seller-dashboard-page .role-dashboard-intro .button:not(.button-secondary):hover {
    border-color: var(--seller-accent-deep);
    background: var(--seller-accent-deep);
}

.agmula-theme.seller-dashboard-page .seller-dashboard-hero {
    min-height: 178px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
}

.agmula-theme.seller-dashboard-page .seller-section-intro {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.agmula-theme.seller-dashboard-page .admin-card,
.agmula-theme.seller-dashboard-page .form-card,
.agmula-theme.seller-dashboard-page .panel {
    border-color: #dce7d7;
}

.agmula-theme.seller-dashboard-page .admin-card:hover {
    border-color: #ccdcca;
}

/* Seller dashboard */
.agmula-theme.seller-dashboard-page .role-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.agmula-theme.seller-dashboard-page .role-metrics article {
    position: relative;
    min-height: 138px;
    overflow: hidden;
    border-top: 3px solid var(--seller-accent-line);
}

.agmula-theme.seller-dashboard-page .role-metrics article::after {
    content: "";
    position: absolute;
    right: -26px;
    bottom: -32px;
    width: 88px;
    height: 88px;
    border: 16px solid rgba(47, 125, 60, .05);
    border-radius: 50%;
    pointer-events: none;
}

.agmula-theme.seller-dashboard-page .role-metrics article:nth-child(2) {
    border-top-color: var(--seller-harvest);
}

.agmula-theme.seller-dashboard-page .role-metrics article:nth-child(3) {
    border-top-color: #76a7c5;
}

.agmula-theme.seller-dashboard-page .role-metrics article:nth-child(4) {
    border-top-color: #8f79bd;
}

.agmula-theme.seller-dashboard-page .role-metrics strong {
    color: var(--seller-accent-deep);
}

.agmula-theme.seller-dashboard-page .role-dashboard-grid {
    align-items: stretch;
}

.agmula-theme.seller-dashboard-page .dashboard-order-list > a {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 14px;
    border-radius: 13px;
}

.agmula-theme.seller-dashboard-page .dashboard-order-list > a:hover {
    border-color: var(--seller-accent-line);
    background: var(--seller-accent-soft);
}

.agmula-theme.seller-dashboard-page .dashboard-order-list > a b {
    color: var(--seller-accent-deep);
    white-space: nowrap;
}

.agmula-theme.seller-dashboard-page .product-status-list li {
    min-height: 72px;
    border-radius: 13px;
}

.agmula-theme.seller-dashboard-page .seller-quick-links {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.agmula-theme.seller-dashboard-page .seller-quick-links .role-empty-card {
    min-height: 164px;
    align-content: start;
}

.agmula-theme.seller-dashboard-page .seller-quick-links .role-empty-card > span {
    border: 1px solid var(--seller-accent-line);
    background: var(--seller-accent-soft);
    color: var(--seller-accent-strong);
}

.agmula-theme.seller-dashboard-page .seller-quick-links .role-empty-card:nth-child(3) > span,
.agmula-theme.seller-dashboard-page .seller-quick-links .role-empty-card:nth-child(4) > span {
    border-color: var(--seller-harvest-line);
    background: var(--seller-harvest-soft);
    color: var(--seller-earth);
}

/* Farm profile */
.agmula-theme.seller-dashboard-page .farm-page-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(290px, .55fr);
    gap: clamp(18px, 2.4vw, 30px);
}

.agmula-theme.seller-dashboard-page .farm-form-column {
    gap: 22px;
}

.agmula-theme.seller-dashboard-page .farm-profile-form,
.agmula-theme.seller-dashboard-page .farm-photo-card,
.agmula-theme.seller-dashboard-page .product-editor-card,
.agmula-theme.seller-dashboard-page .product-photo-card {
    padding: clamp(20px, 3vw, 32px);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--theme-shadow-sm);
}

.agmula-theme.seller-dashboard-page .farm-profile-form .admin-card-heading,
.agmula-theme.seller-dashboard-page .farm-photo-card .admin-card-heading,
.agmula-theme.seller-dashboard-page .product-editor-card .admin-card-heading,
.agmula-theme.seller-dashboard-page .product-photo-card .admin-card-heading {
    margin-bottom: 22px;
    padding-bottom: 17px;
    border-bottom: 1px solid #e8eee5;
}

.agmula-theme.seller-dashboard-page .form-stack {
    gap: 18px;
}

.agmula-theme.seller-dashboard-page .form-stack label > span,
.agmula-theme.seller-dashboard-page .farm-upload-form label > span,
.agmula-theme.seller-dashboard-page .inventory-row label > span {
    color: #294a34;
    font-weight: 800;
}

.agmula-theme.seller-dashboard-page .form-stack input,
.agmula-theme.seller-dashboard-page .form-stack select,
.agmula-theme.seller-dashboard-page .form-stack textarea,
.agmula-theme.seller-dashboard-page .farm-upload-form input,
.agmula-theme.seller-dashboard-page .inventory-row input,
.agmula-theme.seller-dashboard-page .inventory-row select,
.agmula-theme.seller-dashboard-page .catalog-filter-bar input,
.agmula-theme.seller-dashboard-page .catalog-filter-bar select,
.agmula-theme.seller-dashboard-page .order-filter-bar input,
.agmula-theme.seller-dashboard-page .order-filter-bar select,
.agmula-theme.seller-dashboard-page .order-action-form textarea {
    border-color: #ccd9ca;
    background: #fbfdf9;
}

.agmula-theme.seller-dashboard-page .form-stack input:hover,
.agmula-theme.seller-dashboard-page .form-stack select:hover,
.agmula-theme.seller-dashboard-page .form-stack textarea:hover,
.agmula-theme.seller-dashboard-page .inventory-row input:hover,
.agmula-theme.seller-dashboard-page .inventory-row select:hover {
    border-color: #aac7a7;
}

.agmula-theme.seller-dashboard-page .form-stack input:focus,
.agmula-theme.seller-dashboard-page .form-stack select:focus,
.agmula-theme.seller-dashboard-page .form-stack textarea:focus,
.agmula-theme.seller-dashboard-page .farm-upload-form input:focus,
.agmula-theme.seller-dashboard-page .inventory-row input:focus,
.agmula-theme.seller-dashboard-page .inventory-row select:focus,
.agmula-theme.seller-dashboard-page .catalog-filter-bar input:focus,
.agmula-theme.seller-dashboard-page .catalog-filter-bar select:focus,
.agmula-theme.seller-dashboard-page .order-filter-bar input:focus,
.agmula-theme.seller-dashboard-page .order-filter-bar select:focus,
.agmula-theme.seller-dashboard-page .order-action-form textarea:focus {
    border-color: var(--seller-accent);
    box-shadow: 0 0 0 4px rgba(47, 125, 60, .12);
}

.agmula-theme.seller-dashboard-page .farm-map-fields,
.agmula-theme.seller-dashboard-page .product-location-note {
    border: 1px solid var(--seller-accent-line);
    background: var(--seller-accent-soft);
}

.agmula-theme.seller-dashboard-page .farm-photo-grid,
.agmula-theme.seller-dashboard-page .product-photo-grid {
    gap: 14px;
}

.agmula-theme.seller-dashboard-page .farm-photo-grid article,
.agmula-theme.seller-dashboard-page .product-photo-grid article {
    border: 1px solid #d8e5d4;
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(24, 91, 43, .06);
}

.agmula-theme.seller-dashboard-page .farm-photo-grid img,
.agmula-theme.seller-dashboard-page .product-photo-grid img {
    transition: transform 180ms ease;
}

.agmula-theme.seller-dashboard-page .farm-photo-grid article:hover img,
.agmula-theme.seller-dashboard-page .product-photo-grid article:hover img {
    transform: scale(1.025);
}

.agmula-theme.seller-dashboard-page .farm-upload-form {
    margin-top: 18px;
    padding: 18px;
    border: 1px dashed #b8cfb4;
    border-radius: 15px;
    background: #f8fbf6;
}

.agmula-theme.seller-dashboard-page .farm-review-column,
.agmula-theme.seller-dashboard-page .product-review-column {
    top: 92px;
}

.agmula-theme.seller-dashboard-page .farm-review-panel,
.agmula-theme.seller-dashboard-page .product-review-card {
    overflow: hidden;
    padding: 24px;
    border-color: var(--seller-accent-line);
    border-radius: 20px;
    background:
        radial-gradient(circle at 92% 6%, rgba(200, 239, 124, .25), transparent 28%),
        #fff;
    box-shadow: var(--theme-shadow-md);
}

.agmula-theme.seller-dashboard-page .farm-check-list li {
    position: relative;
    padding: 11px 12px 11px 38px;
    border: 1px solid #e0e9dd;
    border-radius: 12px;
    background: #f9fbf8;
}

.agmula-theme.seller-dashboard-page .farm-check-list li::before {
    content: "–";
    position: absolute;
    left: 12px;
    top: 10px;
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e9eee7;
    color: #7b887c;
    font-size: .7rem;
    font-weight: 900;
}

.agmula-theme.seller-dashboard-page .farm-check-list li.is-ready {
    border-color: var(--seller-accent-line);
    background: var(--seller-accent-soft);
}

.agmula-theme.seller-dashboard-page .farm-check-list li.is-ready::before {
    content: "✓";
    background: var(--seller-accent);
    color: #fff;
}

.agmula-theme.seller-dashboard-page .farm-review-note,
.agmula-theme.seller-dashboard-page .product-review-note {
    border-color: #e9cfc9;
    background: #fff5f2;
}

/* Product catalog and editor */
.agmula-theme.seller-dashboard-page .catalog-filter-bar {
    grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, .75fr)) auto auto;
    gap: 10px;
    padding: 16px;
    border-color: #d8e5d4;
    border-radius: 17px;
    background: rgba(255, 255, 255, .9);
    box-shadow: var(--theme-shadow-sm);
}

.agmula-theme.seller-dashboard-page .seller-product-grid {
    gap: 18px;
}

.agmula-theme.seller-dashboard-page .seller-product-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    border-color: #d9e5d5;
    border-radius: 20px;
    box-shadow: 0 10px 28px rgba(24, 91, 43, .065);
    transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.agmula-theme.seller-dashboard-page .seller-product-card:hover {
    transform: translateY(-3px);
    border-color: #b8d1b4;
    box-shadow: 0 18px 40px rgba(24, 91, 43, .11);
}

.agmula-theme.seller-dashboard-page .seller-product-photo {
    min-height: 210px;
    background:
        radial-gradient(circle at 82% 18%, rgba(200, 239, 124, .28), transparent 26%),
        linear-gradient(145deg, #edf6e9, #fbf5e8);
}

.agmula-theme.seller-dashboard-page .seller-product-photo img {
    height: 210px;
    transition: transform 200ms ease;
}

.agmula-theme.seller-dashboard-page .seller-product-card:hover .seller-product-photo img {
    transform: scale(1.025);
}

.agmula-theme.seller-dashboard-page .seller-product-body {
    min-height: 250px;
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 20px;
}

.agmula-theme.seller-dashboard-page .seller-product-body h3 {
    color: var(--seller-accent-deep);
    font-size: 1.08rem;
}

.agmula-theme.seller-dashboard-page .product-card-meta {
    padding: 11px 0;
    border-top: 1px solid #edf1eb;
    border-bottom: 1px solid #edf1eb;
}

.agmula-theme.seller-dashboard-page .product-card-actions {
    margin-top: auto;
    padding-top: 15px;
}

.agmula-theme.seller-dashboard-page .product-card-actions .button {
    min-width: 92px;
    justify-content: center;
}

.agmula-theme.seller-dashboard-page .product-edit-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
}

.agmula-theme.seller-dashboard-page .product-editor-card {
    max-width: none;
}

.agmula-theme.seller-dashboard-page .product-location-note > span {
    background: #dcefd7;
    color: var(--seller-accent-strong);
}

/* Inventory */
.agmula-theme.seller-dashboard-page .inventory-list {
    gap: 13px;
}

.agmula-theme.seller-dashboard-page .inventory-row {
    grid-template-columns: minmax(250px, 1.25fr) minmax(130px, .52fr) minmax(150px, .62fr) minmax(180px, .72fr) auto;
    gap: 14px;
    padding: 16px;
    border-color: #d9e5d5;
    border-radius: 17px;
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.agmula-theme.seller-dashboard-page .inventory-row:hover {
    transform: translateY(-1px);
    border-color: #b9d0b5;
    box-shadow: var(--theme-shadow-sm);
}

.agmula-theme.seller-dashboard-page .inventory-thumb {
    overflow: hidden;
    border: 1px solid #d8e5d4;
    border-radius: 13px;
    background: var(--seller-accent-soft);
}

.agmula-theme.seller-dashboard-page .inventory-thumb img {
    object-fit: cover;
}

.agmula-theme.seller-dashboard-page .inventory-row .button {
    align-self: end;
}

/* Orders and payments */
.agmula-theme.seller-dashboard-page .order-filter-bar {
    gap: 10px;
    padding: 16px;
    border-color: #d8e5d4;
    border-radius: 17px;
    background: rgba(255, 255, 255, .9);
    box-shadow: var(--theme-shadow-sm);
}

.agmula-theme.seller-dashboard-page .order-filter-bar a {
    color: var(--seller-accent-strong);
}

.agmula-theme.seller-dashboard-page .order-list {
    gap: 13px;
}

.agmula-theme.seller-dashboard-page .order-list-card {
    padding: 19px;
    border-color: #d9e5d5;
    border-radius: 17px;
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.agmula-theme.seller-dashboard-page .order-list-card:hover {
    transform: translateY(-2px);
    border-color: #bad1b6;
    box-shadow: var(--theme-shadow-sm);
}

.agmula-theme.seller-dashboard-page .order-list-card h2,
.agmula-theme.seller-dashboard-page .order-hero h2,
.agmula-theme.seller-dashboard-page .order-action-form h2,
.agmula-theme.seller-dashboard-page .order-payment-card h2 {
    color: var(--seller-accent-deep);
}

.agmula-theme.seller-dashboard-page .payment-status-unrecorded {
    background: #eef1ed;
    color: #657067;
}

.agmula-theme.seller-dashboard-page .order-hero {
    border-color: var(--seller-accent-line);
    background:
        radial-gradient(circle at 94% 8%, rgba(200, 239, 124, .22), transparent 25%),
        linear-gradient(135deg, #fff, #f7fbf5);
}

.agmula-theme.seller-dashboard-page .order-action-form,
.agmula-theme.seller-dashboard-page .order-payment-card {
    border-radius: 18px;
}

.agmula-theme.seller-dashboard-page .order-payment-card {
    border-color: var(--seller-harvest-line);
    background: var(--seller-harvest-soft);
}

.agmula-theme.seller-dashboard-page .marketplace-back-row a {
    color: var(--seller-accent-strong);
    font-weight: 800;
}

/* Reviews, notifications, and tracking */
.agmula-theme.seller-dashboard-page .review-summary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.agmula-theme.seller-dashboard-page .review-summary-metrics article {
    min-height: 128px;
}

.agmula-theme.seller-dashboard-page .published-review-grid {
    gap: 16px;
}

.agmula-theme.seller-dashboard-page .published-review-card {
    border-color: #d9e5d5;
    border-radius: 17px;
    box-shadow: var(--theme-shadow-sm);
}

.agmula-theme.seller-dashboard-page .review-stars {
    white-space: nowrap;
}

.agmula-theme.seller-dashboard-page .notification-card {
    border-color: #d9e5d5;
    border-radius: 16px;
}

.agmula-theme.seller-dashboard-page .notification-card.is-unread {
    border-color: #aecda9;
    background: #f3faef;
    box-shadow: inset 4px 0 0 var(--seller-accent);
}

.agmula-theme.seller-dashboard-page .notification-card-icon {
    border: 1px solid var(--seller-accent-line);
    background: var(--seller-accent-soft);
    color: var(--seller-accent-strong);
}

.agmula-theme.seller-dashboard-page .tracking-delivery-card {
    border-color: #d9e5d5;
    border-radius: 17px;
}

.agmula-theme.seller-dashboard-page .tracking-delivery-card:hover {
    border-color: #b9d0b5;
    box-shadow: 0 17px 36px rgba(24, 91, 43, .1);
}

.agmula-theme.seller-dashboard-page .tracking-delivery-card > strong {
    color: var(--seller-accent-strong);
}

/* Seller responsive behavior */
@media (max-width: 1240px) {
    .agmula-theme.seller-dashboard-page .seller-quick-links {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .agmula-theme.seller-dashboard-page .catalog-filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .agmula-theme.seller-dashboard-page .catalog-filter-bar .button,
    .agmula-theme.seller-dashboard-page .catalog-filter-bar > a {
        justify-content: center;
    }

    .agmula-theme.seller-dashboard-page .inventory-row {
        grid-template-columns: minmax(230px, 1fr) repeat(2, minmax(150px, .65fr));
    }

    .agmula-theme.seller-dashboard-page .inventory-row > label:nth-of-type(3),
    .agmula-theme.seller-dashboard-page .inventory-row > .button {
        grid-column: auto;
    }
}

@media (max-width: 1080px) {
    .agmula-theme.seller-dashboard-page .role-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .agmula-theme.seller-dashboard-page .farm-page-grid,
    .agmula-theme.seller-dashboard-page .product-edit-grid {
        grid-template-columns: 1fr;
    }

    .agmula-theme.seller-dashboard-page .farm-review-column,
    .agmula-theme.seller-dashboard-page .product-review-column {
        position: static;
    }

    .agmula-theme.seller-dashboard-page .seller-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .agmula-theme.seller-dashboard-page .inventory-row {
        grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(145px, .7fr));
    }

    .agmula-theme.seller-dashboard-page .inventory-row > label:nth-of-type(3) {
        grid-column: 2 / 3;
    }

    .agmula-theme.seller-dashboard-page .inventory-row > .button {
        grid-column: 3 / 4;
    }
}

@media (max-width: 760px) {
    .agmula-theme.seller-dashboard-page .seller-dashboard-hero,
    .agmula-theme.seller-dashboard-page .seller-section-intro {
        min-height: 0;
        align-items: stretch;
        flex-direction: column;
    }

    .agmula-theme.seller-dashboard-page .seller-dashboard-hero .button,
    .agmula-theme.seller-dashboard-page .seller-section-intro .button {
        width: 100%;
        justify-content: center;
    }

    .agmula-theme.seller-dashboard-page .seller-quick-links,
    .agmula-theme.seller-dashboard-page .seller-product-grid,
    .agmula-theme.seller-dashboard-page .published-review-grid {
        grid-template-columns: 1fr;
    }

    .agmula-theme.seller-dashboard-page .seller-quick-links .role-empty-card {
        min-height: 130px;
    }

    .agmula-theme.seller-dashboard-page .catalog-filter-bar,
    .agmula-theme.seller-dashboard-page .order-filter-wide,
    .agmula-theme.seller-dashboard-page .inventory-row {
        grid-template-columns: 1fr;
    }

    .agmula-theme.seller-dashboard-page .inventory-row > label:nth-of-type(3),
    .agmula-theme.seller-dashboard-page .inventory-row > .button {
        grid-column: auto;
    }

    .agmula-theme.seller-dashboard-page .inventory-row .button {
        width: 100%;
        justify-content: center;
    }

    .agmula-theme.seller-dashboard-page .farm-photo-grid,
    .agmula-theme.seller-dashboard-page .product-photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .agmula-theme.seller-dashboard-page .dashboard-order-list > a {
        grid-template-columns: 1fr auto;
    }

    .agmula-theme.seller-dashboard-page .dashboard-order-list > a b {
        grid-column: 1 / -1;
    }

    .agmula-theme.seller-dashboard-page .review-summary-metrics {
        grid-template-columns: 1fr;
    }

    .agmula-theme.seller-dashboard-page .notification-card,
    .agmula-theme.seller-dashboard-page .tracking-delivery-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .agmula-theme.seller-dashboard-page .role-metrics {
        grid-template-columns: 1fr;
    }

    .agmula-theme.seller-dashboard-page .farm-profile-form,
    .agmula-theme.seller-dashboard-page .farm-photo-card,
    .agmula-theme.seller-dashboard-page .product-editor-card,
    .agmula-theme.seller-dashboard-page .product-photo-card {
        padding: 18px;
    }

    .agmula-theme.seller-dashboard-page .farm-photo-grid,
    .agmula-theme.seller-dashboard-page .product-photo-grid {
        grid-template-columns: 1fr;
    }

    .agmula-theme.seller-dashboard-page .form-columns,
    .agmula-theme.seller-dashboard-page .product-form-columns {
        grid-template-columns: 1fr;
    }

    .agmula-theme.seller-dashboard-page .seller-product-photo,
    .agmula-theme.seller-dashboard-page .seller-product-photo img {
        min-height: 180px;
        height: 180px;
    }
}


/*
|--------------------------------------------------------------------------
| AGMULA Theme — Phase 5 Rider Portal
|--------------------------------------------------------------------------
| Rider-only presentation layer. Existing assignment limits, pickup and
| delivery codes, COD, proof-of-delivery, tracking, and notification rules
| remain controlled by the existing Laravel workflows.
*/

.agmula-theme.rider-dashboard-page {
    --rider-accent: #137a75;
    --rider-accent-strong: #0a5d59;
    --rider-accent-deep: #074845;
    --rider-accent-soft: #eaf8f6;
    --rider-accent-line: #bfe2de;
    --rider-route: #2f6fa5;
    --rider-route-soft: #edf6fc;
    --rider-route-line: #c7ddec;
    --rider-signal: #d99024;
    --rider-signal-soft: #fff7e8;
    --rider-signal-line: #ecd5a9;
}

.agmula-theme.rider-dashboard-page .admin-shell {
    background:
        radial-gradient(circle at 94% 2%, rgba(64, 175, 167, .12), transparent 26%),
        radial-gradient(circle at 72% 100%, rgba(47, 111, 165, .08), transparent 29%),
        #f1f6f5;
}

.agmula-theme.rider-dashboard-page .role-sidebar-rider {
    background:
        radial-gradient(circle at 18% -8%, rgba(85, 211, 200, .22), transparent 31%),
        linear-gradient(180deg, #0d5552 0%, #0a4746 55%, #063938 100%);
}

.agmula-theme.rider-dashboard-page .role-sidebar-rider .admin-nav-link.is-active {
    background: rgba(229, 255, 251, .13);
    color: #fff;
    box-shadow: inset 3px 0 0 #6de0d6;
}

.agmula-theme.rider-dashboard-page .role-sidebar-rider .admin-nav-link:not(.is-disabled):hover {
    background: rgba(255, 255, 255, .08);
}

.agmula-theme.rider-dashboard-page .admin-topbar {
    border-bottom-color: #d7e6e3;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(14px);
}

.agmula-theme.rider-dashboard-page .admin-kicker {
    color: var(--rider-accent);
}

.agmula-theme.rider-dashboard-page .admin-avatar,
.agmula-theme.rider-dashboard-page .role-sidebar-avatar {
    background: linear-gradient(145deg, var(--rider-accent), var(--rider-route));
    color: #fff;
}

.agmula-theme.rider-dashboard-page .admin-content {
    max-width: 1480px;
}

.agmula-theme.rider-dashboard-page .role-dashboard-content {
    gap: clamp(18px, 2.2vw, 28px);
}

.agmula-theme.rider-dashboard-page .role-dashboard-intro {
    border-color: var(--rider-accent-line);
    background:
        radial-gradient(circle at 93% 7%, rgba(78, 198, 188, .24), transparent 27%),
        radial-gradient(circle at 79% 118%, rgba(47, 111, 165, .11), transparent 31%),
        linear-gradient(135deg, #fff 0%, #f3fbfa 100%);
}

.agmula-theme.rider-dashboard-page .role-dashboard-intro::after {
    border-color: rgba(19, 122, 117, .07);
}

.agmula-theme.rider-dashboard-page .role-dashboard-intro .eyebrow {
    color: var(--rider-accent);
}

.agmula-theme.rider-dashboard-page .role-dashboard-intro .button:not(.button-secondary),
.agmula-theme.rider-dashboard-page .rider-delivery-hero .button {
    border-color: var(--rider-accent-strong);
    background: var(--rider-accent-strong);
}

.agmula-theme.rider-dashboard-page .role-dashboard-intro .button:not(.button-secondary):hover,
.agmula-theme.rider-dashboard-page .rider-delivery-hero .button:hover {
    border-color: var(--rider-accent-deep);
    background: var(--rider-accent-deep);
}

.agmula-theme.rider-dashboard-page .rider-dashboard-hero {
    min-height: 178px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
}

.agmula-theme.rider-dashboard-page .rider-section-intro {
    min-height: 148px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.agmula-theme.rider-dashboard-page .admin-card,
.agmula-theme.rider-dashboard-page .panel {
    border-color: #d8e6e3;
}

.agmula-theme.rider-dashboard-page .admin-card:hover {
    border-color: #c3dad6;
}

/* Rider dashboard */
.agmula-theme.rider-dashboard-page .role-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.agmula-theme.rider-dashboard-page .role-metrics article {
    position: relative;
    min-height: 138px;
    overflow: hidden;
    border-top: 3px solid var(--rider-accent);
}

.agmula-theme.rider-dashboard-page .role-metrics article::after {
    content: "";
    position: absolute;
    right: -25px;
    bottom: -31px;
    width: 88px;
    height: 88px;
    border: 16px solid rgba(19, 122, 117, .055);
    border-radius: 50%;
    pointer-events: none;
}

.agmula-theme.rider-dashboard-page .role-metrics article:nth-child(2) {
    border-top-color: var(--rider-route);
}

.agmula-theme.rider-dashboard-page .role-metrics article:nth-child(3) {
    border-top-color: #3b8d61;
}

.agmula-theme.rider-dashboard-page .role-metrics article:nth-child(4) {
    border-top-color: var(--rider-signal);
}

.agmula-theme.rider-dashboard-page .role-metrics strong {
    color: var(--rider-accent-deep);
}

.agmula-theme.rider-dashboard-page .role-dashboard-grid {
    align-items: stretch;
}

.agmula-theme.rider-dashboard-page .role-primary-card {
    background:
        radial-gradient(circle at 95% 5%, rgba(78, 198, 188, .14), transparent 28%),
        #fff;
}

.agmula-theme.rider-dashboard-page .role-feature-panel {
    border: 1px solid var(--rider-accent-line);
    background: var(--rider-accent-soft);
}

.agmula-theme.rider-dashboard-page .role-feature-icon {
    background: #d9f1ee;
    color: var(--rider-accent-strong);
}

.agmula-theme.rider-dashboard-page .dashboard-order-list > a {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    border-radius: 13px;
}

.agmula-theme.rider-dashboard-page .dashboard-order-list > a:hover {
    border-color: var(--rider-accent-line);
    background: var(--rider-accent-soft);
}

.agmula-theme.rider-dashboard-page .rider-quick-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.agmula-theme.rider-dashboard-page .rider-quick-links .role-empty-card {
    min-height: 156px;
    align-content: start;
}

.agmula-theme.rider-dashboard-page .rider-quick-links .role-empty-card > span {
    border: 1px solid var(--rider-accent-line);
    background: var(--rider-accent-soft);
    color: var(--rider-accent-strong);
}

.agmula-theme.rider-dashboard-page .rider-quick-links .role-empty-card:nth-child(2) > span {
    border-color: var(--rider-route-line);
    background: var(--rider-route-soft);
    color: var(--rider-route);
}

.agmula-theme.rider-dashboard-page .rider-quick-links .role-empty-card:nth-child(3) > span {
    border-color: var(--rider-signal-line);
    background: var(--rider-signal-soft);
    color: #976312;
}

/* Available delivery jobs */
.agmula-theme.rider-dashboard-page .delivery-active-warning {
    margin-bottom: 0;
    border-color: var(--rider-signal-line);
    border-radius: 17px;
    background: var(--rider-signal-soft);
    box-shadow: var(--theme-shadow-sm);
}

.agmula-theme.rider-dashboard-page .delivery-active-warning > span {
    border: 1px solid var(--rider-signal-line);
    background: #fff0c9;
}

.agmula-theme.rider-dashboard-page .rider-job-list {
    gap: 18px;
}

.agmula-theme.rider-dashboard-page .delivery-job-card {
    min-width: 0;
    padding: 22px;
    border-color: #d6e5e2;
    border-radius: 19px;
    box-shadow: 0 10px 28px rgba(7, 72, 69, .06);
    transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.agmula-theme.rider-dashboard-page .delivery-job-card:hover {
    transform: translateY(-3px);
    border-color: var(--rider-accent-line);
    box-shadow: 0 18px 40px rgba(7, 72, 69, .11);
}

.agmula-theme.rider-dashboard-page .delivery-job-heading {
    padding-bottom: 16px;
    border-bottom: 1px solid #e6efed;
}

.agmula-theme.rider-dashboard-page .delivery-job-heading h2 {
    color: var(--rider-accent-deep);
}

.agmula-theme.rider-dashboard-page .delivery-job-heading > strong {
    color: var(--rider-accent-strong);
    white-space: nowrap;
}

.agmula-theme.rider-dashboard-page .delivery-job-details {
    gap: 10px;
}

.agmula-theme.rider-dashboard-page .delivery-job-details > div {
    min-width: 0;
    border: 1px solid #deebe8;
    background: #f6faf9;
}

.agmula-theme.rider-dashboard-page .delivery-job-details dt {
    color: #6c817d;
}

.agmula-theme.rider-dashboard-page .delivery-job-details dd {
    overflow-wrap: anywhere;
    color: var(--rider-accent-deep);
}

.agmula-theme.rider-dashboard-page .delivery-job-card .button[disabled] {
    border-color: #c9d5d2;
    background: #dfe7e5;
    color: #72817e;
    box-shadow: none;
}

/* Active delivery workflow */
.agmula-theme.rider-dashboard-page .rider-delivery-hero {
    border-color: var(--rider-accent-line);
    background:
        radial-gradient(circle at 95% 7%, rgba(78, 198, 188, .23), transparent 27%),
        linear-gradient(135deg, #fff, #f2fbf9);
}

.agmula-theme.rider-dashboard-page .rider-delivery-hero h2 {
    color: var(--rider-accent-deep);
}

.agmula-theme.rider-dashboard-page .rider-delivery-hero .order-hero-status > strong {
    color: var(--rider-accent-strong);
}

.agmula-theme.rider-dashboard-page .delivery-active-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(310px, .62fr);
    gap: clamp(18px, 2.4vw, 28px);
}

.agmula-theme.rider-dashboard-page .delivery-active-main,
.agmula-theme.rider-dashboard-page .delivery-active-side {
    gap: 18px;
    min-width: 0;
}

.agmula-theme.rider-dashboard-page .delivery-active-side {
    top: 96px;
}

.agmula-theme.rider-dashboard-page .delivery-route-card,
.agmula-theme.rider-dashboard-page .order-items-card,
.agmula-theme.rider-dashboard-page .order-history-card,
.agmula-theme.rider-dashboard-page .order-action-form {
    border-radius: 18px;
    box-shadow: var(--theme-shadow-sm);
}

.agmula-theme.rider-dashboard-page .delivery-route-card {
    padding: 24px;
    border-color: var(--rider-route-line);
    background:
        radial-gradient(circle at 95% 6%, rgba(47, 111, 165, .1), transparent 28%),
        #fff;
}

.agmula-theme.rider-dashboard-page .delivery-route-stop {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 15px;
}

.agmula-theme.rider-dashboard-page .delivery-route-stop > span {
    width: 46px;
    height: 46px;
    background: var(--rider-accent);
    box-shadow: 0 8px 18px rgba(19, 122, 117, .18);
}

.agmula-theme.rider-dashboard-page .delivery-route-stop:nth-of-type(3) > span {
    background: var(--rider-route);
    box-shadow: 0 8px 18px rgba(47, 111, 165, .18);
}

.agmula-theme.rider-dashboard-page .delivery-route-line {
    height: 42px;
    margin-left: 22px;
    background: linear-gradient(var(--rider-accent-line), var(--rider-route-line));
}

.agmula-theme.rider-dashboard-page .delivery-route-stop strong {
    color: var(--rider-accent-deep);
}

.agmula-theme.rider-dashboard-page .delivery-route-stop a {
    color: var(--rider-route);
}

.agmula-theme.rider-dashboard-page .order-action-form {
    gap: 13px;
    padding: 22px;
    border-color: #d5e4e1;
    background: #fff;
}

.agmula-theme.rider-dashboard-page .order-action-form h2 {
    color: var(--rider-accent-deep);
}

.agmula-theme.rider-dashboard-page .rider-pickup-form {
    border-top: 3px solid var(--rider-accent);
}

.agmula-theme.rider-dashboard-page .rider-release-form {
    border-top: 3px solid #c65b50;
    background: #fffafa;
}

.agmula-theme.rider-dashboard-page .rider-out-form {
    border-top: 3px solid var(--rider-route);
}

.agmula-theme.rider-dashboard-page .rider-complete-form {
    border-top: 3px solid #3b8d61;
}

.agmula-theme.rider-dashboard-page .order-action-form label > span {
    color: #284b48;
}

.agmula-theme.rider-dashboard-page .order-action-form :where(input[type="text"], input[type="file"], textarea) {
    border-color: #c7d9d5;
    background: #fbfdfd;
}

.agmula-theme.rider-dashboard-page .order-action-form :where(input[type="text"], input[type="file"], textarea):focus {
    border-color: var(--rider-accent);
    box-shadow: 0 0 0 4px rgba(19, 122, 117, .13);
}

.agmula-theme.rider-dashboard-page .delivery-code-input {
    min-height: 54px;
    border-color: var(--rider-accent-line);
    background: #f5fbfa;
    color: var(--rider-accent-deep);
}

.agmula-theme.rider-dashboard-page .danger-action-button {
    border-radius: 10px;
}

.agmula-theme.rider-dashboard-page .payment-status-unrecorded {
    background: #eef2f1;
    color: #61716d;
}

/* Live tracking and map */
.agmula-theme.rider-dashboard-page .live-tracking-card {
    padding: clamp(20px, 2.8vw, 30px);
    border-color: var(--rider-route-line);
    border-radius: 20px;
    background: #fff;
}

.agmula-theme.rider-dashboard-page .live-tracking-heading {
    gap: 22px;
}

.agmula-theme.rider-dashboard-page .live-tracking-heading h2 {
    color: var(--rider-accent-deep);
}

.agmula-theme.rider-dashboard-page .live-tracking-actions .button {
    border-color: var(--rider-accent-strong);
    background: var(--rider-accent-strong);
}

.agmula-theme.rider-dashboard-page .live-tracking-actions .button-secondary {
    border-color: #c7d9d5;
    background: #fff;
    color: var(--rider-accent-strong);
}

.agmula-theme.rider-dashboard-page .tracking-connection-status {
    border: 1px solid #d2e0dd;
    background: #f7faf9;
}

.agmula-theme.rider-dashboard-page .tracking-connection-status.is-live {
    border-color: #b8ddc2;
    background: #e9f7ec;
    color: #28733d;
}

.agmula-theme.rider-dashboard-page .agmula-live-map {
    border-color: var(--rider-route-line);
    border-radius: 18px;
}

.agmula-theme.rider-dashboard-page .tracking-map-legend {
    padding: 11px 13px;
    border: 1px solid #dce8e5;
    border-radius: 12px;
    background: #f7faf9;
}

/* Delivery history and notifications */
.agmula-theme.rider-dashboard-page .rider-history-card {
    overflow: hidden;
    padding: 0;
    border-radius: 19px;
}

.agmula-theme.rider-dashboard-page .rider-history-card .responsive-table-wrap {
    overflow-x: auto;
}

.agmula-theme.rider-dashboard-page .rider-history-card .admin-data-table {
    margin: 0;
}

.agmula-theme.rider-dashboard-page .rider-history-card .admin-data-table th {
    background: #f1f7f6;
    color: var(--rider-accent-deep);
}

.agmula-theme.rider-dashboard-page .rider-history-card .admin-data-table tbody tr:hover {
    background: #f7fbfa;
}

.agmula-theme.rider-dashboard-page .notification-card {
    border-color: #d7e5e2;
    border-radius: 16px;
}

.agmula-theme.rider-dashboard-page .notification-card.is-unread {
    border-color: var(--rider-accent-line);
    background: linear-gradient(90deg, var(--rider-accent-soft), #fff 30%);
    box-shadow: inset 4px 0 0 var(--rider-accent);
}

.agmula-theme.rider-dashboard-page .notification-card-icon {
    border: 1px solid var(--rider-accent-line);
    background: var(--rider-accent-soft);
    color: var(--rider-accent-strong);
}

.agmula-theme.rider-dashboard-page .notification-read-button {
    color: var(--rider-accent-strong);
}

/* Rider responsive behavior */
@media (max-width: 1180px) {
    .agmula-theme.rider-dashboard-page .role-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .agmula-theme.rider-dashboard-page .delivery-active-layout {
        grid-template-columns: minmax(0, 1fr) minmax(290px, .56fr);
    }
}

@media (max-width: 980px) {
    .agmula-theme.rider-dashboard-page .delivery-active-layout {
        grid-template-columns: 1fr;
    }

    .agmula-theme.rider-dashboard-page .delivery-active-side {
        position: static;
    }

    .agmula-theme.rider-dashboard-page .rider-job-list {
        grid-template-columns: 1fr;
    }

    .agmula-theme.rider-dashboard-page .agmula-live-map {
        min-height: 460px;
    }
}

@media (max-width: 760px) {
    .agmula-theme.rider-dashboard-page .rider-dashboard-hero,
    .agmula-theme.rider-dashboard-page .rider-section-intro,
    .agmula-theme.rider-dashboard-page .rider-delivery-hero,
    .agmula-theme.rider-dashboard-page .live-tracking-heading {
        min-height: 0;
        align-items: stretch;
        flex-direction: column;
    }

    .agmula-theme.rider-dashboard-page .rider-dashboard-hero .button,
    .agmula-theme.rider-dashboard-page .rider-section-intro .button,
    .agmula-theme.rider-dashboard-page .rider-delivery-hero .button,
    .agmula-theme.rider-dashboard-page .live-tracking-actions .button {
        width: 100%;
        justify-content: center;
    }

    .agmula-theme.rider-dashboard-page .rider-delivery-hero .order-hero-status {
        width: 100%;
        justify-content: flex-start;
        align-items: flex-start;
    }

    .agmula-theme.rider-dashboard-page .rider-delivery-hero .order-hero-status > strong {
        text-align: left;
    }

    .agmula-theme.rider-dashboard-page .rider-quick-links {
        grid-template-columns: 1fr;
    }

    .agmula-theme.rider-dashboard-page .rider-quick-links .role-empty-card {
        min-height: 126px;
    }

    .agmula-theme.rider-dashboard-page .delivery-job-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .agmula-theme.rider-dashboard-page .delivery-job-details {
        grid-template-columns: 1fr;
    }

    .agmula-theme.rider-dashboard-page .delivery-active-warning {
        grid-template-columns: 40px 1fr;
        padding: 16px;
    }

    .agmula-theme.rider-dashboard-page .delivery-active-warning > span {
        width: 40px;
        height: 40px;
    }

    .agmula-theme.rider-dashboard-page .live-tracking-actions {
        width: 100%;
        justify-content: stretch;
    }

    .agmula-theme.rider-dashboard-page .tracking-connection-status {
        width: 100%;
        justify-content: center;
    }

    .agmula-theme.rider-dashboard-page .notification-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    .agmula-theme.rider-dashboard-page .role-metrics {
        grid-template-columns: 1fr;
    }

    .agmula-theme.rider-dashboard-page .delivery-job-card,
    .agmula-theme.rider-dashboard-page .delivery-route-card,
    .agmula-theme.rider-dashboard-page .order-action-form,
    .agmula-theme.rider-dashboard-page .live-tracking-card {
        padding: 18px;
    }

    .agmula-theme.rider-dashboard-page .delivery-route-stop {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 12px;
    }

    .agmula-theme.rider-dashboard-page .delivery-route-stop > span {
        width: 40px;
        height: 40px;
    }

    .agmula-theme.rider-dashboard-page .delivery-route-line {
        margin-left: 19px;
    }

    .agmula-theme.rider-dashboard-page .agmula-live-map {
        min-height: 360px;
    }

    .agmula-theme.rider-dashboard-page .tracking-map-legend {
        display: grid;
        gap: 8px;
    }
}

/*
|--------------------------------------------------------------------------
| AGMULA Admin Panel — Phase 6
|--------------------------------------------------------------------------
| Admin-only presentation layer. Routes, permissions, validation, moderation,
| order, delivery, payment, reporting, and notification workflows are unchanged.
*/

.agmula-theme.admin-page {
    --admin-navy: #123b2b;
    --admin-ink: #19372c;
    --admin-muted: #677a70;
    --admin-surface: #ffffff;
    --admin-soft: #f5f8f3;
    --admin-line: #dce6d9;
    --admin-accent: #287a48;
    --admin-accent-strong: #176336;
    --admin-accent-soft: #edf7ee;
    --admin-warning: #8a621b;
    --admin-warning-soft: #fff7df;
    --admin-danger: #a43d37;
    --admin-danger-soft: #fff0ee;
    color: var(--admin-ink);
}

.agmula-theme.admin-page .admin-shell {
    background:
        radial-gradient(circle at 88% 0%, rgba(174, 219, 116, .14), transparent 26rem),
        linear-gradient(180deg, #f4f7f1 0%, #edf2eb 100%);
}

.agmula-theme.admin-page .admin-main {
    min-height: 100vh;
}

.agmula-theme.admin-page .admin-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: 82px;
    border-bottom-color: rgba(19, 75, 43, .1);
    background: rgba(255, 255, 255, .92);
}

.agmula-theme.admin-page .admin-topbar > div:first-child {
    min-width: 0;
}

.agmula-theme.admin-page .admin-topbar h1 {
    overflow-wrap: anywhere;
}

.agmula-theme.admin-page .admin-content {
    display: grid;
    gap: clamp(18px, 2vw, 26px);
    max-width: 1660px;
}

.agmula-theme.admin-page :where(
    .admin-card,
    .admin-metrics > article,
    .role-dashboard-intro
) {
    border-color: var(--admin-line);
}

.agmula-theme.admin-page .admin-card {
    min-width: 0;
    box-shadow: 0 9px 28px rgba(24, 72, 43, .055);
}

.agmula-theme.admin-page .admin-card:hover {
    border-color: #c8d9c4;
    box-shadow: 0 15px 34px rgba(24, 72, 43, .08);
}

.agmula-theme.admin-page .admin-card-heading {
    align-items: flex-start;
}

.agmula-theme.admin-page .admin-card-heading h2 {
    margin-top: 3px;
}

.agmula-theme.admin-page .admin-card-link,
.agmula-theme.admin-page .admin-card-badge {
    flex: 0 0 auto;
}

/* Dashboard */
.agmula-theme.admin-page .admin-metrics {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.agmula-theme.admin-page .admin-metrics > article {
    min-width: 0;
    min-height: 132px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    background:
        radial-gradient(circle at 104% 112%, rgba(54, 139, 79, .11), transparent 42%),
        var(--admin-surface);
}

.agmula-theme.admin-page .admin-metrics strong {
    overflow-wrap: anywhere;
    font-size: clamp(1.35rem, 2.2vw, 2rem);
}

.agmula-theme.admin-page .admin-metrics small {
    line-height: 1.45;
}

.agmula-theme.admin-page .admin-dashboard-grid {
    grid-template-columns: minmax(0, 1.55fr) repeat(2, minmax(250px, .72fr));
    gap: 20px;
}

.agmula-theme.admin-page .admin-dashboard-grid > *,
.agmula-theme.admin-page .admin-lower-grid > * {
    min-width: 0;
}

.agmula-theme.admin-page .admin-dashboard-grid .admin-card,
.agmula-theme.admin-page .admin-lower-grid .admin-card {
    padding: 22px;
}

.agmula-theme.admin-page .admin-lower-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.agmula-theme.admin-page .dashboard-order-list > a {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 14px;
    border-radius: 12px;
}

.agmula-theme.admin-page .dashboard-order-list > a > span:first-child {
    min-width: 0;
}

.agmula-theme.admin-page .dashboard-order-list strong,
.agmula-theme.admin-page .dashboard-order-list small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agmula-theme.admin-page .catalog-operations-grid {
    gap: 10px;
}

.agmula-theme.admin-page .catalog-operations-grid > a {
    min-width: 0;
    border: 1px solid var(--admin-line);
    border-radius: 13px;
    background: var(--admin-soft);
}

.agmula-theme.admin-page .catalog-operations-grid > a:hover {
    border-color: #bad2b8;
    background: var(--admin-accent-soft);
}

.agmula-theme.admin-page .category-summary-list,
.agmula-theme.admin-page .verification-list {
    gap: 8px;
}

.agmula-theme.admin-page .category-summary-list li,
.agmula-theme.admin-page .verification-list li {
    border-radius: 12px;
}

/* Page headings and actions */
.agmula-theme.admin-page .role-dashboard-intro,
.agmula-theme.admin-page .order-hero {
    padding: clamp(22px, 2.5vw, 30px);
    border-radius: 20px;
    background:
        radial-gradient(circle at 94% 8%, rgba(180, 224, 119, .23), transparent 30%),
        #fff;
}

.agmula-theme.admin-page .admin-page-actions,
.agmula-theme.admin-page .marketplace-back-row {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.agmula-theme.admin-page .admin-page-actions > a:not(.button),
.agmula-theme.admin-page .marketplace-back-row > a {
    color: var(--admin-accent-strong);
    font-weight: 800;
}

.agmula-theme.admin-page .admin-page-actions > a:not(.button):hover,
.agmula-theme.admin-page .marketplace-back-row > a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Filters and controls */
.agmula-theme.admin-page :where(
    .catalog-filter-bar,
    .order-filter-bar,
    .admin-filter-bar
) {
    display: grid;
    grid-template-columns: minmax(220px, 1.3fr) repeat(3, minmax(150px, .75fr)) auto auto;
    gap: 10px;
    align-items: end;
    padding: 14px;
    border: 1px solid var(--admin-line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 8px 24px rgba(24, 72, 43, .045);
}

.agmula-theme.admin-page .admin-filter-bar {
    grid-template-columns: minmax(220px, 1.25fr) repeat(2, minmax(150px, .7fr)) auto;
}

.agmula-theme.admin-page .review-filter-bar {
    grid-template-columns: minmax(240px, 1fr) minmax(160px, .45fr) auto auto;
}

.agmula-theme.admin-page :where(
    .catalog-filter-bar,
    .order-filter-bar,
    .admin-filter-bar,
    .payment-admin-card form,
    .category-inline-form,
    .form-stack,
    .moderation-form,
    .admin-return-form,
    .order-action-form
) :where(input, select, textarea) {
    min-width: 0;
    border-color: #cbd9c7;
    background: #fbfdfb;
}

.agmula-theme.admin-page :where(
    .catalog-filter-bar,
    .order-filter-bar,
    .admin-filter-bar,
    .payment-admin-card form,
    .category-inline-form,
    .form-stack,
    .moderation-form,
    .admin-return-form,
    .order-action-form
) :where(input, select, textarea):focus {
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 4px rgba(40, 122, 72, .12);
}

.agmula-theme.admin-page :where(
    .catalog-filter-bar,
    .order-filter-bar,
    .admin-filter-bar
) > a:not(.button) {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-inline: 12px;
    border: 1px solid var(--admin-line);
    border-radius: 10px;
    background: #fff;
    color: var(--admin-accent-strong);
    font-size: .72rem;
    font-weight: 850;
}

.agmula-theme.admin-page :where(
    .catalog-filter-bar,
    .order-filter-bar,
    .admin-filter-bar
) > a:not(.button):hover {
    border-color: #bcd1b8;
    background: var(--admin-accent-soft);
}

.agmula-theme.admin-page .button,
.agmula-theme.admin-page .admin-filter-submit,
.agmula-theme.admin-page .admin-action-button {
    border-radius: 10px;
}

.agmula-theme.admin-page .button:not(.button-secondary),
.agmula-theme.admin-page .admin-filter-submit,
.agmula-theme.admin-page .admin-action-approve,
.agmula-theme.admin-page .admin-action-activate {
    border-color: var(--admin-accent-strong);
    background: var(--admin-accent-strong);
    color: #fff;
}

.agmula-theme.admin-page .button:not(.button-secondary):hover,
.agmula-theme.admin-page .admin-filter-submit:hover,
.agmula-theme.admin-page .admin-action-approve:hover,
.agmula-theme.admin-page .admin-action-activate:hover {
    border-color: #0e512b;
    background: #0e512b;
}

.agmula-theme.admin-page .button-secondary {
    border-color: #c7d7c3;
    background: #fff;
    color: var(--admin-accent-strong);
}

.agmula-theme.admin-page .danger-action-button,
.agmula-theme.admin-page .admin-action-suspend {
    border-radius: 10px;
}

.agmula-theme.admin-page .danger-action-button:focus-visible,
.agmula-theme.admin-page .admin-action-button:focus-visible,
.agmula-theme.admin-page .text-action-button:focus-visible,
.agmula-theme.admin-page .text-danger-button:focus-visible {
    outline: 3px solid rgba(40, 122, 72, .2);
    outline-offset: 2px;
}

/* Data tables */
.agmula-theme.admin-page :where(
    .admin-table-wrap,
    .responsive-table-wrap
) {
    max-width: 100%;
    overflow-x: auto;
    border-radius: 15px;
    scrollbar-width: thin;
}

.agmula-theme.admin-page .admin-table-card {
    padding: 0;
    border-radius: 17px;
}

.agmula-theme.admin-page .admin-table-card :where(.admin-table-wrap, .responsive-table-wrap) {
    border-radius: inherit;
}

.agmula-theme.admin-page :where(.admin-table, .admin-data-table) {
    min-width: 780px;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.agmula-theme.admin-page :where(.admin-table, .admin-data-table) thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #eef5eb;
    color: var(--admin-navy);
}

.agmula-theme.admin-page :where(.admin-table, .admin-data-table) td {
    overflow-wrap: anywhere;
}

.agmula-theme.admin-page :where(.admin-table, .admin-data-table) td > small {
    margin-top: 3px;
}

.agmula-theme.admin-page :where(.admin-table, .admin-data-table) tbody tr:hover td {
    background: #f8fbf7;
}

.agmula-theme.admin-page .admin-table-actions-heading {
    min-width: 170px;
}

.agmula-theme.admin-page .admin-action-row {
    align-items: flex-start;
}

.agmula-theme.admin-page .admin-action-review {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid #c8d8c4;
    border-radius: 9px;
    background: #fff;
    color: var(--admin-accent-strong);
    font-size: .68rem;
    font-weight: 850;
}

.agmula-theme.admin-page .admin-action-review:hover {
    border-color: #aecaab;
    background: var(--admin-accent-soft);
}

.agmula-theme.admin-page .payment-status-unrecorded {
    border-color: #d7dfdc;
    background: #f1f4f3;
    color: #63716b;
}

/* User and farmer management */
.agmula-theme.admin-page .admin-user-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.agmula-theme.admin-page .admin-user-summary article {
    border-color: var(--admin-line);
    border-radius: 16px;
    background: #fff;
}

.agmula-theme.admin-page .admin-users-card {
    padding: 22px;
}

.agmula-theme.admin-page .admin-user-cell {
    min-width: 190px;
}

.agmula-theme.admin-page .admin-user-avatar {
    flex: 0 0 auto;
    background: var(--admin-accent-soft);
    color: var(--admin-accent-strong);
}

.agmula-theme.admin-page .admin-suspend-control {
    position: relative;
}

.agmula-theme.admin-page .admin-suspend-control[open] {
    min-width: min(330px, 78vw);
    padding: 10px;
    border: 1px solid #efc9c5;
    border-radius: 12px;
    background: #fffafa;
    box-shadow: 0 15px 35px rgba(100, 38, 32, .12);
}

.agmula-theme.admin-page .admin-suspend-control form {
    gap: 9px;
}

.agmula-theme.admin-page .admin-farmer-grid {
    grid-template-columns: minmax(250px, .56fr) minmax(0, 1.44fr);
    gap: 20px;
}

.agmula-theme.admin-page .admin-farmer-grid .admin-card {
    padding: 22px;
}

.agmula-theme.admin-page .admin-detail-list {
    gap: 10px;
}

.agmula-theme.admin-page .admin-detail-list > div {
    min-width: 0;
    padding: 12px;
    border: 1px solid #e1e9df;
    border-radius: 11px;
    background: var(--admin-soft);
}

.agmula-theme.admin-page .admin-detail-list dd {
    overflow-wrap: anywhere;
}

.agmula-theme.admin-page .admin-farm-photo-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.agmula-theme.admin-page .admin-farm-photo-grid a {
    overflow: hidden;
    border-radius: 13px;
    background: var(--admin-soft);
}

.agmula-theme.admin-page .admin-farm-photo-grid img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform 170ms ease;
}

.agmula-theme.admin-page .admin-farm-photo-grid a:hover img {
    transform: scale(1.025);
}

.agmula-theme.admin-page .admin-review-actions-card {
    padding: 22px;
}

.agmula-theme.admin-page .admin-review-actions {
    align-items: flex-start;
}

.agmula-theme.admin-page .admin-return-form {
    min-width: min(460px, 100%);
}

/* Categories and products */
.agmula-theme.admin-page .category-admin-grid {
    grid-template-columns: minmax(270px, .55fr) minmax(0, 1.45fr);
    gap: 22px;
    align-items: start;
}

.agmula-theme.admin-page .category-create-card {
    position: sticky;
    top: 106px;
    padding: 22px;
}

.agmula-theme.admin-page .category-management-list {
    min-width: 0;
    display: grid;
    gap: 14px;
}

.agmula-theme.admin-page .category-management-list .catalog-filter-bar {
    grid-template-columns: minmax(200px, 1fr) minmax(140px, .42fr) auto auto;
}

.agmula-theme.admin-page .category-admin-row {
    padding: 16px;
}

.agmula-theme.admin-page .category-inline-form {
    grid-template-columns: 58px minmax(220px, 1fr) minmax(90px, .22fr) auto auto;
    gap: 12px;
    align-items: center;
}

.agmula-theme.admin-page .category-icon-input {
    min-height: 54px;
    padding-inline: 6px;
    text-align: center;
    font-size: 1.25rem;
}

.agmula-theme.admin-page .category-row-actions {
    border-top-color: var(--admin-line);
}

.agmula-theme.admin-page .table-product-cell img {
    width: 48px;
    height: 48px;
    object-fit: cover;
}

.agmula-theme.admin-page .admin-product-review-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr);
    gap: 22px;
}

.agmula-theme.admin-page .product-review-summary,
.agmula-theme.admin-page .moderation-card {
    padding: 22px;
}

.agmula-theme.admin-page .admin-product-gallery {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.agmula-theme.admin-page .admin-product-gallery img {
    width: 100%;
    height: 175px;
    border-radius: 13px;
    object-fit: cover;
}

.agmula-theme.admin-page .product-detail-list {
    gap: 10px;
}

.agmula-theme.admin-page .product-detail-list > div {
    min-width: 0;
    border: 1px solid #e1e9df;
    border-radius: 11px;
    background: var(--admin-soft);
}

.agmula-theme.admin-page .product-detail-list dd {
    overflow-wrap: anywhere;
}

.agmula-theme.admin-page .moderation-card {
    position: sticky;
    top: 106px;
}

.agmula-theme.admin-page .moderation-form > small {
    display: block;
    color: var(--admin-muted);
    font-size: .67rem;
    line-height: 1.45;
}

/* Orders and deliveries */
.agmula-theme.admin-page .order-hero {
    align-items: center;
}

.agmula-theme.admin-page .order-hero-status {
    min-width: 210px;
}

.agmula-theme.admin-page .order-detail-grid {
    grid-template-columns: minmax(0, 1.48fr) minmax(300px, .52fr);
    gap: 22px;
}

.agmula-theme.admin-page .order-detail-main,
.agmula-theme.admin-page .order-detail-side {
    min-width: 0;
    gap: 18px;
}

.agmula-theme.admin-page .order-detail-side {
    position: sticky;
    top: 106px;
    align-self: start;
}

.agmula-theme.admin-page :where(
    .order-address-card,
    .order-payment-card,
    .order-action-form,
    .delivery-route-card,
    .delivery-proof-summary
) {
    padding: 22px;
    border-radius: 17px;
}

.agmula-theme.admin-page .order-action-form {
    display: grid;
    gap: 12px;
}

.agmula-theme.admin-page .order-action-form label {
    display: grid;
    gap: 7px;
}

.agmula-theme.admin-page .order-action-form label > span {
    color: var(--admin-ink);
    font-size: .7rem;
    font-weight: 850;
}

.agmula-theme.admin-page .delivery-admin-assignments {
    padding: 22px;
}

.agmula-theme.admin-page .delivery-assignment-list {
    gap: 10px;
}

.agmula-theme.admin-page .delivery-assignment-list > form {
    grid-template-columns: minmax(0, 1fr) minmax(190px, .38fr) auto;
    gap: 12px;
    border-color: var(--admin-line);
    border-radius: 13px;
    background: var(--admin-soft);
}

.agmula-theme.admin-page .delivery-assignment-list > form > div {
    min-width: 0;
}

.agmula-theme.admin-page .delivery-assignment-list strong,
.agmula-theme.admin-page .delivery-assignment-list small {
    overflow-wrap: anywhere;
}

.agmula-theme.admin-page .delivery-route-card {
    background:
        radial-gradient(circle at 96% 7%, rgba(55, 137, 80, .11), transparent 28%),
        #fff;
}

.agmula-theme.admin-page .delivery-route-stop > span {
    background: var(--admin-accent);
}

.agmula-theme.admin-page .delivery-route-line {
    background: #c9dcca;
}

.agmula-theme.admin-page .delivery-proof-summary {
    border-color: #bfddc5;
    background: var(--admin-accent-soft);
}

/* Payments */
.agmula-theme.admin-page .payment-admin-list {
    display: grid;
    gap: 14px;
}

.agmula-theme.admin-page .payment-admin-card {
    grid-template-columns: minmax(190px, .8fr) minmax(150px, .35fr) minmax(300px, 1.1fr) minmax(150px, .45fr) auto;
    gap: 16px;
    align-items: center;
    padding: 20px;
}

.agmula-theme.admin-page .payment-admin-card > div,
.agmula-theme.admin-page .payment-admin-card form {
    min-width: 0;
}

.agmula-theme.admin-page .payment-admin-card form {
    display: grid;
    grid-template-columns: minmax(135px, .45fr) minmax(170px, 1fr) auto;
    gap: 8px;
}

.agmula-theme.admin-page .payment-admin-card details {
    min-width: 0;
}

.agmula-theme.admin-page .payment-admin-card summary {
    color: var(--admin-accent-strong);
    cursor: pointer;
    font-size: .7rem;
    font-weight: 850;
}

.agmula-theme.admin-page .payment-admin-card details > div {
    max-height: 230px;
    margin-top: 9px;
    padding: 10px;
    overflow-y: auto;
    border: 1px solid var(--admin-line);
    border-radius: 10px;
    background: var(--admin-soft);
}

/* Reviews */
.agmula-theme.admin-page .review-type-tabs {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    padding: 4px;
    border: 1px solid var(--admin-line);
    border-radius: 12px;
    background: #fff;
}

.agmula-theme.admin-page .review-type-tabs a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 9px;
    color: var(--admin-muted);
    font-size: .72rem;
    font-weight: 850;
}

.agmula-theme.admin-page .review-type-tabs a.is-active {
    background: var(--admin-accent-strong);
    color: #fff;
}

.agmula-theme.admin-page .admin-review-list {
    gap: 16px;
}

.agmula-theme.admin-page .admin-review-card {
    grid-template-columns: minmax(0, 1fr) minmax(280px, .42fr);
    gap: 20px;
    padding: 22px;
}

.agmula-theme.admin-page .admin-review-content,
.agmula-theme.admin-page .admin-review-actions {
    min-width: 0;
}

.agmula-theme.admin-page .admin-review-actions {
    display: grid;
    gap: 12px;
    align-content: start;
}

.agmula-theme.admin-page .admin-review-actions form {
    display: grid;
    gap: 9px;
    padding: 13px;
    border: 1px solid var(--admin-line);
    border-radius: 12px;
    background: var(--admin-soft);
}

.agmula-theme.admin-page .review-moderation-note {
    border-radius: 11px;
}

/* Reports */
.agmula-theme.admin-page .report-filter-card {
    grid-template-columns: minmax(260px, 1fr) minmax(150px, .28fr) minmax(150px, .28fr) auto;
    gap: 16px;
    align-items: end;
    padding: 22px;
}

.agmula-theme.admin-page .report-filter-card > div {
    min-width: 0;
}

.agmula-theme.admin-page .report-metrics {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.agmula-theme.admin-page .report-export-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px;
}

.agmula-theme.admin-page .report-export-card > div:first-child {
    min-width: 0;
}

.agmula-theme.admin-page .report-export-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.agmula-theme.admin-page .report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.agmula-theme.admin-page .report-table-wide,
.agmula-theme.admin-page .report-security-note {
    grid-column: 1 / -1;
}

.agmula-theme.admin-page .report-table-card {
    min-width: 0;
    padding: 20px;
}

.agmula-theme.admin-page .report-security-note {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 15px;
    padding: 22px;
    border-color: #c7dbca;
    background: var(--admin-accent-soft);
}

/* Maps, notifications, audit logs */
.agmula-theme.admin-page .live-tracking-card {
    padding: clamp(20px, 2.5vw, 28px);
    border-radius: 20px;
}

.agmula-theme.admin-page .live-tracking-heading {
    gap: 18px;
}

.agmula-theme.admin-page .agmula-map,
.agmula-theme.admin-page .agmula-live-map {
    min-height: 500px;
    overflow: hidden;
    border: 1px solid #c9d9c5;
    border-radius: 17px;
}

.agmula-theme.admin-page .tracking-connection-status {
    border: 1px solid var(--admin-line);
    background: var(--admin-soft);
}

.agmula-theme.admin-page .notification-list,
.agmula-theme.admin-page .account-audit-list {
    gap: 12px;
}

.agmula-theme.admin-page .notification-card,
.agmula-theme.admin-page .account-audit-item {
    border-color: var(--admin-line);
    border-radius: 14px;
}

.agmula-theme.admin-page .notification-card.is-unread {
    border-color: #b9d7b8;
    background: linear-gradient(90deg, var(--admin-accent-soft), #fff 34%);
    box-shadow: inset 4px 0 0 var(--admin-accent);
}

.agmula-theme.admin-page .notification-card-icon,
.agmula-theme.admin-page .account-audit-marker {
    background: var(--admin-accent-soft);
    color: var(--admin-accent-strong);
}

.agmula-theme.admin-page .account-audit-card {
    padding: 22px;
}

/* Admin responsive behavior */
@media (max-width: 1380px) {
    .agmula-theme.admin-page .admin-metrics,
    .agmula-theme.admin-page .report-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .agmula-theme.admin-page .admin-dashboard-grid {
        grid-template-columns: minmax(0, 1.4fr) minmax(250px, .6fr);
    }

    .agmula-theme.admin-page .admin-dashboard-grid > :first-child {
        grid-row: span 2;
    }

    .agmula-theme.admin-page .admin-lower-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .agmula-theme.admin-page .payment-admin-card {
        grid-template-columns: minmax(190px, .75fr) minmax(150px, .35fr) minmax(320px, 1fr);
    }

    .agmula-theme.admin-page .payment-admin-card details,
    .agmula-theme.admin-page .payment-admin-card > .button {
        grid-column: auto;
    }
}

@media (max-width: 1120px) {
    .agmula-theme.admin-page :where(
        .catalog-filter-bar,
        .order-filter-bar,
        .admin-filter-bar
    ) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .agmula-theme.admin-page :where(
        .catalog-filter-bar,
        .order-filter-bar,
        .admin-filter-bar
    ) > :first-child {
        grid-column: 1 / -1;
    }

    .agmula-theme.admin-page .admin-product-review-grid,
    .agmula-theme.admin-page .order-detail-grid {
        grid-template-columns: minmax(0, 1.25fr) minmax(280px, .55fr);
    }

    .agmula-theme.admin-page .category-inline-form {
        grid-template-columns: 54px minmax(0, 1fr) minmax(90px, .25fr);
    }

    .agmula-theme.admin-page .category-inline-form .category-row-meta,
    .agmula-theme.admin-page .category-inline-form > .button {
        grid-column: auto;
    }

    .agmula-theme.admin-page .payment-admin-card {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .agmula-theme.admin-page .payment-admin-card form,
    .agmula-theme.admin-page .payment-admin-card details {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .agmula-theme.admin-page .admin-topbar {
        top: 0;
    }

    .agmula-theme.admin-page .admin-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .agmula-theme.admin-page .admin-dashboard-grid > :first-child {
        grid-row: auto;
    }

    .agmula-theme.admin-page .admin-farmer-grid,
    .agmula-theme.admin-page .category-admin-grid,
    .agmula-theme.admin-page .admin-product-review-grid,
    .agmula-theme.admin-page .order-detail-grid {
        grid-template-columns: 1fr;
    }

    .agmula-theme.admin-page .category-create-card,
    .agmula-theme.admin-page .moderation-card,
    .agmula-theme.admin-page .order-detail-side {
        position: static;
    }

    .agmula-theme.admin-page .admin-review-card {
        grid-template-columns: 1fr;
    }

    .agmula-theme.admin-page .report-filter-card {
        grid-template-columns: 1fr 1fr;
    }

    .agmula-theme.admin-page .report-filter-card > div {
        grid-column: 1 / -1;
    }

    .agmula-theme.admin-page .report-export-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .agmula-theme.admin-page .report-export-actions {
        justify-content: flex-start;
    }

    .agmula-theme.admin-page .agmula-map,
    .agmula-theme.admin-page .agmula-live-map {
        min-height: 430px;
    }
}

@media (max-width: 700px) {
    .agmula-theme.admin-page .admin-metrics,
    .agmula-theme.admin-page .report-metrics,
    .agmula-theme.admin-page .admin-user-summary,
    .agmula-theme.admin-page .admin-lower-grid,
    .agmula-theme.admin-page .report-grid {
        grid-template-columns: 1fr;
    }

    .agmula-theme.admin-page .report-table-wide,
    .agmula-theme.admin-page .report-security-note {
        grid-column: auto;
    }

    .agmula-theme.admin-page .admin-metrics > article {
        min-height: 112px;
    }

    .agmula-theme.admin-page .admin-dashboard-grid .admin-card,
    .agmula-theme.admin-page .admin-lower-grid .admin-card,
    .agmula-theme.admin-page .admin-users-card,
    .agmula-theme.admin-page .admin-farmer-grid .admin-card,
    .agmula-theme.admin-page .category-create-card,
    .agmula-theme.admin-page .product-review-summary,
    .agmula-theme.admin-page .moderation-card,
    .agmula-theme.admin-page .delivery-admin-assignments,
    .agmula-theme.admin-page .admin-review-card,
    .agmula-theme.admin-page .report-filter-card,
    .agmula-theme.admin-page .report-export-card,
    .agmula-theme.admin-page .report-table-card,
    .agmula-theme.admin-page .account-audit-card {
        padding: 18px;
    }

    .agmula-theme.admin-page :where(
        .catalog-filter-bar,
        .order-filter-bar,
        .admin-filter-bar,
        .review-filter-bar,
        .category-management-list .catalog-filter-bar
    ) {
        grid-template-columns: 1fr;
    }

    .agmula-theme.admin-page :where(
        .catalog-filter-bar,
        .order-filter-bar,
        .admin-filter-bar
    ) > * {
        grid-column: auto;
    }

    .agmula-theme.admin-page :where(
        .catalog-filter-bar,
        .order-filter-bar,
        .admin-filter-bar
    ) :where(.button, a) {
        width: 100%;
    }

    .agmula-theme.admin-page .dashboard-order-list > a {
        grid-template-columns: 1fr auto;
    }

    .agmula-theme.admin-page .dashboard-order-list > a > b {
        grid-column: 1 / -1;
    }

    .agmula-theme.admin-page .category-inline-form,
    .agmula-theme.admin-page .delivery-assignment-list > form,
    .agmula-theme.admin-page .payment-admin-card,
    .agmula-theme.admin-page .payment-admin-card form,
    .agmula-theme.admin-page .report-filter-card {
        grid-template-columns: 1fr;
    }

    .agmula-theme.admin-page .category-icon-input {
        width: 58px;
    }

    .agmula-theme.admin-page .category-inline-form > *,
    .agmula-theme.admin-page .payment-admin-card form,
    .agmula-theme.admin-page .payment-admin-card details,
    .agmula-theme.admin-page .report-filter-card > div {
        grid-column: auto;
    }

    .agmula-theme.admin-page .category-row-actions {
        justify-content: flex-start;
    }

    .agmula-theme.admin-page .order-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .agmula-theme.admin-page .order-hero-status {
        width: 100%;
        min-width: 0;
        align-items: flex-start;
    }

    .agmula-theme.admin-page .report-export-actions {
        width: 100%;
    }

    .agmula-theme.admin-page .report-export-actions .button {
        flex: 1 1 150px;
    }

    .agmula-theme.admin-page .admin-review-actions {
        width: 100%;
    }

    .agmula-theme.admin-page .agmula-map,
    .agmula-theme.admin-page .agmula-live-map {
        min-height: 360px;
    }
}

@media (max-width: 520px) {
    .agmula-theme.admin-page .admin-topbar {
        align-items: flex-start;
        gap: 10px;
    }

    .agmula-theme.admin-page .admin-profile {
        max-width: 46%;
    }

    .agmula-theme.admin-page .admin-profile strong {
        max-width: 90px;
    }

    .agmula-theme.admin-page .admin-content {
        gap: 16px;
    }

    .agmula-theme.admin-page .review-type-tabs {
        width: 100%;
    }

    .agmula-theme.admin-page .review-type-tabs a {
        flex: 1 1 50%;
        justify-content: center;
        text-align: center;
    }

    .agmula-theme.admin-page .admin-page-actions .button,
    .agmula-theme.admin-page .marketplace-back-row .button {
        width: 100%;
    }

    .agmula-theme.admin-page .admin-farm-photo-grid,
    .agmula-theme.admin-page .admin-product-gallery {
        grid-template-columns: 1fr;
    }

    .agmula-theme.admin-page .admin-farm-photo-grid img,
    .agmula-theme.admin-page .admin-product-gallery img {
        height: 210px;
    }

    .agmula-theme.admin-page .report-export-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .agmula-theme.admin-page .report-export-actions .button {
        width: 100%;
    }
}

/*
|--------------------------------------------------------------------------
| AGMULA Theme — Phase 7 Responsive and Accessibility QA
|--------------------------------------------------------------------------
| Cross-platform hardening only. Business workflows and component behavior
| remain unchanged.
*/

.agmula-theme:not(.admin-page) :where(#categories, #farmers, #about, #contact) {
    scroll-margin-top: 92px;
}

.agmula-theme :where(
    .flash,
    .admin-card,
    .panel,
    .role-dashboard-intro,
    .marketplace-product-body,
    .marketplace-product-summary,
    .notification-card,
    .delivery-job-card,
    .order-hero,
    td,
    dd
) {
    overflow-wrap: anywhere;
}

.agmula-theme :where(
    .responsive-table-wrap,
    .admin-table-wrap,
    .table-wrap
) {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
}

.agmula-theme :where(.responsive-table-wrap, .admin-table-wrap, .table-wrap):focus-within {
    box-shadow: var(--theme-focus);
}

.agmula-theme .admin-data-table th[scope="col"],
.agmula-theme .admin-table th[scope="col"] {
    white-space: nowrap;
}

@media (max-width: 1120px) {
    .agmula-theme .site-header.public-fullwidth-header .public-header-navigation {
        overscroll-behavior: contain;
    }
}

@media (max-width: 900px) {
    .agmula-theme .admin-nav {
        overscroll-behavior-inline: contain;
        scroll-padding-inline: 10px;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 640px) {
    .agmula-theme :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
        font-size: 16px;
    }

    .agmula-theme .admin-topbar > div:first-child,
    .agmula-theme .admin-topbar h1 {
        min-width: 0;
    }

    .agmula-theme .global-flash-stack {
        top: max(10px, env(safe-area-inset-top));
        width: calc(100vw - 20px);
    }

    .agmula-theme .global-flash {
        padding: 12px 12px 12px 14px;
    }
}

@media (forced-colors: active) {
    .agmula-theme :where(a, button, input, select, textarea, summary):focus-visible {
        outline: 2px solid CanvasText;
        outline-offset: 3px;
        box-shadow: none;
    }

    .agmula-theme :where(
        .button,
        .admin-nav-link,
        .admin-card,
        .panel,
        input,
        select,
        textarea
    ) {
        border: 1px solid CanvasText;
    }

    .agmula-theme .admin-nav-link.is-active {
        outline: 2px solid Highlight;
        outline-offset: -2px;
    }
}

/*
|--------------------------------------------------------------------------
| Admin visual correction — dashboard, pagination and payment rows
|--------------------------------------------------------------------------
| Layout-only fixes. No route, query, moderation, payment or workflow logic.
*/

/* Keep summary values readable instead of breaking currency across lines. */
.agmula-theme.admin-page .admin-metrics strong {
    overflow-wrap: normal;
    word-break: normal;
    white-space: nowrap;
}

/* Compact dashboard operation cards use readable horizontal rows. */
.agmula-theme.admin-page .admin-operations-card .catalog-operations-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 12px;
}

.agmula-theme.admin-page .admin-operations-card .catalog-operations-grid > a {
    min-height: 56px;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
}

.agmula-theme.admin-page .admin-operations-card .catalog-operations-grid > a > span {
    grid-column: 1;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #fff;
    font-size: 1rem;
}

.agmula-theme.admin-page .admin-operations-card .catalog-operations-grid > a > small {
    grid-column: 2;
    min-width: 0;
    line-height: 1.25;
    overflow-wrap: normal;
    word-break: normal;
}

.agmula-theme.admin-page .admin-operations-card .catalog-operations-grid > a > strong {
    grid-column: 3;
    margin: 0;
    font-size: clamp(1.05rem, 1.45vw, 1.35rem);
    line-height: 1;
    overflow-wrap: normal;
    word-break: normal;
    white-space: nowrap;
}

/* The verification markup wraps its row in an anchor; size the anchor, not li cells. */
.agmula-theme.admin-page .verification-list li {
    display: block;
    padding: 0;
    overflow: hidden;
}

.agmula-theme.admin-page .verification-list li > a {
    width: 100%;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    color: inherit;
}

.agmula-theme.admin-page .verification-list li > a:hover {
    background: var(--admin-accent-soft);
}

.agmula-theme.admin-page .verification-list li > a > span:nth-child(2) {
    min-width: 0;
}

.agmula-theme.admin-page .verification-list :where(strong, small) {
    overflow-wrap: normal;
    word-break: normal;
}

/* Theme Laravel's default paginator without relying on Tailwind utilities. */
.agmula-theme.admin-page .catalog-pagination {
    min-width: 0;
    margin-top: 18px;
}

.agmula-theme.admin-page .catalog-pagination nav {
    display: block;
    min-width: 0;
}

.agmula-theme.admin-page .catalog-pagination nav > div:first-child {
    display: none;
}

.agmula-theme.admin-page .catalog-pagination nav > div:last-child {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.agmula-theme.admin-page .catalog-pagination nav > div:last-child > div {
    min-width: 0;
}

.agmula-theme.admin-page .catalog-pagination nav p {
    margin: 0;
    color: var(--admin-muted);
    font-size: .76rem;
    line-height: 1.4;
}

.agmula-theme.admin-page .catalog-pagination nav > div:last-child > div:last-child {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
}

.agmula-theme.admin-page .catalog-pagination nav > div:last-child > div:last-child > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px;
    border: 0;
    border-radius: 11px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 5px 16px rgba(24, 72, 43, .05);
}

.agmula-theme.admin-page .catalog-pagination nav > div:last-child > div:last-child > span > span {
    padding: 0;
    border: 0;
    background: transparent;
}

.agmula-theme.admin-page .catalog-pagination nav > div:last-child > div:last-child > span > a,
.agmula-theme.admin-page .catalog-pagination nav > div:last-child > div:last-child > span > span > span {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid var(--admin-line);
    border-radius: 9px;
    background: #fff;
    color: var(--admin-accent-strong);
    font-size: .76rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.agmula-theme.admin-page .catalog-pagination nav > div:last-child > div:last-child > span > a:hover {
    border-color: #b5ceb2;
    background: var(--admin-accent-soft);
}

.agmula-theme.admin-page .catalog-pagination nav [aria-current="page"] {
    padding: 0;
    border: 0;
    background: transparent;
}

.agmula-theme.admin-page .catalog-pagination nav [aria-current="page"] > span {
    border-color: var(--admin-accent);
    background: var(--admin-accent);
    color: #fff;
}

.agmula-theme.admin-page .catalog-pagination svg {
    width: 16px;
    height: 16px;
}

/* Balance payment identity, amount, update controls, history and order action. */
.agmula-theme.admin-page .payment-admin-card {
    grid-template-columns:
        minmax(230px, 1fr)
        minmax(145px, .4fr)
        minmax(390px, 1.25fr)
        minmax(155px, .45fr)
        auto;
    gap: 14px;
}

.agmula-theme.admin-page .payment-admin-identity,
.agmula-theme.admin-page .payment-admin-amount {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.agmula-theme.admin-page .payment-admin-identity h2 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agmula-theme.admin-page .payment-admin-amount {
    justify-items: start;
}

.agmula-theme.admin-page .payment-admin-amount > strong,
.agmula-theme.admin-page .payment-admin-history > summary,
.agmula-theme.admin-page .payment-admin-card > .button {
    white-space: nowrap;
}

.agmula-theme.admin-page .payment-admin-update-form {
    grid-template-columns: minmax(145px, .55fr) minmax(190px, 1fr) auto;
    align-items: center;
}

.agmula-theme.admin-page .payment-admin-card > .button {
    justify-self: end;
}

@media (max-width: 1380px) {
    .agmula-theme.admin-page .payment-admin-card {
        grid-template-columns: minmax(220px, 1fr) minmax(145px, .4fr) minmax(340px, 1.2fr) auto;
    }

    .agmula-theme.admin-page .payment-admin-history {
        grid-column: 1 / 4;
    }

    .agmula-theme.admin-page .payment-admin-card > .button {
        grid-column: 4;
        justify-self: end;
    }
}

@media (max-width: 1120px) {
    .agmula-theme.admin-page .payment-admin-card {
        grid-template-columns: minmax(0, 1fr) minmax(145px, .35fr);
    }

    .agmula-theme.admin-page .payment-admin-update-form,
    .agmula-theme.admin-page .payment-admin-history {
        grid-column: 1 / -1;
    }

    .agmula-theme.admin-page .payment-admin-card > .button {
        grid-column: auto;
        justify-self: start;
    }
}

@media (max-width: 700px) {
    .agmula-theme.admin-page .catalog-pagination nav > div:last-child {
        align-items: flex-start;
        flex-direction: column;
    }

    .agmula-theme.admin-page .catalog-pagination nav > div:last-child > div:last-child {
        width: 100%;
    }

    .agmula-theme.admin-page .payment-admin-card,
    .agmula-theme.admin-page .payment-admin-update-form {
        grid-template-columns: 1fr;
    }

    .agmula-theme.admin-page .payment-admin-card > *,
    .agmula-theme.admin-page .payment-admin-update-form,
    .agmula-theme.admin-page .payment-admin-history,
    .agmula-theme.admin-page .payment-admin-card > .button {
        grid-column: auto;
    }

    .agmula-theme.admin-page .payment-admin-card > .button {
        width: 100%;
        justify-content: center;
    }
}

/*
|--------------------------------------------------------------------------
| Admin Payments — action control spacing correction
|--------------------------------------------------------------------------
| Visual-only override: keeps status, audit note and submit controls distinct.
*/

.agmula-theme.admin-page .payment-admin-update-form {
    grid-template-columns: minmax(175px, .62fr) minmax(240px, 1fr) auto;
    column-gap: 14px;
    row-gap: 10px;
}

.agmula-theme.admin-page .payment-admin-update-form > select {
    width: 100%;
    min-width: 175px;
    white-space: nowrap;
}

.agmula-theme.admin-page .payment-admin-update-form > input {
    width: 100%;
    min-width: 0;
}

@media (max-width: 700px) {
    .agmula-theme.admin-page .payment-admin-update-form {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .agmula-theme.admin-page .payment-admin-update-form > select {
        min-width: 0;
    }
}

/*
|--------------------------------------------------------------------------
| Admin Payments — overlap correction
|--------------------------------------------------------------------------
| Replaces the previous grid sizing with a non-overlapping flex row.
*/

.agmula-theme.admin-page .payment-admin-update-form {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px !important;
    grid-template-columns: none !important;
}

.agmula-theme.admin-page .payment-admin-update-form > select {
    flex: 0 1 170px;
    width: auto !important;
    min-width: 140px !important;
    max-width: 180px;
    margin: 0 !important;
}

.agmula-theme.admin-page .payment-admin-update-form > input {
    flex: 1 1 220px;
    width: auto !important;
    min-width: 160px !important;
    margin: 0 !important;
}

.agmula-theme.admin-page .payment-admin-update-form > button {
    flex: 0 0 auto;
    margin: 0 !important;
}

@media (max-width: 700px) {
    .agmula-theme.admin-page .payment-admin-update-form {
        flex-direction: column;
        align-items: stretch;
    }

    .agmula-theme.admin-page .payment-admin-update-form > select,
    .agmula-theme.admin-page .payment-admin-update-form > input,
    .agmula-theme.admin-page .payment-admin-update-form > button {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none;
    }
}

/*
|--------------------------------------------------------------------------
| Shared Buyer, Seller and Rider profile settings
|--------------------------------------------------------------------------
*/

.agmula-theme.admin-page .profile-account-page {
    max-width: 1240px;
}

.agmula-theme.admin-page .profile-account-intro {
    margin-bottom: 20px;
}

.agmula-theme.admin-page .profile-account-intro > div {
    max-width: 780px;
}

.agmula-theme.admin-page .profile-account-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.agmula-theme.admin-page .profile-account-summary > article {
    min-width: 0;
    display: grid;
    gap: 5px;
    padding: 18px;
}

.agmula-theme.admin-page .profile-account-summary span {
    color: var(--theme-muted);
    font-size: .67rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.agmula-theme.admin-page .profile-account-summary strong {
    overflow-wrap: anywhere;
    color: var(--theme-green-950);
    font-size: 1.05rem;
}

.agmula-theme.admin-page .profile-account-summary small {
    color: var(--theme-muted);
    font-size: .72rem;
}

.agmula-theme.admin-page .profile-account-status {
    width: fit-content;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: .76rem !important;
}

.agmula-theme.admin-page .profile-account-status-active {
    background: #e8f5e9;
    color: #1d6b34 !important;
}

.agmula-theme.admin-page .profile-account-status-pending {
    background: var(--theme-warning-bg);
    color: var(--theme-warning) !important;
}

.agmula-theme.admin-page .profile-account-status-suspended {
    background: var(--theme-danger-bg);
    color: var(--theme-danger) !important;
}

.agmula-theme.admin-page .profile-account-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.agmula-theme.admin-page .profile-account-card {
    min-width: 0;
    padding: clamp(20px, 2.4vw, 28px);
}

.agmula-theme.admin-page .profile-account-card-heading {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 13px;
    align-items: start;
    margin-bottom: 20px;
}

.agmula-theme.admin-page .profile-account-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid var(--theme-green-200);
    border-radius: 14px;
    background: var(--theme-green-50);
    color: var(--theme-green-800);
    font-size: 1.1rem;
    font-weight: 900;
}

.agmula-theme.admin-page .profile-account-card-heading h2 {
    margin: 3px 0 5px;
    color: var(--theme-green-950);
    font-size: 1.2rem;
}

.agmula-theme.admin-page .profile-account-card-heading p {
    margin: 0;
    color: var(--theme-muted);
    font-size: .78rem;
    line-height: 1.55;
}

.agmula-theme.admin-page .profile-account-alert {
    margin: 0 0 16px;
    padding: 11px 13px;
    font-size: .78rem;
}

.agmula-theme.admin-page .profile-account-form {
    display: grid;
    gap: 15px;
}

.agmula-theme.admin-page .profile-account-form label {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.agmula-theme.admin-page .profile-account-form label > span {
    color: var(--theme-green-950);
    font-size: .75rem;
    font-weight: 850;
}

.agmula-theme.admin-page .profile-account-form input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--theme-line-strong);
    border-radius: var(--theme-radius-sm);
    background: #fff;
    color: var(--theme-ink);
}

.agmula-theme.admin-page .profile-account-form input:focus {
    border-color: var(--theme-green-700);
    outline: 0;
    box-shadow: var(--theme-focus);
}

.agmula-theme.admin-page .profile-field-hint,
.agmula-theme.admin-page .profile-field-error {
    font-size: .69rem;
    line-height: 1.45;
}

.agmula-theme.admin-page .profile-field-hint {
    color: var(--theme-muted);
}

.agmula-theme.admin-page .profile-field-error {
    color: var(--theme-danger);
    font-weight: 750;
}

.agmula-theme.admin-page .profile-account-actions {
    display: flex;
    justify-content: flex-start;
    padding-top: 3px;
}

.agmula-theme.admin-page .profile-account-help {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    margin-top: 18px;
    padding: 18px 20px;
}

.agmula-theme.admin-page .profile-account-help-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--theme-info-bg);
    color: var(--theme-info);
    font-weight: 900;
}

.agmula-theme.admin-page .profile-account-help strong {
    display: block;
    color: var(--theme-green-950);
}

.agmula-theme.admin-page .profile-account-help p {
    margin: 4px 0 0;
    color: var(--theme-muted);
    font-size: .76rem;
    line-height: 1.55;
}

.agmula-theme.admin-page .profile-account-help a {
    display: inline-flex;
    gap: 6px;
    margin-top: 9px;
    color: var(--theme-green-800);
    font-size: .75rem;
    font-weight: 850;
}

@media (max-width: 980px) {
    .agmula-theme.admin-page .profile-account-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .agmula-theme.admin-page .profile-account-summary {
        grid-template-columns: 1fr;
    }

    .agmula-theme.admin-page .profile-account-card {
        padding: 18px;
    }

    .agmula-theme.admin-page .profile-account-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/*
|--------------------------------------------------------------------------
| Seller Earnings / Sales Summary
|--------------------------------------------------------------------------
*/

.agmula-theme.admin-page .seller-earnings-page {
    max-width: 1540px;
}

.agmula-theme.admin-page .seller-earnings-intro {
    align-items: center;
    margin-bottom: 18px;
}

.agmula-theme.admin-page .seller-earnings-intro > div {
    max-width: 820px;
}

.agmula-theme.admin-page .seller-earnings-filter {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 12px;
    padding: 16px;
}

.agmula-theme.admin-page .seller-earnings-filter label {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.agmula-theme.admin-page .seller-earnings-filter label > span {
    color: var(--theme-green-950);
    font-size: .72rem;
    font-weight: 850;
}

.agmula-theme.admin-page .seller-earnings-filter input,
.agmula-theme.admin-page .seller-earnings-filter select {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid var(--theme-line-strong);
    border-radius: var(--theme-radius-sm);
    background: #fff;
    color: var(--theme-ink);
}

.agmula-theme.admin-page .seller-earnings-filter input:focus,
.agmula-theme.admin-page .seller-earnings-filter select:focus {
    border-color: var(--theme-green-700);
    outline: 0;
    box-shadow: var(--theme-focus);
}

.agmula-theme.admin-page .seller-earnings-filter-actions {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 42px;
}

.agmula-theme.admin-page .seller-earnings-filter-actions a {
    color: var(--theme-green-800);
    font-size: .76rem;
    font-weight: 850;
}

.agmula-theme.admin-page .seller-earnings-range {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: var(--theme-muted);
    font-size: .73rem;
}

.agmula-theme.admin-page .seller-earnings-range strong {
    color: var(--theme-green-950);
}

.agmula-theme.admin-page .seller-earnings-metrics {
    margin-bottom: 18px;
}

.agmula-theme.admin-page .seller-earnings-metrics article {
    min-width: 0;
}

.agmula-theme.admin-page .seller-earnings-metrics strong {
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}

.agmula-theme.admin-page .seller-earnings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
    gap: 18px;
    align-items: stretch;
    margin-bottom: 18px;
}

.agmula-theme.admin-page .seller-earnings-breakdown-card,
.agmula-theme.admin-page .seller-earnings-note,
.agmula-theme.admin-page .seller-earnings-ledger-card {
    min-width: 0;
}

.agmula-theme.admin-page .seller-earnings-breakdown {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.agmula-theme.admin-page .seller-earnings-breakdown li {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 11px;
    align-items: center;
    padding: 13px;
    border: 1px solid var(--theme-line);
    border-radius: var(--theme-radius-sm);
    background: var(--theme-surface-soft);
}

.agmula-theme.admin-page .seller-earnings-breakdown li > span:last-child {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.agmula-theme.admin-page .seller-earnings-breakdown strong,
.agmula-theme.admin-page .seller-earnings-breakdown small {
    overflow-wrap: anywhere;
}

.agmula-theme.admin-page .seller-earnings-breakdown strong {
    color: var(--theme-green-950);
    font-size: .79rem;
}

.agmula-theme.admin-page .seller-earnings-breakdown small {
    color: var(--theme-muted);
    font-size: .69rem;
}

.agmula-theme.admin-page .seller-earnings-note {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 13px;
    align-content: start;
    padding: 22px;
    background: linear-gradient(145deg, var(--theme-green-50), #fff);
}

.agmula-theme.admin-page .seller-earnings-note-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--theme-green-800);
    color: #fff;
    font-family: Georgia, serif;
    font-size: 1rem;
    font-weight: 900;
}

.agmula-theme.admin-page .seller-earnings-note h2 {
    margin: 5px 0 7px;
    color: var(--theme-green-950);
    font-size: 1.08rem;
}

.agmula-theme.admin-page .seller-earnings-note p {
    margin: 0;
    color: var(--theme-muted);
    font-size: .75rem;
    line-height: 1.65;
}

.agmula-theme.admin-page .seller-earnings-ledger-card {
    padding: 0;
    overflow: hidden;
}

.agmula-theme.admin-page .seller-earnings-ledger-card > .admin-card-heading {
    margin: 0;
    padding: 18px 20px;
    border-bottom: 1px solid var(--theme-line);
}

.agmula-theme.admin-page .seller-earnings-ledger-card > .admin-card-heading > small {
    color: var(--theme-muted);
    font-size: .72rem;
    white-space: nowrap;
}

.agmula-theme.admin-page .seller-earnings-table-wrap {
    border: 0;
    border-radius: 0;
}

.agmula-theme.admin-page .seller-earnings-table {
    min-width: 1120px;
}

.agmula-theme.admin-page .seller-earnings-table td {
    vertical-align: middle;
}

.agmula-theme.admin-page .seller-earnings-table td > strong,
.agmula-theme.admin-page .seller-earnings-table td > small {
    display: block;
}

.agmula-theme.admin-page .seller-earnings-table td > small {
    margin-top: 3px;
    color: var(--theme-muted);
    font-size: .68rem;
}

.agmula-theme.admin-page .seller-earnings-table td:nth-child(5),
.agmula-theme.admin-page .seller-earnings-table td:nth-child(6),
.agmula-theme.admin-page .seller-earnings-table td:nth-child(7) {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.agmula-theme.admin-page .seller-earnings-ledger-card > .catalog-pagination {
    margin: 0;
    padding: 14px 20px 18px;
    border-top: 1px solid var(--theme-line);
}

@media (max-width: 1120px) {
    .agmula-theme.admin-page .seller-earnings-filter {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .agmula-theme.admin-page .seller-earnings-filter-actions {
        grid-column: 1 / -1;
    }

    .agmula-theme.admin-page .seller-earnings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .agmula-theme.admin-page .seller-earnings-intro {
        align-items: flex-start;
    }

    .agmula-theme.admin-page .seller-earnings-intro .button {
        width: 100%;
        justify-content: center;
    }

    .agmula-theme.admin-page .seller-earnings-filter {
        grid-template-columns: 1fr;
    }

    .agmula-theme.admin-page .seller-earnings-filter-actions {
        grid-column: auto;
    }

    .agmula-theme.admin-page .seller-earnings-filter-actions .button {
        flex: 1 1 auto;
        justify-content: center;
    }

    .agmula-theme.admin-page .seller-earnings-breakdown {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .agmula-theme.admin-page .seller-earnings-note {
        grid-template-columns: 1fr;
    }

    .agmula-theme.admin-page .seller-earnings-ledger-card > .admin-card-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}

/*
|--------------------------------------------------------------------------
| Dynamic Rider earnings and Admin fee settings
|--------------------------------------------------------------------------
*/

.agmula-theme.admin-page .settings-admin-content,
.agmula-theme.admin-page .rider-earnings-content {
    display: grid;
    gap: 22px;
}

.agmula-theme.admin-page .settings-admin-grid {
    display: grid;
    grid-template-columns: minmax(280px, .8fr) minmax(0, 1.8fr);
    gap: 20px;
    align-items: stretch;
}

.agmula-theme.admin-page .settings-fee-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.agmula-theme.admin-page .settings-current-fee {
    display: grid;
    gap: 4px;
    padding: 18px;
    border: 1px solid var(--theme-border, #dbe7df);
    border-radius: 18px;
    background: var(--theme-surface-soft, #f6faf7);
}

.agmula-theme.admin-page .settings-current-fee small,
.agmula-theme.admin-page .settings-current-fee span {
    color: var(--theme-text-muted, #64756b);
}

.agmula-theme.admin-page .settings-current-fee strong {
    color: var(--theme-primary, #176b3a);
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    line-height: 1;
    white-space: nowrap;
}

.agmula-theme.admin-page .settings-fee-form {
    display: grid;
    gap: 14px;
}

.agmula-theme.admin-page .settings-fee-form label {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

.agmula-theme.admin-page .currency-input {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--theme-border, #d5e2d9);
    border-radius: 12px;
    background: #fff;
}

.agmula-theme.admin-page .currency-input:focus-within {
    border-color: var(--theme-primary, #176b3a);
    box-shadow: 0 0 0 3px rgba(23, 107, 58, .12);
}

.agmula-theme.admin-page .currency-input b {
    padding: 0 0 0 14px;
    color: var(--theme-primary, #176b3a);
    font-size: 1rem;
}

.agmula-theme.admin-page .currency-input input {
    min-width: 0;
    border: 0;
    box-shadow: none;
}

.agmula-theme.admin-page .settings-help-copy {
    margin: 0;
    color: var(--theme-text-muted, #64756b);
    font-size: .9rem;
    line-height: 1.55;
}

.agmula-theme.admin-page .settings-earning-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.agmula-theme.admin-page .settings-ledger-card,
.agmula-theme.admin-page .rider-earnings-ledger {
    min-width: 0;
}

.agmula-theme.admin-page .settings-filter-bar {
    display: grid;
    grid-template-columns: minmax(150px, .8fr) minmax(220px, 1.2fr) minmax(140px, .65fr) minmax(140px, .65fr) auto auto;
    gap: 10px;
    align-items: end;
    margin: 18px 0;
}

.agmula-theme.admin-page .rider-earnings-filter {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(145px, .7fr) minmax(145px, .7fr) auto auto;
    gap: 10px;
    align-items: end;
    margin: 18px 0;
}

.agmula-theme.admin-page .filter-date-field {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.agmula-theme.admin-page .filter-date-field > span {
    color: var(--theme-text-muted, #64756b);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.agmula-theme.admin-page .settings-filter-bar select,
.agmula-theme.admin-page .settings-filter-bar input,
.agmula-theme.admin-page .rider-earnings-filter select,
.agmula-theme.admin-page .rider-earnings-filter input {
    width: 100%;
    min-width: 0;
}

.agmula-theme.admin-page .settings-earnings-table td,
.agmula-theme.admin-page .rider-earnings-table td {
    vertical-align: middle;
}

.agmula-theme.admin-page .settings-earnings-table td > strong,
.agmula-theme.admin-page .settings-earnings-table td > small,
.agmula-theme.admin-page .rider-earnings-table td > strong,
.agmula-theme.admin-page .rider-earnings-table td > small {
    display: block;
}

.agmula-theme.admin-page .settings-earnings-table td > small,
.agmula-theme.admin-page .rider-earnings-table td > small {
    margin-top: 4px;
    color: var(--theme-text-muted, #64756b);
}

.agmula-theme.admin-page .money-nowrap {
    white-space: nowrap;
}

.agmula-theme.admin-page .earning-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.agmula-theme.admin-page .earning-status-pending {
    color: #8a4b08;
    background: #fff3d6;
}

.agmula-theme.admin-page .earning-status-approved {
    color: #165b35;
    background: #dcf7e7;
}

.agmula-theme.admin-page .earning-status-paid {
    color: #17468a;
    background: #dfeaff;
}

.agmula-theme.admin-page .rider-earning-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.agmula-theme.admin-page .earning-history-note {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    border-color: #d7e4ed;
    background: #f5f9fc;
}

.agmula-theme.admin-page .earning-history-note > span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #17468a;
    background: #dfeaff;
    font-weight: 900;
}

.agmula-theme.admin-page .earning-history-note strong,
.agmula-theme.admin-page .earning-history-note p {
    display: block;
    margin: 0;
}

.agmula-theme.admin-page .earning-history-note p {
    margin-top: 4px;
    color: var(--theme-text-muted, #64756b);
}

@media (max-width: 1180px) {
    .agmula-theme.admin-page .settings-admin-grid {
        grid-template-columns: 1fr;
    }

    .agmula-theme.admin-page .settings-filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .agmula-theme.admin-page .rider-earnings-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .agmula-theme.admin-page .settings-earning-metrics,
    .agmula-theme.admin-page .rider-earning-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .agmula-theme.admin-page .settings-filter-bar,
    .agmula-theme.admin-page .rider-earnings-filter,
    .agmula-theme.admin-page .settings-earning-metrics,
    .agmula-theme.admin-page .rider-earning-metrics {
        grid-template-columns: 1fr;
    }

    .agmula-theme.admin-page .settings-filter-bar .button,
    .agmula-theme.admin-page .rider-earnings-filter .button {
        width: 100%;
        justify-content: center;
    }

    .agmula-theme.admin-page .earning-history-note {
        grid-template-columns: 1fr;
    }
}



/* Web password recovery */
body.auth-page .auth-recovery-grid {
    grid-template-columns: minmax(0, .92fr) minmax(400px, .9fr);
}

body.auth-page .auth-recovery-card {
    max-width: 560px;
    justify-self: end;
}

.auth-recovery-status {
    margin-bottom: 20px;
    line-height: 1.55;
}

body.password-request-page .public-auth-form,
body.password-reset-page .public-auth-form {
    gap: 18px;
}

body.password-reset-page .auth-benefit-list article:first-child > span {
    font-size: .72rem;
    letter-spacing: -.03em;
}

body.auth-page .auth-recovery-card .form-footer {
    line-height: 1.55;
}

@media (max-width: 960px) {
    body.auth-page .auth-recovery-grid {
        grid-template-columns: 1fr;
    }

    body.auth-page .auth-recovery-card {
        max-width: none;
        justify-self: stretch;
    }
}

@media (max-width: 560px) {
    body.auth-page .auth-recovery-section {
        padding-top: 30px;
    }

    body.auth-page .auth-recovery-grid {
        width: min(100% - 28px, 1180px);
        gap: 30px;
    }

    body.auth-page .auth-recovery-card {
        padding: 22px 18px;
    }
}


/*
|--------------------------------------------------------------------------
| AGMULA Phase 2 — Private Identity Verification
|--------------------------------------------------------------------------
*/

.verification-page,
.verification-admin-page {
    display: grid;
    gap: 22px;
}

.verification-intro,
.verification-inline-card,
.verification-submit-card,
.verification-review-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.verification-status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 30px;
    padding: 5px 11px;
    border: 1px solid var(--theme-line-strong);
    border-radius: 999px;
    background: var(--theme-surface-soft);
    color: var(--theme-muted);
    font-size: .76rem;
    font-weight: 850;
    white-space: nowrap;
}

.verification-status-submitted {
    border-color: #b8d5e7;
    background: var(--theme-info-bg);
    color: var(--theme-info);
}

.verification-status-approved {
    border-color: var(--theme-green-200);
    background: var(--theme-green-100);
    color: var(--theme-green-900);
}

.verification-status-changes_requested {
    border-color: #efc3be;
    background: var(--theme-danger-bg);
    color: var(--theme-danger);
}

.verification-summary,
.verification-admin-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.verification-summary article {
    display: grid;
    gap: 6px;
}

.verification-summary article > span {
    color: var(--theme-muted);
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.verification-summary article > strong {
    color: var(--theme-green-950);
    font-size: 1.2rem;
}

.verification-form {
    display: grid;
    gap: 20px;
}

.verification-section {
    display: grid;
    gap: 18px;
}

.verification-section label {
    display: grid;
    gap: 7px;
    color: var(--theme-ink);
    font-weight: 800;
}

.verification-section label > small,
.verification-upload small {
    color: var(--theme-muted);
    font-weight: 500;
}

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

.verification-upload {
    min-height: 132px;
    align-content: start;
    padding: 16px;
    border: 1px dashed var(--theme-line-strong);
    border-radius: var(--theme-radius-md);
    background: var(--theme-surface-soft);
}

.verification-upload input[type="file"] {
    width: 100%;
    min-height: auto;
    padding: 8px;
    background: #fff;
}

.verification-upload a,
.verification-document-actions a {
    color: var(--theme-green-800);
    font-size: .8rem;
    font-weight: 850;
}

.verification-actions {
    display: flex;
    justify-content: flex-end;
}

.verification-submit-card,
.verification-review-actions,
.verification-inline-card {
    padding: 22px;
}

.verification-submit-card h2,
.verification-review-actions h2,
.verification-inline-card h2 {
    margin: 4px 0 6px;
}

.verification-submit-card p,
.verification-review-actions p,
.verification-inline-card p {
    margin: 0;
    color: var(--theme-muted);
}

.verification-review-note {
    padding: 16px 18px;
    border: 1px solid #efc3be;
    border-radius: var(--theme-radius-md);
    background: var(--theme-danger-bg);
    color: var(--theme-danger);
}

.verification-review-note p {
    margin: 5px 0 0;
    white-space: pre-wrap;
}

.verification-next-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.verification-document-actions,
.verification-review-buttons,
.admin-card-heading-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.verification-admin-grid {
    grid-template-columns: minmax(240px, .8fr) minmax(0, 2fr);
}

.verification-admin-grid .admin-card-wide {
    min-width: 0;
}

@media (max-width: 980px) {
    .verification-summary,
    .verification-document-grid,
    .verification-next-steps,
    .verification-admin-grid {
        grid-template-columns: 1fr;
    }

    .verification-intro,
    .verification-inline-card,
    .verification-submit-card,
    .verification-review-actions {
        align-items: flex-start;
        flex-direction: column;
    }
}


.verification-history-list {
    display: grid;
    gap: 12px;
}

.verification-history-list article {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid var(--theme-line);
    border-radius: var(--theme-radius-sm);
    background: var(--theme-surface-soft);
}

.verification-history-list article > span {
    color: var(--theme-muted);
    font-size: .78rem;
}

.verification-history-list article > p {
    margin: 3px 0 0;
    color: var(--theme-ink);
    white-space: pre-wrap;
}


/* Phase 3: buyer saved delivery addresses */
.buyer-address-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.buyer-address-card {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    border: 1px solid rgba(30, 91, 54, .14);
}

.buyer-address-card.is-default {
    border-color: rgba(30, 91, 54, .55);
    box-shadow: 0 10px 28px rgba(30, 91, 54, .08);
}

.buyer-address-card header,
.checkout-address-selector .admin-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.buyer-address-card h2,
.checkout-address-selector h2 {
    margin: .2rem 0 0;
}

.buyer-address-default-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .35rem .65rem;
    background: rgba(30, 91, 54, .1);
    color: #1e5b36;
    font-size: .78rem;
    font-weight: 800;
}

.buyer-address-phone {
    font-weight: 800;
    color: #1e5b36;
}

.buyer-address-notes {
    padding: .75rem;
    border-radius: .75rem;
    background: rgba(120, 92, 58, .08);
}

.buyer-address-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: auto;
    padding-top: .5rem;
}

.buyer-address-actions form {
    margin: 0;
}

.buyer-address-empty,
.checkout-address-empty {
    text-align: center;
}

.buyer-address-empty > span {
    display: block;
    font-size: 2rem;
    margin-bottom: .5rem;
}

.buyer-address-checkout-link {
    margin-top: 1rem;
    text-align: right;
    font-weight: 800;
}

.buyer-address-form {
    display: grid;
    gap: 1.25rem;
}

.buyer-address-default-option {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: .65rem;
    padding: .85rem 1rem;
    border: 1px solid rgba(30, 91, 54, .18);
    border-radius: .8rem;
    background: rgba(30, 91, 54, .04);
}

.buyer-address-default-option input {
    width: auto;
    margin: 0;
}

.buyer-address-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
}

.checkout-address-selector {
    margin-bottom: 1rem;
}

.checkout-address-picker-form {
    display: grid;
    gap: .5rem;
}

.checkout-address-picker-form > label {
    font-weight: 800;
}

.checkout-address-picker-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .75rem;
}

.checkout-address-picker-row select {
    width: 100%;
}

@media (max-width: 820px) {
    .buyer-address-grid {
        grid-template-columns: 1fr;
    }

    .checkout-address-selector .admin-card-heading,
    .buyer-address-card header {
        align-items: stretch;
        flex-direction: column;
    }

    .checkout-address-picker-row {
        grid-template-columns: 1fr;
    }

    .buyer-address-form-actions {
        flex-direction: column-reverse;
    }

    .buyer-address-form-actions .button {
        width: 100%;
    }
}


/*
|--------------------------------------------------------------------------
| Phase 4 — Seller inventory and product moderation
|--------------------------------------------------------------------------
*/
.agmula-theme .product-lockable-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.agmula-theme .product-lockable-fieldset:disabled {
    opacity: .72;
}

.agmula-theme .product-history-card {
    margin-top: 18px;
}

.agmula-theme .product-moderation-timeline {
    display: grid;
    gap: 12px;
}

.agmula-theme .product-moderation-entry {
    position: relative;
    display: grid;
    gap: 4px;
    padding: 13px 14px 13px 17px;
    border: 1px solid var(--theme-line);
    border-radius: var(--theme-radius-sm);
    background: var(--theme-surface-soft);
}

.agmula-theme .product-moderation-entry::before {
    position: absolute;
    inset: 12px auto 12px 0;
    width: 4px;
    border-radius: 999px;
    background: var(--theme-green-600);
    content: "";
}

.agmula-theme .product-moderation-entry > span {
    color: var(--theme-green-800);
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.agmula-theme .product-moderation-entry > strong {
    color: var(--theme-green-950);
    font-size: .84rem;
}

.agmula-theme .product-moderation-entry > small {
    color: var(--theme-muted);
    font-size: .7rem;
}

.agmula-theme .product-moderation-entry > p {
    margin: 5px 0 0;
    color: var(--theme-ink);
    font-size: .78rem;
    line-height: 1.55;
}

.agmula-theme .inventory-product small + small {
    margin-top: 3px;
    color: var(--theme-muted);
}

@media (max-width: 720px) {
    .agmula-theme .product-moderation-entry {
        padding-right: 12px;
    }
}


/* Phase 5: Rider availability, eligibility, and private delivery proof */
.agmula-theme .rider-availability-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
    border-left: 5px solid var(--theme-border);
}

.agmula-theme .rider-availability-card h2 {
    margin: 4px 0 8px;
    color: var(--theme-green-950);
}

.agmula-theme .rider-availability-card p {
    max-width: 760px;
    margin: 0;
    color: var(--theme-muted);
    line-height: 1.6;
}

.agmula-theme .rider-availability-available {
    border-left-color: var(--theme-green-600);
    background: linear-gradient(135deg, rgba(31, 122, 67, .08), rgba(255, 255, 255, .98));
}

.agmula-theme .rider-availability-busy,
.agmula-theme .rider-busy-notice {
    border-left-color: #b7791f;
    background: linear-gradient(135deg, rgba(183, 121, 31, .08), rgba(255, 255, 255, .98));
}

.agmula-theme .rider-availability-offline {
    border-left-color: #718096;
}

.agmula-theme .rider-eligibility-warning {
    display: block;
    margin-top: 10px;
    color: #9b2c2c;
    font-weight: 700;
    line-height: 1.45;
}

.agmula-theme .rider-busy-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 0 0 22px;
    padding: 16px 18px;
    border-left: 5px solid #b7791f;
    border-radius: 14px;
}

.agmula-theme .rider-busy-notice > span {
    font-size: 1.5rem;
}

.agmula-theme .rider-busy-notice strong,
.agmula-theme .rider-busy-notice p {
    display: block;
}

.agmula-theme .rider-busy-notice p {
    margin: 4px 0 0;
    color: var(--theme-muted);
}

.agmula-theme .rider-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #edf2f7;
    color: #4a5568;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.agmula-theme .rider-state-available {
    background: #e6ffed;
    color: #17633a;
}

.agmula-theme .rider-state-busy {
    background: #fff7df;
    color: #8a5a00;
}

.agmula-theme .rider-state-offline {
    background: #edf2f7;
    color: #4a5568;
}

.agmula-theme .rider-state-ineligible {
    background: #fff0f0;
    color: #9b2c2c;
}

.agmula-theme .rider-roster-card {
    margin: 22px 0;
}

.agmula-theme .delivery-admin-metrics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.agmula-theme .rider-complete-form label small {
    display: block;
    margin-top: 6px;
    color: var(--theme-muted);
    font-size: .76rem;
}

@media (max-width: 1100px) {
    .agmula-theme .delivery-admin-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .agmula-theme .rider-availability-card {
        align-items: stretch;
        flex-direction: column;
    }

    .agmula-theme .rider-availability-card form,
    .agmula-theme .rider-availability-card button {
        width: 100%;
    }

    .agmula-theme .delivery-admin-metrics {
        grid-template-columns: 1fr;
    }
}


/* Phase 6: COD accounting and remittance controls */
.payment-cod-metrics {
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
}
.cod-remittance-review,
.rider-cod-card {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    border: 1px solid var(--line, #dfe7df);
    border-radius: 14px;
    background: #f8fbf8;
}
.cod-remittance-review > div,
.rider-cod-card > div {
    display: grid;
    gap: .25rem;
}
.cod-remittance-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}
.cod-remittance-actions form,
.cod-remittance-form {
    display: grid;
    gap: .65rem;
}
.cod-remittance-actions input,
.cod-remittance-form input {
    width: 100%;
}
.rider-cod-list {
    display: grid;
    gap: 1rem;
}
.cod-remittance-form {
    min-width: min(100%, 360px);
}
.cod-remittance-form label {
    display: grid;
    gap: .3rem;
}
.cod-remittance-form label > span {
    font-size: .8rem;
    font-weight: 700;
}
.cod-remittance-summary {
    display: grid;
    gap: .35rem;
    min-width: min(100%, 260px);
}
.payment-status-awaiting_collection,
.payment-status-pending {
    background: #fff7d6;
    color: #775b00;
}
.payment-status-collected,
.payment-status-remittance_submitted {
    background: #e8f3ff;
    color: #16598a;
}
.payment-status-remitted {
    background: #eee9ff;
    color: #523493;
}
.payment-status-reconciled,
.payment-status-paid {
    background: #e2f6e8;
    color: #176632;
}
@media (max-width: 760px) {
    .cod-remittance-review,
    .rider-cod-card {
        flex-direction: column;
    }
    .cod-remittance-actions {
        grid-template-columns: 1fr;
    }
    .cod-remittance-form,
    .cod-remittance-summary {
        min-width: 100%;
    }
}


/* Phase 7 — Admin operations and audit log */
.audit-admin-content {
    display: grid;
    gap: 20px;
}

.audit-filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1.6fr) repeat(4, minmax(140px, .8fr)) auto;
    gap: 14px;
    align-items: end;
}

.audit-filter-bar label {
    display: grid;
    gap: 7px;
}

.audit-filter-bar label > span {
    color: var(--theme-muted);
    font-size: .78rem;
    font-weight: 800;
}

.audit-filter-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    min-height: 43px;
}

.audit-log-card {
    overflow: hidden;
}

.audit-log-list {
    display: grid;
    gap: 14px;
}

.audit-log-entry {
    padding: 18px;
    border: 1px solid var(--theme-line);
    border-radius: var(--theme-radius-md);
    background: var(--theme-surface-soft);
}

.audit-log-heading {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
}

.audit-log-heading h3 {
    margin: 7px 0 0;
    font-size: 1rem;
}

.audit-log-heading time {
    flex: 0 0 auto;
    color: var(--theme-muted);
    font-size: .76rem;
    font-weight: 750;
}

.audit-action-badge {
    display: inline-flex;
    min-height: 27px;
    align-items: center;
    padding: 4px 9px;
    border: 1px solid var(--theme-green-200);
    border-radius: 999px;
    background: var(--theme-green-50);
    color: var(--theme-green-800);
    font-size: .72rem;
    font-weight: 850;
}

.audit-log-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 14px;
    color: var(--theme-muted);
    font-size: .78rem;
}

.audit-reason {
    margin: 14px 0 0;
    padding: 11px 13px;
    border-left: 3px solid var(--theme-warning);
    background: var(--theme-warning-bg);
    color: var(--theme-ink);
}

.audit-context {
    margin-top: 14px;
}

.audit-context summary {
    cursor: pointer;
    color: var(--theme-green-800);
    font-size: .8rem;
    font-weight: 850;
}

.audit-context-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.audit-context-grid > div {
    min-width: 0;
}

.audit-context-grid strong {
    display: block;
    margin-bottom: 6px;
    font-size: .76rem;
}

.audit-context-grid pre {
    max-height: 260px;
    margin: 0;
    overflow: auto;
    padding: 12px;
    border: 1px solid var(--theme-line);
    border-radius: var(--theme-radius-sm);
    background: #fff;
    color: var(--theme-ink);
    font: 500 .72rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.audit-scope-note {
    margin: 0;
    color: var(--theme-muted);
    font-size: .78rem;
}

.payment-operations-card .catalog-operations-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1180px) {
    .audit-filter-bar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .audit-context-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .audit-filter-bar {
        grid-template-columns: 1fr;
    }

    .audit-log-heading {
        display: grid;
    }

    .payment-operations-card .catalog-operations-grid {
        grid-template-columns: 1fr;
    }
}
