:root{--green-50: #f0fdf4;--green-100: #dcfce7;--green-200: #bbf7d0;--green-600: #16a34a;--green-700: #15803d;--green-800: #166534;--gray-50: #f6f7f6;--gray-100: #eef0ee;--gray-200: #e0e4e0;--gray-500: #6b756c;--gray-700: #36403a;--gray-900: #1a211c;--red-50: #fef2f2;--red-600: #dc2626;--red-700: #b91c1c;--radius: 12px;--shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 2px 8px rgb(0 0 0 / 4%);font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;color:var(--gray-900);line-height:1.5}*{box-sizing:border-box}body{margin:0;background:var(--gray-50);font-size:15px}button,input,select{font:inherit;color:inherit}h1,h2,p{margin:0}.layout{min-height:100vh;display:flex}.sidebar{width:250px;flex-shrink:0;background:#fff;border-right:1px solid var(--gray-200);padding:20px 14px;position:sticky;top:0;height:100vh}.brand{display:flex;gap:10px;align-items:center;padding:4px 8px 22px}.brand-logo{font-size:26px;background:var(--green-100);border-radius:10px;width:42px;height:42px;display:grid;place-items:center}.brand-name{font-weight:700;color:var(--green-800)}.brand-sub{font-size:12px;color:var(--gray-500)}nav{display:flex;flex-direction:column;gap:4px}.nav-item{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:11px 12px;border:0;border-radius:10px;background:transparent;cursor:pointer;color:var(--gray-700)}.nav-item:hover{background:var(--gray-100)}.nav-item.active{background:var(--green-100);color:var(--green-800);font-weight:600}.content{flex:1;min-width:0;padding:32px clamp(16px,4vw,40px) 48px;max-width:1100px}.topbar,.backdrop{display:none}.page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;margin-bottom:18px}.page-title{font-size:24px;font-weight:700;color:var(--gray-900)}.page-sub{color:var(--gray-500);margin:2px 0 20px}.page-head .page-sub{margin-bottom:0}.card{background:#fff;border:1px solid var(--gray-200);border-radius:var(--radius);box-shadow:var(--shadow);padding:20px}.card-title{font-size:16px;font-weight:600;margin-bottom:14px}.results-title{margin-bottom:12px}.plan-grid{display:grid;grid-template-columns:minmax(280px,380px) 1fr;gap:24px;align-items:start}.field{margin-bottom:16px}.field label{display:block;font-weight:600;font-size:14px;margin-bottom:6px;color:var(--gray-700)}input,select{width:100%;padding:10px 12px;border:1px solid var(--gray-200);border-radius:9px;background:#fff;min-height:42px}input:focus,select:focus,.btn:focus-visible,.nav-item:focus-visible,.icon-btn:focus-visible{outline:2px solid var(--green-600);outline-offset:1px;border-color:var(--green-600)}input[aria-invalid=true]{border-color:var(--red-600)}.field-error{color:var(--red-700);font-size:13px;margin-top:5px}.crop-info{display:flex;flex-wrap:wrap;gap:8px 16px;margin-top:8px;padding:9px 12px;background:var(--green-50);border-radius:9px;font-size:14px;color:var(--green-800)}.stats{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}.stat{background:#fff;border:1px solid var(--gray-200);border-radius:var(--radius);padding:18px;box-shadow:var(--shadow)}.stat.ready{background:linear-gradient(145deg,var(--green-700),var(--green-600));border-color:transparent;color:#fff}.stat-label{font-size:13px;opacity:.85}.stat-value{font-size:34px;font-weight:700;line-height:1.2;margin:6px 0 2px;font-variant-numeric:tabular-nums}.stat-suffix{font-size:18px;font-weight:600;white-space:nowrap}.stat-unit{font-size:13px;opacity:.8}.hint{margin-top:14px;color:var(--gray-500)}.btn{border:1px solid var(--gray-200);background:#fff;padding:9px 16px;border-radius:9px;cursor:pointer;min-height:40px}.btn:hover:not(:disabled){background:var(--gray-100)}.btn:disabled{opacity:.6;cursor:not-allowed}.btn.primary{background:var(--green-700);border-color:var(--green-700);color:#fff;font-weight:600}.btn.primary:hover:not(:disabled){background:var(--green-800)}.btn.small{padding:5px 12px;min-height:32px;font-size:14px}.btn.danger{color:var(--red-700);border-color:#fecaca}.btn.danger:hover:not(:disabled){background:var(--red-50)}.btn.danger.solid{background:var(--red-600);border-color:var(--red-600);color:#fff}.btn.danger.solid:hover:not(:disabled){background:var(--red-700)}.link{background:none;border:0;padding:0;color:inherit;text-decoration:underline;cursor:pointer}.icon-btn{background:none;border:0;font-size:22px;cursor:pointer;padding:6px 10px;border-radius:8px}.table-wrap{padding:0;overflow-x:auto}table{width:100%;border-collapse:collapse}th,td{padding:12px 16px;text-align:left;border-bottom:1px solid var(--gray-100);white-space:nowrap}th{background:var(--gray-50);font-size:13px;color:var(--gray-500);font-weight:600;position:sticky;top:0}tbody tr:hover{background:var(--green-50)}tbody tr:last-child td{border-bottom:0}.num{text-align:right;font-variant-numeric:tabular-nums}th.num:first-child,td.num:first-child{width:64px}.actions{text-align:right}.actions .btn+.btn{margin-left:6px}.empty{text-align:center;color:var(--gray-500);padding:28px}.modal-backdrop{position:fixed;inset:0;background:#0f191273;display:grid;place-items:center;padding:16px;z-index:50}.modal{background:#fff;border-radius:14px;padding:22px;width:100%;max-width:440px;box-shadow:0 10px 40px #00000040}.modal h2{font-size:18px;margin-bottom:14px}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.toasts{position:fixed;right:16px;bottom:16px;display:flex;flex-direction:column;gap:8px;z-index:60;max-width:calc(100vw - 32px)}.toast{padding:12px 16px;border-radius:10px;color:#fff;box-shadow:0 4px 16px #0003;animation:pop .2s ease-out}.toast.success{background:var(--green-700)}.toast.error{background:var(--red-600)}.alert.error{background:var(--red-50);color:var(--red-700);border:1px solid #fecaca;padding:10px 14px;border-radius:10px;margin-bottom:14px}@keyframes pop{0%{opacity:0;transform:translateY(8px)}}@media(prefers-reduced-motion:reduce){.toast{animation:none}}@media(max-width:900px){.plan-grid{grid-template-columns:1fr}}@media(max-width:760px){.layout{flex-direction:column}.topbar{display:flex;align-items:center;gap:8px;padding:8px 12px;background:#fff;border-bottom:1px solid var(--gray-200);position:sticky;top:0;z-index:30}.sidebar{position:fixed;z-index:45;left:0;top:0;height:100%;transform:translate(-100%);transition:transform .2s;box-shadow:4px 0 24px #00000026}.sidebar.open{transform:none}.backdrop{display:block;position:fixed;inset:0;background:#0f191266;z-index:40}.content{padding-top:20px}.stat-value{font-size:30px}th,td{padding:10px 12px}}@media(prefers-reduced-motion:reduce){.sidebar{transition:none}}.color-dot{display:inline-block;width:12px;height:12px;border-radius:50%;margin-right:8px;vertical-align:-1px;flex-shrink:0}.crop-info .color-dot{margin-right:0}.crop-info{align-items:center}.batch-card{margin-top:14px}.batch-title{margin-bottom:12px}.batch-note{color:var(--gray-500);font-size:13px}.plot-grid{display:grid;grid-template-columns:repeat(12,1fr);grid-template-rows:repeat(4,1fr);grid-auto-flow:column;gap:5px}.plot{display:flex;align-items:center;justify-content:center}.plot.used{border-style:solid;border-color:transparent}@media(max-width:760px){.plot-grid{grid-template-columns:repeat(8,1fr)}}.cselect{position:relative}.cselect-btn{width:100%;min-height:42px;display:flex;justify-content:space-between;align-items:center;gap:8px;padding:10px 12px;border:1px solid var(--gray-200);border-radius:9px;background:#fff;cursor:pointer;text-align:left}.cselect-btn.colored{color:#fff;font-weight:600}.cselect-btn:disabled{opacity:.6;cursor:not-allowed}.cselect-btn:focus-visible{outline:2px solid var(--green-600);outline-offset:1px}.cselect-list{position:absolute;z-index:20;left:0;right:0;top:calc(100% + 4px);max-height:340px;overflow-y:auto;margin:0;padding:6px;list-style:none;background:#fff;border:1px solid var(--gray-200);border-radius:10px;box-shadow:0 8px 28px #0000002e;display:grid;gap:4px}.cselect-opt{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 12px;border-radius:8px;color:#fff;cursor:pointer;font-weight:500}.cselect-opt small{opacity:.85;white-space:nowrap}.cselect-opt.active{outline:2px solid var(--gray-900);outline-offset:1px}
