/* Shared AgriNexaFarm workspace: administration and farmer portal visual language. */
:root {
    --an-accent: #6063ee;
    --an-accent-soft: #eeeefe;
    --an-ink: #303641;
    --an-muted: #737b89;
    --an-border: #e8ebf0;
    --an-background: #f6f7fb;
}
.an-sidebar {
    width: 250px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    color: var(--an-ink);
    border-right: 1px solid var(--an-border);
    font-family: Inter, system-ui, sans-serif;
    font-size: 13px;
    box-sizing: border-box;
}
.an-sidebar-desktop {
    position: sticky;
    top: 0;
    height: 100dvh;
    align-self: flex-start;
}
.an-sidebar-brand {
    display: block;
    padding: 25px 23px 20px;
    border-bottom: 1px solid var(--an-border);
}
.an-sidebar-brand img {
    display: block;
    width: 178px;
    height: 48px;
    object-fit: contain;
    object-position: left;
}
.an-sidebar-brand > span {
    display: block;
    margin-top: 11px;
    color: #8c93a1;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1.8px;
}
.an-farm-context {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 21px 22px 5px;
}
.an-farm-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: #263650;
    color: white;
    border-radius: 11px;
    font-size: 20px;
}
.an-farm-context > div {
    min-width: 0;
}
.an-farm-context strong {
    display: block;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.an-farm-context small {
    display: block;
    color: var(--an-muted);
    margin-top: 4px;
    font-size: 10px;
}
.an-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0 13px 18px;
    scrollbar-width: thin;
    scrollbar-color: #e0e2e9 transparent;
}
.an-nav-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 12px 10px;
    color: #7b8391;
    text-transform: uppercase;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.1px;
    margin: 0;
}
.an-nav-heading:after {
    content: "−";
    color: #a3a9b4;
}
.an-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 43px;
    width: 100%;
    padding: 11px 12px;
    margin: 3px 0;
    border-radius: 8px;
    color: #535d6b;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition:
        background 0.15s,
        color 0.15s;
}
.an-nav-link > i {
    font-size: 17px;
    width: 19px;
    text-align: center;
    flex-shrink: 0;
}
.an-nav-link > span:first-of-type {
    flex: 1;
}
.an-nav-link:hover {
    background: #f7f7fc;
    color: var(--an-accent);
}
.an-nav-link.is-active {
    background: var(--an-accent-soft);
    color: var(--an-accent);
    font-weight: 600;
}
.an-nav-active-dot {
    display: none;
    width: 5px;
    height: 5px;
    background: currentColor;
    border-radius: 50%;
    flex: 0 0 5px;
}
.is-active > .an-nav-active-dot {
    display: block;
}
.an-nav-badge {
    font-size: 9px;
    padding: 2px 6px;
    background: #f0f2f7;
    border-radius: 4px;
    color: #737b89;
}
.an-sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--an-border);
}
.an-records-note {
    display: flex;
    gap: 8px;
    font-size: 10px;
    line-height: 1.6;
    color: var(--an-muted);
    margin-bottom: 12px;
}
.an-records-note > i {
    font-size: 16px;
    color: #529879;
}
.an-home-link {
    display: flex;
    align-items: center;
    gap: 9px;
    background: none;
    border: 0;
    padding: 8px 0;
    color: #798391;
    text-decoration: none;
    font-size: 11px;
}
.an-home-link:hover {
    color: var(--an-accent);
}
.an-sidebar-account {
    display: flex;
    gap: 9px;
    align-items: center;
    padding-top: 13px;
    margin-top: 9px;
    border-top: 1px solid var(--an-border);
}
.an-avatar {
    display: flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--an-accent-soft);
    color: var(--an-accent);
    font-weight: 600;
    flex-shrink: 0;
}
.an-sidebar-account > div {
    flex: 1;
    min-width: 0;
}
.an-sidebar-account strong {
    display: block;
    font-size: 11px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}
