
/* AgroTrag — simple management and beautiful read-only scan card */
.record-view { max-width:900px; margin:0 auto 50px; min-width:0; }
.record-toolbar { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:14px; }
.record-readonly { display:inline-flex; align-items:center; gap:5px; background:#e9f3eb; color:#35704a; border-radius:30px; padding:8px 12px; font-size:12px; font-weight:800; white-space:nowrap; }
.record-paper { overflow:hidden; border-radius:23px; box-shadow:0 15px 45px #183c2915; background:#fff; border:1px solid #d9e8d9; }
.record-banner { position:relative; padding:28px 34px 32px; color:white; background:linear-gradient(125deg,#143e2c 5%,#185b3a 70%,#298054 100%); overflow:hidden; }
.record-banner::after { content:'✺'; position:absolute; right:-20px; top:-50px; font-size:240px; color:#ffffff0b; line-height:1; pointer-events:none; }
.record-brand { display:flex; align-items:center; gap:9px; font-size:17px; font-weight:900; letter-spacing:-.4px; margin-bottom:30px; }
.record-brand img { width:31px; height:31px; object-fit:cover; border-radius:9px; background:#fff; }
.record-brand small { margin-left:auto; font-size:10px; color:#b9dbbc; letter-spacing:1.3px; font-weight:800; }
.record-category { display:inline-flex; background:#ffffff20; border:1px solid #ffffff35; border-radius:100px; padding:7px 12px; font-size:12px; font-weight:750; margin-bottom:12px; }
.record-banner h1 { color:white; font-size:clamp(25px,4.2vw,38px); margin:0 0 9px; line-height:1.15; letter-spacing:-1px; }
.record-banner p { margin:0; color:#d6ead7; font-size:14px; line-height:1.5; }
.record-divider { padding:0 7px; opacity:.65; }
.record-body { padding:28px 34px 32px; }
.record-highlight { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:-3px 0 30px; }
.record-highlight>span { background:#f0f7ed; border:1px solid #dbebd9; border-radius:15px; padding:18px 20px; color:#648270; font-size:12px; font-weight:700; display:flex; flex-direction:column; gap:10px; }
.record-highlight strong { color:#19482e; font-size:clamp(18px,2.8vw,25px); line-height:1.25; overflow-wrap:anywhere; }
.record-body h2 { font-size:17px; font-weight:850; margin:26px 0 14px; color:#244a33; }
.record-facts { margin:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 20px; }
.record-fact { display:flex; justify-content:space-between; gap:10px; padding:13px 0; border-bottom:1px solid #edf1e9; font-size:13px; min-width:0; }
.record-fact dt { color:#708479; flex-shrink:0; }
.record-fact dd { margin:0; text-align:right; font-weight:800; color:#254632; overflow-wrap:anywhere; min-width:0; }
.record-notes { background:#f7faf3; padding:14px 16px; border-radius:12px; border-left:3px solid #83b895; margin:18px 0; }
.record-notes strong { color:#315e41; font-size:13px; }
.record-notes p { margin:7px 0 0; color:#506557; font-size:13px; white-space:pre-wrap; overflow-wrap:anywhere; }
.record-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:25px 0; }
.record-summary>div { background:#f9faf7; border:1px solid #e9eee5; padding:16px 14px; border-radius:12px; min-width:0; }
.record-summary span { display:block; color:#718879; font-size:11px; line-height:1.3; }
.record-summary strong { display:block; margin-top:10px; color:#1b4a2d; font-size:19px; line-height:1.3; overflow-wrap:anywhere; }
.record-timeline { border-left:2px solid #cbe3cd; margin-left:8px; padding-left:21px; }
.record-event { position:relative; padding:2px 0 20px; min-width:0; }
.event-dot { position:absolute; width:12px; height:12px; border-radius:50%; background:#278c53; border:3px solid #e1f1e1; left:-28px; top:5px; box-sizing:content-box; }
.record-event small { display:block; color:#789080; font-size:12px; margin-bottom:6px; }
.record-event strong { display:block; color:#214931; font-size:14px; line-height:1.4; }
.record-event p { margin:4px 0; font-size:12px; color:#5a7763; }
.record-empty { font-size:13px; color:#708675; background:#fafcf8; border-radius:12px; padding:18px; }
.record-qr { display:flex; gap:20px; align-items:center; border-top:1px solid #e9f0e7; padding-top:24px; margin-top:28px; }
.record-qr img { width:116px; height:116px; flex-shrink:0; background:white; border:1px solid #e4eae0; padding:7px; border-radius:12px; }
.record-qr strong { display:block; font-size:14px; color:#29503a; }
.record-qr p { font-size:12px; color:#688070; line-height:1.5; margin:6px 0; }
.record-qr small { font-size:11px; color:#657c6c; font-weight:800; }
.record-bottom { display:flex; gap:10px; margin:17px 0; flex-wrap:wrap; }
.record-bottom .button { flex:1; min-height:52px; }
.manage-record { background:white; border:1px solid #e2eade; border-radius:13px; margin-top:15px; overflow:hidden; }
.manage-record summary { cursor:pointer; font-weight:800; color:#43634d; padding:15px; font-size:13px; }
.manage-record>p { margin:0; padding:0 15px; font-size:12px; color:#69806f; }
.manage-actions { display:flex; flex-wrap:wrap; gap:9px; padding:15px; }
.manage-actions .button { min-height:42px; }
.danger-link,.entity-danger { border:1px solid #f1d0cc; color:#a14a40!important; background:#fff8f7; border-radius:10px; font-weight:750; padding:9px 12px; min-height:38px; cursor:pointer; }
.danger-link:hover,.entity-danger:hover { background:#ffeded; }
.entity-controls { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:7px; padding:8px 12px; }
.entity-controls button { border:1px solid #dfeadf; border-radius:9px; color:#42634b; background:#f8fbf7; padding:9px 11px; min-height:40px; font-size:12px; font-weight:750; cursor:pointer; }
.entity-controls button.entity-danger { border-color:#f1d0cc; color:#a14a40; background:#fff8f7; }
.entity-controls button:hover { background:#ecf6ea; }
.plot-row { background:white; border:1px solid #e1ece0; border-radius:16px; overflow:hidden; min-width:0; }
.plot-row .plot-tile { border:0; border-radius:0; box-shadow:none; width:100%; }
.plot-row .entity-controls { border-top:1px solid #edf2ec; }
.manage-list { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; }
.manage-row { background:white; border:1px solid #e4eee1; border-radius:14px; display:flex; justify-content:space-between; align-items:center; gap:10px; padding:12px 13px; min-width:0; }
.manage-row-main { display:flex; align-items:center; gap:12px; min-width:0; }
.manage-row-main>div { min-width:0; }
.manage-row-main strong { display:block; overflow-wrap:anywhere; font-size:14px; color:#244e34; }
.manage-row-main small { display:block; margin-top:4px; color:#758577; font-size:12px; }
.manage-row-icon { flex-shrink:0; display:grid; place-items:center; border-radius:12px; width:43px; height:43px; background:#ebf5e9; font-size:22px; }
.manage-row>.entity-controls { flex-shrink:0; }
.delete-dialog { max-width:445px; text-align:center; }
.delete-dialog .delete-symbol { display:grid; place-items:center; width:65px; height:65px; background:#fff0ed; border-radius:18px; font-size:35px; margin:0 auto 14px; }
.delete-dialog h2 { font-size:23px; color:#353e34; margin-bottom:10px; }
.delete-dialog p { line-height:1.5; font-size:13px; color:#69796b; }
.delete-dialog .delete-target { color:#294634; font-weight:850; font-size:16px; }
.delete-dialog .actions { display:grid; grid-template-columns:1fr 1fr; margin-top:25px; }
.delete-dialog .actions .button { min-height:48px; padding:10px; }
@media(max-width:760px) {
 .record-view { margin:0 -2px 70px; }
 .record-banner { padding:22px 20px 26px; }
 .record-brand { margin-bottom:24px; }
 .record-brand small { font-size:9px; letter-spacing:.6px; }
 .record-body { padding:17px 16px 22px; }
 .record-paper { border-radius:19px; }
 .record-highlight { gap:8px; }
 .record-highlight>span { padding:13px 11px; }
 .record-highlight strong { font-size:19px; }
 .record-facts { grid-template-columns:minmax(0,1fr); }
 .record-fact { font-size:12px; }
 .record-summary { gap:7px; }
 .record-summary>div { padding:12px 9px; }
 .record-summary strong { font-size:15px; }
 .record-summary span { font-size:10px; }
 .record-qr { gap:10px; }
 .record-qr img { width:105px; height:105px; }
 .record-bottom { flex-direction:column; }
 .record-toolbar { margin-bottom:12px; }
 .record-toolbar .button { padding:10px; font-size:12px; }
 .manage-row { flex-wrap:wrap; }
 .manage-row>.entity-controls { width:100%; justify-content:flex-start; }
 .entity-controls button { min-height:44px; }
 .delete-dialog { border-radius:20px 20px 0 0; }
}
@media print {
 @page { size:A4; margin:10mm; }
 html,body { background:#fff!important; overflow:visible!important; }
 .sidebar,.topbar,.mobilebar,.global-add,.quick-sheet,.quick-backdrop,.record-toolbar,.record-bottom,.manage-record,.no-print,#toast,.pagehead,.offline { display:none!important; }
 .layout,.main,.content { display:block!important; width:100%!important; max-width:none!important; padding:0!important; margin:0!important; }
 .record-view { margin:0!important; width:100%!important; max-width:none!important; }
 .record-paper { border:0!important; border-radius:0!important; box-shadow:none!important; break-inside:avoid; }
 .record-banner { -webkit-print-color-adjust:exact; print-color-adjust:exact; padding:15mm 12mm 12mm; }
 .record-body { padding:8mm 12mm; }
 .record-qr img { width:35mm!important; height:35mm!important; }
 .record-event { break-inside:avoid; }
 .record-highlight,.record-summary { break-inside:avoid; }
}

/* Keep the posjed selector understandable without exposing an extra + at every step. */
.farm-label { display:inline-block; color:#587865; font-size:10px; letter-spacing:.65px; font-weight:850; white-space:nowrap; }
@media(max-width:760px){
 .farm-label { display:none; }
 .farm-switch { flex:1; max-width:100%; min-width:0; }
 .farm-switch select { flex:1; max-width:100%; min-width:0; background:#f5faf3; font-weight:750; font-size:14px; }
 .top-logo { flex-shrink:0; }
}
