/* ===== برنامج المحاسبة — كلين كار ===== */

.acc-body {
  background:
    radial-gradient(900px 420px at 100% 0, rgba(140,47,57,0.1), transparent 65%),
    #f9fafa;
  min-height: 100vh;
}

/* ===== الدخول ===== */
.acc-login {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 30px 18px;
  background:
    radial-gradient(600px 320px at 50% 0, rgba(140,47,57,0.18), transparent 70%),
    linear-gradient(180deg, #f6f7f7 0%, #eeeff0 100%);
}

.acc-login[hidden] {
  display: none;
}

.acc-login-card {
  width: min(460px, 100%);
  padding: 30px 30px 24px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.acc-login-brand {
  display: inline-flex;
  margin-bottom: 22px;
}

.acc-login-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  border-radius: 18px;
  background: var(--ink);
  color: var(--amber);
}

.acc-login-icon .icon {
  width: 27px;
  height: 27px;
}

.acc-login-card h1 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--ink);
}

.acc-login-sub {
  margin: 7px auto 20px;
  max-width: 340px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.8;
}

.acc-login-card form {
  text-align: start;
}

.acc-login-submit {
  width: 100%;
  height: 46px;
  margin-top: 14px;
  font-size: 0.9rem;
}

.acc-login-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}

.acc-login-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 700;
}

.acc-login-links a:hover {
  color: var(--amber-deep);
}

.acc-login-links .icon {
  width: 14px;
  height: 14px;
}

.acc-login-note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.7rem;
}

.acc-login-note .icon {
  width: 13px;
  height: 13px;
}

/* ===== الشريط العلوي والمحتوى ===== */
.acc-topbar-btn .icon {
  width: 15px;
  height: 15px;
}

.acc-main {
  padding-bottom: 46px;
}

.acc-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin: 28px 0 18px;
}

.acc-hero-copy h1 {
  margin: 7px 0 5px;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.6vw, 2.25rem);
  font-weight: 800;
  color: var(--ink);
}

.acc-hero-copy > p {
  max-width: 620px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.8;
}

.acc-hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.acc-hero-actions .btn {
  height: 44px;
  padding: 10px 18px;
  font-size: 0.82rem;
}

/* ===== شريط الإجراءات الرئيسي: الترتيب من إنشاء العقد إلى التقارير ===== */
.acc-actions {
  display: flex;
  flex: 1 1 820px;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.acc-actions-main {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 8px;
}

.acc-action-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  height: auto;
  min-height: 52px;
  padding: 8px 12px;
  border-radius: 14px;
  text-align: start;
}

.acc-action-btn .acc-action-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--amber-deep);
}

.acc-action-btn.btn-primary .acc-action-icon {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.acc-action-btn .acc-action-label {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.acc-action-btn .acc-action-label strong {
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.acc-action-btn .acc-action-label small {
  font-size: 0.66rem;
  font-weight: 500;
  opacity: 0.74;
  white-space: nowrap;
}

.acc-action-btn .icon {
  width: 17px;
  height: 17px;
}

/* أدوات المتابعة والتحصيل تبقى في الجهة اليسرى أسفل شريط الإجراءات */
.acc-actions-side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-self: flex-end;
  gap: 8px;
  padding-top: 9px;
  border-top: 1px dashed rgba(20, 63, 92, 0.16);
}

.acc-side-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: auto;
  min-height: 44px;
  padding: 8px 12px;
  text-align: start;
}

.acc-side-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.acc-side-text strong {
  font-size: 0.78rem;
  font-weight: 800;
}

.acc-side-text small {
  font-size: 0.66rem;
  opacity: 0.76;
}

.acc-side-btn-alert {
  color: #8c2f39;
}

.acc-inline-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 10px;
  border: 1px dashed #d3d5d7;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.acc-inline-action .icon {
  width: 15px;
  height: 15px;
}

.acc-inline-action:hover {
  border-style: solid;
  background: #fff;
}

.acc-nav-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-inline-start: 2px;
  border-radius: 999px;
  background: var(--amber);
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

/* ===== المهام السريعة ===== */
.acc-quick {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.acc-quick-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fcfcfc 58%, #f6f7f7 100%);
  color: var(--ink);
  text-align: start;
  box-shadow:
    0 2px 0 rgba(20, 63, 92, 0.08),
    0 6px 16px rgba(20, 63, 92, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.16s ease, border-color 0.16s ease;
}

.acc-quick-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(20, 63, 92, 0.28);
  box-shadow:
    0 3px 0 rgba(20, 63, 92, 0.09),
    0 10px 22px rgba(20, 63, 92, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.acc-quick-btn:active {
  transform: translateY(1px);
  box-shadow:
    0 1px 0 rgba(20, 63, 92, 0.08),
    0 2px 5px rgba(20, 63, 92, 0.08),
    inset 0 1px 2px rgba(20, 63, 92, 0.12);
}

.acc-quick-btn:focus-visible {
  outline: 3px solid rgba(140,47,57,0.82);
  outline-offset: 2px;
}

.acc-quick-btn.is-primary {
  border-color: transparent;
  background: linear-gradient(180deg, #23618a 0%, #19506f 58%, #143f5c 100%);
  color: #fff;
  box-shadow:
    0 2px 0 rgba(11, 39, 58, 0.3),
    0 8px 20px rgba(20, 63, 92, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.acc-quick-btn.is-primary:hover {
  background: linear-gradient(180deg, #2a6f9b 0%, #1e5a7e 58%, #17496a 100%);
  border-color: transparent;
  box-shadow:
    0 3px 0 rgba(11, 39, 58, 0.32),
    0 12px 26px rgba(20, 63, 92, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.acc-quick-btn.is-primary:active {
  background: linear-gradient(180deg, #19506f 0%, #143f5c 100%);
  transform: translateY(1px);
  box-shadow:
    0 1px 0 rgba(11, 39, 58, 0.26),
    0 2px 6px rgba(20, 63, 92, 0.18),
    inset 0 1px 2px rgba(0, 0, 0, 0.18);
}

.acc-quick-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--amber-soft);
  color: var(--amber-deep);
}

.acc-quick-btn.is-primary .acc-quick-icon {
  background: rgba(255, 255, 255, 0.14);
  color: var(--amber);
}

.acc-quick-icon .icon {
  width: 20px;
  height: 20px;
}

.acc-quick-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.acc-quick-text strong {
  font-size: 0.9rem;
  font-weight: 800;
}

.acc-quick-text small {
  color: var(--muted);
  font-size: 0.72rem;
}

.acc-quick-btn.is-primary .acc-quick-text small {
  color: rgba(255, 255, 255, 0.72);
}

/* ===== بطاقات الإحصاء ===== */
.acc-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.acc-stat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.acc-stat-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--amber-soft);
  color: var(--amber-deep);
}

.acc-stat-icon .icon {
  width: 19px;
  height: 19px;
}

.acc-stat-icon-green {
  background: var(--green-soft);
  color: var(--green);
}

.acc-stat-icon-red {
  background: var(--red-soft);
  color: var(--red);
}

.acc-stat-icon-amber {
  background: #f3f2f2;
  color: var(--amber-deep);
}

.acc-stat div > span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.acc-stat strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.15;
}

.acc-stat strong em {
  color: var(--muted);
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 600;
}

.acc-stat small {
  color: #7d97a8;
  font-size: 0.67rem;
  line-height: 1.5;
}

.acc-stat-hero {
  border-color: rgba(20, 63, 92, 0.18);
  background: linear-gradient(145deg, var(--ink), #1d5f86);
  box-shadow: var(--shadow-md);
}

.acc-stat-hero .acc-stat-icon {
  background: rgba(255, 255, 255, 0.14);
  color: var(--amber);
}

.acc-stat-hero div > span,
.acc-stat-hero small {
  color: rgba(255, 255, 255, 0.72);
}

.acc-stat-hero strong {
  color: #fff;
}

/* ===== أزرار الأقسام ===== */
.acc-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.acc-tab {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fcfcfc 55%, #f7f7f7 100%);
  color: var(--ink);
  text-align: start;
  cursor: pointer;
  box-shadow:
    0 2px 0 rgba(20, 63, 92, 0.08),
    0 6px 16px rgba(20, 63, 92, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: transform 0.16s cubic-bezier(0.2, 0.8, 0.3, 1), border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.acc-tab:hover {
  border-color: rgba(140,47,57,0.7);
  transform: translateY(-1px);
  box-shadow:
    0 3px 0 rgba(20, 63, 92, 0.09),
    0 10px 20px rgba(20, 63, 92, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.acc-tab:active {
  transform: translateY(1px);
  box-shadow:
    0 1px 0 rgba(20, 63, 92, 0.08),
    0 2px 5px rgba(20, 63, 92, 0.08),
    inset 0 1px 2px rgba(20, 63, 92, 0.12);
}

.acc-tab:focus-visible {
  outline: 3px solid rgba(140,47,57,0.82);
  outline-offset: 2px;
}

.acc-tab-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 13px;
  background: var(--cream);
  color: var(--ink);
  transition: background 0.18s ease, color 0.18s ease;
}

.acc-tab-icon .icon {
  width: 20px;
  height: 20px;
}

.acc-tab-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.acc-tab-text strong {
  font-family: var(--font-display);
  font-size: 0.93rem;
  font-weight: 800;
}

.acc-tab-text small {
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.5;
}

.acc-tab-count {
  margin-inline-start: auto;
  min-width: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 800;
  text-align: center;
}

.acc-tab-count-soft {
  background: var(--amber-soft);
  color: var(--amber-deep);
}

.acc-tab.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.acc-tab.is-active .acc-tab-icon {
  background: rgba(255, 255, 255, 0.14);
  color: var(--amber);
}

.acc-tab.is-active .acc-tab-text small {
  color: rgba(255, 255, 255, 0.7);
}

.acc-tab.is-active .acc-tab-count {
  background: var(--amber);
  color: var(--ink);
}

/* ===== اللوحات والأدوات ===== */
.acc-view[hidden] {
  display: none;
}

.acc-view {
  animation: acc-fade 0.25s ease;
}

@keyframes acc-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.acc-panel {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.acc-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.acc-toolbar .adm-search {
  flex: 1 1 300px;
  max-width: 460px;
}

.acc-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-inline-start: auto;
  flex-wrap: wrap;
}

.acc-toolbar-actions .btn {
  height: 38px;
  padding: 8px 14px;
  font-size: 0.76rem;
}

.acc-count {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ===== تنبيه الحجوزات ===== */
.acc-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(140,47,57,0.6);
  border-radius: 16px;
  background: linear-gradient(120deg, #f7f7f7, #fff);
  box-shadow: var(--shadow-sm);
}

.acc-banner[hidden] {
  display: none;
}

.acc-banner-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 13px;
  background: var(--amber);
  color: var(--ink);
}

.acc-banner-icon .icon {
  width: 20px;
  height: 20px;
}

.acc-banner-copy {
  flex: 1;
  min-width: 0;
}

.acc-banner-copy strong {
  display: block;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.acc-banner-copy p {
  margin-top: 2px;
  color: var(--amber-deep);
  font-size: 0.74rem;
}

/* ===== الجداول ===== */
.acc-table-wrap {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.acc-table-scroll {
  max-height: 430px;
  overflow: auto;
}

.acc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
}

.acc-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 11px 10px;
  background: #f8f9f9;
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 800;
  text-align: start;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

.acc-table tbody td {
  padding: 11px 10px;
  border-bottom: 1px solid #f5f5f6;
  color: var(--text);
  vertical-align: middle;
}

.acc-table tbody tr:last-child td {
  border-bottom: 0;
}

.acc-table tbody tr:hover {
  background: #fdfdfd;
}

.acc-table tbody tr.is-cancelled td {
  opacity: 0.62;
}

.acc-money {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--ink);
}

.acc-money-green {
  color: var(--green);
}

.acc-money-red {
  color: var(--red);
}

.acc-cell-strong {
  display: block;
  color: var(--ink);
  font-weight: 700;
}

.acc-cell-sub {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.66rem;
}

.acc-plate {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  direction: ltr;
  white-space: nowrap;
}

.acc-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 800;
  white-space: nowrap;
}

.acc-status::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.acc-status.is-active {
  background: var(--green-soft);
  color: var(--green);
}

.acc-status.is-completed {
  background: var(--cream-deep);
  color: var(--ink);
}

.acc-status.is-cancelled {
  background: var(--red-soft);
  color: var(--red);
}

.acc-status.is-available {
  background: var(--green-soft);
  color: var(--green);
}

.acc-status.is-rented {
  background: var(--amber-soft);
  color: var(--amber-deep);
}

.acc-row-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.acc-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #fbfbfb);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(20, 63, 92, 0.08), 0 3px 7px rgba(20, 63, 92, 0.06);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.acc-link-btn:hover {
  border-color: var(--amber);
  background: linear-gradient(180deg, #ffffff, #f7f6f6);
  transform: translateY(-1px);
  box-shadow: 0 2px 0 rgba(20, 63, 92, 0.08), 0 5px 11px rgba(20, 63, 92, 0.09);
}

.acc-link-btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 1px 2px rgba(20, 63, 92, 0.14);
}

.acc-link-btn:focus-visible {
  outline: 2px solid rgba(140,47,57,0.82);
  outline-offset: 1px;
}

.acc-link-btn.is-danger:hover {
  border-color: var(--red);
  background: linear-gradient(180deg, #ffffff, var(--red-soft));
  color: var(--red);
}

.acc-link-btn .icon {
  width: 12px;
  height: 12px;
}

.acc-tab:disabled,
.acc-quick-btn:disabled,
.acc-link-btn:disabled,
.acc-report-item:disabled,
.acc-preset:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: inset 0 0 0 1px rgba(20, 63, 92, 0.06);
}

.acc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 42px 20px;
  text-align: center;
}

.acc-empty[hidden] {
  display: none;
}

.acc-empty-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--cream);
  color: var(--ink);
}

.acc-empty-icon .icon {
  width: 25px;
  height: 25px;
}

.acc-empty h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
}

.acc-empty p {
  max-width: 420px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.8;
}

.acc-empty .btn {
  margin-top: 5px;
}

.acc-empty-sm {
  padding: 22px 12px;
}

.acc-empty-sm p {
  font-size: 0.74rem;
}

/* ===== بطاقات السيارات ===== */
.acc-car-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.acc-car-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.acc-car-media {
  position: relative;
  height: 138px;
  background: var(--cream-deep);
}

.acc-car-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.acc-car-media .acc-status {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 3px 10px rgba(20, 63, 92, 0.14);
}

.acc-car-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 13px 13px;
  flex: 1;
}

.acc-car-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.acc-car-head strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink);
}

