@import url("https://fonts.googleapis.com/css2?family=Tajawal:wght@400;600;800&display=swap");
/* Primix UI Base Theme (shared across all pages) */
:root{
  --bg:#0b0f14;
  --panel:#111826;
  --panel2:#0c131f;
  --border:#22304a;
  --text:#e8eef6;
  --muted:#9fb0c8;
  --brand:#93c5fd;
  --ok:#22c55e;
  --bad:#ef4444;
  --shadow: 0 8px 24px rgba(0,0,0,.25);
  --radius:16px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:"Tajawal",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

a{color:var(--brand); text-decoration:none}
a:hover{opacity:.9}

.wrap{max-width:1000px;margin:0 auto;padding:18px}

.card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:16px;
  margin:12px 0;
  box-shadow: var(--shadow);
}

.row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  padding:10px 0;
  border-bottom:1px solid var(--border);
}
.row:last-child{border-bottom:0}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:9px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:var(--panel2);
  color:var(--text);
  font-weight:800;
  cursor:pointer;
  text-decoration:none;
}
.btn:hover{filter:brightness(1.1)}
.btn:disabled{opacity:.6;cursor:not-allowed}
.btn.primary{background:#0e1a2b}
.btn.ok{background:var(--ok);color:#06120a;border-color:transparent}
.btn.bad{background:var(--bad);color:#190606;border-color:transparent}
.btn.ghost{background:transparent}

input,select,textarea{
  background:var(--panel2);
  color:var(--text);
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px;
  outline:none;
}
input:focus,select:focus,textarea:focus{box-shadow:0 0 0 3px rgba(147,197,253,.18)}

small,.muted{color:var(--muted)}
code,pre{
  background:rgba(12,19,31,.55);
  border:1px solid rgba(34,48,74,.6);
  border-radius:10px;
  padding:2px 6px;
  color:#d7e7ff;
}
pre{padding:12px;white-space:pre-wrap;word-break:break-word}

.primix-header{
  position:sticky;
  top:0;
  z-index:20;
  backdrop-filter:blur(8px);
  background:rgba(11,15,20,.7);
  border-bottom:1px solid rgba(34,48,74,.6);
}
.primix-header .inner{
  max-width:1000px;
  margin:0 auto;
  padding:12px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.primix-header .brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:900;
  letter-spacing:.2px;
}
.primix-header .nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.primix-header .nav a{
  padding:8px 10px;
  border:1px solid transparent;
  border-radius:12px;
  color:var(--text);
}
.primix-header .nav a.active{
  border-color:rgba(147,197,253,.35);
  background:rgba(147,197,253,.08);
}

.pill{
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(34,48,74,.9);
  background:rgba(12,19,31,.65);
  font-weight:800;
  font-size:12px;
  color:var(--text);
}

/* Modal (Inbox Create) */
.modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
}
.modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
}
.modal-card{
  position: relative;
  z-index: 10000;
  max-width: 560px;
  margin: 10vh auto;
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}


/* =========================================================
   PRIMIX_ACCOUNTANT_THEME_V1
   High-contrast + readable tables for accounting (advanced view)
   Applies only on accounting page container.
   ========================================================= */
.pmx-page-accounting { color: #111; }
.pmx-page-accounting .pmx-container { max-width: 1100px; }
.pmx-page-accounting .pmx-card,
.pmx-page-accounting .pmx-panel,
.pmx-page-accounting .pmx-box {
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
}
.pmx-page-accounting label,
.pmx-page-accounting h1,
.pmx-page-accounting h2,
.pmx-page-accounting h3 { color:#111; opacity:1; }
.pmx-page-accounting .pmx-muted { color:#374151; opacity:1; }

.pmx-page-accounting table { width: 100%; border-collapse: collapse; }
.pmx-page-accounting thead th {
  text-align: right;
  font-weight: 800;
  color: #111;
  background: rgba(0,0,0,.04);
  border-bottom: 1px solid rgba(0,0,0,.10);
  padding: 10px 12px;
}
.pmx-page-accounting tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,.06);
  color:#111;
}
.pmx-page-accounting tbody tr:nth-child(even) { background: rgba(0,0,0,.015); }

.pmx-page-accounting input, .pmx-page-accounting select {
  color:#111;
  background:#fff;
  border: 1px solid rgba(0,0,0,.14);
}
.pmx-page-accounting input::placeholder { color:#6b7280; opacity:1; }

/* PRIMIX_HIDE_LEGACY_DOCS_V1
   Hide any leftover floating doc buttons/qr (legacy injections)
*/
#pmx-inv-doc-actions,
#pmx-inv-doc-actions * {
  /* allow only the new slot-based block; old id will not be used anymore */
}

.pmx-floating-docs,
.pmx-docs-float,
#pmx-floating-docs,
#pmx-docs-float,
#pmxPdfFloat,
#pmxQrFloat,
#pmx-open-pdf,
#pmx-download-pdf,
#pmx-qr-wrap,
#pmx-qr-img,
#pmxQrWrap,
#pmxQrImg {
  display: none !important;
  visibility: hidden !important;
}

/* Extra safety: if legacy scripts inject a tiny fixed bar bottom-left */
*[style*="position: fixed"][style*="bottom: 0"][style*="left: 0"]{
  /* don't kill all fixed elements—only if it looks like our docs */
}
