@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* {
    box-sizing: border-box;
}

:root {
    --green: #0f9f4f;
    --green-dark: #08783a;
    --mint: #dcefe5;
    --mint-deep: #c4e2d2;
    --text: #1f2933;
    --muted: #5d6b7a;
    --line: #d9dde3;
    --white: #ffffff;
    --focus: rgba(15, 159, 79, 0.22);
}

body {
    margin: 0;
    overflow-x: hidden;
    min-height: 100vh;
    font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background:
        linear-gradient(45deg, transparent 0 43%, rgba(255,255,255,0.35) 43% 47%, transparent 47% 100%),
        linear-gradient(225deg, transparent 0 58%, rgba(255,255,255,0.3) 58% 62%, transparent 62% 100%),
        var(--mint);
}

.dashboard-body {
    background: #f4f6f8;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
}

.dashboard-page {
    width: min(100%, 1240px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 12px 14px 22px;
    overflow-x: hidden;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
}

.farmer-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 18px 14px;
    border-right: 1px solid #dce4e0;
    background: var(--white);
    box-shadow: 8px 0 24px rgba(20, 33, 45, 0.05);
}

.sidebar-brand {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: var(--green);
    color: var(--white);
    font-weight: 800;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 7px;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.sidebar-link:hover,
.sidebar-link.is-active {
    background: #eef9ef;
    color: var(--green-dark);
    text-decoration: none;
}

.placeholder-text {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 15px;
    font-weight: 600;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.dashboard-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--green-dark);
    min-width: 0;
}

.dashboard-title h1 {
    color: var(--green-dark);
    font-size: clamp(24px, 3vw, 34px);
    text-align: left;
    overflow-wrap: anywhere;
}

.dashboard-user-icon {
    position: relative;
    width: 34px;
    height: 34px;
}

.dashboard-user-icon::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--green-dark);
}

.dashboard-user-icon::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 4px;
    color: var(--green-dark);
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    text-shadow: -27px 23px 0 var(--green-dark), -18px 23px 0 var(--green-dark), -9px 23px 0 var(--green-dark);
}

.dashboard-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.dashboard-btn {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 14px;
    border: 1px solid var(--green);
    border-radius: 7px;
    background: var(--white);
    color: var(--green-dark);
    cursor: pointer;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.dashboard-btn:hover {
    text-decoration: none;
}

.dashboard-btn-primary {
    background: var(--green);
    color: var(--white);
}

.dashboard-btn-primary:hover {
    background: var(--green-dark);
    color: var(--white);
}

.dashboard-btn-blue {
    border-color: #1463ff;
    color: #1463ff;
}

.dashboard-btn-outline:hover {
    background: #effaf4;
}

.dashboard-btn-blue:hover {
    background: #eef4ff;
    color: #0f51d7;
}

.save-icon,
.folder-icon,
.print-icon {
    position: relative;
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.save-icon::before {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 3px;
    background: currentColor;
}

.save-icon::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 5px;
    width: 7px;
    height: 5px;
    border-radius: 1px;
    background: var(--green);
    box-shadow: 0 9px 0 -1px var(--green);
}

.folder-icon::before {
    content: "";
    position: absolute;
    left: 1px;
    top: 7px;
    width: 19px;
    height: 12px;
    border-radius: 2px;
    background: currentColor;
    transform: skewX(-15deg);
}

.folder-icon::after {
    content: "";
    position: absolute;
    left: 2px;
    top: 4px;
    width: 10px;
    height: 5px;
    border-radius: 2px 2px 0 0;
    background: currentColor;
}

.print-icon::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 7px;
    width: 15px;
    height: 9px;
    border: 3px solid currentColor;
    border-radius: 3px;
}

.print-icon::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 11px;
    height: 7px;
    border: 3px solid currentColor;
    border-bottom: 0;
    border-radius: 2px 2px 0 0;
    box-shadow: 0 15px 0 -2px currentColor;
}

