
:root {
    --inoia-green: #1a472a;
    --inoia-light: #2d5a3f;
    --inoia-accent: #4ade80;
    --tech-gray: #f5f5f4;
    --alert-red: #dc2626;
    --warning-amber: #f59e0b;
    --text-main: #1f2937;
    --text-soft: #64748b;
    --border: #e5e7eb;
    --panel: #ffffff;
    --shadow: 0 10px 40px rgba(26, 71, 42, 0.10);
    --radius-xl: 18px;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--tech-gray); }
body {
    margin: 0;
    color: var(--text-main);
    background: var(--tech-gray);
    min-height: 100vh;
    overflow-x: hidden;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar {
    width: 18rem;
    height: 100dvh;
    min-height: 0;
    background: #fff;
    border-inline-end: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.10);
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.sidebar-header {
    flex: 0 0 auto;
    padding: 1.5rem;
    color: #fff;
    background: linear-gradient(135deg, var(--inoia-green), var(--inoia-light));
}
.brand-block, .brand-line, .profile-chip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.brand-icon, .brand-mark {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.8rem;
    display: block;
    background: rgba(255,255,255,.92);
    object-fit: contain;
    padding: .18rem;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .12);
}
.brand-mark {
    width: 2.35rem;
    height: 2.35rem;
    background: #fff;
}
.brand-logo, .brand-logo-small {
    object-fit: contain;
}
.sidebar h1 { margin: 0; font-size: 1.25rem; }
.sidebar-header p { margin: .45rem 0 0; color: rgba(255,255,255,.80); font-size: .82rem; }
#app-version-label { margin: .1rem 0 0; color: var(--inoia-accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; }
.status-pill {
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .7rem;
    background: rgba(255,255,255,.12);
    border-radius: .65rem;
    font-size: .75rem;
}
.status-dot {
    width: .55rem;
    height: .55rem;
    border-radius: 50%;
    background: var(--inoia-accent);
    box-shadow: 0 0 0 4px rgba(74, 222, 128, .14);
}
.sidebar-nav, .mobile-nav {
    display: grid;
    gap: .45rem;
    padding: 1rem;
}
.sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}
.sidebar-nav::-webkit-scrollbar,
.mobile-nav::-webkit-scrollbar {
    width: .45rem;
}
.sidebar-nav::-webkit-scrollbar-thumb,
.mobile-nav::-webkit-scrollbar-thumb {
    background: rgba(26, 71, 42, .28);
    border-radius: 999px;
}
.sidebar-nav::-webkit-scrollbar-track,
.mobile-nav::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, .04);
}
.nav-button {
    border: 0;
    background: transparent;
    color: #4b5563;
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    text-align: start;
    padding: .95rem 1rem;
    border-radius: .85rem;
    font-weight: 650;
    transition: background .2s, color .2s, transform .2s;
}
.nav-button:hover { background: rgba(74, 222, 128, .10); transform: translateX(3px); }
.nav-button.active { background: var(--inoia-green); color: #fff; }
.nav-icon { width: 1.35rem; text-align: center; }
.sidebar-footer {
    flex: 0 0 auto;
    margin-top: 0;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    background: #f8fafc;
    color: #475569;
}
.avatar {
    width: 2.55rem;
    height: 2.55rem;
    border-radius: 50%;
    background: var(--inoia-green);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: .85rem;
    font-weight: 800;
}
.profile-chip strong { display: block; font-size: .86rem; color: #111827; }
.profile-chip span { display: block; font-size: .75rem; color: #64748b; }
.sidebar-footer p { font-size: .75rem; margin: .8rem 0 0; color: #94a3b8; }

.mobile-header {
    display: none;
    position: sticky;
    top: 0;
    z-index: 45;
    background: var(--inoia-green);
    color: #fff;
    padding: .9rem 1rem;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 30px rgba(15, 23, 42, .18);
}
.brand-title { font-size: 1.05rem; font-weight: 800; }
.icon-button {
    border: 0;
    background: rgba(255,255,255,.08);
    border-radius: .7rem;
    padding: .65rem;
    display: grid;
    gap: .25rem;
}
.icon-button span {
    display: block;
    width: 1.35rem;
    height: 2px;
    background: #fff;
}
.mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    z-index: 70;
}
.mobile-menu-panel {
    width: min(85vw, 21rem);
    height: 100dvh;
    min-height: 0;
    background: #fff;
    padding: 1rem;
    box-shadow: 0 20px 80px rgba(15, 23, 42, .25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.mobile-menu-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem;
    color: var(--inoia-green);
    font-size: 1.2rem;
}
.mobile-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-block: .75rem;
}
html[dir="rtl"] .mobile-menu-panel {
    margin-inline-start: auto;
}

.plain-button {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--inoia-green);
    padding: .45rem .7rem;
    border-radius: .6rem;
}
.language-switcher {
    position: fixed;
    inset-block-start: 1rem;
    inset-inline-end: 1rem;
    z-index: 60;
    background: rgba(255,255,255,.96);
    border: 1px solid var(--border);
    border-radius: .8rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .75rem;
}
.language-switcher label { font-size: .75rem; color: var(--inoia-green); font-weight: 800; }
.language-switcher select {
    border: 1px solid #d1d5db;
    border-radius: .55rem;
    background: #fff;
    color: var(--inoia-green);
    padding: .35rem .5rem;
    font-weight: 800;
}

.main-content {
    margin-inline-start: 18rem;
    width: calc(100% - 18rem);
    min-height: 100vh;
    padding: 2rem;
}
.module-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding-bottom: 4rem;
}
.module-title {
    margin-bottom: 1.5rem;
}
.module-title h2 {
    color: var(--inoia-green);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin: 0 0 .35rem;
}
.module-title p { margin: 0; color: #64748b; }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.grid-wide { grid-template-columns: minmax(18rem, 24rem) minmax(0, 1fr); align-items: start; }

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    padding: 1.25rem;
}
.panel h3 { margin: 0 0 1rem; color: #111827; }
.panel-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: start;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: 1rem;
}
.panel-title-row h3 { margin: 0; color: var(--inoia-green); }
.text-soft { color: var(--text-soft); }
.small { font-size: .82rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: .25rem .6rem;
    font-size: .75rem;
    font-weight: 800;
    background: #ecfdf5;
    color: #166534;
}
.badge.blue { background: #eff6ff; color: #1d4ed8; }
.badge.amber { background: #fffbeb; color: #92400e; }
.badge.red { background: #fef2f2; color: #b91c1c; }

.form-grid { display: grid; gap: .9rem; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
label { color: #374151; font-weight: 650; font-size: .9rem; }
input, select, textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: .75rem;
    background: #fff;
    padding: .78rem .9rem;
    color: #111827;
}
input[type="range"] { padding: 0; accent-color: var(--inoia-green); }
.input-help { font-size: .75rem; color: #64748b; margin-top: .35rem; }

.action-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.primary-button, .secondary-button, .danger-button, .yellow-button {
    border: 0;
    border-radius: .8rem;
    padding: .8rem 1rem;
    font-weight: 800;
    transition: transform .2s, background .2s;
}
.primary-button { background: var(--inoia-green); color: #fff; }
.primary-button:hover { background: var(--inoia-light); }
.secondary-button { background: #fff; color: var(--inoia-green); border: 1px solid var(--inoia-green); }
.danger-button { background: var(--alert-red); color: #fff; }
.yellow-button {
    background: var(--warning-amber);
    color: #422006;
    border: 1px solid #d97706;
    box-shadow: 0 10px 22px rgba(245, 158, 11, .18);
}
.yellow-button:hover:not(:disabled) { background: #fbbf24; }
.yellow-button:disabled {
    opacity: .55;
    cursor: not-allowed;
    box-shadow: none;
}
.primary-button:active, .secondary-button:active, .danger-button:active { transform: translateY(1px); }

.species-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
    gap: 1.25rem;
}
.species-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: #fff;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.species-card-header {
    color: #fff;
    padding: 1.15rem;
    background: linear-gradient(135deg, var(--inoia-green), var(--inoia-light));
}
.species-card-header h3 { margin: 0; color: #fff; }
.species-card-header p { margin: .25rem 0 0; color: rgba(255,255,255,.85); font-style: italic; }
.species-card-body { padding: 1rem; }
.kpi-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; margin: .75rem 0 1rem; }
.kpi {
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: .8rem;
    padding: .6rem;
}
.kpi span { display: block; color: #64748b; font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; }
.kpi strong { display: block; margin-top: .2rem; color: var(--inoia-green); font-size: .82rem; }
.bbch-scale { display: flex; flex-wrap: wrap; gap: .25rem; }
.bbch-button {
    border: 0;
    border-radius: .45rem;
    min-width: 2rem;
    height: 2rem;
    padding: 0 .35rem;
    color: #fff;
    font-size: .72rem;
    font-weight: 900;
}
.bbch-button.active { outline: 3px solid var(--inoia-green); outline-offset: 2px; }
.detail-panel {
    margin-top: 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: #fff;
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.molecule-list, .saved-list, .history-list { display: grid; gap: .75rem; max-height: 28rem; overflow: auto; padding-inline-end: .2rem; }
.molecule-card, .list-card, .recommendation-card {
    border: 1px solid var(--border);
    border-inline-start: 4px solid var(--inoia-green);
    border-radius: .95rem;
    padding: .9rem;
    background: #fff;
}
.molecule-card.warning { border-inline-start-color: var(--warning-amber); }
.molecule-card.danger { border-inline-start-color: var(--alert-red); }
.molecule-card h4, .list-card h4, .recommendation-card h4 { margin: 0 0 .35rem; color: #111827; }
.card-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .55rem; }
.alert-box, .info-box, .warning-box, .success-box {
    border-radius: .95rem;
    padding: 1rem;
    border: 1px solid;
    margin-top: .75rem;
}
.alert-box { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.warning-box { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.info-box { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.success-box { background: #ecfdf5; border-color: #bbf7d0; color: #14532d; }

.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .75rem; }
.result-kpi {
    border-radius: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--inoia-green), var(--inoia-light));
    color: #fff;
}
.result-kpi span { display: block; color: rgba(255,255,255,.80); font-size: .75rem; }
.result-kpi strong { display: block; margin-top: .25rem; font-size: 1.25rem; }

.radar-wrap {
    min-height: 20rem;
    display: grid;
    place-items: center;
}
.radar-svg {
    width: min(100%, 24rem);
    height: auto;
}
.factor-bar {
    display: grid;
    gap: .35rem;
}
.factor-line {
    height: .55rem;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}
.factor-fill {
    height: 100%;
    background: var(--inoia-green);
    border-radius: inherit;
}
.report-preview {
    margin-top: 1.25rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
}
.report-page {
    max-width: 794px;
    margin: 1rem auto;
    background: #fff;
    color: #1f2937;
}
.report-cover {
    background: linear-gradient(135deg, var(--inoia-green), var(--inoia-light));
    color: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
}
.report-cover h1 { margin: 0 0 .5rem; }
.report-section {
    border: 1px solid var(--border);
    border-radius: .85rem;
    padding: 1rem;
    margin-top: 1rem;
}
.report-section h2 {
    color: var(--inoia-green);
    margin: 0 0 .75rem;
    font-size: 1.05rem;
}
.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .86rem;
}
.report-table th, .report-table td {
    text-align: start;
    padding: .55rem;
    border-top: 1px solid var(--border);
}
.report-table th { background: #f8fafc; color: #334155; }

.toast-zone {
    position: fixed;
    inset-block-end: 1rem;
    inset-inline-end: 1rem;
    display: grid;
    gap: .5rem;
    z-index: 90;
}
.toast {
    background: #111827;
    color: #fff;
    border-radius: .8rem;
    padding: .75rem .9rem;
    box-shadow: 0 15px 50px rgba(15, 23, 42, .25);
    max-width: 22rem;
}

html[dir="rtl"] body { direction: rtl; }
html[dir="rtl"] .nav-button:hover { transform: translateX(-3px); }
html[dir="rtl"] input[type="number"],
html[dir="rtl"] input[type="date"],
html[dir="rtl"] .mono { direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] input, html[dir="rtl"] textarea, html[dir="rtl"] select { text-align: right; }
html[dir="rtl"] input[type="number"], html[dir="rtl"] input[type="date"] { text-align: left; }

@media (max-width: 1024px) {
    .mobile-header { display: flex; }
    .sidebar { display: none; }
    .main-content { margin-inline-start: 0; width: 100%; padding: 1rem; }
    .language-switcher { inset-block-start: 4.7rem; }
    .grid-wide, .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .form-row, .kpi-row { grid-template-columns: 1fr; }
    .language-switcher label { display: none; }
}
@media print {
    .no-print, .sidebar, .mobile-header, .language-switcher, .toast-zone { display: none !important; }
    body { background: #fff; }
    .app-shell, .main-content, .module-shell { display: block; margin: 0; width: 100%; padding: 0; max-width: none; }
    .module-shell > *:not(.print-target) { display: none !important; }
    .print-target { display: block !important; box-shadow: none; border: 0; padding: 0; }
    .report-preview { border: 0; padding: 0; }
    .report-page { max-width: none; margin: 0; }
}


.panel-subsection {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: .9rem;
    background: #f8fafc;
}
.panel-subsection h4 { margin: 0 0 .65rem; color: var(--inoia-green); }
.technical-library h4 { margin: 0 0 1rem; color: var(--inoia-green); }

.guide-layout {
    display: grid;
    grid-template-columns: minmax(14rem, .8fr) minmax(0, 2.4fr);
    gap: 1.5rem;
}
.guide-sidebar {
    position: sticky;
    top: 1rem;
    align-self: start;
}
.guide-link {
    display: block;
    padding: .8rem .9rem;
    border-radius: .75rem;
    background: #f8fafc;
    color: #475569;
    text-decoration: none;
    font-weight: 650;
    margin-bottom: .5rem;
}
.guide-link:hover { background: #ecfdf5; color: var(--inoia-green); }
.guide-step {
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: #f8fafc;
    padding: 1rem;
}
.guide-step-number {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--inoia-green);
    color: #fff;
    font-weight: 800;
    margin-bottom: .5rem;
}

.report-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(15, 23, 42, .58);
    padding: 1.25rem;
    overflow: auto;
}
.report-modal-panel {
    width: min(980px, 100%);
    margin: 0 auto;
    background: #fff;
    border-radius: 1.1rem;
    box-shadow: 0 25px 80px rgba(15, 23, 42, .35);
    overflow: hidden;
}
.report-modal-bar {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}
.report-modal .report-preview { padding: 1.25rem; }
.report-cover .uppercase { text-transform: uppercase; letter-spacing: .08em; opacity: .82; }

@media (max-width: 900px) {
    .guide-layout { grid-template-columns: 1fr; }
    .guide-sidebar { position: static; }
    .report-modal { padding: .5rem; }
    .report-modal-bar { align-items: stretch; flex-direction: column; }
}

@media print {
    body.printing-report > *:not(.report-modal) {
        display: none !important;
    }
    body.printing-report .report-modal {
        position: static !important;
        inset: auto !important;
        padding: 0 !important;
        overflow: visible !important;
        background: #fff !important;
    }
    body.printing-report .report-modal-panel {
        width: 100% !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
    body.printing-report .report-modal-bar,
    body.printing-report .no-print {
        display: none !important;
    }
    body.printing-report .report-modal .report-preview {
        padding: 0 !important;
    }
    body.printing-report .report-page {
        width: 100% !important;
        max-width: none !important;
        box-shadow: none !important;
    }
}


/* V3.2 enriched guide and report */
.quick-action-card {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #f8fafc;
    padding: 1rem;
    text-align: left;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.quick-action-card:hover {
    transform: translateY(-2px);
    border-color: #1a472a;
    box-shadow: 0 12px 30px rgba(26, 71, 42, .10);
}
.quick-action-card strong {
    display: block;
    color: #1a472a;
    margin-bottom: .35rem;
}
.quick-action-card span {
    display: block;
    color: #64748b;
    font-size: .86rem;
}
.guide-checks {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    border-radius: 14px;
}
.guide-checks h4 {
    color: #1d4ed8;
    margin: 0 0 .5rem;
}
.guide-checks ul {
    margin: 0;
    padding-left: 1.15rem;
}
html[dir="rtl"] .guide-checks ul {
    padding-left: 0;
    padding-right: 1.15rem;
}
.signature-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1rem;
    align-items: end;
}
.signature-box {
    text-align: right;
}
.signature-box span {
    display: block;
    color: #64748b;
    font-size: .78rem;
}
.signature-line {
    min-height: 58px;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: .78rem;
    margin-bottom: .5rem;
}
html[dir="rtl"] .signature-box {
    text-align: left;
}
@media (max-width: 760px) {
    .signature-grid {
        grid-template-columns: 1fr;
    }
}


/* V3.3 safe supply planning */
.checkbox-card {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    border: 1px solid #dbeafe;
    border-radius: .95rem;
    background: #f8fafc;
    padding: .9rem;
}
.checkbox-card input {
    width: auto;
    margin-top: .15rem;
    accent-color: var(--inoia-green);
}
.checkbox-card span {
    color: #334155;
    font-weight: 650;
    line-height: 1.45;
}
.procurement-form .warning-box,
.procurement-form .success-box {
    margin-top: 0;
}


.estimator-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.estimator-kpi {
    border: 1px solid var(--border);
    border-radius: .9rem;
    padding: .9rem;
    background: #f8fafc;
}
.estimator-kpi span {
    display: block;
    color: var(--text-soft);
    font-size: .78rem;
    margin-bottom: .25rem;
}
.estimator-kpi strong {
    color: var(--inoia-green);
    font-size: 1.25rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.report-cover-brand {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-bottom: .85rem;
}
.report-logo {
    width: 72px;
    height: 54px;
    object-fit: contain;
    border-radius: .75rem;
    background: rgba(255,255,255,.96);
    padding: .25rem;
}
@media (max-width: 768px) {
    .estimator-grid { grid-template-columns: 1fr; }
}



.simulation-result {
    border: 1px solid #fcd34d;
    background: #fffbeb;
    color: #713f12;
    border-radius: 1rem;
    padding: 1rem;
    margin-top: .75rem;
}
.simulation-result h4 {
    margin: 0 0 .75rem;
    color: #713f12;
}


/* V3.6 GPS orchard mapping */
.gps-panel .form-grid label {
    min-width: 0;
}
.warning-button {
    border: 0;
    border-radius: .85rem;
    padding: .8rem 1rem;
    background: var(--warning-amber);
    color: #422006;
    font-weight: 800;
    box-shadow: 0 8px 22px rgba(245, 158, 11, .22);
}
.warning-button:hover { filter: brightness(.98); transform: translateY(-1px); }
.warning-button:disabled { opacity: .65; cursor: wait; }
.gps-actions { align-items: stretch; flex-wrap: wrap; }
.gps-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, .85fr);
    gap: 1rem;
    align-items: start;
}
.gps-map-card {
    border-radius: 1rem;
    background: linear-gradient(135deg, #ecfdf5, #f8fafc);
    border: 1px solid var(--border);
    padding: .75rem;
}
.gps-map-svg {
    display: block;
    width: 100%;
    min-height: 320px;
    border-radius: 1rem;
}
.map-bg { fill: #f8fafc; stroke: #bbf7d0; stroke-width: 2; }
.map-grid-line { stroke: #d1fae5; stroke-width: 1; }
.map-polygon { fill: rgba(74, 222, 128, .24); stroke: var(--inoia-green); stroke-width: 3; }
.map-line { fill: none; stroke: var(--inoia-green); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.map-point { fill: var(--inoia-green); stroke: #fff; stroke-width: 3; }
.map-center { fill: var(--warning-amber); stroke: #fff; stroke-width: 3; }
.map-center-pulse { fill: rgba(245, 158, 11, .25); stroke: rgba(245, 158, 11, .5); stroke-width: 2; }
.map-label { fill: #14532d; font-size: 14px; font-weight: 800; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.map-center-label { fill: #92400e; }
.map-coords { fill: #475569; font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.gps-info-card {
    display: grid;
    gap: .85rem;
}
.data-table .tiny-button {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: .6rem;
    padding: .35rem .55rem;
    color: var(--alert-red);
    font-size: .8rem;
    font-weight: 700;
}
.mono {
    direction: ltr;
    unicode-bidi: isolate;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (max-width: 900px) {
    .gps-layout { grid-template-columns: 1fr; }
}
@media print {
    .gps-actions { display: none !important; }
}


/* V3.7 Internet-assisted orchard mapping */
.internet-leaflet-map {
    min-height: 460px;
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #eef2f0;
    box-shadow: inset 0 0 0 1px rgba(26, 71, 42, 0.06);
}
.map-online-status {
    margin-bottom: 0.75rem;
}
.map-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: stretch;
    margin: 1rem 0 0.75rem;
}
.map-search-row input {
    min-height: 44px;
}
.map-search-results {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.search-result-button {
    text-align: left;
    border: 1px solid var(--border);
    background: #ffffff;
    border-radius: 12px;
    padding: 0.75rem;
    cursor: pointer;
    display: grid;
    gap: 0.35rem;
    color: var(--text-main);
}
.search-result-button:hover {
    border-color: var(--inoia-green);
    background: #f0fdf4;
}
html[dir="rtl"] .search-result-button {
    text-align: right;
}
.text-danger {
    color: var(--alert-red);
}
.leaflet-container {
    font-family: inherit;
}
@media (max-width: 700px) {
    .map-search-row {
        grid-template-columns: 1fr;
    }
    .internet-leaflet-map {
        min-height: 360px;
    }
}


/* V3.8 — Calendrier annuel BBCH & fenêtres d'intervention */
.calendar-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    align-items: end;
}
.calendar-notice {
    margin-top: 1rem;
    border-inline-start: 4px solid var(--warning-amber);
}
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: 1rem;
}
.calendar-year-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(180px, 1fr));
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: .5rem;
}
.calendar-month-card {
    min-height: 14rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: .85rem;
}
.calendar-month-card.current-month {
    outline: 3px solid rgba(245, 158, 11, .35);
    background: #fffbeb;
}
.calendar-month-card h3 {
    margin: 0 0 .75rem;
    color: var(--inoia-green);
    font-size: 1rem;
}
.calendar-window-card {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: .85rem;
    padding: .8rem;
    margin-bottom: .65rem;
    box-shadow: 0 4px 18px rgba(15, 23, 42, .06);
}
.calendar-window-card.compact {
    padding: .65rem;
}
.calendar-window-card.risk-low {
    border-inline-start: 4px solid #22c55e;
}
.calendar-window-card.risk-medium {
    border-inline-start: 4px solid #f59e0b;
}
.calendar-window-card.risk-high {
    border-inline-start: 4px solid #dc2626;
}
.calendar-window-head {
    display: flex;
    justify-content: space-between;
    gap: .6rem;
    align-items: flex-start;
    margin-bottom: .55rem;
}
.bbch-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(26, 71, 42, .08);
    color: var(--inoia-green);
    padding: .2rem .5rem;
    font-size: .72rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    white-space: nowrap;
}
.calendar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin: .35rem 0;
}
.calendar-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .28rem .55rem;
    font-size: .72rem;
    font-weight: 700;
    background: #e5e7eb;
    color: #374151;
}
.tag-surveillance { background: #dbeafe; color: #1d4ed8; }
.tag-fongicide { background: #e0e7ff; color: #3730a3; }
.tag-insecticide { background: #fee2e2; color: #b91c1c; }
.tag-acaricide { background: #ffedd5; color: #c2410c; }
.tag-herbicide { background: #dcfce7; color: #15803d; }
.tag-fertilisant { background: #d1fae5; color: #047857; }
.tag-irrigation { background: #cffafe; color: #0e7490; }
.tag-biostimulant { background: #f3e8ff; color: #7e22ce; }
.tag-prophylaxie { background: #f1f5f9; color: #475569; }
.tag-dar { background: #fef3c7; color: #b45309; }
.tag-recolte { background: #ecfccb; color: #4d7c0f; }
.tag-taille { background: #ede9fe; color: #5b21b6; }
.tag-pollinisation { background: #fce7f3; color: #be185d; }
.calendar-window-foot {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    align-items: center;
    margin-top: .6rem;
    color: var(--text-soft);
    font-size: .78rem;
}
.small-button {
    padding: .35rem .6rem;
    font-size: .78rem;
}
.calendar-timeline {
    position: relative;
    display: grid;
    gap: 1rem;
}
.calendar-timeline::before {
    content: '';
    position: absolute;
    inset-block: .5rem;
    inset-inline-start: 1rem;
    width: 3px;
    background: linear-gradient(var(--inoia-green), var(--inoia-accent));
    border-radius: 999px;
}
.calendar-timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 2.2rem 1fr;
    gap: .75rem;
}
.timeline-dot {
    width: 1.15rem;
    height: 1.15rem;
    margin: .55rem auto 0;
    border-radius: 50%;
    background: var(--inoia-green);
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px rgba(26, 71, 42, .12);
    z-index: 1;
}
.timeline-content-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1rem;
}
@media (max-width: 900px) {
    .calendar-year-grid {
        grid-template-columns: repeat(12, minmax(240px, 1fr));
    }
}


/* V3.9 — Greffe & traitements */
.precision-panel {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255,255,255,.96), rgba(236,253,245,.92)),
        radial-gradient(circle at top right, rgba(74,222,128,.22), transparent 36rem);
}
.precision-panel::before,
.graft-scheme-panel::before,
.treatment-decision-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, rgba(255,255,255,.38), rgba(255,255,255,0) 34%, rgba(255,255,255,.22) 62%, rgba(255,255,255,0));
    mix-blend-mode: screen;
}
.panel-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}
.metric-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .45rem .7rem;
    font-size: .75rem;
    font-weight: 800;
    color: #064e3b;
    background: linear-gradient(135deg, #bbf7d0, #a7f3d0);
    box-shadow: inset 0 1px rgba(255,255,255,.75), 0 10px 20px rgba(16,185,129,.18);
}
.checkbox-line {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-height: 2.8rem;
}
.checkbox-line input {
    width: 1.05rem;
    height: 1.05rem;
}
.graft-tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: .85rem;
}
.graft-tech-card {
    border: 1px solid rgba(16,185,129,.22);
    border-radius: 1rem;
    background: linear-gradient(135deg, #ffffff, #ecfeff);
    color: #0f172a;
    padding: 1rem;
    text-align: start;
    display: grid;
    gap: .25rem;
    box-shadow: 0 14px 32px rgba(15,23,42,.08);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.graft-tech-card:hover {
    transform: translateY(-2px);
    border-color: rgba(14,165,233,.45);
    box-shadow: 0 20px 40px rgba(14,165,233,.16);
}
.graft-tech-card.active {
    color: #fff;
    background: linear-gradient(135deg, #059669, #0ea5e9 52%, #7c3aed);
}
.graft-tech-card span:last-child { font-size: .8rem; opacity: .82; }
.graft-tech-icon {
    width: 2.55rem;
    height: 2.55rem;
    display: grid;
    place-items: center;
    border-radius: .85rem;
    background: rgba(255,255,255,.44);
    box-shadow: inset 0 1px rgba(255,255,255,.72);
}
.graft-scheme-panel,
.treatment-decision-card {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(255,255,255,.96), rgba(240,249,255,.9)),
        radial-gradient(circle at top left, rgba(14,165,233,.2), transparent 28rem);
}
.graft-scheme {
    margin: 1rem 0 0;
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid rgba(14,165,233,.18);
    background: #f8fafc;
    box-shadow: 0 18px 42px rgba(15,23,42,.12);
}
.graft-scheme img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 22rem;
    object-fit: contain;
}
.graft-scheme figcaption {
    padding: .75rem 1rem;
    background: linear-gradient(135deg, rgba(14,165,233,.08), rgba(74,222,128,.10));
    color: var(--text-soft);
    font-size: .82rem;
}
.graft-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: .6rem;
    margin-top: .9rem;
}
.graft-legend div {
    display: flex;
    gap: .55rem;
    align-items: center;
    padding: .65rem .75rem;
    border-radius: .85rem;
    background: linear-gradient(135deg, #f8fafc, #ecfeff);
    border: 1px solid rgba(14,165,233,.14);
    font-size: .82rem;
    color: #334155;
}
.graft-legend span,
.timeline-item span {
    width: 1.75rem;
    height: 1.75rem;
    min-width: 1.75rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #059669, #0ea5e9);
    font-size: .85rem;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(14,165,233,.25);
}
.clean-list {
    margin: .7rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: .55rem;
}
.clean-list li {
    position: relative;
    padding: .7rem .8rem .7rem 2.1rem;
    border-radius: .85rem;
    background: #f8fafc;
    border: 1px solid rgba(148,163,184,.16);
}
[dir="rtl"] .clean-list li {
    padding: .7rem 2.1rem .7rem .8rem;
}
.clean-list li::before {
    content: "✓";
    position: absolute;
    inset-inline-start: .75rem;
    top: .72rem;
    color: #059669;
    font-weight: 900;
}
.timeline-list {
    display: grid;
    gap: .75rem;
}
.timeline-item {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    padding: .85rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 1px solid rgba(148,163,184,.18);
}
.timeline-item p {
    margin: .18rem 0 0;
    color: #334155;
}
.treatment-decision-card {
    display: grid;
    gap: 1rem;
}
.treatment-icon {
    width: 4.25rem;
    height: 4.25rem;
    display: grid;
    place-items: center;
    border-radius: 1.2rem;
    font-size: 2.1rem;
    background: linear-gradient(135deg, #dcfce7, #bae6fd);
    box-shadow: inset 0 1px rgba(255,255,255,.8), 0 16px 36px rgba(14,165,233,.16);
}
@media print {
    .graft-tech-grid,
    .graft-legend,
    .timeline-list {
        break-inside: avoid;
    }
    .graft-scheme {
        box-shadow: none;
        max-width: 16cm;
    }
}



/* V3.10 — correction scroll menu principal et audit UX */
@media (max-height: 760px) and (min-width: 1025px) {
    .sidebar-header {
        padding: 1rem 1.25rem;
    }
    .status-pill {
        margin-top: .65rem;
        padding: .45rem .6rem;
    }
    .sidebar-footer {
        padding: .85rem 1rem;
    }
    .nav-button {
        padding-block: .72rem;
    }
}
