:root{--ink:#253348;--muted:#7a869b;--line:#e6ebf2;--green:#37b549;--green-2:#289639;--mint:#e8f7e9;--mint-2:#f5fcf6;--shadow:0 12px 40px #33496a0b;--white:#fff}
.record-editor input[data-numeric],input[type=number]{direction:ltr;unicode-bidi:isolate;text-align:left}.data-table th.center-title{text-align:center}
.record-editor td img{width:60px;height:44px;object-fit:contain}
.calendar-input{display:flex;gap:6px;align-items:center}.calendar-input input{min-width:0;flex:1}.calendar-input button{border:1px solid #dce4ef;background:#eef3ff;border-radius:8px;padding:9px 13px;cursor:pointer}.persian-calendar{position:fixed;width:310px;max-width:calc(100vw - 16px);z-index:999;background:#fff;border:1px solid #dbe4ee;box-shadow:0 16px 55px #26374c30;border-radius:14px;padding:12px}.calendar-head{display:flex;gap:5px;align-items:center;margin-bottom:10px}.calendar-head input{width:72px}.calendar-head select{flex:1}.calendar-head select,.calendar-head input{padding:6px;border:1px solid #dae3ef;border-radius:7px}.persian-calendar button{border:0;background:#f1f5fa;border-radius:7px;padding:7px;cursor:pointer}.calendar-days{display:grid;grid-template-columns:repeat(7,1fr);gap:3px;text-align:center}.calendar-days b{font-size:11px;padding:4px;color:#8290a5}.calendar-days .is-today{box-shadow:inset 0 0 0 1px #37b549}.calendar-days .is-selected{background:#37b549;color:white}.calendar-foot{display:flex;justify-content:space-between;margin-top:10px}.signature-preview{max-width:180px;max-height:100px;object-fit:contain}.notice-options label{display:flex;align-items:flex-start;gap:8px;padding:10px;border-bottom:1px solid #e6ebf2}.notice-options input{margin-top:4px}.notice-options p{white-space:pre-wrap;margin:5px 0;color:#78859a}.print-editor textarea{width:100%;min-height:90px;border:1px solid #dbe4ee;border-radius:9px;padding:10px;font:13px Tahoma}.print-editor{padding:22px}
body{background:radial-gradient(ellipse at 90% 0%,#eef2ff 0,transparent 40%),#f6f8fc;color:var(--ink)}
.shell{grid-template-columns:250px minmax(0,1fr)}
aside{background:#fff;color:#4c5870;border-left:1px solid var(--line);padding:24px 14px}
.brand{border-bottom:1px solid var(--line);padding:0 9px 24px}.brand strong{color:#37b549;letter-spacing:2px}.brand span{color:#7d8798}.mark{background:#37b549;color:#183b20;box-shadow:0 8px 20px #37b54924;border-radius:15px}
.nav-label{color:#a0a9b8;font-size:10px;letter-spacing:.4px}.nav-btn{color:#68758b;border-radius:12px;margin:4px 0;font-weight:500;transition:background .15s,color .15s}.nav-btn:hover{background:#f2f5fb;color:#39435a}.nav-btn.active{background:#e8f7e9;color:#245e2c;box-shadow:inset -3px 0 #37b549}.nav-btn .ico{background:#f3f5f9;border-radius:8px;color:#77819c;padding:4px}.nav-btn.active .ico{background:#c9edce;color:#286330}.side-foot{border-color:var(--line);color:#97a1b1}.side-foot b{color:#647089}
.main{padding:30px 34px;min-width:0}.topbar{margin-bottom:24px}.title h1{font-size:25px;letter-spacing:-.5px}.eyebrow{color:#8c96a7}.top-actions{gap:12px}.avatar{background:#efeaff;color:#7653ba;border-radius:14px}.icon-btn{border:1px solid var(--line);background:#fff;color:#747f92}
.card{border:1px solid var(--line);box-shadow:var(--shadow);border-radius:18px}.toolbar{padding:4px 0 12px}.toolbar h2{font-size:21px}.data-table{min-width:680px}.data-table thead th{background:#f8faff;color:#8792a7;font-size:10px;border-bottom:1px solid #e7edf5}.data-table td{padding:13px 12px;border-bottom:1px solid #edf1f6;font-size:12px}.data-table tbody tr:hover{background:#fcfdff}.data-table tbody tr:last-child td{border-bottom:0}.data-table td .secondary{margin:3px;border-radius:8px;font-size:10px;white-space:nowrap}
.primary{background:#37b549;color:#123918;box-shadow:0 7px 18px #37b54925;border:1px solid #2faa40;border-radius:10px;font-size:12px}.primary:hover{background:#42c555;color:#112e15}.secondary{border-color:#e0e6f0;color:#62718b;background:#fff;border-radius:10px;font-size:12px}.secondary:hover{background:#f5f7fc;border-color:#c8d5e8}.ghost{color:#596b98}.select,.search input{border-color:#e1e7f0;border-radius:10px;background:#fff;font-size:12px}.select:focus,.field input:focus,.field select:focus{border-color:#6db37a;box-shadow:0 0 0 3px #37b54914;outline:0}
.stats{gap:18px;display:grid;grid-template-columns:repeat(4,1fr)}.stat{border:1px solid var(--line);border-top:4px solid #37b549;border-radius:17px;box-shadow:var(--shadow);padding:23px;position:relative;overflow:hidden;background:#fff}.stat:nth-child(2){border-top-color:#8975ec;background:linear-gradient(135deg,#fff,#f7f4ff)}.stat:nth-child(3){border-top-color:#49a7dd;background:linear-gradient(135deg,#fff,#f3faff)}.stat:nth-child(4){border-top-color:#f2b35a;background:linear-gradient(135deg,#fff,#fff8ed)}.stat .num{font-size:34px;color:#2d3c51}.stat .label{color:#8a95a7;margin-top:6px}.badge.paint{background:#f0eaff;color:#7c56b4}.badge.stitch{background:#e9f6f0;color:#378069}.badge.wait{background:#fff2dc;color:#ac7a2f}.badge.sent{background:#e8f4fc;color:#3b85b4}
.field input,.field select{border-color:#e2e8f1;border-radius:10px}.field label{color:#78869b;font-size:11px}.form-grid{gap:20px;padding:24px}.toast{background:#27364d;border-radius:12px;max-width:75vw}.page{animation:enter-page .15s ease}@keyframes enter-page{from{opacity:.4;transform:translateY(4px)}to{opacity:1;transform:none}}
.record-editor{padding:0}.record-editor .modal{max-width:none!important;width:100%!important;max-height:none;overflow:visible;border:1px solid var(--line);box-shadow:var(--shadow);border-radius:17px}.record-editor .modal-head{background:linear-gradient(100deg,#fff,#f3f6ff);border-radius:17px 17px 0 0}.record-editor .close{background:#eaf0fa;color:#61728f}.record-editor .modal-actions{border-top:1px solid var(--line);background:#fbfcff;position:sticky;bottom:0;z-index:4;border-radius:0 0 17px 17px;flex-wrap:wrap}.record-editor .table-wrap{padding:0 14px}.record-editor .data-table{min-width:950px}.record-editor .data-table td{padding:11px 7px}.record-editor input[data-key]{border:1px solid #dce4ef;border-radius:8px;padding:9px;width:100px;background:#fff}.record-editor input[data-key=code]{width:125px;font-weight:700;color:#425473;direction:ltr}.record-editor .row-description{min-width:185px;color:#63718b}.record-editor .blank-row{background:#fbfcff}.record-editor .modal-head h3{font-size:18px}.record-editor .field input[type=checkbox]{width:20px;height:20px}
.status-pill{display:inline-block;padding:5px 9px;background:#f2eefc;color:#7a63b0;border-radius:7px;font-size:10px}.color-code{display:inline-flex;align-items:center;gap:5px;background:#eff3fa;color:#5b6d89;border-radius:7px;padding:5px 8px;font-size:11px;direction:ltr}.priority-tag{display:inline-block;color:#925fb8;background:#f6eafa;padding:4px 8px;border-radius:7px;font-size:11px}.hint{color:#8794a8;font-size:11px;padding:0 24px 12px}.kardex-summary{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:18px}.kardex-summary div{background:#fff;border:1px solid var(--line);padding:16px 24px;border-radius:12px}.kardex-summary strong{display:block;margin-top:8px;color:#536986}.editor-breadcrumb{color:#99a3b4;font-size:11px;margin-bottom:12px}.calendar-field{direction:ltr;text-align:right}.screen-callout{padding:14px 18px;background:#eef3ff;border:1px solid #e1e8f8;border-radius:12px;font-size:12px;color:#677796}
@media(max-width:1000px){.stats{grid-template-columns:repeat(2,1fr)}.main{padding:22px 20px}.shell{grid-template-columns:225px 1fr}.filters{gap:6px}.record-editor .form-grid{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.shell{grid-template-columns:1fr}.stats{grid-template-columns:1fr 1fr}.main{padding:16px}.topbar{gap:10px}.title h1{font-size:20px}.top-actions{flex-wrap:wrap;justify-content:flex-end}.record-editor .form-grid{grid-template-columns:1fr}.toolbar{align-items:flex-start}.toolbar .filters{width:100%}.record-editor .modal-actions{justify-content:flex-start}.data-table{min-width:650px}}

.letter-block{padding:18px;margin:18px 0}.letter-toolbar{padding:18px;display:flex;gap:14px;flex-wrap:wrap;align-items:center}.letter-toolbar input{width:80px}.letter-block textarea{border:1px solid #d7e0e8;border-radius:8px;padding:10px;resize:vertical;background:#fff;color:#172737}

.letter-format-tools{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:10px 0}.letter-format-tools label{display:flex;gap:6px;align-items:center}.letter-format-tools input{width:115px}.letter-format-tools select,.letter-format-tools input{padding:6px;border:1px solid #d7e0e8;border-radius:7px;font:inherit}

#letterEditor [data-letter-block] textarea{font-family:"B Nazanin",Tahoma,serif!important}