.dashboard-panel {
    width: 100%;
    min-width: 0;
    min-height: auto;
    padding: 22px 22px 18px;
    border-radius: 11px;
    background: var(--white);
    box-shadow: 0 10px 30px rgba(20, 33, 45, 0.08);
}

.section-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding-bottom: 7px;
    border-bottom: 2px solid var(--green);
    color: var(--green);
}

.section-title-row h2 {
    margin: 0;
    color: var(--green);
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.section-person-icon {
    position: relative;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--green);
}

.section-person-icon::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--white);
}

.section-person-icon::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 13px;
    width: 10px;
    height: 5px;
    border-radius: 8px 8px 3px 3px;
    background: var(--white);
}

.details-form {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 11px 16px;
    padding-top: 14px;
}

.dashboard-flash {
    margin: 18px 0 0;
}

.toast-message {
    position: fixed;
    left: 50%;
    top: 18px;
    z-index: 1000;
    width: min(92vw, 460px);
    padding: 13px 18px;
    border: 1px solid var(--mint-deep);
    border-radius: 8px;
    background: #f1faf5;
    color: var(--green-dark);
    box-shadow: 0 14px 35px rgba(18, 82, 52, 0.18);
    font-size: 15px;
    font-weight: 800;
    text-align: center;
    transform: translateX(-50%);
    animation: toastIn 220ms ease-out;
}

.toast-message.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -12px);
    transition: opacity 220ms ease, transform 220ms ease;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translate(-50%, -12px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.field-group label {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
}

.details-form input,
.details-form select {
    min-width: 0;
    height: 34px;
    border-radius: 7px;
    font-size: 15px;
}

.details-form input[type="file"] {
    padding: 5px 8px;
    font-size: 13px;
}

.farmer-code-box {
    min-height: 34px;
    display: grid;
    place-items: center;
    border: 1px dashed var(--green);
    border-radius: 7px;
    background: #eef9ef;
    color: var(--green);
    font-size: 15px;
    font-weight: 800;
    text-align: center;
}

.col-2 {
    grid-column: span 2;
}

.col-3 {
    grid-column: span 3;
}

.col-4 {
    grid-column: span 4;
}

.col-6 {
    grid-column: span 6;
}

.col-8 {
    grid-column: span 8;
}

.col-12 {
    grid-column: 1 / -1;
}

.form-section {
    margin-top: 6px;
}

.section-location-icon {
    position: relative;
    width: 20px;
    height: 20px;
    border-radius: 50% 50% 50% 0;
    background: var(--green);
    transform: rotate(-45deg);
}

.section-land-icon {
    position: relative;
    width: 25px;
    height: 20px;
    color: var(--green);
}

.section-land-icon::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 5px;
    width: 14px;
    height: 11px;
    border: 3px solid currentColor;
    border-radius: 3px 3px 2px 2px;
}

.section-land-icon::after {
    content: "";
    position: absolute;
    left: 0;
    top: 15px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 15px 0 0 currentColor, 8px -8px 0 -1px currentColor;
}

.land-title-row {
    margin-top: 4px;
}

.section-bank-icon {
    position: relative;
    width: 25px;
    height: 23px;
    color: var(--green);
}

.section-bank-icon::before {
    content: "";
    position: absolute;
    left: 1px;
    top: 6px;
    width: 23px;
    height: 4px;
    background: currentColor;
    box-shadow: 0 13px 0 currentColor;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.section-bank-icon::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 12px;
    width: 4px;
    height: 9px;
    background: currentColor;
    box-shadow: 6px 0 0 currentColor, 12px 0 0 currentColor, 18px 0 0 currentColor;
}

.bank-title-row {
    margin-top: 4px;
}

.section-family-icon {
    position: relative;
    width: 28px;
    height: 22px;
    color: var(--green);
}