.acc-car-head small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.66rem;
}

.acc-car-price {
  color: var(--amber-deep);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

.acc-car-price span {
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 600;
}

.acc-car-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.acc-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink-soft);
  font-size: 0.62rem;
  font-weight: 600;
}

.acc-car-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.acc-car-stat {
  text-align: center;
}

.acc-car-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.58rem;
}

.acc-car-stat strong {
  display: block;
  margin-top: 1px;
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

.acc-car-stat strong.is-green {
  color: var(--green);
}

.acc-car-stat strong.is-red {
  color: var(--red);
}

.acc-car-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ===== التقارير ===== */
.acc-report-filter {
  margin-bottom: 12px;
}

.acc-filter-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.acc-date-field {
  width: 150px;
}

.acc-car-field {
  width: 200px;
}

.acc-date-field .adm-input,
.acc-car-field select {
  height: 40px;
  font-size: 0.78rem;
}

.acc-presets {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fafbfb;
}

.acc-preset {
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.acc-preset:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 1px 0 rgba(20, 63, 92, 0.08), 0 3px 8px rgba(20, 63, 92, 0.06);
}

.acc-preset:active {
  transform: translateY(1px);
  box-shadow: inset 0 1px 2px rgba(20, 63, 92, 0.14);
}

.acc-preset:focus-visible {
  outline: 2px solid rgba(140,47,57,0.8);
  outline-offset: 1px;
}

.acc-preset.is-active {
  background: linear-gradient(180deg, #ffffff, #f9fafa);
  color: var(--ink);
  box-shadow:
    0 1px 0 rgba(20, 63, 92, 0.1),
    0 4px 10px rgba(20, 63, 92, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.acc-report-actions {
  display: flex;
  gap: 6px;
  margin-inline-start: auto;
  flex-wrap: wrap;
}

.acc-report-actions .btn {
  height: 38px;
  padding: 8px 13px;
  font-size: 0.74rem;
}

.acc-report-note {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.7;
}

.acc-report-note .icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  margin-top: 2px;
}

.acc-report-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.acc-report-stat {
  padding: 12px 12px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.acc-report-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 600;
}

.acc-report-stat strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  white-space: nowrap;
}

.acc-report-stat strong em {
  color: var(--muted);
  font-size: 0.65rem;
  font-style: normal;
}

.acc-report-stat.is-green strong {
  color: var(--green);
}

.acc-report-stat.is-red strong {
  color: var(--red);
}

.acc-report-stat.is-amber strong {
  color: var(--amber-deep);
}

.acc-report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.acc-report-card {
  padding: 0;
  overflow: hidden;
}

.acc-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  background: #fdfdfd;
}

.acc-report-head h2 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
}

.acc-report-head p {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.66rem;
}

.acc-report-head .btn {
  height: 36px;
  padding: 7px 12px;
  font-size: 0.72rem;
}

.acc-report-card .acc-table-wrap {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.acc-expenses-card {
  margin-bottom: 20px;
}

/* ===== قائمة التقارير والعارض ===== */
.acc-report-menu-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.acc-report-menu-head h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
}

.acc-report-menu-head p {
  margin-top: 3px;
  max-width: 640px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.7;
}

.acc-report-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.acc-report-item:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.acc-report-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fcfdfd 60%, #f9f9f9 100%);
  color: var(--ink);
  font-family: var(--font-body);
  text-align: start;
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(20, 63, 92, 0.07),
    0 4px 10px rgba(20, 63, 92, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  transition: transform 0.16s cubic-bezier(0.2, 0.8, 0.3, 1), border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.acc-report-item:hover {
  border-color: var(--amber);
  background: linear-gradient(180deg, #ffffff, #fafafa);
  transform: translateY(-1px);
  box-shadow:
    0 2px 0 rgba(20, 63, 92, 0.08),
    0 8px 18px rgba(20, 63, 92, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.acc-report-item:active {
  transform: translateY(1px);
  box-shadow: inset 0 1px 2px rgba(20, 63, 92, 0.14);
}

.acc-report-item:focus-visible {
  outline: 3px solid rgba(140,47,57,0.82);
  outline-offset: 2px;
}

.acc-report-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 9px;
  background: var(--amber-soft);
  color: var(--amber-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.acc-report-item.is-crimson .acc-report-item-icon {
  background: var(--crimson-soft);
  color: var(--crimson-deep);
}

.acc-report-item.is-red .acc-report-item-icon {
  background: var(--red-clear-soft);
  color: var(--red-clear);
}

.acc-report-item.is-red:hover {
  border-color: rgba(192, 57, 43, 0.52);
}

.acc-report-item-icon .icon {
  width: 16px;
  height: 16px;
}

.acc-report-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.acc-report-item-text strong {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.45;
}

.acc-report-item-text small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.acc-report-item-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  opacity: 0.72;
}

.acc-report-item-arrow .icon {
  width: 13px;
  height: 13px;
}

.acc-report-item:hover .acc-report-item-arrow {
  color: var(--amber-deep);
  opacity: 1;
}

.acc-report-item.is-red:hover .acc-report-item-arrow {
  color: var(--red);
}

.acc-report-denied {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #fdfdfd;
  text-align: center;
  justify-items: center;
}

.acc-report-denied-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--ink-3);
}

.acc-report-denied strong {
  font-family: var(--font-display);
  font-size: 0.86rem;
}

.acc-report-denied p {
  max-width: 420px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.7;
}

.acc-report-runner {
  display: grid;
  gap: 12px;
}

.acc-report-runner-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.acc-report-runner-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.acc-report-runner-head h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
}

.acc-report-runner-head p {
  margin-top: 2px;
  max-width: 620px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.65;
}

.acc-report-runner-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--amber-soft);
  color: var(--amber-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.acc-report-runner-icon.is-crimson {
  background: var(--crimson-soft);
  color: var(--crimson-deep);
}

.acc-report-runner-icon.is-red {
  background: var(--red-clear-soft);
  color: var(--red-clear);
}

.acc-report-runner-icon .icon {
  width: 16px;
  height: 16px;
}

.acc-report-scope {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}

.acc-report-scope-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fafbfb;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.5;
}

.acc-report-scope-item b {
  color: var(--ink);
  font-weight: 800;
}

.acc-report-scope-item .icon {
  width: 12px;
  height: 12px;
  color: var(--ink-3);
}

.acc-report-section-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 4px 0 7px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
}

.acc-report-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.acc-report-section-label[hidden] {
  display: none;
}

.acc-report-filter-dynamic {
  margin-top: 0;
}

.acc-report-filter-field {
  width: 230px;
}

.acc-report-filter-field select {
  height: 40px;
  font-size: 0.76rem;
}

.acc-report-toolbar {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.acc-report-toolbar-spacer {
  flex: 1 1 20px;
}

.acc-report-toolbar .btn {
  height: 38px;
  font-size: 0.74rem;
}

#reportShowBtn {
  min-width: 140px;
}

.acc-report-toolbar .btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.acc-report-placeholder {
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: #fdfdfd;
}

.acc-report-placeholder h3 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink);
}

.acc-report-placeholder p {
  color: var(--muted);
  font-size: 0.7rem;
}

.acc-report-output {
  display: grid;
  gap: 12px;
}

.acc-report-range {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafbfb;
  color: var(--muted);
  font-size: 0.69rem;
}

.acc-report-range-main {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink);
  font-weight: 700;
}

.acc-report-range-main .icon {
  width: 13px;
  height: 13px;
}

.acc-report-chip {
  padding: 3px 8px;
  border-radius: 7px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 0.65rem;
}

.acc-report-range-generated {
  margin-inline-start: auto;
  color: var(--muted);
  font-size: 0.63rem;
}

.acc-report-card .acc-table th.is-money,
.acc-report-card .acc-table th.is-number,
.acc-report-card .acc-table td.is-money,
.acc-report-card .acc-table td.is-number {
  text-align: start;
  white-space: nowrap;
}

.acc-report-details-col {
  width: 90px;
  text-align: center !important;
}

.acc-report-totals td {
  background: #f8f9f9;
  border-top: 2px solid var(--line);
  font-weight: 800;
  color: var(--ink);
}

.acc-report-formula {
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--cream);
  color: var(--ink-3);
  font-weight: 600;
}

.acc-report-details-panel {
  max-width: 900px;
}

.acc-report-details-body {
  display: grid;
  gap: 14px;
}

.acc-report-detail-section h3 {
  margin-bottom: 7px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink);
}

.acc-report-detail-table {
  font-size: 0.7rem;
}

/* ===== الشيكات والكراجات والتجار ===== */
.acc-cheque-fields {
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed rgba(140,47,57,0.8);
  border-radius: 12px;
  background: #faf9f9;
}

.acc-cheque-fields[hidden] {
  display: none;
}

.acc-cheque-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 10px;
  color: var(--amber-deep);
  font-size: 0.68rem;
  line-height: 1.6;
}

.acc-cheque-hint .icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  margin-top: 2px;
}

