/* v6.17 - export center refined: safer layout + calmer colors */
:root{
  --workspace-max:1440px;
  --workspace-gap:16px;
  --surface:#fff;
  --surface-soft:#f7fbff;
  --line:#dfe8f1;
  --ink:#18263a;
  --muted:#6f8197;
  --accent:#165fc4;
  --accent-soft:#edf4ff;
  --accent-deep:#12365f;
  --teal:#0d7c90;
}
.main-content{width:100%;max-width:none;padding:12px 18px 38px;overflow-x:hidden}
.main-content>.topbar,.main-content>section,.main-content>form,.main-content>.invoice-editor-grid,.main-content>.content-grid,.main-content>.expense-layout{width:100%;max-width:var(--workspace-max);margin-inline:auto;box-sizing:border-box}
.topbar{position:sticky;top:8px;z-index:30;min-height:58px;padding:10px 14px;border:1px solid rgba(223,231,241,.94);border-radius:16px;background:rgba(255,255,255,.92);box-shadow:0 10px 26px rgba(15,35,55,.05);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
.topbar h1{font-size:17px;letter-spacing:-.03em}
.panel{border:1px solid var(--line);border-radius:16px;background:var(--surface);box-shadow:0 8px 24px rgba(15,35,55,.04)}
.panel-head{gap:12px;padding-bottom:12px;border-bottom:1px solid #edf2f6}
.panel-head h2{font-size:14px}.panel-head p{font-size:9px;color:var(--muted)}
.panel-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.btn{min-height:38px;border-radius:10px;font-size:10px;padding-inline:13px}
.btn.primary{background:linear-gradient(135deg,#1b69cf,#0e58b4)!important;color:#fff!important}
.btn.light{background:#fff!important;color:var(--accent)!important;border:1px solid #d6e4f4}
.field label,.export-filter-grid label>span{font-size:9px;font-weight:850;color:#52677b}
.field input,.field select,.field textarea,.export-filter-grid input,.export-filter-grid select{border-color:#d8e2ee;background:#fbfdff;border-radius:10px;min-height:40px}
.field input:focus,.field select:focus,.field textarea:focus,.export-filter-grid input:focus,.export-filter-grid select:focus{border-color:#7aa8e8;box-shadow:0 0 0 3px rgba(22,95,196,.1);background:#fff}
.data-table thead th{background:#f5f8fb;color:#526578;font-size:8.5px;border-bottom:1px solid #dfe8ee}
.data-table tbody tr:hover{background:#fbfdff}.data-table td{border-bottom-color:#edf2f5}
.stat-grid{gap:12px}.stat-card{border:1px solid var(--line);border-radius:14px;box-shadow:none;background:#fff}
.invoice-hero,.workspace-hero{border-radius:20px;box-shadow:0 14px 38px rgba(13,45,68,.10)}
.workspace-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:14px;padding:24px 24px;color:#fff;background:linear-gradient(135deg,#12365f 0%,#165fc4 58%,#0d7c90 100%)}
.workspace-hero h2{margin:4px 0 7px;font-size:23px;letter-spacing:-.04em}.workspace-hero p{margin:0;color:#ddeafd;font-size:10px;line-height:1.9}.workspace-hero .eyebrow{color:#9ed7ff}
.metric-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}
.metric-strip article{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:78px;padding:14px 16px;border:1px solid var(--line);border-radius:15px;background:linear-gradient(180deg,#fff 0%,#fbfdff 100%)}
.metric-strip article:before{content:'';align-self:stretch;width:4px;border-radius:999px;background:linear-gradient(180deg,#1a6fd5,#0d7c90)}
.metric-strip small{color:var(--muted);font-size:9px;font-weight:800}.metric-strip b{color:var(--ink);font-size:18px;letter-spacing:-.04em}.metric-strip em{font-size:8px;font-style:normal;color:var(--muted)}
.export-filter-panel{margin-bottom:14px}.export-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.export-filter-grid label{display:grid;gap:6px;min-width:0}
.export-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:22px;align-items:stretch}
.export-card{min-width:0;display:grid;grid-template-columns:auto 1fr;align-items:start;gap:12px;padding:16px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(180deg,#fff 0%,#fbfdff 100%);box-shadow:0 6px 20px rgba(15,35,55,.035)}
.export-card.featured{grid-column:span 2;border-color:#cfe0f5;background:linear-gradient(135deg,#f4f9ff,#ffffff)}
.export-card>.btn,.export-card>.row-link,.export-card>.export-links{grid-column:1/-1}
.export-icon{width:42px;height:42px;display:grid;place-items:center;flex:none;border-radius:12px;background:linear-gradient(135deg,var(--accent-soft),#f6fbff);color:var(--accent);font-size:11px;font-weight:950;direction:ltr;border:1px solid #d6e4f4}
.export-card h3{margin:1px 0 5px;color:var(--ink);font-size:12px}.export-card p{margin:0;color:var(--muted);font-size:9px;line-height:1.9}
.export-links{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.export-links a,.export-card>.row-link{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:7px 11px;border:1px solid #dbe8ed;border-radius:9px;background:#f8fbff;color:#1a5eb2;font-size:9px;font-weight:850}.export-links a:hover,.export-card>.row-link:hover{border-color:#90b8ec;background:#eef5ff}
.report-print-body,.batch-print-body{margin:0;background:#e9eef2;color:#111;font-family:'IRANYekanX','IRANYekan',Tahoma,Arial,sans-serif}
.report-print-toolbar{position:sticky;top:0;z-index:50;display:flex;justify-content:center;gap:8px;padding:9px;background:#12365f}.report-print-toolbar button{border:0;border-radius:8px;padding:8px 14px;background:#fff;color:#12365f;font-family:inherit;font-weight:800;cursor:pointer}
.report-paper,.batch-invoice-paper{width:297mm;min-height:210mm;margin:12px auto;padding:11mm;background:#fff;box-shadow:0 8px 30px rgba(0,0,0,.12);box-sizing:border-box}
.report-paper>header,.batch-invoice-paper>header{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;padding-bottom:8px;border-bottom:2px solid #173f52}.report-paper h1,.batch-invoice-paper h1{margin:0 0 3px;font-size:17px}.report-paper header p,.batch-invoice-paper header p{margin:0;font-size:10px}.report-paper header>div:last-child,.batch-invoice-paper header>div:last-child{display:grid;gap:3px;text-align:left}.report-paper table,.batch-invoice-paper table{width:100%;margin-top:9px;border-collapse:collapse;font-size:8px}.report-paper th,.report-paper td,.batch-invoice-paper th,.batch-invoice-paper td{padding:5px;border:1px solid #9eabb3;text-align:right;vertical-align:top}.report-paper th,.batch-invoice-paper th{background:#edf3f5;font-weight:900}.report-paper footer{margin-top:8px;font-size:8px;color:#555}
.batch-invoice-paper{width:210mm;min-height:297mm;page-break-after:always}.batch-parties{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:9px}.batch-parties>div{display:grid;gap:3px;padding:8px;border:1px solid #cdd8de;border-radius:7px}.batch-parties small{font-size:7px;color:#596a74}.batch-parties b{font-size:10px}.batch-parties span{font-size:8px}.batch-totals{width:48%;margin:9px 0 0 auto;display:grid}.batch-totals>div{display:flex;justify-content:space-between;padding:5px 7px;border-bottom:1px solid #d7e0e5;font-size:8px}.batch-totals .grand{background:#173f52;color:#fff;font-size:9px}.batch-invoice-paper>footer{display:flex;justify-content:space-between;margin-top:24mm;padding-top:7px;border-top:1px dashed #999;font-size:8px}
@media(max-width:1200px){.export-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.export-card.featured{grid-column:1/-1}.export-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){.main-content{padding:8px 9px 100px}.topbar{top:5px;min-height:54px;border-radius:13px}.workspace-hero{align-items:flex-start;padding:17px;border-radius:15px}.workspace-hero h2{font-size:18px}.workspace-hero p{font-size:9px}.metric-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.metric-strip article{min-height:64px;padding:11px}.metric-strip article:before{width:3px}.metric-strip b{font-size:15px}.export-grid{grid-template-columns:1fr}.export-card.featured{grid-column:auto}.export-filter-grid{grid-template-columns:1fr 1fr}.panel{border-radius:14px}.invoice-editor-grid{gap:10px}}
@media(max-width:480px){.workspace-hero{display:grid}.workspace-hero .btn{width:100%}.export-filter-grid{grid-template-columns:1fr}.metric-strip{gap:7px}.metric-strip article{display:grid;grid-template-columns:4px 1fr;gap:4px}.export-card{padding:13px}.export-card h3{font-size:11px}}
@media print{.report-print-toolbar{display:none!important}.report-print-body,.batch-print-body{background:#fff}.report-paper,.batch-invoice-paper{margin:0;box-shadow:none}.report-paper{width:297mm;min-height:210mm}.batch-invoice-paper:last-child{page-break-after:auto}}