.section-family-icon::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: -8px 5px 0 -1px currentColor, 8px 5px 0 -1px currentColor;
}

.section-family-icon::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 11px;
    width: 14px;
    height: 8px;
    border-radius: 8px 8px 3px 3px;
    background: currentColor;
    box-shadow: -8px 3px 0 -3px currentColor, 8px 3px 0 -3px currentColor;
}

.family-title-row {
    margin-top: 4px;
}

.section-product-icon {
    position: relative;
    width: 22px;
    height: 24px;
    color: var(--green);
}

.section-soil-icon {
    position: relative;
    width: 24px;
    height: 24px;
    color: var(--green);
}

.section-preparation-icon {
    position: relative;
    width: 24px;
    height: 24px;
    color: var(--green);
}

.section-preparation-icon::before,
.section-preparation-icon::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 24px;
    border-radius: 4px;
    background: currentColor;
}

.section-preparation-icon::before {
    left: 6px;
    top: 0;
    transform: rotate(45deg);
}

.section-preparation-icon::after {
    right: 6px;
    top: 0;
    transform: rotate(-45deg);
}

.section-distribution-icon {
    position: relative;
    width: 28px;
    height: 20px;
    color: var(--green);
}

.section-monitoring-icon {
    position: relative;
    width: 20px;
    height: 22px;
    border-radius: 4px;
    background: var(--green);
}

.section-harvesting-icon {
    position: relative;
    width: 24px;
    height: 22px;
    color: var(--green);
}

.section-harvesting-icon::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 5px;
    width: 16px;
    height: 12px;
    border-radius: 14px 14px 4px 14px;
    background: currentColor;
    transform: rotate(25deg);
}

.section-harvesting-icon::after {
    content: "";
    position: absolute;
    left: 15px;
    top: 1px;
    width: 4px;
    height: 20px;
    border-radius: 4px;
    background: currentColor;
    transform: rotate(20deg);
}

.section-monitoring-icon::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 4px;
    width: 8px;
    height: 4px;
    border: 2px solid var(--white);
    border-top: 0;
    border-right: 0;
    transform: rotate(-45deg);
}

.section-monitoring-icon::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 13px;
    width: 12px;
    height: 2px;
    background: var(--white);
    box-shadow: 0 4px 0 var(--white);
}

.section-distribution-icon::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    width: 20px;
    height: 11px;
    border-radius: 2px;
    background: currentColor;
}

.section-distribution-icon::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 15px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 16px 0 0 currentColor;
}

.preparation-title-row,
.distribution-title-row,
.production-title-row,
.monitoring-title-row,
.harvesting-title-row {
    margin-top: 4px;
}

.section-soil-icon::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 2px;
    width: 6px;
    height: 18px;
    border-radius: 4px;
    background: currentColor;
    transform: rotate(45deg);
}

.section-soil-icon::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 15px;
    width: 14px;
    height: 5px;
    border-radius: 0 0 10px 10px;
    border: 3px solid currentColor;
    border-top: 0;
    transform: rotate(-45deg);
}

.soil-title-row {
    margin-top: 4px;
}

.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    font-size: 15px;
    font-weight: 600;
}

.checkbox-row input {
    width: 20px;
    height: 20px;
    padding: 0;
}

.section-product-icon::before {
    content: "";
    position: absolute;
    left: 9px;
    top: 8px;
    width: 4px;
    height: 15px;
    border-radius: 4px;
    background: currentColor;
}

.section-product-icon::after {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 12px;
    height: 10px;
    border-radius: 12px 12px 2px 12px;
    background: currentColor;
    transform: rotate(34deg);
    box-shadow: 12px -3px 0 -1px currentColor;
}

.product-title-row {
    margin-top: 4px;
}

.section-training-icon {
    position: relative;
    width: 25px;
    height: 22px;
    color: var(--green);
}