.acc-cheque-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.6rem;
  font-weight: 800;
  vertical-align: middle;
}

.acc-cheque-badge.is-pending {
  background: var(--amber-soft);
  color: var(--amber-deep);
}

.acc-cheque-badge.is-collected {
  background: var(--green-soft);
  color: var(--green);
}

.acc-cheque-badge.is-returned {
  background: var(--red-soft);
  color: var(--red);
}

.acc-cheque-meta {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.64rem;
}

.acc-link-btn.is-green:hover {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}

.acc-expense-maintenance {
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fdfdfd;
}

.acc-expense-maintenance[hidden] {
  display: none;
}

.acc-expense-subhead {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 10px;
}

.acc-expense-subhead strong {
  color: var(--text);
  font-family: var(--font-display);
}

.acc-expense-subhead span {
  color: var(--muted);
  font-size: 12px;
}

.acc-expense-suppliers {
  margin-top: 10px;
}

.acc-picker {
  position: relative;
  display: flex;
  flex-direction: column;
}

.acc-picker-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.acc-picker-control .adm-input {
  flex: 1 1 auto;
  min-width: 0;
}

.acc-picker-control .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.acc-picker-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(20, 63, 92, 0.18);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.acc-picker-menu[hidden] {
  display: none;
}

.acc-picker-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: right;
  cursor: pointer;
}

.acc-picker-option:hover,
.acc-picker-option:focus-visible {
  background: #f5f6f6;
}

.acc-picker-option small {
  color: var(--muted);
  font-size: 11px;
}

.acc-picker-option.is-add {
  color: var(--amber-deep);
  font-weight: 700;
}

.acc-picker-empty {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
}

.acc-quick-supplier {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px dashed rgba(20, 63, 92, 0.24);
  border-radius: 12px;
  background: #fafbfb;
}

.acc-quick-supplier[hidden] {
  display: none;
}

.acc-quick-supplier-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

@media (max-width: 720px) {
  .acc-picker-control {
    flex-wrap: wrap;
  }

  .acc-picker-control .btn {
    width: 100%;
    justify-content: center;
  }
}

.acc-supplier-panel {
  max-width: 1040px;
}

.acc-supplier-body {
  display: grid;
  gap: 16px;
}

.acc-supplier-section {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.acc-supplier-section h3 {
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--ink);
}

.acc-supplier-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.acc-supplier-form .adm-field.is-wide {
  grid-column: 1 / -1;
}

.acc-supplier-form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.acc-supplier-list {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.acc-supplier-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fdfdfd;
}

.acc-supplier-item strong {
  display: block;
  font-size: 0.76rem;
  color: var(--ink);
}

.acc-supplier-item small {
  color: var(--muted);
  font-size: 0.64rem;
}

/* ===== نموذج العقد ===== */
.acc-modal-panel {
  max-width: 1180px;
}

.acc-modal-panel-sm {
  max-width: 820px;
}

.acc-contract-body {
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.7fr);
}

.acc-new-renter {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px dashed rgba(140,47,57,0.75);
  border-radius: 12px;
  background: #faf9f9;
}

.acc-new-renter[hidden] {
  display: none;
}

.acc-inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.acc-inline-actions .btn {
  height: 36px;
  padding: 7px 12px;
  font-size: 0.72rem;
}

.acc-inline-hint {
  color: var(--muted);
  font-size: 0.66rem;
}

.acc-field-note {
  color: var(--muted);
  font-size: 0.64rem;
}

.acc-total-strip,
.acc-remaining-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--cream);
}

.acc-total-strip > div,
.acc-remaining-strip {
  font-size: 0.74rem;
}

.acc-total-strip > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.acc-total-strip span,
.acc-remaining-strip span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.acc-total-strip strong,
.acc-remaining-strip strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  white-space: nowrap;
}

.acc-total-strip p {
  color: var(--muted);
  font-size: 0.64rem;
}

.acc-remaining-strip {
  background: #f8f8f8;
  border: 1px solid rgba(140,47,57,0.45);
}

.acc-summary-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.acc-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.73rem;
}

.acc-summary-row span {
  color: var(--muted);
}

.acc-summary-row strong {
  color: var(--ink);
  font-weight: 700;
  text-align: end;
}

.acc-summary-row.is-total {
  margin-top: 3px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
}

.acc-summary-row.is-total strong {
  color: var(--amber-deep);
  font-size: 0.95rem;
}

.acc-summary-empty {
  padding: 18px 8px;
  color: var(--muted);
  font-size: 0.72rem;
  text-align: center;
  line-height: 1.8;
}

/* ===== السائق البديل ===== */
.acc-driver-add {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 12px 14px;
  border: 1px dashed rgba(20, 63, 92, 0.24);
  border-radius: 12px;
  background: #fafafa;
}

.acc-driver-add .acc-inline-hint {
  flex: 1 1 240px;
  margin: 0;
}

.acc-driver-add-btn {
  flex: 0 0 auto;
}

.acc-driver-add-btn.is-active {
  border-color: rgba(140,47,57,0.5);
  background: #f9f9f9;
  color: #8f2a36;
}

.acc-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px dashed rgba(20, 63, 92, 0.24);
  border-radius: 12px;
  background: #fafafa;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.acc-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
  cursor: pointer;
}

.acc-review-check {
  border-style: solid;
  border-color: rgba(185, 138, 30, 0.45);
  background: #f8f7f7;
  line-height: 1.7;
}

.acc-check + .acc-inline-hint {
  display: block;
  margin-top: 6px;
}

.acc-driver-fields {
  margin-top: 12px;
}

.acc-driver-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  color: var(--amber-deep);
  font-weight: 700;
}

.acc-driver-tag .icon {
  width: 12px;
  height: 12px;
}

.acc-driver-primary {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafafa;
}

.acc-driver-primary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.76rem;
}

.acc-driver-primary-row span {
  color: var(--muted);
}

.acc-driver-primary-row strong {
  color: var(--ink);
  font-weight: 700;
  text-align: end;
}

.acc-driver-current {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--amber-soft);
  color: var(--amber-deep);
  font-size: 0.74rem;
  line-height: 1.7;
}

/* ===== تفاصيل العقد ===== */
.acc-details-body {
  display: block;
  padding: 18px 22px 22px;
  overflow-y: auto;
  background: #fafbfb;
}

.acc-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.acc-details-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.acc-details-card h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--ink);
}

.acc-details-card h3 .icon {
  width: 16px;
  height: 16px;
  color: var(--amber-deep);
}

.acc-details-card.is-primary {
  border-color: rgba(20, 63, 92, 0.28);
  background: linear-gradient(180deg, #fafafa, #fff);
}

.acc-details-card.is-driver {
  border-color: rgba(140,47,57,0.28);
  background: linear-gradient(180deg, #f8f8f8, #fff);
}

.acc-details-list {
  display: grid;
  gap: 6px;
  margin: 0;
}

.acc-details-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.75rem;
}

.acc-details-list > div.is-wide {
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
}

.acc-details-list dt {
  flex: 0 0 auto;
  color: var(--muted);
}

.acc-details-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  text-align: end;
  overflow-wrap: anywhere;
}

.acc-details-list > div.is-wide dd {
  text-align: start;
  font-weight: 600;
}

.acc-details-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.8;
}

.acc-details-notes {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fff;
}

.acc-details-notes strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 0.78rem;
}

.acc-details-notes p {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.8;
  white-space: pre-wrap;
}

/* ===== شاشة نجاح حفظ العقد ===== */
.adm-editor-panel > form[hidden] {
  display: none;
}

.acc-contract-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-height: calc(100dvh - 48px);
  padding: 34px 26px 26px;
  overflow-y: auto;
  text-align: center;
  background:
    radial-gradient(420px 220px at 50% 0, rgba(37, 160, 104, 0.13), transparent 72%),
    #fff;
}

.acc-contract-done[hidden] {
  display: none;
}

.acc-done-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid #b9e6cd;
  border-radius: 50%;
  background: #e9f9f0;
  color: #1c7d4d;
}

.acc-done-icon .icon {
  width: 30px;
  height: 30px;
}

.acc-contract-done h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 800;
}

.acc-contract-done > p {
  margin: 0;
  max-width: 460px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.8;
}

.acc-done-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 620px;
  margin: 10px 0 14px;
}

.acc-done-summary span {
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f9f9f9;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.acc-done-summary b {
  color: var(--ink);
  font-weight: 800;
}

.acc-done-print {
  width: 100%;
  max-width: 460px;
  justify-content: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: 16px;
  box-shadow: 0 16px 32px rgba(14, 47, 70, 0.24);
  font-size: 1.05rem;
  font-weight: 800;
}

.acc-done-print .icon {
  width: 22px;
  height: 22px;
}

.acc-done-docs {
  width: 100%;
  max-width: 460px;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 14px;
  margin-top: 10px;
  font-size: 0.9rem;
  font-weight: 700;
}

.acc-done-docs .icon {
  width: 20px;
  height: 20px;
}

.acc-done-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 460px;
  margin-top: 6px;
}

.acc-done-actions .btn {
  flex: 1 1 120px;
  justify-content: center;
}

.acc-renter-body {
  display: block;
  padding: 18px 22px 24px;
  overflow-y: auto;
  background: #fafbfb;
}

.acc-renter-body .adm-form-section {
  margin-bottom: 12px;
}

.acc-doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.acc-doc-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.acc-doc-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(220px 110px at 50% 0, rgba(20, 63, 92, 0.06), transparent 70%),
    #fdfdfd;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.acc-doc-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.acc-doc-preview .acc-doc-empty {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.acc-doc-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px 14px;
}

.acc-doc-meta strong {
  color: var(--ink);
  font-size: 0.88rem;
}

.acc-doc-meta small {
  color: var(--muted);
  font-size: 0.7rem;
}

.acc-doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.acc-doc-actions .btn {
  padding: 7px 12px;
  font-size: 0.72rem;
  border-radius: 10px;
}

.acc-doc-actions .btn[hidden] {
  display: none;
}

.acc-doc-remove {
  color: #b42318;
  border-color: #f3c0bb;
}

.acc-doc-remove:hover {
  background: #fdf2f1;
}

.acc-doc-status {
  min-height: 18px;
  margin: 8px 2px 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.acc-doc-status.is-error {
  color: #b42318;
}

@media (max-width: 560px) {
  .acc-doc-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== الحجوزات ===== */
.acc-bookings-panel {
  max-width: 960px;
  padding: 0;
  border-radius: 24px;
}

.acc-bookings-head {
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(360px 150px at 95% 0, rgba(140,47,57,0.14), transparent 70%),
    #fff;
}

.acc-bookings-head h2 {
  margin: 6px 0 3px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ink);
}

.acc-bookings-head p {
  max-width: 620px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.8;
}

.acc-bookings-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: min(58vh, 520px);
  padding: 16px 20px;
  overflow-y: auto;
  background: #fafbfb;
}

