:root {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: #16211a;
  background: #f4f7f4;
  line-height: 1.45;
}
* { box-sizing: border-box; }
body { margin: 0; background: #f4f7f4; }
button, input, select { font: inherit; }
.hidden { display: none !important; }
.screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #eef4ef;
}
.login-card {
  width: min(440px, 100%);
  background: white;
  border: 1px solid #dde5df;
  border-radius: 24px;
  padding: 34px;
  box-shadow: 0 24px 70px rgba(31,56,40,.12);
}
.mark {
  width: 54px; height: 54px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: #1f6b3a; color: white;
  font-weight: 800;
}
.mark.small { width: 40px; height: 40px; border-radius: 12px; font-size: .85rem; }
.eyebrow { margin: 0 0 6px; font-size: .72rem; letter-spacing: .14em; font-weight: 800; color: #5b7764; }
.muted { color: #68736b; }
.error { color: #a63030; min-height: 1.4em; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(1.7rem,2.5vw,2.5rem); line-height: 1.08; }
h2 { font-size: 1.18rem; }
label { display: grid; gap: 7px; margin: 16px 0; font-size: .86rem; font-weight: 700; color: #405044; }
input, select {
  width: 100%; border: 1px solid #ccd8cf; border-radius: 10px;
  padding: 11px 12px; background: white; color: #17231b; outline: none;
}
input:focus, select:focus { border-color: #2f7b49; box-shadow: 0 0 0 3px rgba(47,123,73,.11); }
button, .export {
  border: 0; border-radius: 10px; padding: 10px 14px;
  background: #1f6b3a; color: white; font-weight: 750; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
}
button:hover, .export:hover { filter: brightness(.96); }
button:disabled { opacity: .55; cursor: wait; }
.ghost { background: #edf2ee; color: #284031; }
.danger { background: #f8e9e9; color: #8c2b2b; }
.text-button { background: transparent; color: #1f6b3a; padding: 6px 0; }
.brand { display: flex; gap: 12px; align-items: center; padding: 18px; }
.brand div:last-child { display: grid; }
.brand span { font-size: .76rem; color: #8a978e; }
aside {
  position: fixed; inset: 0 auto 0 0; width: 230px;
  background: #122319; color: white; padding: 10px;
  display: flex; flex-direction: column;
}
aside .brand strong { color: white; }
nav { display: grid; gap: 6px; margin-top: 18px; }
.nav { justify-content: flex-start; background: transparent; color: #b8c8bd; padding: 11px 13px; }
.nav.active { background: #213d2b; color: white; }
.aside-bottom { margin-top: auto; display: grid; gap: 8px; padding: 10px; }
.aside-bottom .ghost { background: rgba(255,255,255,.08); color: #dbe5de; }
.aside-bottom .export { background: #2c7d48; }
main { margin-left: 230px; padding: 28px; min-height: 100vh; }
header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.live {
  display: flex; align-items: center; gap: 8px; padding: 8px 11px;
  background: #e7f5ea; border: 1px solid #c8e6d0; color: #245f37;
  border-radius: 999px; font-size: .78rem; font-weight: 800;
}
.live i { width: 8px; height: 8px; border-radius: 50%; background: #2e9f52; }
.stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.stats article, .panel {
  background: white; border: 1px solid #dce5de; border-radius: 16px;
  box-shadow: 0 8px 25px rgba(26,51,33,.05);
}
.stats article { padding: 18px; }
.stats span { display: block; color: #748179; font-size: .8rem; font-weight: 700; }
.stats strong { display: block; font-size: 2rem; margin-top: 8px; color: #1b2a20; }
.panel { padding: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: 18px; }
.table-wrap { overflow: auto; border: 1px solid #e3e9e5; border-radius: 12px; }
table { width: 100%; border-collapse: collapse; min-width: 800px; background: white; }
th, td { text-align: left; padding: 12px 13px; border-bottom: 1px solid #edf1ee; vertical-align: top; }
th { font-size: .73rem; letter-spacing: .06em; text-transform: uppercase; color: #738079; background: #f7f9f7; }
td { font-size: .88rem; }
td strong, td small { display: block; }
td small { margin-top: 4px; color: #78837c; max-width: 360px; }
.status { min-width: 118px; padding: 7px 9px; }
.empty { padding: 34px; text-align: center; color: #869089; }
.rule {
  display: flex; justify-content: space-between; gap: 16px;
  border: 1px solid #e1e8e3; border-radius: 12px; padding: 14px; margin-top: 10px;
}
.rule strong, .rule small, .rule code { display: block; }
.rule small { color: #738078; margin: 3px 0; }
.rule code { font-size: .72rem; color: #53635a; word-break: break-all; max-width: 440px; }
.rule-actions { display: flex; align-items: flex-start; gap: 7px; }
.event { display: grid; grid-template-columns: 12px 1fr; gap: 11px; padding: 12px 4px; border-bottom: 1px solid #edf1ee; }
.event:last-child { border-bottom: 0; }
.event-dot { width: 9px; height: 9px; border-radius: 50%; background: #3d8a56; margin-top: 5px; }
.event p, .event small { margin: 2px 0; color: #768179; font-size: .8rem; }
@media (max-width: 900px) {
  aside { position: static; width: auto; height: auto; flex-direction: row; align-items: center; overflow: auto; }
  .brand { min-width: max-content; }
  .aside-bottom { display: none; }
  nav { display: flex; margin: 0 0 0 auto; }
  .nav { white-space: nowrap; }
  main { margin-left: 0; padding: 18px; }
  .stats { grid-template-columns: repeat(2,1fr); }
  .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  header { align-items: flex-start; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats article { padding: 14px; }
  .stats strong { font-size: 1.55rem; }
  .panel { padding: 14px; }
  aside { padding: 6px; }
  .brand div:last-child { display: none; }
  .brand { padding: 8px; }
  .nav { padding: 9px 10px; font-size: .8rem; }
  .login-card { padding: 24px; border-radius: 18px; }
}

textarea { width:100%; border:1px solid #ccd8cf; border-radius:10px; padding:11px 12px; background:white; color:#17231b; outline:none; resize:vertical; font:inherit; }
textarea:focus { border-color:#2f7b49; box-shadow:0 0 0 3px rgba(47,123,73,.11); }
.finance-disabled { display:none !important; }
.button { border:0; border-radius:10px; padding:10px 14px; background:#1f6b3a; color:white; font-weight:750; cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; justify-content:center; }
.button.ghost { background:#edf2ee; color:#284031; }
.row-actions { display:flex; flex-wrap:wrap; gap:7px; min-width:260px; }
.row-actions button, .row-actions .button { padding:7px 9px; font-size:.8rem; }
.document-actions { min-width:420px; }
.document-actions .send-document { background:#155f37; }
@media (max-width:760px) { .document-actions { min-width:320px; } }
.split { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.checks { display:grid; gap:6px; padding:10px 0; }
.checks label, .checkline { display:flex; grid-template-columns:none; align-items:center; gap:9px; margin:4px 0; }
.checks input, .checkline input, .gst-box input { width:auto; }
.method-card { border:1px solid #e0e7e2; border-radius:14px; padding:14px; margin:12px 0; background:#fbfcfb; }
.method-card label:first-child { margin-top:0; }
.method-card label:last-child { margin-bottom:0; }
.line-head { display:flex; justify-content:space-between; align-items:center; margin:20px 0 8px; }
.line-item { display:grid; grid-template-columns:minmax(180px,1fr) 90px 130px 72px 44px; gap:8px; align-items:end; padding:10px; border:1px solid #e1e8e3; border-radius:12px; margin-bottom:8px; background:#fbfcfb; }
.line-item label { margin:0; }
.line-item .danger { height:43px; font-size:1.1rem; }
.gst-box { justify-items:start; }
dialog { width:min(860px,calc(100vw - 28px)); border:0; border-radius:20px; padding:0; box-shadow:0 28px 90px rgba(18,35,25,.25); }
dialog::backdrop { background:rgba(11,22,15,.55); backdrop-filter:blur(3px); }
.dialog-card { padding:24px; max-height:88vh; overflow:auto; }
.small-dialog { max-width:520px; margin:auto; }@media (max-width:760px) {
  .line-item { grid-template-columns:1fr 1fr; }
  .line-item label:first-child { grid-column:1/-1; }
  .line-item .danger { width:44px; }
  .split { grid-template-columns:1fr; gap:0; }
  dialog { width:calc(100vw - 16px); }
  .dialog-card { padding:16px; }
}
.job-ref { background:transparent; color:#1f6b3a; padding:0; border-radius:0; font-size:inherit; font-weight:800; text-decoration:underline; text-underline-offset:2px; }
.job-ref:hover { filter:none; color:#174f2c; }
.job-record-card { max-width:920px; margin:auto; }
.job-badges,.job-actions { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 16px; }
.job-badge { display:inline-flex; padding:7px 10px; border-radius:999px; background:#eef5f0; color:#294a34; border:1px solid #d7e5db; font-size:.78rem; font-weight:800; }
.job-record-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.record-section { border:1px solid #e0e7e2; border-radius:14px; padding:16px; background:#fbfcfb; min-width:0; }
.record-section h3 { margin:0 0 12px; font-size:1rem; }
.detail-row { display:grid; grid-template-columns:130px minmax(0,1fr); gap:12px; padding:7px 0; border-bottom:1px solid #e9eeea; }
.detail-row:last-child { border-bottom:0; }
.detail-row span { color:#748179; font-size:.78rem; }
.detail-row strong { color:#26352b; font-size:.84rem; overflow-wrap:anywhere; }
.job-activity-item { padding:8px 0; border-bottom:1px solid #e9eeea; }
.job-activity-item:last-child { border-bottom:0; }
.job-activity-item strong,.job-activity-item small { display:block; }
.job-activity-item small { color:#748179; margin-top:2px; }
.job-doc-list { display:grid; gap:7px; }
.job-doc-item { padding:9px 10px; border:1px solid #e1e8e3; border-radius:10px; background:white; }
.job-doc-item strong,.job-doc-item small { display:block; }
.job-doc-item small { color:#748179; margin-top:2px; }
@media (max-width:760px) { .job-record-grid { grid-template-columns:1fr; } .detail-row { grid-template-columns:105px minmax(0,1fr); } }

.ricey-logo { display:block; object-fit:contain; }
.login-logo { width:min(240px,75%); height:auto; margin:0 auto 22px; }
.brand-logo { width:46px; height:46px; border-radius:12px; background:white; padding:3px; }
.login-card .eyebrow,.login-card h1,.login-card .muted { text-align:center; }
.screen { background:linear-gradient(145deg,#eef4ef 0%,#f8faf8 58%,#e7efe9 100%); }
