:root{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;line-height:1.5;color:#1e293b;background-color:#f1f6f2;--terra-emerald: #059669;--terra-emerald-dark: #047857;--terra-emerald-light: #ecfdf5;--terra-amber: #d97706;--terra-amber-light: #fef3c7;--terra-slate-dark: #0f172a;--terra-slate-border: #e2e8f0}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:linear-gradient(180deg,#edf7f0,#f8fafc);color:#1e293b;overflow-x:hidden}button,input,select,textarea{font:inherit}button{cursor:pointer;transition:all .15s ease-in-out}.app-shell{max-width:1440px;margin:0 auto;padding:24px}.topbar{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:24px;background:#fff;padding:16px 24px;border-radius:16px;box-shadow:0 4px 14px #0f172a0d;border:1px solid #e2e8f0}.brand-header-cluster{display:flex;align-items:center;gap:14px}.brand-logo-circle{width:44px;height:44px;border-radius:50%;background:#ecfdf5;border:1px solid #a7f3d0;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 8px #0596691f;flex-shrink:0}.brand-svg-logo{width:28px;height:28px}.brand-img-logo{width:32px;height:32px;object-fit:contain;display:block}.brand-meta-badge{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.ecosystem-pill{background:#f1f5f9;color:#475569;font-size:10px;font-weight:600;padding:2px 8px;border-radius:9999px;border:1px solid #e2e8f0;text-transform:uppercase;letter-spacing:.05em}.brand-badge{display:flex;align-items:center;gap:8px}.brand-dot{width:10px;height:10px;border-radius:50%;background-color:#059669}.eyebrow{text-transform:uppercase;letter-spacing:.14em;color:#059669;margin:0;font-size:11px;font-weight:700}h1{margin:4px 0 0;font-size:20px;font-weight:700;color:#0f172a}h2{margin:0 0 10px;font-size:18px;font-weight:600}h3{margin:0 0 8px;font-size:15px;font-weight:600}h4{margin:16px 0 8px;font-size:14px;font-weight:600;color:#334155}.subtext{color:#64748b;font-size:13px;margin:0 0 14px}.topbar-actions{display:flex;align-items:center;gap:16px}.nav-toggles{display:flex;background:#f1f5f9;padding:4px;border-radius:10px;gap:4px}.tab-btn{border:none;background:transparent;padding:8px 14px;border-radius:8px;font-size:13px;font-weight:500;color:#475569}.tab-btn.active{background:#fff;color:#0f172a;box-shadow:0 2px 6px #0000000f}.user-profile{display:flex;align-items:center;gap:12px}.user-email{font-size:13px;font-weight:500;color:#334155;background:#f8fafc;padding:6px 12px;border-radius:8px;border:1px solid #e2e8f0}.layout{display:grid;grid-template-columns:320px 360px 1fr;gap:20px;align-items:start}.panel{background:#fff;border-radius:16px;padding:20px;box-shadow:0 4px 18px #0f172a0a;border:1px solid #e8ede9}.panel-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.new-org-inline-form{display:flex;gap:8px;margin-bottom:12px}.new-org-inline-form input{padding:6px 10px;font-size:13px}.small-btn.primary{background:#16a34a;color:#fff;border-color:#16a34a}.section-title{margin-top:20px}.stack{display:flex;flex-direction:column;gap:12px}.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field-label{display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:4px}input,select,textarea{width:100%;padding:10px 12px;border:1px solid #cbd5e1;border-radius:8px;background:#f8fafc;color:#0f172a;font-size:14px}input:focus,select:focus,textarea:focus{outline:none;border-color:#16a34a;box-shadow:0 0 0 3px #16a34a26;background:#fff}.primary-btn{border:none;border-radius:8px;background:#16a34a;color:#fff;padding:11px 16px;font-weight:600;font-size:14px}.primary-btn:hover:not(:disabled){background:#15803d}.primary-btn:disabled{opacity:.6;cursor:not-allowed}.secondary-btn{border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#334155;padding:8px 14px;font-size:13px;font-weight:500}.secondary-btn:hover{background:#f1f5f9}.small-btn{border:1px solid #cbd5e1;border-radius:6px;background:#fff;color:#16a34a;font-weight:600;padding:4px 10px;font-size:12px}.small-btn:hover{background:#f0fdf4}.link-btn{border:none;background:transparent;color:#16a34a;font-weight:600;font-size:12px;padding:4px 0;text-decoration:underline}.notice{margin-bottom:20px;padding:12px 16px;border-radius:10px;font-size:14px;font-weight:500}.notice.success{background:#dcfce7;color:#15803d;border:1px solid #bbf7d0}.notice.error{background:#fee2e2;color:#b91c1c;border:1px solid #fecaca}.auth-portal-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:32px;max-width:1060px;margin:40px auto;align-items:stretch}.auth-hero-card{background:linear-gradient(145deg,#fff,#f0fdf4);border:1px solid #bbf7d0;padding:36px;border-radius:20px;box-shadow:0 10px 30px #05966914;display:flex;flex-direction:column;justify-content:space-between}.hero-badge{display:inline-flex;align-items:center;gap:8px;background:#ecfdf5;border:1px solid #a7f3d0;color:#047857;font-size:12px;font-weight:600;padding:5px 14px;border-radius:9999px;width:fit-content;margin-bottom:16px}.auth-hero-card h2{font-size:24px;font-weight:800;color:#0f172a;line-height:1.3;margin:0 0 12px}.hero-subtext{color:#475569;font-size:14px;line-height:1.6;margin:0 0 24px}.hero-features-list{display:flex;flex-direction:column;gap:16px;margin-bottom:24px}.hero-feature-item{display:flex;gap:14px;align-items:flex-start;background:#ffffffd9;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);padding:12px 16px;border-radius:12px;border:1px solid #e2e8f0}.hero-feature-item strong{display:block;font-size:13px;color:#0f172a;margin-bottom:2px}.hero-feature-item p{margin:0;font-size:12px;color:#64748b;line-height:1.4}.feat-icon{font-size:20px;line-height:1;padding-top:2px}.hero-footer-note{font-size:11px;color:#94a3b8;text-transform:uppercase;letter-spacing:.05em;font-weight:600;border-top:1px solid #e2e8f0;padding-top:16px}.auth-card{width:100%;max-width:460px;padding:36px;border-radius:20px;box-shadow:0 10px 30px #0f172a0f;border:1px solid #e2e8f0;background:#fff;display:flex;flex-direction:column;justify-content:center}.auth-card-header{margin-bottom:20px}.auth-pill{display:inline-block;background:#f1f5f9;color:#0f172a;font-size:11px;font-weight:700;padding:4px 10px;border-radius:9999px;text-transform:uppercase;letter-spacing:.08em;margin-bottom:8px}.auth-card-header h3{font-size:20px;font-weight:700;color:#0f172a;margin:0 0 6px}.auth-tab-row{display:flex;gap:8px;margin-bottom:20px;background:#f1f5f9;padding:4px;border-radius:10px}.auth-tab{flex:1;border:none;background:transparent;padding:10px;font-size:13px;font-weight:600;color:#64748b;border-radius:8px;min-height:44px}.auth-tab.active{background:#fff;color:#0f172a;box-shadow:0 2px 6px #0000000f}.auth-demo-hint{margin-top:24px;padding:12px 14px;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:10px;font-size:12px;color:#64748b;display:flex;flex-direction:column;gap:4px}.auth-demo-hint strong{color:#334155}.stat-card{margin-top:14px;background:linear-gradient(135deg,#f0fdf4,#dcfce7);border:1px solid #bbf7d0;border-radius:12px;padding:14px;display:flex;flex-direction:column}.stat-label{font-size:11px;font-weight:700;text-transform:uppercase;color:#15803d;letter-spacing:.05em}.stat-val{font-size:24px;font-weight:700;color:#14532d;margin:4px 0}.stat-detail{font-size:12px;color:#166534}.count-badge{background:#e2e8f0;color:#475569;font-size:11px;font-weight:700;padding:2px 8px;border-radius:12px}.lot-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;max-height:520px;overflow-y:auto}.lot-item-btn{width:100%;border:1px solid #e2e8f0;background:#f8fafc;border-radius:10px;padding:12px;text-align:left}.lot-item-btn:hover{background:#f1f5f9;border-color:#cbd5e1}.lot-item-btn.selected{background:#f0fdf4;border-color:#86efac;box-shadow:0 0 0 1px #86efac}.lot-btn-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}.lot-btn-sub{display:flex;justify-content:space-between;font-size:12px;color:#64748b}.status-pill{font-size:10px;font-weight:700;padding:3px 8px;border-radius:12px;text-transform:uppercase;letter-spacing:.04em}.status-active{background:#dcfce7;color:#15803d}.status-in_transit{background:#fef3c7;color:#b45309}.status-delivered{background:#e0f2fe;color:#0369a1}.status-processed{background:#f3e8ff;color:#7e22ce}.status-split{background:#f1f5f9;color:#64748b}.action-tabs{display:flex;gap:6px;margin-bottom:16px;background:#f1f5f9;padding:4px;border-radius:10px}.tab-btn-pill{flex:1;border:none;background:transparent;padding:8px;font-size:12px;font-weight:600;color:#64748b;border-radius:6px}.tab-btn-pill.active{background:#fff;color:#0f172a;box-shadow:0 1px 3px #00000014}.tab-btn-pill:disabled{opacity:.4;cursor:not-allowed}.split-row{display:grid;grid-template-columns:1fr 100px 32px;gap:8px;align-items:center}.delete-btn{border:none;background:#fee2e2;color:#b91c1c;border-radius:6px;height:36px;font-weight:700}.lot-detail-header{display:flex;justify-content:space-between;align-items:flex-start;padding-bottom:16px;border-bottom:1px solid #e2e8f0;margin-bottom:16px}.lot-qr-mini{display:flex;flex-direction:column;align-items:center;gap:4px}.qr-img-small{width:72px;height:72px;border:1px solid #e2e8f0;border-radius:8px;padding:4px;background:#fff}.meta-box-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:18px}.meta-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:10px 12px;display:flex;flex-direction:column}.meta-card-label{font-size:11px;color:#64748b;font-weight:600;margin-bottom:4px}.balance-highlight{color:#16a34a}.evidence-section{margin-bottom:20px}.evidence-chips{display:flex;flex-wrap:wrap;gap:8px}.evidence-chip{background:#f1f5f9;border:1px solid #e2e8f0;border-radius:8px;padding:8px 12px;display:flex;align-items:center;gap:8px;font-size:12px}.doc-name{font-weight:600;color:#1e293b}.doc-hash{color:#64748b;font-family:monospace}.download-link{color:#16a34a;text-decoration:none;font-weight:600}.event-record-box{background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:16px;margin-bottom:20px}.timeline{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px}.timeline-item{display:flex;gap:14px}.timeline-marker{width:12px;height:12px;border-radius:50%;background:#16a34a;margin-top:6px;flex-shrink:0;box-shadow:0 0 0 3px #dcfce7}.timeline-content{flex:1;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:12px}.timeline-top{display:flex;justify-content:space-between;margin-bottom:6px}.timeline-details code{font-size:12px;color:#334155;word-break:break-all}.source-tag{display:inline-block;margin-top:6px;font-size:11px;color:#64748b;background:#e2e8f0;padding:2px 6px;border-radius:4px}.empty-state{text-align:center;padding:80px 20px;color:#64748b}.empty-icon{font-size:40px;display:block;margin-bottom:12px}.public-container{max-width:800px;margin:0 auto}.public-search-card{margin-bottom:20px}.search-box{display:flex;gap:10px}.public-details-card{border:2px solid #86efac}.public-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:20px}.badge-public{display:inline-block;background:#dcfce7;color:#15803d;font-size:11px;font-weight:700;padding:4px 8px;border-radius:6px;margin-bottom:8px;text-transform:uppercase}.qr-preview-box{display:flex;flex-direction:column;align-items:center;gap:6px}.qr-img{width:120px;height:120px;border:1px solid #cbd5e1;border-radius:8px;padding:6px;background:#fff}.public-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;background:#f8fafc;padding:16px;border-radius:10px;margin-bottom:18px}.meta-item label{font-size:12px;font-weight:600;color:#64748b}.meta-item p{margin:4px 0 0;font-weight:600;color:#0f172a}.public-disclaimer{background:#fefce8;border:1px solid #fef08a;color:#854d0e;padding:12px 16px;border-radius:8px;font-size:13px;margin-bottom:24px}.event-badge{font-weight:700;color:#0f172a}.event-source{font-size:12px;color:#64748b;display:block;margin:2px 0 4px}.event-time{font-size:11px;color:#94a3b8}.col3-tab-row{display:flex;gap:8px;border-bottom:2px solid #f1f5f9;padding-bottom:12px;margin-bottom:18px}.col3-tab-btn{background:transparent;border:none;font-size:14px;font-weight:600;color:#64748b;padding:8px 14px;border-radius:8px;transition:all .2s ease}.col3-tab-btn:hover{color:#0f172a;background:#f8fafc}.col3-tab-btn.active{color:#16a34a;background:#dcfce7}.transform-form{gap:16px}.form-header-row{display:flex;justify-content:space-between;align-items:center}.badge-pill{font-size:11px;font-weight:700;text-transform:uppercase;background:#ecfdf5;color:#059669;padding:3px 8px;border-radius:12px;border:1px solid #a7f3d0}.section-block{background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:12px 14px;display:flex;flex-direction:column;gap:10px}.bold-label{font-weight:700;color:#1e293b;margin-bottom:4px}.field-label-small{font-size:11px;font-weight:600;color:#64748b;text-transform:uppercase;letter-spacing:.05em;margin-bottom:4px;display:block}.input-row-card,.output-row-card{background:#fff;border:1px solid #cbd5e1;border-radius:8px;padding:10px 12px;display:flex;flex-direction:column;gap:8px}.grid-2-sub{display:grid;grid-template-columns:2fr 1fr;gap:8px}.grid-3{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:8px}.input-balance-feedback{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:#64748b;border-top:1px dashed #e2e8f0;padding-top:6px;margin-top:2px}.text-danger{color:#dc2626;font-weight:600}.text-success{color:#16a34a;font-weight:600}.delete-inline-btn{background:none;border:none;color:#ef4444;font-size:11px;font-weight:600;padding:2px 6px;border-radius:4px}.delete-inline-btn:hover{background:#fee2e2}.output-row-footer{display:flex;justify-content:flex-end}.input-group{display:flex;gap:6px}.input-group input{flex:2}.input-group select{flex:1}.balance-preview-card{border-radius:10px;padding:14px 16px;transition:all .25s ease}.balance-preview-card.balanced{background:#f0fdf4;border:1.5px solid #86efac}.balance-preview-card.unbalanced{background:#fffbeb;border:1.5px solid #fde047}.balance-preview-header{display:flex;justify-content:space-between;align-items:center;font-size:13px;color:#1e293b;margin-bottom:10px}.balance-badge{font-size:11px;font-weight:700;padding:3px 8px;border-radius:6px}.badge-success{background:#16a34a;color:#fff}.badge-warn{background:#f59e0b;color:#fff}.balance-stats-row{display:flex;align-items:center;justify-content:space-between;background:#fff;padding:8px 12px;border-radius:8px;border:1px solid rgba(0,0,0,.05);font-size:12px}.bal-sublabel{display:block;font-size:10px;text-transform:uppercase;color:#64748b;letter-spacing:.04em}.bal-val{font-size:14px;font-weight:700;color:#0f172a}.bal-divider{font-weight:700;color:#94a3b8;font-size:14px}.val-danger{color:#dc2626}.val-ok{color:#16a34a}.bal-warning-text{font-size:11px;line-height:1.4;color:#b45309;margin-top:8px;background:#fef3c799;padding:6px 10px;border-radius:6px;border-left:3px solid #f59e0b}.genealogy-view,.transformations-list{display:flex;flex-direction:column;gap:16px}.trans-card{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:16px;box-shadow:0 2px 8px #0f172a0a;display:flex;flex-direction:column;gap:12px}.trans-header{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid #f1f5f9;padding-bottom:10px}.trans-title-row{display:flex;align-items:center;gap:10px}.badge-trans-type{background:#0f172a;color:#fff;font-size:11px;font-weight:700;padding:3px 8px;border-radius:6px;letter-spacing:.05em}.trans-time{font-size:12px;color:#64748b}.trans-meta-row{display:flex;flex-direction:column;align-items:flex-end;font-size:11px;color:#64748b;gap:2px}.idempotency-badge{font-family:monospace;background:#f1f5f9;padding:2px 6px;border-radius:4px;font-size:10px;color:#475569}.trans-flow-grid{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;background:#f8fafc;padding:12px;border-radius:8px;border:1px solid #e8ede9}.flow-col-label{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.05em;font-weight:700;color:#475569;margin-bottom:6px}.flow-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.flow-item{display:flex;justify-content:space-between;font-size:12px;background:#fff;padding:4px 8px;border-radius:6px;border:1px solid #e2e8f0}.flow-arrow{font-size:18px;color:#16a34a;font-weight:700;text-align:center}.trans-loss-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:12px}.loss-tag{background:#f1f5f9;border:1px solid #e2e8f0;padding:4px 8px;border-radius:6px;color:#334155}.trans-notes{color:#64748b;font-style:italic;font-size:12px}.trans-corrections-box{background:#fafaf9;border:1px solid #e7e5e4;border-radius:8px;padding:10px 12px;display:flex;flex-direction:column;gap:8px}.corrections-header{display:flex;justify-content:space-between;align-items:center}.corrections-title{font-size:12px;font-weight:700;color:#44403c}.link-btn-small{background:none;border:none;color:#16a34a;font-size:11px;font-weight:600;cursor:pointer;padding:2px 4px}.link-btn-small:hover{text-decoration:underline}.corrections-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}.correction-entry{font-size:12px;background:#fff;padding:6px 10px;border-radius:6px;border-left:3px solid #f97316;border-top:1px solid #e7e5e4;border-right:1px solid #e7e5e4;border-bottom:1px solid #e7e5e4}.correction-entry small{color:#78716c}.correction-inline-form{display:flex;gap:8px;margin-top:4px}.correction-inline-form input{flex:1;padding:6px 10px;font-size:12px}.ecosystem-footer{margin-top:48px;padding-top:24px;border-top:1px solid #e2e8f0}.footer-content{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:16px}.footer-brand{display:flex;flex-direction:column;gap:4px}.footer-title{font-weight:700;font-size:14px;color:#0f172a}.footer-tagline{font-size:12px;color:#64748b}.footer-brand small{color:#94a3b8;font-size:11px}.footer-links{display:flex;gap:16px;align-items:center;flex-wrap:wrap}.footer-link-btn{background:none;border:none;color:#059669;font-size:12px;font-weight:600;padding:6px 8px;cursor:pointer;border-radius:6px}.footer-link-btn:hover{background:#ecfdf5}.footer-link-anchor{color:#64748b;font-size:12px;text-decoration:none;font-weight:500;padding:6px 8px}.footer-link-anchor:hover{color:#0f172a}@media (max-width: 1080px){.layout{grid-template-columns:1fr}.meta-box-grid{grid-template-columns:1fr 1fr}.trans-flow-grid{grid-template-columns:1fr}.flow-arrow{transform:rotate(90deg)}.auth-portal-grid{grid-template-columns:1fr;max-width:600px}}@media (max-width: 768px){.app-shell{padding:16px}.topbar{flex-direction:column;align-items:flex-start;padding:16px}.topbar-actions{width:100%;flex-direction:column;align-items:stretch;gap:12px}.nav-toggles{width:100%}.nav-toggles .tab-btn{flex:1;text-align:center;min-height:44px;display:flex;align-items:center;justify-content:center}.user-profile{width:100%;justify-content:space-between}.auth-portal-grid{grid-template-columns:1fr;margin:20px auto;gap:20px}.auth-hero-card,.auth-card{padding:24px}.search-box{flex-direction:column}.public-grid,.grid-2,.grid-3{grid-template-columns:1fr}.balance-stats-row{flex-direction:column;gap:6px;align-items:flex-start}.bal-divider{display:none}.footer-content{flex-direction:column;align-items:flex-start}button,input,select,textarea{min-height:44px}}@media (max-width: 390px){.app-shell{padding:12px}.brand-header-cluster h1{font-size:17px}.auth-hero-card h2{font-size:20px}.auth-hero-card,.auth-card{padding:18px;border-radius:14px}.meta-box-grid{grid-template-columns:1fr}.flow-item{padding:12px}}.ecosystem-footer{margin-top:48px;padding:24px 0;border-top:1px solid var(--terra-slate-border)}.ecosystem-footer .footer-content{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:16px}.ecosystem-footer .footer-title{font-weight:700;font-size:14px;color:#0f172a}.ecosystem-footer .footer-tagline{font-size:12px;color:#64748b;margin:2px 0}.ecosystem-footer .footer-links{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.ecosystem-footer .footer-link-btn,.ecosystem-footer .footer-link-anchor{background:none;border:none;padding:0;font-size:13px;color:#059669;text-decoration:none;cursor:pointer;font-weight:500;transition:color .15s ease}.ecosystem-footer .footer-link-btn:hover,.ecosystem-footer .footer-link-anchor:hover{color:#047857;text-decoration:underline}.ecosystem-footer .staff-login-link{color:#2563eb;font-weight:600}.ecosystem-footer .staff-login-link:hover{color:#1d4ed8}