.acc-booking-item {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.acc-booking-main strong {
  display: block;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.acc-booking-main small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.67rem;
}

.acc-booking-ref {
  display: inline-flex;
  margin-top: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.acc-booking-dates {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.7;
}

.acc-booking-dates strong {
  display: block;
  color: var(--ink);
  font-size: 0.78rem;
}

.acc-booking-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.acc-booking-total {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

.acc-booking-total small {
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 600;
}

.acc-booking-linked {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 700;
}

.acc-booking-linked .icon {
  width: 13px;
  height: 13px;
}

.acc-booking-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 22px;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 0.74rem;
}

/* ===== الطباعة ===== */
.acc-print-area {
  display: none;
}

.acc-print-sheet {
  position: relative;
  direction: rtl;
  color: #163a52;
  font-family: 'Tajawal', 'Segoe UI', sans-serif;
  font-size: 12px;
  line-height: 1.7;
}

.acc-print-sheet > * {
  position: relative;
  z-index: 1;
}

.acc-print-watermark {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
}

.acc-print-watermark img {
  width: 58%;
  max-width: 400px;
  opacity: 0.022;
  filter: grayscale(1);
}

.acc-print-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--contract-color, #143f5c);
}

.acc-print-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.acc-print-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.acc-print-brand strong {
  display: block;
  color: var(--contract-color, #143f5c);
  font-family: 'Cairo', 'Segoe UI', sans-serif;
  font-size: 20px;
  font-weight: 800;
}

.acc-print-brand span {
  display: block;
  color: #587489;
  font-size: 11px;
}

.acc-print-doc {
  text-align: end;
}

.acc-print-doc span {
  display: block;
  color: var(--contract-color, #8f2a36);
  font-size: 11px;
  font-weight: 700;
}

.acc-print-doc strong {
  display: block;
  color: var(--contract-color, #143f5c);
  font-family: 'Cairo', 'Segoe UI', sans-serif;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.acc-print-letterhead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding-bottom: 2px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.acc-print-side {
  color: #22323d;
  font-size: 12px;
  line-height: 1.65;
}

.acc-print-side strong {
  display: block;
  margin-bottom: 2px;
  color: #10283a;
  font-family: 'Cairo', 'Segoe UI', sans-serif;
  font-size: 18px;
  font-weight: 800;
}

.acc-print-side span {
  display: block;
}

.acc-print-side-ar {
  text-align: right;
}

.acc-print-side-en {
  text-align: left;
}

.acc-print-phone {
  color: #10283a;
  font-weight: 700;
  unicode-bidi: embed;
}

.acc-print-side-ar .acc-print-phone {
  direction: ltr;
  text-align: right;
}

.acc-print-side-en .acc-print-phone {
  direction: ltr;
  text-align: left;
}

.acc-print-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.acc-print-letterhead .acc-print-logo {
  width: 76px;
  height: 76px;
}

.acc-print-rule {
  height: 3px;
  margin-top: 8px;
  border-radius: 2px;
  background: #10283a;
}

.acc-print-contract-title {
  margin: 10px 0 6px;
  color: #10283a;
  font-family: 'Cairo', 'Segoe UI', sans-serif;
  font-size: 25px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  break-after: avoid;
  page-break-after: avoid;
}

.acc-print-contract-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #d4d6d8;
  color: #3d5566;
  font-size: 12.5px;
}

.acc-print-contract-no b {
  color: #10283a;
  font-size: 14px;
  letter-spacing: 0.03em;
}

.acc-print-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 0;
  color: #587489;
  font-size: 10.5px;
}

.acc-print-title {
  margin: 12px 0 8px;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--contract-soft, #f6f7f7);
  color: var(--contract-color, #143f5c);
  font-family: 'Cairo', 'Segoe UI', sans-serif;
  font-size: 13px;
  font-weight: 800;
  break-after: avoid;
  page-break-after: avoid;
}

.acc-print-table {
  width: 100%;
  margin-bottom: 12px;
  border-collapse: collapse;
  font-size: 11px;
}

.acc-print-table th,
.acc-print-table td {
  padding: 6px 8px;
  border: 1px solid #e5e6e7;
  text-align: start;
  vertical-align: top;
}

.acc-print-table th {
  background: var(--contract-soft, #f8f9f9);
  color: var(--contract-color, #143f5c);
  font-weight: 700;
}

.acc-print-table td.num {
  direction: ltr;
  text-align: end;
  font-weight: 700;
  white-space: nowrap;
}

.acc-print-totals {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-bottom: 14px;
  font-size: 11.5px;
}

.acc-print-totals b {
  color: var(--contract-color, #143f5c);
}

.acc-print-notes {
  margin-bottom: 16px;
  padding: 8px 10px;
  border: 1px dashed #e5e6e7;
  border-radius: 6px;
  color: #365a70;
  font-size: 10.5px;
  white-space: pre-wrap;
}

.acc-print-sign {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  margin-top: 32px;
  padding-top: 12px;
  color: #587489;
  font-size: 11px;
  text-align: center;
}

.acc-print-sign div {
  flex: 1;
  padding-top: 26px;
  border-top: 1px solid #cccfd1;
}

.acc-print-foot {
  margin-top: 20px;
  padding-top: 7px;
  border-top: 1px solid #e5e6e7;
  color: #7d97a8;
  font-size: 9.5px;
  text-align: center;
}

.acc-print-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0 14px;
}

.acc-print-summary div {
  padding: 7px 9px;
  border: 1px solid #e5e6e7;
  border-radius: 6px;
}

.acc-print-summary span {
  display: block;
  color: #587489;
  font-size: 9.5px;
}

.acc-print-summary strong {
  display: block;
  color: var(--contract-color, #143f5c);
  font-size: 13px;
}

.acc-print-section {
  margin-top: 14px;
  font-family: 'Cairo', 'Segoe UI', sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: var(--contract-color, #143f5c);
}

/* نموذج العقد: خطوط أوضح وأرقام بارزة مع الحفاظ على التخطيط وRTL */
.acc-contract-print {
  display: flex;
  flex-direction: column;
  min-height: 266mm;
  color: #0f1c24;
  font-size: 15.5px;
  line-height: 1.6;
}

.acc-print-blocks {
  display: flex;
  flex-direction: column;
}

.acc-contract-print .acc-print-letterhead {
  gap: 16px;
}

.acc-contract-print .acc-print-side {
  font-size: 12.5px;
}

.acc-contract-print .acc-print-side strong {
  font-size: 19px;
}

.acc-contract-print .acc-print-contract-title {
  margin: 5px 0 2px;
  font-size: 28px;
}

.acc-contract-print .acc-print-contract-meta {
  margin-bottom: 5px;
  padding-bottom: 0;
  border-bottom: 0;
  color: #24363f;
  font-size: 14px;
}

.acc-contract-print .acc-print-contract-no b {
  font-size: 15.5px;
}

.acc-contract-print .acc-print-title {
  margin: 3px 0 1px;
  padding: 3px 9px;
  background: #eeeff0;
  color: #0d1a22;
  font-size: 16.5px;
}

.acc-contract-print .acc-print-table {
  margin-bottom: 5px;
  font-size: 14.5px;
  line-height: 1.32;
}

.acc-contract-print .acc-print-table th,
.acc-contract-print .acc-print-table td {
  padding: 1px 9px;
  border-color: #c9ced2;
}

.acc-contract-print .acc-print-table th {
  background: #edeeee;
  color: #0d1a22;
  font-size: 13.5px;
}

.acc-contract-print .acc-print-table td.num {
  color: #0b1a24;
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.acc-contract-print .acc-print-notes {
  margin-bottom: 3px;
  padding: 4px 9px;
  border: 1px solid #c9ced2;
  color: #1e3341;
  font-size: 13px;
  line-height: 1.45;
}

.acc-contract-print .acc-print-notes.is-legal-note {
  margin-bottom: 3px;
  padding: 3px 9px;
  border-style: dashed;
  color: #465b68;
  font-size: 11px;
}

.acc-contract-print .acc-print-sign {
  margin-top: auto;
  padding-top: 6px;
  color: #2b4050;
  font-size: 14px;
}

.acc-contract-print .acc-print-sign div {
  padding-top: 12px;
  border-top-color: #9fb8c9;
}

.acc-contract-print .acc-print-foot {
  margin-top: 3px;
  padding-top: 0;
  border-top: 0;
  color: #455d6b;
  font-size: 12px;
}

/* ===== الاستجابة ===== */
@media (max-width: 1180px) {
  .acc-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .acc-report-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .acc-report-menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .acc-supplier-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .acc-car-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .acc-report-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .acc-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .acc-details-grid {
    grid-template-columns: 1fr;
  }

  .acc-contract-body {
    grid-template-columns: 1fr;
  }

  .acc-renter-body {
    display: block;
  }

  .acc-toolbar .adm-search {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .acc-main {
    padding-inline: 0;
  }

  .acc-hero {
    margin-top: 18px;
  }

  .acc-quick {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .acc-quick-btn {
    padding: 12px 14px;
  }

  .acc-quick-text small {
    font-size: 0.7rem;
  }

  .acc-details-body {
    padding: 14px;
  }

  .acc-contract-done {
    padding: 26px 16px 20px;
  }

  .acc-done-print {
    padding: 15px 20px;
    font-size: 1rem;
  }

  .acc-hero-actions {
    width: 100%;
  }

  .acc-hero-actions .btn {
    flex: 1;
  }

  .acc-actions {
    flex: 1 1 100%;
    width: 100%;
  }

  .acc-actions-main {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .acc-action-btn {
    width: 100%;
  }

  .acc-action-btn .acc-action-label strong,
  .acc-action-btn .acc-action-label small {
    white-space: normal;
  }

  .acc-actions-side {
    align-self: stretch;
  }

  .acc-side-btn {
    flex: 1 1 140px;
    justify-content: center;
  }

  .acc-stats {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .acc-stat {
    padding: 12px;
  }

  .acc-stat strong {
    font-size: 1.3rem;
  }

  .acc-stat small {
    display: none;
  }

  .acc-tab {
    padding: 11px;
    gap: 8px;
  }

  .acc-tab-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .acc-tab-text small {
    display: none;
  }

  .acc-tab-count {
    min-width: 24px;
    padding: 3px 6px;
  }

  .acc-topbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 12px;
  }

  .acc-topbar-btn span {
    display: none;
  }

  .acc-toolbar {
    align-items: stretch;
  }

  .acc-toolbar .adm-search {
    flex-basis: 100%;
  }

  .acc-toolbar-actions {
    margin-inline-start: 0;
    width: 100%;
    justify-content: space-between;
  }

  .acc-banner {
    flex-wrap: wrap;
  }

  .acc-banner .btn {
    width: 100%;
  }

  .acc-car-grid {
    grid-template-columns: 1fr;
  }

  .acc-report-stats {
    grid-template-columns: 1fr 1fr;
  }

  .acc-report-menu-grid {
    grid-template-columns: 1fr;
  }

  .acc-report-filter-field {
    width: 100%;
  }

  .acc-report-toolbar .btn {
    flex: 1 1 calc(50% - 4px);
  }

  #reportShowBtn {
    flex: 1 1 100%;
  }

  .acc-report-toolbar-spacer {
    display: none;
  }

  .acc-report-runner-head {
    flex-direction: column;
    align-items: stretch;
  }

  .acc-report-runner-title {
    align-items: flex-start;
  }

  .acc-report-scope {
    gap: 5px;
  }

  .acc-report-scope-item {
    font-size: 0.63rem;
  }

  .acc-report-range-generated {
    margin-inline-start: 0;
  }

  .acc-supplier-form {
    grid-template-columns: 1fr;
  }

  .acc-report-actions {
    width: 100%;
    margin-inline-start: 0;
  }

  .acc-report-actions .btn {
    flex: 1;
  }

  .acc-filter-row {
    align-items: stretch;
  }

  .acc-date-field,
  .acc-car-field {
    width: 100%;
  }

  .acc-presets {
    width: 100%;
    justify-content: space-between;
  }

  .acc-preset {
    flex: 1;
    text-align: center;
  }

  .acc-booking-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .acc-booking-side {
    align-items: stretch;
    flex-direction: row;
    justify-content: space-between;
  }

  .acc-booking-side .btn {
    flex: 1;
  }

  .acc-bookings-body {
    padding: 12px;
  }

  .acc-bookings-head {
    padding: 20px 18px 14px;
  }

  .acc-modal-panel .adm-editor-head {
    padding: 20px 18px 16px;
  }

  .acc-modal-panel .adm-editor-body {
    display: block;
    padding-bottom: 4px;
  }

  .acc-modal-panel .adm-editor-main,
  .acc-modal-panel .adm-editor-side {
    padding: 14px;
  }

  .acc-modal-panel .adm-editor-side {
    border-inline-start: 0;
    border-top: 1px solid var(--line);
  }

  .acc-modal-panel .adm-grid.two,
  .acc-modal-panel .adm-grid.three {
    grid-template-columns: 1fr;
  }

  .acc-modal-panel .adm-editor-foot {
    position: sticky;
    bottom: 0;
    z-index: 5;
    flex-wrap: wrap;
    padding: 12px 14px;
  }

  .acc-modal-panel .adm-editor-buttons {
    width: 100%;
  }

  .acc-modal-panel .adm-editor-buttons .btn {
    flex: 1;
  }

  .acc-table {
    min-width: 820px;
  }

  .acc-table-scroll .acc-table {
    min-width: 680px;
  }

  .acc-table-wrap {
    overflow-x: auto;
  }
}

@media print {
  @page {
    size: A4;
    margin: 14mm 12mm;
  }

  body {
    background: #fff !important;
  }

  body > *:not(#printArea) {
    display: none !important;
  }

  #printArea {
    display: block !important;
  }

  .acc-print-sheet {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .acc-print-sheet + .acc-print-sheet {
    break-before: page;
    page-break-before: always;
  }

  .acc-print-head {
    break-after: avoid;
    page-break-after: avoid;
  }

  .acc-print-letterhead,
  .acc-print-rule,
  .acc-print-contract-title,
  .acc-print-contract-meta {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .acc-print-contract-title {
    break-after: avoid;
    page-break-after: avoid;
  }

  .acc-print-table {
    page-break-inside: auto;
  }

  .acc-print-table tr,
  .acc-print-receipt-amount,
  .acc-print-notes,
  .acc-print-sign,
  .acc-print-foot,
  .acc-print-summary > div {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .acc-print-sign {
    break-before: avoid;
    page-break-before: avoid;
  }
}

/* ===== المدينون والتحفظات ===== */
.acc-nav-count-danger {
  background: var(--red);
  color: #fff;
}

.acc-quick-btn-alert {
  border-color: rgba(189, 75, 75, 0.3);
  background: linear-gradient(135deg, #fff7f7, #fff);
}

.acc-quick-btn-alert .acc-quick-icon {
  background: var(--red-soft);
  color: var(--red);
}

.acc-quick-btn-alert .acc-quick-text small {
  color: var(--red);
}

.acc-alert-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px 18px;
  border: 1px solid rgba(189, 75, 75, 0.28);
  border-radius: 16px;
  background: linear-gradient(135deg, #fff6f6, #fff);
  box-shadow: var(--shadow-sm);
}

.acc-alert-strip[hidden] {
  display: none;
}

.acc-alert-strip > .icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: var(--red);
}

.acc-alert-strip > div {
  flex: 1;
  min-width: 0;
}

.acc-alert-strip strong {
  display: block;
  color: var(--red);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 800;
}

.acc-alert-strip p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.75;
}

.acc-flag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-inline-start: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 800;
  vertical-align: middle;
  white-space: nowrap;
}

.acc-flag .icon {
  width: 10px;
  height: 10px;
}

.acc-flag.is-debt {
  background: var(--red-soft);
  color: var(--red);
}

.acc-flag.is-blacklist {
  background: #37211f;
  color: #f6d8dc;
}

.acc-cell-debtor {
  color: var(--red);
}

.acc-money-red {
  color: var(--red);
  font-weight: 800;
}

tr.is-blocked-row td {
  background: #fffafa;
}

.acc-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.acc-filter-chip .icon {
  width: 13px;
  height: 13px;
}

.acc-filter-chip:hover {
  border-color: rgba(189, 75, 75, 0.45);
  color: var(--red);
}

.acc-filter-chip.is-active {
  border-color: var(--red);
  background: var(--red-soft);
  color: var(--red);
}

/* تنبيه إيقاف العقد */
.acc-renter-block {
  display: block;
  margin: 4px 0 14px;
  padding: 14px 16px;
  border: 1px solid rgba(189, 75, 75, 0.38);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff6f6, #fff);
}

.acc-renter-block[hidden] {
  display: none;
}

.acc-renter-block-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.acc-renter-block-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--red-soft);
  color: var(--red);
}

.acc-renter-block-icon .icon {
  width: 17px;
  height: 17px;
}

.acc-renter-block-head strong {
  display: block;
  color: var(--red);
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 800;
}

.acc-renter-block-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.7;
}

.acc-renter-block-reasons {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.acc-renter-block-reasons li {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(189, 75, 75, 0.07);
}

.acc-renter-block-reasons li strong {
  color: var(--ink);
  font-size: 0.74rem;
}

.acc-renter-block-reasons li span {
  color: var(--muted);
  font-size: 0.68rem;
}

.acc-approval-box {
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed rgba(20, 63, 92, 0.3);
  border-radius: 12px;
  background: #fff;
}

.acc-approval-box[hidden] {
  display: none;
}

.acc-approval-note {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 0.7rem;
  line-height: 1.7;
}

.acc-approval-denied {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(189, 75, 75, 0.1);
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.7;
}

.acc-approval-denied[hidden] {
  display: none;
}

.acc-renter-status {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(189, 75, 75, 0.35);
  border-radius: 14px;
  background: #fff6f6;
}

.acc-renter-status[hidden] {
  display: none;
}

.acc-renter-status-head {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--red);
  font-size: 0.78rem;
}

.acc-renter-status-head .icon {
  width: 15px;
  height: 15px;
}

.acc-renter-status .acc-renter-block-reasons {
  margin-top: 8px;
}

.acc-renter-status-hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.7;
}

/* تفاصيل العقد: تنبيه ودفعات */
.acc-details-alert {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
  padding: 11px 14px;
  border: 1px solid rgba(189, 75, 75, 0.35);
  border-radius: 12px;
  background: #fff6f6;
}

.acc-details-alert strong {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--red);
  font-size: 0.8rem;
}

.acc-details-alert strong .icon {
  width: 14px;
  height: 14px;
}

.acc-details-alert span {
  color: var(--muted);
  font-size: 0.7rem;
}

.acc-details-card-wide {
  grid-column: 1 / -1;
  margin-top: 12px;
}

.acc-payment-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.7;
}

.acc-payment-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 170px)) 1fr;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fcfcfc;
}

.acc-payment-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 2px;
}

.acc-payment-list {
  display: grid;
  gap: 6px;
}

.acc-payment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.acc-payment-row > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  min-width: 0;
}

