/* هوية شركة دبليو، مستوحاة من لوحة الفروع في المرجع المرفق. */
:root {
  --ink: #203b49;
  --muted: #6f7f87;
  --navy: #284757;
  --navy-2: #162f3a;
  --teal: #42687b;
  --teal-soft: #e7eff2;
  --amber: #b7a584;
  --amber-soft: #f4f0e8;
  --red: #b95858;
  --red-soft: #f8eaea;
  --blue: #355a6d;
  --blue-soft: #e8f0f3;
  --paper: #f1f4f4;
  --white: #fbfefe;
  --line: #d7e1e5;
  --shadow: 0 18px 45px rgba(32, 59, 73, .12);
}

.brand-mark {
  background: linear-gradient(145deg, #42687b, #284757);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 15px 35px rgba(40,71,87,.25);
  font-family: Arial, sans-serif;
  letter-spacing: -.08em;
}

.login-aside { background: linear-gradient(150deg, #182e38 0%, #284757 58%, #42687b 125%); }
.sidebar { background: linear-gradient(180deg, #162f3a, #203b49); }
.sidebar nav { overflow: auto; padding-inline-end: 2px; }
.sidebar nav::-webkit-scrollbar { width: 6px; }
.sidebar nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 20px; }
.hero-strip { background: linear-gradient(118deg, #284757 0%, #355a6d 64%, #42687b 120%); }
.btn.primary { background: #42687b; box-shadow: 0 8px 20px rgba(66,104,123,.22); }
.btn.primary:hover { background: #355a6d; }
.eyebrow, .link-btn { color: #42687b; }
.login-aside .eyebrow, .hero-strip .light { color: #d8e4e8; }
.metric .metric-icon { background: #e7eff2; color: #355a6d; }
.status-bar i { background: linear-gradient(90deg, #284757, #7a98a6); }
.audit-card { border-right-color: #42687b; }
.profile > span { background: #284757; }
.badge.paid { background: #e7eff2; color: #284757; }
.badge.promised { background: #f4f0e8; color: #76684e; }
.contract-hero { background: linear-gradient(125deg, #203b49, #355a6d); }
.timeline-item { border-right-color: #42687b; }

.attachment-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  padding: 6px 9px;
  border-radius: 8px;
  background: #e7eff2;
  color: #355a6d;
  font-size: .72rem;
  font-weight: 800;
  text-decoration: none;
}

.mini-edit {
  border: 0;
  border-radius: 7px;
  padding: 4px 8px;
  background: #e7eff2;
  color: #355a6d;
  font-size: .68rem;
  font-weight: 800;
}

.file-field {
  padding: 11px !important;
  border: 1px dashed #9fb3bc !important;
  background: #f5f8f9 !important;
}

.target-progress { padding: 8px 0; }
.target-track { height: 16px; overflow: hidden; border-radius: 20px; background: #e7eff2; }
.target-track i { display: block; height: 100%; border-radius: 20px; background: linear-gradient(90deg,#22a06b,#59c894); transition: width .45s ease; }
.target-numbers { display: flex; justify-content: space-between; gap: 15px; margin-top: 13px; color: var(--muted); font-size: .82rem; }
.target-numbers strong { color: var(--ink); }
.target-footnote { display: block; margin-top: 12px; color: var(--muted); }
.review-grid, .performance-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.review-card, .performance-card { border: 1px solid var(--line); border-radius: 13px; padding: 15px; background: #f8fafb; }
.review-card h4, .performance-card h4 { margin: 0 0 6px; }
.review-card p, .performance-card p { color: var(--muted); font-size: .75rem; line-height: 1.7; }
.review-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.btn.success { background: #42687b; color: white; }
.btn.warning { background: #f4f0e8; color: #6e624c; }
.btn.danger { background: #a84f4f; color: white; }
.bulk-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; padding: 12px 15px; }
.bulk-bar select { min-width: 190px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.bulk-bar .link-btn { margin-inline-start: auto; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; border-color: #e5c3c3; }
.review-summary { padding: 14px; border-radius: 12px; background: #e7eff2; line-height: 1.8; }
.approval-badge { display: inline-flex; padding: 5px 8px; border-radius: 15px; font-size: .68rem; font-weight: 800; }
.approval-pending { background: #f4f0e8; color: #75664b; }
.approval-approved { background: #e7eff2; color: #284757; }
.approval-rejected { background: #f8eaea; color: #a44343; }
.approval-returned { background: #fff1dc; color: #94651e; }
.payment-summary { margin-bottom: 16px; }
.payment-summary-card { cursor: pointer; transition: transform .18s ease, border-color .18s ease; }
.payment-summary-card:hover { transform: translateY(-2px); border-color: #7fa596; }
.payment-review-note { display: block; max-width: 220px; margin-top: 6px; color: var(--muted); line-height: 1.5; }
.btn.compact { padding: 7px 10px; font-size: .73rem; }
.permission-group { display: grid; gap: .45rem; padding: .75rem; border: 1px solid var(--line); border-radius: 14px; background: #f8fbfc; }
.permission-group > strong { color: var(--brand); font-size: .9rem; margin-bottom: .15rem; }
.check-grid { align-items: start; }
.nav-badge {
  margin-inline-start: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 99px;
  background: #d95f5f;
  color: white;
  font-size: .68rem;
  font-weight: 900;
}
.task-list { display: grid; gap: 12px; }
.task-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafb;
}
.task-card h4 { margin: 0 0 7px; }
.task-card p { margin: 0 0 8px; color: var(--muted); line-height: 1.7; }
.task-card.done { opacity: .74; }
.task-card.cancelled { background: #fbf1f1; }
.payment-filter { cursor: pointer; }
.payment-filter:hover { border-color: #7fa596; transform: translateY(-2px); }
.detail-grid { margin-bottom: 18px; }
.inline-form fieldset.full { grid-column: 1 / -1; }
.modal fieldset .inline-form { margin-top: 8px; }
.dashboard-actions, .section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.section-actions input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0 12px;
  background: white;
  color: var(--ink);
}
.contract-save-row {
  position: sticky;
  bottom: -22px;
  z-index: 2;
  padding: 14px 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,.84), #fff 45%);
  border-top: 1px solid var(--line);
}
.contract-save-row .btn { min-width: 190px; }
.debt-editor {
  background: #fbfdfd;
}
@media(max-width:900px){.review-grid,.performance-grid{grid-template-columns:1fr}.bulk-bar{flex-wrap:wrap}.bulk-bar .link-btn{margin-inline-start:0}.danger-zone{align-items:flex-start;flex-direction:column}}