.section-training-icon::before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    width: 22px;
    height: 9px;
    background: currentColor;
    clip-path: polygon(50% 0, 100% 36%, 50% 72%, 0 36%);
}

.section-training-icon::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 12px;
    width: 12px;
    height: 6px;
    border-radius: 50%;
    border-bottom: 4px solid currentColor;
    box-shadow: 15px -7px 0 -5px currentColor;
}

.section-document-icon {
    position: relative;
    width: 20px;
    height: 23px;
    border-radius: 2px;
    background: var(--green);
}

.section-document-icon::before {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    border-top: 7px solid var(--white);
    border-left: 7px solid rgba(255,255,255,0.45);
}

.section-document-icon::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 10px;
    width: 10px;
    height: 2px;
    background: var(--white);
    box-shadow: 0 5px 0 var(--white);
}

.training-title-row,
.guidance-title-row,
.document-title-row {
    margin-top: 4px;
}

.product-section {
    min-width: 0;
    overflow-x: hidden;
}

.product-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-card {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 10px 12px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fbfcfd;
}

.product-field {
    grid-column: span 2;
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
}

.product-field:nth-child(5),
.product-field:nth-child(6),
.product-field:nth-child(7),
.product-geotag-field {
    grid-column: span 3;
}

.product-field label {
    font-size: 14px;
    font-weight: 800;
}

.product-card input,
.product-card select {
    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 0 9px;
    font-size: 14px;
}

.product-card input[type="file"] {
    padding: 5px 6px;
    font-size: 13px;
}

.table-geotag-row {
    display: flex;
}

.table-geotag-row input {
    min-width: 0;
    border-radius: 7px 0 0 7px;
}

.table-geo-btn {
    width: 36px;
    min-width: 36px;
    height: 34px;
}

.product-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.add-product-btn,
.remove-product-btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 16px;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
}

.add-product-btn,
.remove-product-btn {
    background: #1769ff;
    color: var(--white);
}

.add-product-btn span,
.remove-product-btn span {
    font-size: 26px;
    line-height: 1;
}

.documents-section {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 8px;
}

.documents-section > label {
    font-size: 15px;
    font-weight: 500;
}

.document-rows {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.document-row {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(180px, 1fr) 42px;
    gap: 0;
    min-width: 0;
}

.document-row select {
    border-radius: 7px 0 0 7px;
}

.document-row input[type="file"] {
    border-radius: 0;
}

.document-remove-btn {
    height: 34px;
    border: 1px solid #ff3f5e;
    border-radius: 0 7px 7px 0;
    background: var(--white);
    color: #ff2349;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.add-document-btn {
    width: fit-content;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    border: 1px solid #1769ff;
    border-radius: 7px;
    background: var(--white);
    color: #1769ff;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
}

.add-document-btn span {
    font-size: 24px;
    line-height: 1;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 4px;
}

.save-farmer-btn,
.reset-form-btn {
    min-width: 220px;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-radius: 7px;
    cursor: pointer;
    font: inherit;
    font-size: 18px;
    font-weight: 700;
}

.save-farmer-btn {
    border: 0;
    background: var(--green);
    color: var(--white);
}

.reset-form-btn {
    border: 1px solid #6f7a86;
    background: var(--white);
    color: #6f7a86;
}

.reset-icon {
    position: relative;
    width: 22px;
    height: 22px;
    border: 3px solid currentColor;
    border-left-color: transparent;
    border-radius: 50%;
}

.reset-icon::before {
    content: "";
    position: absolute;
    left: -4px;
    top: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 8px solid currentColor;
    transform: rotate(-20deg);
}

.section-location-icon::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--white);
}

.location-title-row {
    margin-top: 4px;
}

.details-form textarea {
    width: 100%;
    min-width: 0;
    min-height: 56px;
    height: auto;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    outline: none;
    resize: vertical;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.details-form textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 4px var(--focus);
}

.geotag-row,
.location-file-row {
    display: flex;
    min-width: 0;
    width: 100%;
}