.acc-payment-row strong {
  color: var(--green);
  font-size: 0.8rem;
}

.acc-payment-row span {
  color: var(--muted);
  font-size: 0.68rem;
}

.acc-payment-row small {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 0.64rem;
}

.acc-payment-clear {
  margin: 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 700;
}

/* ===== نافذة البلاك ليست ===== */
.acc-blacklist-panel {
  display: flex;
  flex-direction: column;
  max-width: 1040px;
  max-height: 92vh;
  padding: 0;
  border-radius: 24px;
}

.acc-bl-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 20px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: #fff;
  scrollbar-width: thin;
}

.acc-bl-tabs button {
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.acc-bl-tabs button:hover {
  background: var(--cream);
  color: var(--ink);
}

.acc-bl-tabs button.is-active {
  border-color: transparent;
  background: var(--ink);
  color: #fff;
}

.acc-bl-tabs button[hidden] {
  display: none;
}

.acc-bl-body {
  flex: 1;
  min-height: 180px;
  padding: 16px 20px 20px;
  overflow-y: auto;
  background: #fafbfb;
}

.acc-bl-tab-panel[hidden] {
  display: none;
}

.acc-bl-form {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.acc-bl-form[hidden] {
  display: none;
}

.acc-bl-form .adm-grid {
  gap: 10px;
}

.acc-bl-form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.acc-bl-inline-form {
  display: flex;
  align-items: end;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.acc-bl-inline-form .adm-field {
  flex: 1;
  min-width: 0;
}

.acc-bl-list {
  display: grid;
  gap: 8px;
}

.acc-bl-item {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.acc-bl-item.is-active {
  border-inline-start: 4px solid var(--red);
}

.acc-bl-item.is-released {
  background: #fbfdfc;
}

.acc-bl-item-head {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.acc-bl-item-head > strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 800;
}

.acc-bl-item-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.6;
}

.acc-bl-item-reason {
  margin: 0;
  color: var(--ink);
  font-size: 0.72rem;
  line-height: 1.7;
}

.acc-bl-item-reason.is-release {
  color: var(--green);
}

.acc-bl-item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.acc-bl-item-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.acc-bl-empty-text {
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.8;
}

.acc-history-list {
  display: grid;
  gap: 7px;
}

.acc-history-row {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.acc-history-badge {
  justify-self: start;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-size: 0.6rem;
  font-weight: 800;
}

.acc-history-badge.is-approval {
  background: var(--amber-soft);
  color: var(--amber-deep);
}

.acc-history-row strong {
  color: var(--ink);
  font-size: 0.78rem;
}

.acc-history-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.65;
}

.acc-history-meta {
  color: var(--muted);
  font-size: 0.64rem;
}

.acc-status.is-bl-active {
  background: var(--red-soft);
  color: var(--red);
}

.acc-status.is-bl-released {
  background: var(--green-soft);
  color: var(--green);
}

.acc-role-pill {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-size: 0.6rem;
  font-weight: 800;
}

.acc-role-pill.is-owner {
  background: var(--amber-soft);
  color: var(--amber-deep);
}

.acc-role-pill.is-manager {
  background: rgba(20, 63, 92, 0.1);
  color: var(--ink);
}

.acc-role-pill.is-staff {
  background: #f0f1f2;
  color: var(--muted);
}

.acc-bl-sharing-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.acc-bl-sharing-head h3 {
  margin: 0 0 3px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
}

.acc-bl-sharing-head p {
  margin: 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.8;
}

.acc-switch {
  position: relative;
  flex: 0 0 auto;
  display: inline-block;
  width: 46px;
  height: 26px;
}

.acc-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.acc-switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d9dbdd;
  transition: background 0.16s ease;
}

.acc-switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(20, 63, 92, 0.25);
  transition: transform 0.16s ease;
}

.acc-switch input:checked + span {
  background: var(--green);
}

.acc-switch input:checked + span::after {
  transform: translateX(-20px);
}

html[dir="ltr"] .acc-switch input:checked + span::after {
  transform: translateX(20px);
}

.acc-share-code {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px dashed var(--amber);
  border-radius: 12px;
  background: #faf9f9;
  color: var(--ink);
  font-size: 0.72rem;
}

.acc-share-code[hidden] {
  display: none;
}

.acc-share-code code {
  padding: 3px 10px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--amber);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.acc-share-code span {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 0.66rem;
}

.acc-bl-subtitle {
  margin: 16px 0 8px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 800;
}

.acc-shared-view {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 0.7rem;
}

.acc-shared-view strong {
  color: var(--ink);
}

.acc-shared-view span {
  color: var(--muted);
  font-size: 0.64rem;
}

.adm-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .acc-quick {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .acc-payment-form {
    grid-template-columns: 1fr;
  }

  .adm-grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .acc-quick {
    grid-template-columns: 1fr;
  }

  .acc-alert-strip {
    flex-direction: column;
    align-items: stretch;
    text-align: start;
  }

  .acc-blacklist-panel {
    max-height: 94vh;
    border-radius: 18px;
  }

  .acc-bl-body {
    padding: 12px;
  }

  .acc-bl-tabs {
    padding: 8px 12px;
  }

  .acc-bl-inline-form {
    flex-direction: column;
    align-items: stretch;
  }

  .acc-bl-sharing-head {
    flex-direction: column;
  }

  .adm-grid.four {
    grid-template-columns: 1fr;
  }

  .acc-payment-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .acc-details-grid {
    grid-template-columns: 1fr;
  }
}

.acc-bookings-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.acc-bookings-foot span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

@media (max-width: 720px) {
  .acc-bl-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .acc-bookings-foot {
    padding: 10px 12px;
  }
}

.acc-status.is-on {
  background: #e6f5ec;
  color: #1f7a4d;
}

.acc-status.is-off {
  background: #f0f1f1;
  color: #5c6670;
}

/* ===== الدفعات وسندات القبض ===== */
.acc-flag.is-credit {
  background: var(--green-soft);
  color: var(--green);
}

.acc-payment-toolbar {
  flex-wrap: wrap;
}

.acc-payment-date {
  min-width: 132px;
}

.acc-payment-date input {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: 0.76rem;
  color: var(--ink);
}

.acc-payment-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.acc-payment-row.is-void {
  background: #fbfbfb;
  border-style: dashed;
}

.acc-payment-row.is-void strong {
  color: var(--muted);
  text-decoration: line-through;
}

.acc-payment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

.acc-pay-receipt {
  display: inline-flex;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--blue-soft, #f1f2f2);
  color: #143f5c;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.acc-pay-state {
  display: inline-flex;
  margin-inline-start: 5px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 800;
  vertical-align: middle;
}

.acc-pay-state.is-void {
  background: var(--red-soft);
  color: var(--red);
}

.acc-pay-state.is-corrected {
  background: #f8e3e5;
  color: #701a24;
}

.acc-payment-balance {
  color: var(--muted);
  font-size: 0.66rem;
}

.acc-payment-void-reason {
  color: var(--red) !important;
}

.acc-payment-row .acc-payment-actions {
  flex: 0 0 auto;
  align-items: center;
}

.acc-payment-modal {
  max-width: 720px;
}

.acc-payment-renter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg, #fafbfb, #fff);
}