.an-sidebar-account small {
    font-size: 10px;
    color: var(--an-muted);
}
.an-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    flex-shrink: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #818b9d;
    cursor: pointer;
}
.an-icon-button:hover {
    background: var(--an-accent-soft);
    color: var(--an-accent);
}
.an-mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 60;
}
.an-mobile-drawer.hidden {
    display: none;
}
.an-drawer-scrim {
    position: absolute;
    inset: 0;
    background: #1d294266;
    border: 0;
    width: 100%;
    height: 100%;
}
.an-drawer-panel {
    position: absolute;
    inset: 0 auto 0 0;
    width: 280px;
    max-width: 88vw;
    height: 100dvh;
    box-shadow: 14px 0 45px #24324f18;
    outline: none;
}
.an-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--an-border);
}
.an-drawer-header img {
    width: 175px;
    height: 44px;
    object-fit: contain;
}
.an-farmer-dashboard {
    display: flex;
    min-height: 100dvh;
    flex: 1;
    background: var(--an-background);
    color: var(--an-ink);
}
.an-dashboard-main {
    flex: 1;
    min-width: 0;
    padding: 26px 32px 0;
    display: flex;
    flex-direction: column;
    background: var(--an-background);
}
.an-workspace-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 36px;
    min-height: 30px;
}
.an-breadcrumb {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #a0a7b2;
    font-size: 11px;
}
.an-breadcrumb > a {
    color: #7f8999;
}
.an-breadcrumb strong {
    font-size: 11px;
    color: #596476;
    font-weight: 500;
}
.an-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #8892a2;
    font-size: 11px;
}
.an-topbar-actions time {
    display: flex;
    align-items: center;
    gap: 8px;
}
.an-mobile-menu {
    display: none;
}
.an-dashboard-intro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}
.an-eyebrow {
    font-size: 9px;
    letter-spacing: 1.5px;
    color: var(--an-accent);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 9px;
}
.an-dashboard-intro h1 {
    font-size: 30px;
    line-height: 1.25;
    font-weight: 650;
    letter-spacing: -0.9px;
    color: #293241;
}
.an-page-description {
    font-size: 12px;
    color: var(--an-muted);
    margin-top: 10px;
    line-height: 1.7;
    max-width: 600px;
}
.an-page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    flex-wrap: wrap;
    flex-shrink: 0;
}
.an-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid #e0e4eb;
    border-radius: 8px;
    background: #fff;
    color: #526077;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.5;
    cursor: pointer;
    transition:
        background 0.15s,
        box-shadow 0.15s;
    text-decoration: none;
    white-space: nowrap;
}
.an-button:hover {
    background: #f1f2fa;
    border-color: #d8dbeb;
}
.an-button-primary {
    background: var(--an-accent);
    border-color: var(--an-accent);
    color: white;
    box-shadow: 0 3px 7px #6063ee14;
}
.an-button-primary:hover {
    background: #5356db;
    border-color: #5356db;
}
.an-sync-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border: 1px solid var(--an-border);
    background: #fff;
    border-radius: 10px;
    margin-bottom: 22px;
}
.an-sync-banner > i {
    color: #6e7ca1;
    font-size: 18px;
}
.an-sync-banner strong {
    font-size: 11px;
    font-weight: 600;
    margin-right: 10px;
}
.an-sync-banner span {
    font-size: 10px;
    color: var(--an-muted);
    line-height: 1.7;
}
.an-trial-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 16px;
    margin-bottom: 22px;
    border: 1px solid #f5e6c4;
    border-radius: 9px;
    background: #fffaf0;
    color: #99712a;
    font-size: 11px;
}
.an-trial-banner a {
    font-weight: 600;
    white-space: nowrap;
}
.an-dashboard-content {
    flex: 1;
    min-width: 0;
}
.an-dashboard-content .dashboard-content {
    min-width: 0;
}
.an-dashboard-content .bg-white.border-slate-200 {
    border-color: var(--an-border);
    box-shadow: none;
}
.an-dashboard-content .rounded-2xl {
    border-radius: 12px;
}
.an-dashboard-content .shadow-sm {
    box-shadow: 0 2px 3px #24324f02;
}
.an-dashboard-content .text-slate-800 {
    color: var(--an-ink);
}
.an-dashboard-content .text-slate-500 {
    color: var(--an-muted);
}
.an-dashboard-content h3.text-lg {
    font-size: 14px;
    font-weight: 600;
}
.an-dashboard-content h3.text-sm {
    font-size: 12px;
    font-weight: 600;
}
.an-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
    gap: 17px !important;
}
.an-stat-card {
    min-height: 145px;
    padding: 20px !important;
}
.an-stat-card > div:first-child {
    font-size: 11px;
}
.an-stat-card .text-3xl {
    font-size: 30px;
    letter-spacing: -0.6px;
    font-weight: 600;
    line-height: 1.3;
    margin: 13px 0 10px;
}
.an-stat-card > span {
    font-size: 10px;
    font-weight: 400;
    color: var(--an-muted);
}
.an-stat-card .w-10 {
    width: 34px;
    height: 34px;
    border-radius: 9px;
}
.an-stat-card .text-lg {
    font-size: 17px;
}
.an-quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    gap: 14px;
}
.an-quick-links > a {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--an-border);
    border-radius: 10px;
    padding: 17px 15px;
    min-width: 0;
    transition:
        background 0.15s,
        border-color 0.15s;
}
.an-quick-links > a:hover {
    border-color: #c8cafa;
    background: #fcfcff;
}
.an-quick-links > a > span:nth-child(2) {
    flex: 1;
    min-width: 0;
}
.an-quick-links strong {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #4c576c;
}
.an-quick-links small {
    display: block;
    margin-top: 5px;
    font-size: 10px;
    color: var(--an-muted);
    line-height: 1.5;
}
.an-quick-links > a > .bi {
    font-size: 11px;
    color: #a4adbc;
}
.an-quick-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    flex-shrink: 0;
    border-radius: 9px;
    font-size: 17px;
}
.an-violet {
    background: #efedff;
    color: #8070db;
}
.an-orange {
    background: #fff2e8;
    color: #d7985b;
}
.an-green {
    background: #e9f6ef;
    color: #54a27b;
}
.an-blue {
    background: #edf4ff;
    color: #6694d7;
}
.an-dashboard-content table {
    font-size: 12px;
}
.an-dashboard-content thead {
    background: #fafbfe;
    color: #8a94a6;
}
.an-dashboard-content th {
    font-weight: 500 !important;
    font-size: 10px !important;
    letter-spacing: 0.1px !important;
    text-transform: none !important;
}
.an-dashboard-content td {
    font-size: 11px;
}
.an-dashboard-content table .text-xs {
    font-size: 10px;
}
.an-dashboard-content input:not([type="checkbox"]):not([type="radio"]),
.an-dashboard-content select,
.an-dashboard-content textarea {
    border-radius: 8px;
    font-size: 12px;
}
.an-dashboard-content :is(button, a).bg-agri-600,
.an-dashboard-content :is(button, a).bg-agri-800 {
    background: var(--an-accent);
    color: white;
    border-color: var(--an-accent);
    box-shadow: none;
}
.an-dashboard-content :is(button, a).bg-agri-600:hover,
.an-dashboard-content :is(button, a).bg-agri-800:hover {
    background: #5356db;
}
.an-workspace-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 28px 0 20px;
    color: #a2aab8;
    font-size: 10px;
}
.an-workspace-footer > span:last-child {
    font-size: 9px;
}
.an-skip-link {
    position: fixed;
    left: 16px;
    top: -80px;
    z-index: 100;
    background: #fff;
    padding: 12px 18px;
    border: 2px solid var(--an-accent);
    border-radius: 8px;
    color: var(--an-accent);
}
.an-skip-link:focus {
    top: 12px;
}
.an-farmer-dashboard :is(a, button, input, select, textarea):focus-visible,
.an-sidebar :is(a, button):focus-visible {
    outline: 3px solid #aaaaff;
    outline-offset: 3px;
}
.an-farmer-dashboard button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
@media (min-width: 1800px) {
    .an-dashboard-main {
        padding: 30px 38px 0;
    }
    .an-stat-card {
        min-height: 158px;
    }
    .an-dashboard-intro h1 {
        font-size: 32px;
    }
}
@media (max-width: 1200px) {
    .an-sidebar {
        width: 225px;
    }
    .an-sidebar-brand {
        padding-left: 20px;
    }
    .an-sidebar-brand img {
        width: 170px;
    }
    .an-dashboard-main {
        padding: 24px 22px 0;
    }
    .an-dashboard-intro {
        align-items: flex-start;
    }
    .an-page-actions {
        max-width: 180px;
    }
    .an-dashboard-intro h1 {
        font-size: 26px;
    }
    .an-stats-grid {
        gap: 12px !important;
    }
    .an-stat-card {
        padding: 16px !important;
    }
    .an-sync-banner span {
        display: block;
        margin-top: 3px;
    }
}
@media (max-width: 767px) {
    .an-sidebar-desktop {
        display: none;
    }
    .an-drawer-panel {
        width: 280px;
    }
    .an-dashboard-main {
        padding: 18px 16px 0;
    }
    .an-mobile-menu {
        display: inline-flex;
    }
    .an-workspace-topbar {
        margin-bottom: 24px;
        gap: 6px;
    }
    .an-breadcrumb {
        gap: 8px;
        font-size: 10px;
    }
    .an-breadcrumb > a {
        display: none;
    }
    .an-breadcrumb > span {
        display: none;
    }
    .an-topbar-actions {
        font-size: 10px;
        gap: 4px;
    }
    .an-topbar-actions time > i {
        display: none;
    }
    .an-dashboard-intro {
        flex-direction: column;
        gap: 17px;
        margin-bottom: 20px;
    }
    .an-dashboard-intro h1 {
        font-size: 26px;
    }
    .an-page-description {
        font-size: 11px;
    }
    .an-page-actions {
        justify-content: flex-start;
        max-width: none;
        flex-shrink: 1;
    }
    .an-button {
        font-size: 11px;
        padding: 9px 12px;
    }
    .an-sync-banner {
        padding: 12px;
        align-items: flex-start;
        gap: 9px;
        margin-bottom: 18px;
    }
    .an-sync-banner strong {
        font-size: 10px;
    }
    .an-sync-banner span {
        font-size: 10px;
    }
    .an-trial-banner {
        font-size: 10px;
        padding: 11px 12px;
    }
    .an-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 11px !important;
    }
    .an-stat-card {
        min-height: 139px;
        padding: 13px !important;
    }
    .an-stat-card > div:first-child {
        font-size: 10px;
        gap: 5px;
        align-items: flex-start;
    }
    .an-stat-card .text-3xl {
        font-size: 25px;
    }
    .an-stat-card .w-10 {
        height: 28px;
        width: 28px;
        flex-shrink: 0;
    }
    .an-stat-card > span {
        font-size: 9px;
        display: block;
        line-height: 1.6;
    }
    .an-quick-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 11px;
    }
    .an-quick-links > a {
        padding: 12px;
        gap: 8px;
        align-items: flex-start;
    }
    .an-quick-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    .an-quick-links > a > .bi {
        display: none;
    }
    .an-quick-links strong {
        font-size: 10px;
    }
    .an-quick-links small {
        font-size: 9px;
    }
    .an-dashboard-content .p-6 {
        padding: 16px;
    }
    .an-dashboard-content table .p-4 {
        padding: 12px;
    }
    .an-dashboard-content .grid {
        min-width: 0;
    }
    .an-workspace-footer {
        font-size: 9px;
        line-height: 1.6;
    }
    .an-workspace-footer > span:last-child {
        display: none;
    }
}
@media (min-width: 768px) {
    .an-mobile-drawer {
        display: none !important;
    }
}
@media (prefers-reduced-motion: reduce) {
    .an-sidebar *,
    .an-farmer-dashboard * {
        animation: none !important;
        transition: none !important;
    }
}