.geotag-row input,
.location-file-row input {
    min-width: 0;
    flex: 1;
    border-radius: 7px 0 0 7px;
}

.multi-file-list {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 6px;
}

.multi-file-list .location-file-row:not(:first-child) input {
    border-radius: 7px 0 0 7px;
}

.geo-btn,
.delete-file-btn,
.add-file-btn {
    width: 40px;
    min-width: 40px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid #1769ff;
    background: #1769ff;
    color: var(--white);
    cursor: pointer;
}

.geo-btn {
    border-radius: 0 7px 7px 0;
}

.delete-file-btn {
    border-color: #f3b7bd;
    background: #fff1f3;
    color: #e87984;
}

.add-file-btn {
    border-radius: 0 7px 7px 0;
    background: var(--white);
    color: #1769ff;
    font-size: 28px;
    line-height: 1;
}

.geo-pin-icon {
    position: relative;
    width: 16px;
    height: 16px;
    border-radius: 50% 50% 50% 0;
    background: currentColor;
    transform: rotate(-45deg);
}

.geo-pin-icon::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #1769ff;
}

.trash-icon {
    position: relative;
    width: 16px;
    height: 17px;
    border-radius: 2px;
    background: currentColor;
}

.trash-icon::before {
    content: "";
    position: absolute;
    left: -2px;
    top: -4px;
    width: 20px;
    height: 3px;
    border-radius: 3px;
    background: currentColor;
}

.trash-icon::after {
    content: "";
    position: absolute;
    left: 5px;
    top: -7px;
    width: 6px;
    height: 4px;
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 3px 3px 0 0;
}

.welcome-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 34px;
    padding: 28px 18px;
}

.welcome-hero {
    width: min(100%, 650px);
    text-align: center;
}

.welcome-hero h1 {
    max-width: 560px;
    margin: 0 auto;
    font-size: clamp(26px, 4vw, 34px);
    line-height: 1.45;
}

.welcome-hero p {
    margin: 18px auto 0;
    color: #34475a;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.75;
}

.feature-grid {
    width: min(100%, 840px);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    justify-content: center;
}

.feature-card {
    min-height: 214px;
    padding: 26px 22px 24px;
    border-radius: 7px;
    background: var(--white);
    box-shadow: 0 12px 28px rgba(18, 82, 52, 0.14);
    text-align: center;
}

.feature-card:nth-child(3) {
    grid-column: auto;
    width: auto;
    justify-self: center;
}

.feature-icon {
    position: relative;
    width: 52px;
    height: 52px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #f3f8f5;
}

.feature-card h2 {
    margin: 0 0 14px;
    color: var(--green);
    font-size: 14px;
    font-weight: 800;
}

.feature-card p {
    margin: 0;
    color: #3d4b5c;
    font-size: 13px;
    line-height: 1.7;
}

.icon-user::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 14px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--green);
}

.icon-user::after {
    content: "+";
    position: absolute;
    left: 27px;
    top: 12px;
    color: var(--green);
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

.icon-user {
    box-shadow: inset 0 -14px 0 transparent;
}

.icon-user span,
.icon-sprout span,
.icon-chart span {
    display: none;
}

.icon-user {
    background:
        radial-gradient(ellipse at 21px 34px, var(--green) 0 10px, transparent 11px),
        #f3f8f5;
}

.icon-sprout::before {
    content: "";
    position: absolute;
    left: 25px;
    top: 22px;
    width: 4px;
    height: 18px;
    border-radius: 4px;
    background: var(--green);
    transform: rotate(-18deg);
}

.icon-sprout::after {
    content: "";
    position: absolute;
    left: 18px;
    top: 17px;
    width: 14px;
    height: 10px;
    border-radius: 12px 12px 2px 12px;
    background: var(--green);
    transform: rotate(34deg);
    box-shadow: 12px -7px 0 -1px var(--green);
}

.icon-chart::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 16px;
    width: 20px;
    height: 18px;
    border-left: 3px solid var(--green);
    border-bottom: 3px solid var(--green);
}