.acc-payment-renter-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
}

.acc-payment-renter-icon .icon {
  width: 18px;
  height: 18px;
}

.acc-payment-renter strong {
  display: block;
  font-size: 0.9rem;
}

.acc-payment-renter small {
  color: var(--muted);
  font-size: 0.7rem;
}

.acc-payment-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fcfcfc;
}

.acc-payment-summary > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.acc-payment-summary span {
  color: var(--muted);
  font-size: 0.66rem;
}

.acc-payment-summary strong {
  font-size: 0.86rem;
}

.acc-payment-saved {
  display: grid;
  gap: 8px;
  padding: 2px 0;
}

#paymentSavedModal .adm-editor-body {
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  padding: 18px 22px;
}

#paymentSavedModal .acc-payment-saved-row strong {
  max-width: 60%;
}

.acc-payment-saved-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(20, 63, 92, 0.12);
  border-radius: 10px;
  background: #fafbfb;
}

.acc-payment-saved-row span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.acc-payment-saved-row strong {
  max-width: 65%;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.9rem;
  text-align: end;
}

.acc-payment-modal .adm-editor-buttons .btn[hidden] {
  display: none;
}

.acc-payment-overpay {
  margin: 0 0 12px;
  padding: 11px 13px;
  border: 1px solid #de737f;
  border-radius: 12px;
  background: #f8f7f7;
}

.acc-payment-overpay[hidden] {
  display: none;
}

.acc-payment-overpay.is-confirmed {
  border-color: var(--green);
  background: var(--green-soft);
}

.acc-payment-overpay p {
  margin: 0 0 8px;
  color: #631720;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.7;
}

.acc-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.acc-check input {
  width: 17px;
  height: 17px;
  accent-color: var(--green);
}

.acc-payment-attachment {
  margin: 12px 0;
  padding: 11px 13px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fcfcfc;
}

.acc-payment-attachment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.acc-payment-attachment-head strong {
  display: block;
  font-size: 0.8rem;
}

.acc-payment-attachment-head small {
  color: var(--muted);
  font-size: 0.66rem;
}

.acc-payment-attachment-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
  padding: 7px 10px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 0.72rem;
}

.acc-payment-attachment-status[hidden] {
  display: none;
}

.acc-payment-attachment-status .icon {
  width: 14px;
  height: 14px;
}

.acc-payment-error {
  display: block;
  margin: 8px 0 0;
}

.acc-payment-error[hidden] {
  display: none;
}

.acc-payment-void-info {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff6f6;
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.7;
}

.acc-cancel-impact {
  margin: 0 0 14px;
  padding: 0 18px 0 0;
  list-style: disc;
  color: var(--ink-soft, #52606a);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.9;
}

.acc-cancel-reason {
  height: auto;
  min-height: 88px;
  resize: vertical;
  line-height: 1.7;
}

.acc-receipt-modal {
  width: min(1000px, 96vw);
  max-width: min(1000px, 96vw);
}

.acc-receipt-audit-wrap {
  padding: 12px 20px 4px;
  background: #fff;
}

.acc-receipt-audit-wrap[hidden] {
  display: none;
}

.acc-print-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fafa;
}

.acc-print-option {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  white-space: nowrap;
}

.acc-print-option select {
  max-width: 160px;
  min-height: 34px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
}

.acc-orientation-btn {
  min-height: 34px;
  padding: 4px 12px;
  font-size: 0.7rem;
  white-space: nowrap;
}

.acc-print-docs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fafa;
}

.acc-print-docs-label {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  white-space: nowrap;
}

.acc-doc-check {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.acc-doc-check input {
  width: 14px;
  height: 14px;
  accent-color: var(--amber-deep);
}

.acc-doc-check.is-unavailable {
  opacity: 0.55;
  cursor: not-allowed;
}

.acc-print-annex-title {
  margin: 0 0 6px;
  color: var(--contract-color, #143f5c);
  font-family: 'Cairo', 'Segoe UI', sans-serif;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}

.acc-print-annex-meta {
  margin: 0 0 10px;
  color: #587489;
  font-size: 11px;
  text-align: center;
}

.acc-print-annex-body {
  display: grid;
  place-items: center;
  padding: 4px 0 0;
}

.acc-print-annex-body img {
  max-width: 100%;
  max-height: 245mm;
  object-fit: contain;
  border: 1px solid #d8dde1;
  border-radius: 6px;
}

@media (max-width: 720px) {
  .acc-print-docs {
    flex: 1 1 100%;
    justify-content: center;
  }
}

.acc-modal-panel .adm-editor-buttons {
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 720px) {
  .acc-print-options {
    flex: 1 1 100%;
    justify-content: space-between;
  }

  .acc-print-option {
    flex: 1;
  }

  .acc-print-option select {
    max-width: none;
    flex: 1;
  }

  .acc-modal-panel .adm-editor-buttons {
    justify-content: stretch;
  }

  .acc-modal-panel .adm-editor-buttons > .btn {
    flex: 1 1 42%;
  }
}

.acc-receipt-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.acc-receipt-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid #143f5c;
}

.acc-receipt-brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.acc-receipt-brand > div {
  display: flex;
  flex-direction: column;
}

.acc-receipt-brand strong {
  font-size: 1rem;
}

.acc-receipt-brand span {
  color: var(--muted);
  font-size: 0.68rem;
}

.acc-receipt-no {
  margin-inline-start: auto;
  text-align: left;
}

.acc-receipt-no span {
  display: block;
  color: var(--muted);
  font-size: 0.62rem;
}

.acc-receipt-no strong {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.95rem;
  letter-spacing: 0.6px;
}

.acc-receipt-hero {
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eef7f2, #f9fdfb);
  border: 1px solid rgba(31, 122, 77, 0.2);
  text-align: center;
}

.acc-receipt-hero span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
}

.acc-receipt-hero strong {
  display: block;
  margin: 2px 0;
  color: var(--green);
  font-size: 1.7rem;
}

.acc-receipt-hero p {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 700;
}

.acc-receipt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.acc-receipt-grid > div {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.acc-receipt-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.62rem;
}

.acc-receipt-grid strong {
  font-size: 0.8rem;
}

.acc-receipt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.acc-receipt-table th,
.acc-receipt-table td {
  padding: 7px 10px;
  border: 1px solid var(--line);
  text-align: start;
}

.acc-receipt-table th {
  width: 18%;
  background: #f9fafa;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.acc-receipt-table td.num {
  font-weight: 800;
}

.acc-receipt-note {
  padding: 9px 12px;
  border-radius: 10px;
  background: #fcfcfc;
  border: 1px solid var(--line);
  font-size: 0.74rem;
}

.acc-receipt-note strong {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
}

.acc-receipt-note p {
  margin: 2px 0 0;
}

.acc-receipt-sign {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 10px 8px;
  color: var(--muted);
  font-size: 0.68rem;
  text-align: center;
}

.acc-receipt-sign > div {
  flex: 1;
  padding-top: 8px;
  border-top: 1px dashed #9aa9b4;
}

.acc-receipt-foot {
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.7;
}

.acc-receipt-banner {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 800;
}

.acc-receipt-banner .icon {
  width: 15px;
  height: 15px;
}

.acc-receipt-banner.is-void {
  background: var(--red-soft);
  color: var(--red);
}

.acc-receipt-banner.is-corrected {
  background: #f8e3e5;
  color: #701a24;
}

.acc-receipt-audit {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fcfcfc;
}

.acc-receipt-audit h4 {
  margin: 0 0 6px;
  font-size: 0.72rem;
}

.acc-receipt-audit-row {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 0;
  border-top: 1px dashed var(--line);
}

.acc-receipt-audit-row:first-of-type {
  border-top: 0;
}

.acc-receipt-audit-row strong {
  font-size: 0.72rem;
}

.acc-receipt-audit-row span,
.acc-receipt-audit-row small {
  color: var(--muted);
  font-size: 0.64rem;
}

.acc-print-receipt-amount {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #d9dbdc;
  border-radius: 8px;
  background: #f8f8f8;
  text-align: center;
}

.acc-print-receipt-amount span {
  display: block;
  color: #4c6577;
  font-size: 10px;
}

.acc-print-receipt-amount strong {
  display: block;
  font-size: 22px;
}

.acc-print-receipt-amount p {
  margin: 2px 0 0;
  font-size: 11px;
  font-weight: 700;
}

.acc-print-receipt-state {
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid #b94b4b;
  border-radius: 6px;
  color: #b94b4b;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 720px) {
  .acc-payment-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .acc-payment-toolbar .acc-toolbar-actions {
    flex-wrap: wrap;
  }

  .acc-receipt-brand {
    flex-wrap: wrap;
  }

  .acc-receipt-no {
    margin-inline-start: 0;
  }

  .acc-receipt-table th {
    width: auto;
  }

  .acc-payment-attachment-head {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ===== الفواتير والمستندات ===== */

.acc-invoice-context,
.acc-doc-context {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfbfb;
}

.acc-invoice-context div,
.acc-doc-context div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.acc-invoice-context span,
.acc-doc-context span {
  color: var(--muted);
  font-size: 0.72rem;
}

.acc-invoice-context strong,
.acc-doc-context strong {
  font-family: var(--font-display);
  font-size: 0.9rem;
}

#invoiceForm .adm-editor-body,
#documentForm .adm-editor-body {
  display: block;
  padding: 20px 22px 26px;
}

#invoiceForm .adm-editor-body > *,
#documentForm .adm-editor-body > * {
  max-width: 940px;
  margin-inline: auto;
}

.acc-invoice-extras {
  margin: 14px 0;
  padding: 14px;
  border: 1px dashed rgba(20, 63, 92, 0.28);
  border-radius: 14px;
  background: #fff;
}

.acc-invoice-extras-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.acc-invoice-extras-head strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.9rem;
}

.acc-invoice-extras-head small {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  margin-top: 2px;
}

.acc-invoice-extra-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 40px;
  gap: 8px;
  margin-bottom: 8px;
}

.acc-invoice-extra-row .adm-input {
  min-height: 42px;
}

.acc-invoice-extra-remove {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: #b94b4b;
  cursor: pointer;
}

.acc-invoice-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0f2f45;
  color: #fff;
}

.acc-invoice-summary-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 96px;
}

.acc-invoice-summary-row span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.68rem;
}

.acc-invoice-summary-row strong {
  font-family: var(--font-display);
  font-size: 0.98rem;
}

.acc-invoice-summary-row.is-total strong {
  color: #eeb4bb;
  font-size: 1.2rem;
}

.acc-invoice-apply {
  align-self: end;
  min-height: 42px;
}

.acc-preview-panel {
  width: min(1000px, 96vw);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.acc-preview-body {
  display: block;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 !important;
  background: #edeeef;
}

.acc-preview-frame {
  display: block;
  width: 100%;
  height: clamp(320px, 52vh, 640px);
  border: 0;
  background: #edeeef;
}

.acc-layout-panel {
  max-width: 1120px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.acc-layout-panel > .adm-editor-head,
.acc-layout-panel > .adm-editor-foot {
  flex-shrink: 0;
}

.acc-layout-body {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px;
  overflow: auto;
  background: #e8eaeb;
}

.acc-layout-paper {
  width: 210mm;
  max-width: 100%;
  min-height: 297mm;
  margin: 0 auto;
  padding: 14mm 12mm;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 47, 69, 0.18);
}

.acc-layout-paper .acc-print-sheet {
  min-height: 0;
}

.acc-layout-paper .acc-print-block {
  position: relative;
}

.acc-layout-paper .acc-print-block + .acc-print-block {
  margin-top: 0;
}

.acc-layout-paper .cc-arrange-handle {
  top: 0;
  inset-inline-start: 0;
}

@media (max-width: 720px) {
  .acc-layout-body {
    padding: 8px;
  }

  .acc-layout-paper {
    min-height: 0;
    padding: 14px;
  }

  .acc-layout-paper .acc-contract-print {
    font-size: 13px;
  }

  .acc-layout-paper .acc-print-table {
    font-size: 12px;
  }

  .acc-layout-paper .acc-print-table th {
    font-size: 11.5px;
  }

  .acc-layout-paper .acc-print-title {
    font-size: 14px;
  }
}

.acc-preview-panel .adm-editor-foot {
  flex-shrink: 0;
  flex-wrap: wrap;
}

.acc-legal-notice {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(185, 75, 75, 0.35);
  border-radius: 10px;
  background: #fff5f5;
  color: #8c3535;
  font-size: 0.72rem;
  line-height: 1.7;
}

.acc-doc-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.acc-doc-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

@media (max-width: 720px) {
  .acc-invoice-extra-row {
    grid-template-columns: minmax(0, 1fr) 90px 40px;
  }

  .acc-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .acc-preview-frame {
    height: 62vh;
  }
}

/* ===== العقود النشطة والسيارات المؤجرة ===== */
.acc-active-nav .acc-nav-count {
  background: var(--ink);
  color: #fff;
}

.acc-active-panel {
  max-width: 1320px;
}

.acc-active-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 12px;
  padding: 18px 22px 22px;
}

.acc-active-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.acc-active-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(180deg, #ffffff, #fbfbfb);
}

.acc-active-stat span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.acc-active-stat strong {
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.acc-active-stat small {
  color: var(--muted);
  font-size: 0.62rem;
}

.acc-active-stat.is-overdue {
  border-color: rgba(189, 75, 75, 0.4);
  background: linear-gradient(180deg, #fff7f7, #fdeaea);
}

.acc-active-stat.is-overdue strong {
  color: var(--red-clear);
}

.acc-active-stat.is-soon {
  border-color: rgba(140,47,57,0.45);
  background: linear-gradient(180deg, #fbfafa, #fff1ef);
}

.acc-active-stat.is-soon strong {
  color: var(--amber-deep);
}

.acc-active-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.acc-active-toolbar .adm-search {
  flex: 1 1 280px;
  max-width: 460px;
}

.acc-active-toolbar .adm-select-wrap {
  min-width: 180px;
}

.acc-active-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-inline-start: auto;
}

.acc-active-table-wrap {
  max-height: 56vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.acc-active-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.74rem;
}

.acc-active-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 9px;
  border-inline-end: 1px solid #e6e8e9;
  border-bottom: 1px solid #dddfe1;
  background: linear-gradient(180deg, #f3f4f4, #e9ebec);
  color: var(--ink);
  font-size: 0.66rem;
  font-weight: 800;
  text-align: start;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.acc-active-table thead th:last-child {
  cursor: default;
}

.acc-active-table thead th:focus-visible {
  outline: 2px solid rgba(20, 63, 92, 0.45);
  outline-offset: -3px;
}

.acc-active-table thead th[aria-sort="ascending"]::after {
  content: ' ▲';
  color: var(--ink);
  font-size: 0.58rem;
}

.acc-active-table thead th[aria-sort="descending"]::after {
  content: ' ▼';
  color: var(--ink);
  font-size: 0.58rem;
}

.acc-active-table tbody td {
  padding: 9px;
  border-inline-end: 1px solid #eeeff0;
  border-bottom: 1px solid #eeeff0;
  background: #fff;
  color: var(--text);
  vertical-align: middle;
}

.acc-active-table tbody tr:nth-child(even) td {
  background: #fcfdfd;
}

.acc-active-table tbody td:first-child {
  border-inline-start: 4px solid transparent;
}

.acc-active-table tbody td:last-child {
  border-inline-end: 0;
}

.acc-active-table tbody tr:hover td {
  background: #f9f9f9;
}

.acc-active-table tbody tr.is-inspected td {
  background: #f7f6f6;
}

.acc-active-table tbody tr.is-due-soon td {
  background: #fff0ee;
  color: #93372b;
  border-bottom-color: #f3cbd0;
}

.acc-active-table tbody tr.is-due-soon td:first-child {
  border-inline-start-color: var(--amber-deep);
}

.acc-active-table tbody tr.is-due-soon .acc-cell-strong {
  color: #7f2f24;
}

.acc-active-table tbody tr.is-overdue td {
  background: #fde8e8;
  color: #8c2222;
  border-bottom-color: #f0c5c5;
}

.acc-active-table tbody tr.is-overdue td:first-child {
  border-inline-start-color: var(--red-clear);
}

.acc-active-table tbody tr.is-overdue .acc-cell-strong,
.acc-active-table tbody tr.is-overdue .acc-money {
  color: #7c1d1d;
}

.acc-active-table tbody tr.is-overdue:hover td {
  background: #fbdede;
}

.acc-active-table tbody tr.is-due-soon:hover td {
  background: #f9e5e7;
}

.acc-active-table tbody tr.is-upcoming td {
  background: #fafbfb;
}

.acc-active-table .acc-money {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}

.acc-active-car {
  display: block;
  color: var(--ink);
  font-weight: 800;
  font-size: 0.78rem;
  white-space: nowrap;
}

.acc-active-sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.64rem;
  white-space: nowrap;
}

.acc-active-plate {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border: 1px solid #dddfe1;
  border-radius: 6px;
  background: #f9f9f9;
  color: var(--ink);
  font-size: 0.62rem;
  font-weight: 700;
  direction: ltr;
}

.acc-active-due {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.acc-active-due time {
  color: inherit;
  font-weight: 700;
}

.acc-active-due .acc-active-time {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 6px;
  background: #f6f7f7;
  color: var(--ink);
  font-size: 0.62rem;
  font-weight: 700;
  direction: ltr;
}

.acc-due-chip {
  display: inline-flex;
  align-items: center;
  margin-top: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 800;
  white-space: nowrap;
}

.acc-due-chip.is-overdue {
  background: var(--red-clear);
  color: #fff;
}

.acc-due-chip.is-soon {
  background: #fff1ef;
  color: var(--amber-deep);
  box-shadow: inset 0 0 0 1px rgba(140,47,57,0.45);
}

.acc-due-chip.is-upcoming {
  background: #f3f4f4;
  color: var(--ink);
}

.acc-due-chip.is-inspected {
  background: #f9e3e6;
  color: #6f1a24;
}

.acc-due-chip.is-normal {
  background: var(--green-soft);
  color: var(--green);
}

.acc-active-table .acc-link-btn {
  padding: 5px 7px;
  font-size: 0.64rem;
}

/* إرجاع السيارة: زر أساسي بارز داخل خانة الإجراءات لكل سيارة نشطة */
.acc-active-table .acc-link-btn.is-return {
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #861f2b;
  border-radius: 10px;
  background: linear-gradient(180deg, #a52736, #861f2b);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
  box-shadow: 0 2px 0 #681922, 0 5px 10px rgba(110,31,40,0.26);
}

.acc-active-table .acc-link-btn.is-return .icon {
  width: 15px;
  height: 15px;
}

.acc-active-table .acc-link-btn.is-return:hover {
  border-color: #761c26;
  background: linear-gradient(180deg, #b53040, #932330);
  color: #fff;
  box-shadow: 0 3px 0 #681922, 0 7px 13px rgba(110,31,40,0.3);
}

.acc-active-table .acc-link-btn.is-return:active {
  transform: translateY(2px);
  box-shadow: 0 0 0 #761c26, inset 0 1px 3px rgba(80,20,28,0.4);
}

.acc-active-table .acc-link-btn.is-return.is-inspected {
  border-color: #245029;
  background: linear-gradient(180deg, #3f7d49, #2f6a39);
  color: #fff;
  box-shadow: 0 2px 0 #1f4524, 0 5px 10px rgba(31, 69, 36, 0.24);
}

.acc-active-table .acc-link-btn.is-return.is-inspected:hover {
  border-color: #1d4423;
  background: linear-gradient(180deg, #468a51, #357342);
  color: #fff;
}

/* ===== نموذج الإرجاع والفحص ===== */
.acc-return-panel {
  max-width: 980px;
}

.acc-return-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 14px;
  padding: 18px 22px 22px;
}

.acc-return-steps {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.acc-return-step {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfc;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.acc-return-step b {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #eff0f0;
  color: var(--ink);
  font-size: 0.74rem;
}

.acc-return-step.is-active {
  border-color: transparent;
  background: linear-gradient(180deg, #23618a, #143f5c);
  color: #fff;
}

.acc-return-step.is-active b {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.acc-return-step.is-done {
  border-color: rgba(47, 125, 91, 0.35);
  background: var(--green-soft);
  color: var(--green);
}

.acc-return-step.is-done b {
  background: var(--green);
  color: #fff;
}

.acc-return-summary {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #fcfcfc);
}

.acc-return-summary h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.acc-return-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 16px;
}

.acc-return-summary-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.acc-return-summary-row span {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
}

.acc-return-summary-row strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acc-return-summary-row strong.is-red {
  color: var(--red-clear);
}

.acc-return-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fdfdfd;
}

.acc-return-checks legend {
  padding: 0 6px;
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 800;
}

.acc-return-checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.acc-return-checks input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--ink);
}

.acc-return-settlement {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fdfdfd;
}

.acc-return-settlement legend {
  padding: 0 6px;
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 800;
}

.acc-return-settlement .adm-field {
  margin: 0;
}

.acc-return-settlement-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.65;
}

.acc-return-hint {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0;
  padding: 9px 11px;
  border: 1px dashed rgba(20, 63, 92, 0.28);
  border-radius: 11px;
  background: #fbfbfb;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.65;
}

.acc-return-hint .icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--ink);
}

.acc-return-confirm {
  display: grid;
  gap: 10px;
}

.acc-return-confirm-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #e7c3c3;
  border-radius: 12px;
  background: #fff8f8;
  color: #7d2727;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.65;
  cursor: pointer;
}

.acc-return-confirm-check input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin-top: 2px;
  accent-color: var(--red-clear);
}

.acc-return-warning {
  margin: 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--red-clear-soft);
  color: #8c2222;
  font-size: 0.74rem;
  font-weight: 700;
}

.acc-return-warning.is-clear {
  background: var(--green-soft);
  color: var(--green);
}