.icon-chart::after {
    content: "";
    position: absolute;
    left: 20px;
    top: 21px;
    width: 18px;
    height: 10px;
    border-left: 3px solid var(--green);
    border-bottom: 3px solid var(--green);
    transform: skewY(-34deg);
}

.welcome-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

.action-btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid var(--green);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.action-btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.action-primary {
    background: var(--green);
    color: var(--white);
}

.action-primary:hover {
    background: var(--green-dark);
    color: var(--white);
}

.action-secondary {
    background: transparent;
    color: var(--green);
}

.action-secondary:hover {
    background: #f1faf5;
}

.action-admin {
    background: #1769ff;
    border-color: #1769ff;
    color: var(--white);
}

.action-admin:hover {
    background: #0f51d7;
    color: var(--white);
}

.btn-login-icon,
.btn-user-icon {
    position: relative;
    width: 14px;
    height: 14px;
}

.btn-login-icon::before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    width: 9px;
    height: 4px;
    border-radius: 4px;
    background: currentColor;
}

.btn-login-icon::after {
    content: "";
    position: absolute;
    right: 0;
    top: 2px;
    width: 6px;
    height: 10px;
    border: 2px solid currentColor;
    border-left: 0;
    border-radius: 2px;
}

.btn-user-icon::before {
    content: "";
    position: absolute;
    left: 1px;
    top: 1px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.btn-user-icon::after {
    content: "+";
    position: absolute;
    right: 0;
    top: -3px;
    font-size: 13px;
    font-weight: 800;
}

.auth-card {
    width: min(100%, 560px);
    min-width: 0;
    background: var(--white);
    border-radius: 10px;
    padding: 26px 34px 24px;
    box-shadow: 0 16px 38px rgba(18, 82, 52, 0.14);
}

.admin-page {
    width: min(100%, 1320px);
}

.admin-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.admin-toolbar h2 {
    margin: 0;
    color: var(--green-dark);
    font-size: 24px;
}

.admin-toolbar p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.admin-search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(100%, 620px);
    min-width: 0;
}

.admin-search input {
    height: 40px;
}

.admin-search-btn {
    width: auto;
    min-width: 105px;
    min-height: 40px;
}

.admin-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.admin-table {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 10px 11px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.admin-table th:nth-child(6),
.admin-table td:nth-child(6) {
    min-width: 108px;
    white-space: nowrap;
    overflow-wrap: normal;
}

.admin-table th:nth-child(4),
.admin-table td:nth-child(4) {
    min-width: 112px;
    white-space: nowrap;
    overflow-wrap: normal;
}

.admin-table th:nth-child(5),
.admin-table td:nth-child(5) {
    min-width: 126px;
    white-space: nowrap;
    overflow-wrap: normal;
}

.admin-table th:nth-child(7),
.admin-table td:nth-child(7) {
    min-width: 78px;
    white-space: nowrap;
    overflow-wrap: normal;
}

.admin-table th {
    background: #f7fbf8;
    color: var(--green-dark);
    font-weight: 800;
    white-space: nowrap;
    overflow-wrap: normal;
}

.admin-table tr:last-child td {
    border-bottom: 0;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    min-width: 108px;
    padding: 0 14px;
    border-radius: 999px;
    background: #eef9ef;
    color: var(--green-dark);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    overflow-wrap: normal;
}

.small-action-btn {
    min-height: 30px;
    min-width: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border-radius: 6px;
    background: var(--green);
    color: var(--white);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    overflow-wrap: normal;
}

.small-action-btn:hover {
    background: var(--green-dark);
    color: var(--white);
    text-decoration: none;
}

.admin-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid var(--mint-deep);
    border-radius: 8px;
    background: #f7fcf9;
}