@media (max-width: 900px) {
  .acc-active-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .acc-return-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .acc-active-toolbar .adm-search {
    flex-basis: 100%;
    max-width: none;
  }

  .acc-active-toolbar .adm-select-wrap {
    flex: 1 1 140px;
    min-width: 0;
  }

  .acc-active-toolbar-actions {
    margin-inline-start: 0;
  }

  .acc-return-steps {
    flex-direction: column;
  }

  .acc-return-checks,
  .acc-return-summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ===== نموذج الإرجاع: تمرير داخلي مع رأس وتذييل ثابتين ===== */
.acc-return-panel {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 48px);
  overflow: hidden;
}

.acc-return-panel > .adm-editor-head {
  flex: 0 0 auto;
}

.acc-return-panel > .acc-return-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.acc-return-panel > .acc-return-body::-webkit-scrollbar {
  width: 9px;
}

.acc-return-panel > .acc-return-body::-webkit-scrollbar-track {
  background: #f5f5f6;
}

.acc-return-panel > .acc-return-body::-webkit-scrollbar-thumb {
  border: 2px solid #f5f5f6;
  border-radius: 999px;
  background: #a9c9df;
}

.acc-return-panel > .acc-return-body::-webkit-scrollbar-thumb:hover {
  background: #7faecb;
}

.acc-return-panel > .adm-editor-foot {
  flex: 0 0 auto;
  flex-wrap: wrap;
  box-shadow: 0 -10px 20px -18px rgba(9, 35, 53, 0.55);
}

.acc-return-panel .adm-form-status {
  flex: 1 1 220px;
}

.acc-return-panel .adm-editor-buttons {
  margin-inline-start: auto;
}

/* ملخص العقد والفحص: بطاقات واضحة بعمودين بدل صفوف مضغوطة */
.acc-return-panel #contractReturnStep1:not([hidden]),
.acc-return-panel #contractReturnStep2:not([hidden]) {
  display: grid;
  gap: 14px;
  align-content: start;
}

.acc-return-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.acc-return-summary h3 {
  grid-column: 1 / -1;
}

.acc-return-summary .acc-summary-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(20, 63, 92, 0.1);
  border-radius: 10px;
  background: #fafbfb;
}

.acc-return-summary .acc-summary-row span {
  font-size: 0.65rem;
  font-weight: 700;
}

.acc-return-summary .acc-summary-row strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
  text-align: start;
  white-space: normal;
}

.acc-return-summary .acc-summary-row.is-total {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(20, 63, 92, 0.16);
  background: linear-gradient(180deg, #ffffff, #f5f6f6);
}

.acc-return-summary .acc-summary-row.is-total strong {
  color: var(--amber-deep);
  font-size: 0.95rem;
}

@media (max-width: 720px) {
  .acc-return-panel {
    max-height: calc(100dvh - 24px);
  }

  .acc-return-panel > .acc-return-body {
    padding: 14px 12px 18px;
  }

  .acc-return-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .acc-return-panel .adm-editor-foot {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    box-shadow: 0 -8px 16px -14px rgba(9, 35, 53, 0.5);
  }

  .acc-return-panel .adm-editor-buttons {
    margin-inline-start: 0;
  }
}

body:has(.modal.is-open) .cc-syncbar {
  display: none;
}

/* ألوان مخصّصة: العقود النشطة (أخضر فاتح بإطار قرميدي) وأزرار المصاريف (قرميدي فاتح مشبع قليلًا) */
body #activeContractsToolbarBtn {
  background: linear-gradient(180deg, #f2fcf6 0%, #d6f1e1 55%, #c4e9d5 100%);
  border: 2px solid var(--crimson-deep);
  color: #114d31;
  box-shadow:
    0 2px 0 rgba(17, 77, 49, 0.2),
    0 8px 18px -8px rgba(17, 77, 49, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

body #activeContractsToolbarBtn:not(:disabled):hover {
  background: linear-gradient(180deg, #f8fefa 0%, #caecda 55%, #b8e2ca 100%);
  border-color: #872f39;
  color: #0d3f28;
  box-shadow:
    0 3px 0 rgba(17, 77, 49, 0.22),
    0 12px 24px -8px rgba(17, 77, 49, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body #activeContractsToolbarBtn:not(:disabled):active,
body #activeContractsToolbarBtn.is-pressed {
  background: linear-gradient(180deg, #bce3cd 0%, #aedbc3 100%);
  border-color: #7a2a33;
  color: #0b3823;
  transform: translateY(1px);
  box-shadow:
    0 1px 0 rgba(17, 77, 49, 0.2),
    inset 0 2px 4px rgba(12, 58, 37, 0.2);
}

body #activeContractsToolbarBtn:focus-visible {
  outline: 3px solid var(--crimson-deep);
  outline-offset: 3px;
}

body #newExpenseBtn,
body #addExpenseBtn {
  background: linear-gradient(180deg, #fcf3f4 0%, #f7e0e3 55%, #f2d4d7 100%);
  border: 1px solid var(--crimson);
  color: #631a23;
  box-shadow:
    0 2px 0 rgba(140,47,57,0.2),
    0 8px 18px -8px rgba(140,47,57,0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body #newExpenseBtn:not(:disabled):hover,
body #addExpenseBtn:not(:disabled):hover {
  background: linear-gradient(180deg, #fdf9f9 0%, #f4d6da 55%, #efc9cd 100%);
  border-color: var(--crimson-deep);
  color: #56171e;
  box-shadow:
    0 3px 0 rgba(140,47,57,0.22),
    0 12px 24px -8px rgba(140,47,57,0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

body #newExpenseBtn:not(:disabled):active,
body #addExpenseBtn:not(:disabled):active,
body #newExpenseBtn.is-pressed,
body #addExpenseBtn.is-pressed {
  background: linear-gradient(180deg, #ecc2c7 0%, #e6b3b9 100%);
  border-color: #7a2a33;
  color: #471319;
  transform: translateY(1px);
  box-shadow:
    0 1px 0 rgba(140,47,57,0.2),
    inset 0 2px 4px rgba(99, 26, 51, 0.2);
}

body #newExpenseBtn:focus-visible,
body #addExpenseBtn:focus-visible {
  outline: 3px solid var(--crimson-deep);
  outline-offset: 3px;
}

body #newExpenseBtn .acc-action-icon {
  background: rgba(255, 255, 255, 0.78);
  color: #7a242e;
}

body #newExpenseBtn .acc-action-label small {
  color: #6f333a;
  opacity: 1;
}

.acc-tabs .acc-tab[data-tab="expenses"] {
  background: linear-gradient(180deg, #fcf3f4 0%, #f7e0e3 55%, #f2d4d7 100%);
  border-color: var(--crimson);
  color: #631a23;
  box-shadow:
    0 2px 0 rgba(140,47,57,0.2),
    0 7px 16px -8px rgba(140,47,57,0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.acc-tabs .acc-tab[data-tab="expenses"]:not(:disabled):hover {
  background: linear-gradient(180deg, #fdf9f9 0%, #f4d6da 55%, #efc9cd 100%);
  border-color: var(--crimson-deep);
  color: #56171e;
}

.acc-tabs .acc-tab[data-tab="expenses"]:not(:disabled):active {
  background: linear-gradient(180deg, #ecc2c7 0%, #e6b3b9 100%);
  border-color: #7a2a33;
  color: #471319;
}

.acc-tabs .acc-tab[data-tab="expenses"]:focus-visible {
  outline: 3px solid var(--crimson-deep);
  outline-offset: 3px;
}

.acc-tabs .acc-tab[data-tab="expenses"] .acc-tab-icon {
  background: rgba(255, 255, 255, 0.8);
  color: #7a242e;
}

.acc-tabs .acc-tab[data-tab="expenses"] .acc-tab-text small {
  color: #6f333a;
}

.acc-tabs .acc-tab[data-tab="expenses"] .acc-tab-count {
  background: #ffffff;
  border: 1px solid var(--crimson);
  color: #631a23;
}

.acc-tabs .acc-tab[data-tab="expenses"].is-active {
  background: linear-gradient(180deg, #f4d4d8 0%, #efc4c9 100%);
  border-color: var(--crimson-deep);
  color: #471319;
  box-shadow:
    0 2px 0 rgba(140,47,57,0.24),
    0 10px 22px -10px rgba(140,47,57,0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.acc-tabs .acc-tab[data-tab="expenses"].is-active .acc-tab-icon {
  background: #ffffff;
  color: var(--crimson-deep);
}

/* ===== عقود نشطة: ترويسة وملخصات مدمجة ومساحة أوسع للقائمة ===== */
.acc-active-panel {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 32px);
  overflow: hidden;
}

.acc-active-panel > .adm-editor-head {
  flex: 0 0 auto;
  padding: 13px 22px 10px;
}

.acc-active-panel .adm-editor-kicker {
  gap: 4px;
  font-size: 0.64rem;
}

.acc-active-panel .adm-editor-kicker .icon {
  width: 12px;
  height: 12px;
}

.acc-active-panel .adm-editor-head h2 {
  margin: 2px 0;
  font-size: 1.08rem;
  line-height: 1.25;
}

.acc-active-panel .adm-editor-head p {
  font-size: 0.68rem;
  line-height: 1.45;
}

.acc-active-panel > .acc-active-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: 8px;
  padding: 10px 14px 12px;
  overflow: hidden;
}

.acc-active-panel .acc-active-summary {
  flex: 0 0 auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.acc-active-panel .acc-active-stat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 8px;
  row-gap: 0;
  padding: 5px 10px;
  border-radius: 10px;
}

.acc-active-panel .acc-active-stat span {
  font-size: 0.62rem;
  line-height: 1.35;
}

.acc-active-panel .acc-active-stat strong {
  font-size: 0.98rem;
  line-height: 1.2;
  text-align: end;
  white-space: nowrap;
}

.acc-active-panel .acc-active-stat small {
  grid-column: 1 / -1;
  font-size: 0.58rem;
  line-height: 1.4;
}

.acc-active-panel .acc-active-toolbar {
  flex: 0 0 auto;
  gap: 8px;
}

.acc-active-panel .acc-active-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  border-radius: 12px;
}

.acc-active-panel .acc-active-table thead th {
  padding: 7px 8px;
}

.acc-active-panel .acc-active-table tbody td {
  padding: 6px 8px;
}

.acc-active-panel .acc-active-table .acc-link-btn.is-return {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 0.68rem;
}

.acc-active-panel .acc-active-table .acc-link-btn.is-return .icon {
  width: 13px;
  height: 13px;
}

.acc-active-panel > .adm-editor-foot {
  flex: 0 0 auto;
  padding: 9px 18px;
}

@media (max-width: 900px) {
  .acc-active-panel .acc-active-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .acc-active-panel {
    max-height: calc(100dvh - 16px);
  }

  .acc-active-panel > .adm-editor-head {
    padding: 10px 14px 8px;
  }

  .acc-active-panel .adm-editor-head h2 {
    font-size: 0.98rem;
  }

  .acc-active-panel .adm-editor-head p {
    font-size: 0.64rem;
  }

  .acc-active-panel > .acc-active-body {
    gap: 7px;
    padding: 8px 10px 10px;
  }

  .acc-active-panel .acc-active-summary {
    gap: 5px;
  }

  .acc-active-panel .acc-active-stat {
    column-gap: 6px;
    padding: 4px 8px;
  }

  .acc-active-panel .acc-active-stat span {
    font-size: 0.58rem;
  }

  .acc-active-panel .acc-active-stat strong {
    font-size: 0.9rem;
  }

  .acc-active-panel .acc-active-stat small {
    font-size: 0.55rem;
  }

  .acc-active-panel .acc-active-toolbar {
    gap: 6px;
  }

  .acc-active-panel > .adm-editor-foot {
    padding: 8px 12px;
  }
}