.admin-detail-head p {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.admin-detail-head h2 {
    margin: 0;
    color: var(--green-dark);
    font-size: 26px;
}

.detail-section {
    margin-top: 18px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.detail-item {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fbfcfd;
}

.detail-item span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.detail-item strong {
    display: block;
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.document-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.document-group {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fbfcfd;
}

.document-group h3 {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.document-group ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.document-group a {
    color: var(--green-dark);
    font-size: 14px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.document-empty {
    margin-top: 14px;
}

.empty-cell {
    color: var(--muted);
    font-weight: 700;
    text-align: center;
}

.auth-card-wide {
    width: min(100%, 720px);
}

.brand-mark {
    width: 38px;
    height: 38px;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--green);
    color: var(--white);
    font-weight: 800;
    letter-spacing: 0;
}

h1 {
    margin: 0;
    color: var(--green);
    font-size: clamp(23px, 4vw, 28px);
    line-height: 1.2;
    text-align: center;
    font-weight: 800;
    letter-spacing: 0;
}

.subtitle {
    margin: 12px 0 20px;
    text-align: center;
    color: var(--muted);
    font-size: 16px;
    font-weight: 500;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.flash-message {
    margin: -18px 0 24px;
    padding: 14px 16px;
    border: 1px solid var(--mint-deep);
    border-radius: 8px;
    background: #f1faf5;
    color: var(--green-dark);
    font-size: 16px;
    font-weight: 700;
    text-align: center;
}

.code-display {
    margin: 0;
    padding: 18px;
    border: 1px solid var(--mint-deep);
    border-radius: 8px;
    background: #f7fcf9;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.code-display strong {
    display: block;
    margin-top: 8px;
    color: var(--green);
    font-size: 24px;
    letter-spacing: 0;
}

.grid-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
    row-gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

label {
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
}

input,
select {
    width: 100%;
    min-width: 0;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 0 14px;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

select {
    background: var(--white);
    cursor: pointer;
}

input:focus,
select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 4px var(--focus);
}

.required-mark {
    color: var(--green);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 9px;
    top: 50%;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
}

.eye-icon,
.eye-icon::before {
    display: block;
}

.eye-icon {
    position: relative;
    width: 19px;
    height: 12px;
    margin: 0 auto;
    border: 3px solid #78828f;
    border-radius: 50%;
}

.eye-icon::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #78828f;
    transform: translate(-50%, -50%);
}

.forgot-link {
    align-self: flex-end;
    margin: 8px 0 10px;
}

a {
    color: var(--green);
    font-weight: 700;
    text-decoration: none;
}

a:hover {
    color: var(--green-dark);
    text-decoration: underline;
}

.text-link {
    font-size: 14px;
}

.primary-btn {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 7px;
    background: var(--green);
    color: var(--white);
    cursor: pointer;
    font-size: 16px;
    font-weight: 800;
    transition: background 160ms ease, transform 160ms ease;
}

.primary-btn:hover {
    background: var(--green-dark);
}

.primary-btn:active {
    transform: translateY(1px);
}

.full-span {
    grid-column: 1 / -1;
    margin-top: 8px;
}

.auth-footer {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #edf0f2;
    text-align: center;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.55;
}

.auth-footer p {
    margin: 0;
}

@media (max-width: 680px) {
    .auth-card {
        padding: 24px 18px 22px;
    }

    .grid-form {
        grid-template-columns: 1fr;
    }

    .welcome-page {
        justify-content: flex-start;
        gap: 24px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        width: min(100%, 320px);
    }

    .feature-card:nth-child(3) {
        width: 100%;
    }

    .welcome-actions {
        width: min(100%, 320px);
    }

    .action-btn {
        width: 100%;
    }

    label,
    .auth-footer,
    .subtitle {
        font-size: 15px;
    }

    input,
    select {
        height: 42px;
    }
}

@media (max-width: 1100px) {
    .app-shell {
        grid-template-columns: 210px minmax(0, 1fr);
    }

    .dashboard-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-actions {
        justify-content: flex-start;
    }

    .col-2,
    .col-3,
    .col-4,
    .col-6,
    .col-8 {
        grid-column: span 6;
    }

    .col-12 {
        grid-column: 1 / -1;
    }

    .product-field,
    .product-field:nth-child(5),
    .product-field:nth-child(6),
    .product-field:nth-child(7),
    .product-geotag-field {
        grid-column: span 4;
    }

    .document-row {
        grid-template-columns: 1fr 1fr 42px;
    }

    .detail-grid,
    .document-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .dashboard-page {
        padding: 16px 12px 26px;
    }

    .admin-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-search {
        width: 100%;
    }

    .admin-search input {
        min-width: 0;
    }

    .admin-table {
        min-width: 820px;
    }

    .document-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .farmer-sidebar {
        position: static;
        height: auto;
        padding: 12px;
        border-right: 0;
        border-bottom: 1px solid #dce4e0;
    }

    .sidebar-brand {
        width: 44px;
        height: 44px;
        margin-bottom: 12px;
    }

    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
    }

    .sidebar-link {
        white-space: nowrap;
    }

    .dashboard-page {
        padding: 18px 12px 28px;
    }

    .dashboard-title h1 {
        font-size: 26px;
    }

    .dashboard-btn {
        width: 100%;
        font-size: 16px;
        white-space: normal;
    }

    .dashboard-actions {
        width: 100%;
    }

    .dashboard-panel {
        padding: 20px 14px 18px;
        border-radius: 8px;
    }

    .section-title-row h2 {
        font-size: 18px;
    }

    .details-form {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .col-2,
    .col-3,
    .col-4,
    .col-6,
    .col-8,
    .col-12 {
        grid-column: auto;
    }

    .field-group label,
    .details-form input,
    .details-form select,
    .details-form textarea,
    .farmer-code-box {
        font-size: 16px;
    }

    .product-card {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .product-field,
    .product-field:nth-child(5),
    .product-field:nth-child(6),
    .product-field:nth-child(7),
    .product-geotag-field {
        grid-column: auto;
    }

    .documents-section {
        grid-column: auto;
    }

    .product-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .add-product-btn,
    .remove-product-btn {
        width: 100%;
        justify-content: center;
    }

    .document-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .document-row select,
    .document-row input[type="file"],
    .document-remove-btn {
        border-radius: 7px;
    }

    .form-actions {
        flex-direction: column;
        gap: 10px;
    }

    .save-farmer-btn,
    .reset-form-btn {
        width: 100%;
        min-width: 0;
    }

    .admin-toolbar,
    .admin-search {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-search {
        width: 100%;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .document-grid {
        grid-template-columns: 1fr;
    }

    .admin-detail-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 420px) {
    .auth-page {
        padding: 16px 10px;
    }

    .auth-card {
        padding: 22px 14px 20px;
        border-radius: 8px;
    }

    .dashboard-page {
        padding: 12px 8px 22px;
    }

    .dashboard-title h1 {
        font-size: 23px;
    }

    .dashboard-panel {
        padding: 16px 10px;
    }

    .section-title-row h2 {
        font-size: 16px;
    }

    .details-form {
        gap: 13px;
    }

    .geotag-row,
    .location-file-row {
        flex-wrap: nowrap;
    }

    .geo-btn,
    .delete-file-btn,
    .add-file-btn {
        width: 36px;
        min-width: 36px;
    }

    .admin-table {
        min-width: 820px;
    }

    .admin-table th,
    .admin-table td {
        padding: 10px;
        font-size: 13px;
    }

    .admin-detail-head {
        padding: 12px;
    }

    .admin-detail-head h2 {
        font-size: 21px;
    }
}
