/* ==========================================================
   منصة أرض الهجرة للخدمات الفندقية - تصميم الأنظمة المدمجة
   Modules Stylesheet: Auth, MySQL Indicator, Invoices, Vouchers, Clients, Archive, Users
   ========================================================== */

/* ----------------------------------------------------------
   1. Live MySQL & User Header Components & Layout (Fluent UI)
   ---------------------------------------------------------- */
.header-meta-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  height: 30px;
  border-radius: var(--radius-sm, 4px);
  font-size: 0.82rem;
  font-weight: 600;
  background: #fdf3f4;
  color: #a80000;
  border: 1px solid #f4b6be;
  cursor: pointer;
  transition: all 0.15s ease;
}
.nav-logout-btn:hover {
  background: #fde7e9;
  color: #750000;
  border-color: #d13438;
}

.db-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #dff6dd;
  color: #107c41;
  border: 1px solid #a3e6b7;
  padding: 3px 10px;
  height: 28px;
  border-radius: 16px;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.2s ease;
}
.db-status-badge.offline {
  background: #fde7e9;
  color: #d13438;
  border-color: #f4b6be;
}
.db-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #107c41;
  box-shadow: 0 0 6px #107c41;
  animation: pulse-dot 1.8s infinite ease-in-out;
}
.db-status-badge.offline .db-dot {
  background-color: #d13438;
  box-shadow: 0 0 6px #d13438;
  animation: none;
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.25); opacity: 1; }
}

.user-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--neutral-light, #edebe9);
  padding: 2px 10px;
  height: 32px;
  border-radius: 20px;
  font-size: 0.82rem;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
  box-shadow: var(--fluent-depth-4, 0 1.6px 3.6px rgba(0,0,0,0.1));
}
.user-profile-badge:hover {
  background-color: var(--neutral-lighter, #f3f2f1);
  border-color: var(--border-color-input, #8a8886);
}
.user-avatar-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0078d4;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.76rem;
}
.user-role-tag {
  background: #eff6fc;
  color: #004578;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 600;
}

/* User Dropdown Menu */
.user-dropdown-menu {
  position: absolute;
  top: 110%;
  left: 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  min-width: 190px;
  padding: 6px 0;
  z-index: 1000;
  display: none;
}
.user-dropdown-menu.show {
  display: block;
}
.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.user-dropdown-item:hover {
  background: #f3f4f6;
  color: var(--primary);
}
.user-dropdown-item.danger {
  color: #dc2626;
}
.user-dropdown-item.danger:hover {
  background: #fee2e2;
}

/* ----------------------------------------------------------
   2. Main Navigation Bar Enhancements
   ---------------------------------------------------------- */
.nav-tabs {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 5px;
  border-radius: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border: 1px solid #e2e8f0;
}
.nav-tabs::-webkit-scrollbar {
  display: none;
}
.nav-tabs .tab-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #475569;
  border: none;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-tabs .tab-btn:hover {
  background: rgba(255, 255, 255, 0.8);
  color: var(--primary);
}
.nav-tabs .tab-btn.active {
  background: #002b5e;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 43, 94, 0.25);
}
.nav-tabs .tab-btn .nav-tab-icon {
  font-size: 1.05rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}
.nav-tabs .tab-btn .nav-tab-label {
  line-height: 1;
  display: inline-block;
}
.nav-tabs .tab-btn .badge-pill {
  background: #3b82f6;
  color: #fff;
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 10px;
}

/* Common Header Action Buttons */
.nav-header-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  height: 38px !important;
  padding: 0 16px !important;
  border-radius: 8px !important;
  font-family: inherit !important;
  font-weight: 700 !important;
  font-size: 0.84rem !important;
  cursor: pointer !important;
  border: 1px solid transparent !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08) !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
}
.nav-header-btn .btn-icon {
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}
.nav-header-btn .btn-text {
  line-height: 1;
  display: inline-block;
}
.nav-header-btn:hover {
  transform: translateY(-1px);
}

/* ----------------------------------------------------------
   3. Login Fullscreen Screen & Modal
   ---------------------------------------------------------- */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.85) 0%, rgba(10, 15, 29, 0.95) 100%);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 16px;
}
.auth-overlay.hidden {
  display: none !important;
}
.auth-card {
  background: #ffffff;
  width: 100%;
  max-width: 440px;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: modal-enter 0.3s ease-out;
}
@keyframes modal-enter {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.auth-header {
  background: linear-gradient(135deg, #002b5e 0%, #0d1b2a 100%);
  color: #ffffff;
  padding: 28px 24px;
  text-align: center;
  position: relative;
}
.auth-logo {
  height: 65px;
  width: auto;
  object-fit: contain;
  margin-bottom: 12px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}
.auth-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 4px;
}
.auth-subtitle {
  font-size: 0.85rem;
  color: #f1c40f;
  font-weight: 600;
}
.auth-body {
  padding: 28px 24px 24px 24px;
}
.auth-form-group {
  margin-bottom: 18px;
}
.auth-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 6px;
}
.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-icon {
  position: absolute;
  right: 12px;
  color: #9ca3af;
  font-size: 1.1rem;
}
.auth-input {
  width: 100%;
  padding: 10px 40px 10px 12px;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s ease;
  font-family: inherit;
}
.auth-input:focus {
  outline: none;
  border-color: #002b5e;
  box-shadow: 0 0 0 3px rgba(0, 43, 94, 0.15);
}
.auth-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #002b5e 0%, #1e3a8a 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 43, 94, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.auth-btn:hover {
  background: linear-gradient(135deg, #001a3a 0%, #172554 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 43, 94, 0.35);
}
.auth-footer-hint {
  text-align: center;
  margin-top: 16px;
  font-size: 0.8rem;
  color: #6b7280;
}
.auth-error-box {
  background: #fef2f2;
  border: 1px solid #f87171;
  color: #991b1b;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: none;
}

/* ----------------------------------------------------------
   4. Autocomplete Suggestion Dropdowns
   ---------------------------------------------------------- */
.autocomplete-wrapper {
  position: relative;
}
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.12);
  max-height: 220px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}
.autocomplete-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
  transition: background 0.15s;
}
.autocomplete-item:hover {
  background: #f0f7ff;
  color: #002b5e;
}
.autocomplete-item .client-subinfo {
  font-size: 0.75rem;
  color: #64748b;
  direction: ltr;
}

/* ----------------------------------------------------------
   5. تصميم الفاتورة والتسعير الفندقي الأصلي (اوديست المدينة / أجياد مكة)
   ---------------------------------------------------------- */
.invoice-box {
  max-width: 800px;
  margin: 0 auto 20px auto;
  padding: 10px 16px;
  border: 1px solid #ccc;
  background-color: #fff;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.12);
  font-size: 11px;
  line-height: 1.35;
  box-sizing: border-box;
  color: #000;
  direction: rtl;
  border-radius: 4px;
}

/* Header */
.invoice-box .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #002b5e;
  padding-bottom: 2px;
  margin-bottom: 3px;
}
.invoice-box .header-right h2 {
  color: #000;
  font-size: 20px;
  margin: 0;
  padding: 0;
  font-weight: bold;
}
.invoice-box .header-right h3 {
  color: #a67c00;
  font-size: 12px;
  margin: 2px 0 0 0;
  padding: 0;
  font-weight: bold;
}
.invoice-box .header-right p {
  margin: 2px 0 0 0;
  font-size: 11px;
  color: #000;
}
.invoice-box .header-left img {
  max-width: 85px;
  height: auto;
}

/* ==========================================================
   Quotation & Invoices Unified Professional Toolbar
   ========================================================== */
.invoice-toolbar-card {
  max-width: 800px;
  margin: 0 auto 14px auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 16px rgba(0, 43, 94, 0.07);
  gap: 12px;
  flex-wrap: wrap;
  direction: rtl;
}

.toolbar-side-start,
.toolbar-side-end {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.toolbar-label {
  font-weight: 800;
  color: #002b5e;
  font-size: 0.88rem;
  margin-left: 2px;
  white-space: nowrap;
}

/* Pill Switcher */
.doc-type-pill-group {
  display: inline-flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 9px;
  border: 1px solid #e2e8f0;
  gap: 4px;
}

.doc-type-pill-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 14px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: #475569;
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.doc-type-pill-btn:hover {
  background: rgba(255, 255, 255, 0.7);
  color: #002b5e;
}

.doc-type-pill-btn.active {
  background: #002b5e;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 43, 94, 0.25);
}

.doc-type-pill-btn .btn-icon {
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.doc-type-pill-btn .btn-text {
  line-height: 1;
  display: inline-block;
}

/* Unified Action Buttons */
.tool-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  height: 36px;
  padding: 0 13px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  white-space: nowrap;
}

.tool-btn .btn-icon {
  font-size: 0.95rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.tool-btn .btn-text {
  line-height: 1;
  display: inline-block;
}

.tool-btn-secondary {
  background: #ffffff;
  color: #1e293b;
  border-color: #cbd5e1;
}
.tool-btn-secondary:hover {
  background: #f8fafc;
  color: #002b5e;
  border-color: #94a3b8;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.tool-btn-success {
  background: #059669;
  color: #ffffff;
  border-color: #047857;
}
.tool-btn-success:hover {
  background: #047857;
  box-shadow: 0 3px 8px rgba(5, 150, 105, 0.35);
  transform: translateY(-1px);
}

.tool-btn-primary {
  background: #002b5e;
  color: #ffffff;
  border-color: #001f44;
}
.tool-btn-primary:hover {
  background: #001f44;
  box-shadow: 0 3px 8px rgba(0, 43, 94, 0.35);
  transform: translateY(-1px);
}

/* Invoice Title Banner (Pure Centered) */
.invoice-box .invoice-title-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #002b5e;
  color: white;
  padding: 5px 12px;
  margin-bottom: 4px;
  border-radius: 4px;
  min-height: 28px;
}
.invoice-box .invoice-title-banner .banner-text {
  text-align: center;
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

/* Top Grid Container */
.invoice-box .info-grid-container {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 6px 12px;
  margin-bottom: 4px;
  background-color: #ffffff;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.invoice-box .info-column-title {
  color: #333;
  font-weight: bold;
  border-bottom: 2px solid #a67c00;
  padding-bottom: 2px;
  margin-bottom: 4px;
  font-size: 12.5px;
}
.invoice-box .info-field-row {
  display: flex;
  align-items: center;
  margin-bottom: 2px;
  font-size: 11px;
}
.invoice-box .info-field-row label {
  font-weight: bold;
  white-space: nowrap;
  margin-left: 5px;
}
.invoice-box .info-field-row input,
.invoice-box .info-field-row select {
  flex: 1;
  border: 1px solid transparent;
  background: transparent;
  font-family: inherit;
  font-size: 11px;
  font-weight: bold;
  color: #000;
  text-align: right;
  direction: rtl;
  border-radius: 3px;
  padding: 1px 3px;
}
.invoice-box .info-field-row input:hover,
.invoice-box .info-field-row input:focus {
  border-color: #002b5e;
  background: #f8fafc;
}

/* Hotel Details Box */
.invoice-box .hotel-details-container {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 5px 12px;
  margin-bottom: 4px;
  background-color: #ffffff;
  line-height: 1.4;
  font-size: 11px;
}
.invoice-box .hotel-details-container input {
  border: 1px solid transparent;
  background: transparent;
  font-family: inherit;
  font-size: 11px;
  font-weight: bold;
  color: #000;
  border-radius: 3px;
  padding: 1px 4px;
}
.invoice-box .hotel-details-container input:hover,
.invoice-box .hotel-details-container input:focus {
  border-color: #002b5e;
  background: #f8fafc;
}

/* Table */
.invoice-box table.items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 4px;
  text-align: center;
}
.invoice-box table.items-table th,
.invoice-box table.items-table td {
  border: 1px solid #555;
  padding: 3px 4px;
  font-size: 11px;
  vertical-align: middle;
}
.invoice-box table.items-table th {
  background-color: #002b5e;
  color: white;
  font-weight: bold;
}
.invoice-box table.items-table td:first-child {
  white-space: nowrap;
  font-weight: bold;
}
.invoice-box table.items-table input,
.invoice-box table.items-table select {
  border: none;
  background: transparent;
  text-align: center;
  text-align-last: center;
  font-weight: bold;
  width: 100%;
  font-family: inherit;
  font-size: 11px;
  color: #000;
}
.invoice-box table.items-table select {
  cursor: pointer;
  outline: none;
  padding: 1px 2px;
}
.invoice-box table.items-table select:focus,
.invoice-box table.items-table input:focus {
  background: #f0f7ff;
}

.btn-add-meal {
  background-color: #f0f4f8;
  color: #002b5e;
  border: 1px dashed #002b5e;
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: bold;
  cursor: pointer;
  display: inline-block;
  transition: all 0.2s;
}
.btn-add-meal:hover {
  background-color: #002b5e;
  color: #fff;
}
.btn-del-row-action {
  background: #fef2f2;
  color: #ef4444;
  border: 1px solid #fecaca;
  border-radius: 6px;
  width: 26px;
  height: 24px;
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s ease;
  line-height: 1;
}
.btn-del-row-action:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
  transform: scale(1.1);
  box-shadow: 0 2px 5px rgba(220, 38, 38, 0.3);
}

/* Bank & Totals Wrapper */
.invoice-box .bank-totals-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 12px;
  margin-top: 8px;
  margin-bottom: 5px;
}
.invoice-box .bank-info-box {
  flex: 1;
  border: 1px solid #002b5e;
  border-radius: 4px;
  padding: 6px 10px;
  position: relative;
  background: #fff;
  font-size: 10px;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.invoice-box .bank-info-box-title {
  position: absolute;
  top: -8px;
  right: 12px;
  background: white;
  padding: 0 4px;
  color: #002b5e;
  font-weight: bold;
  font-size: 10px;
}

.invoice-box .totals-table-box {
  width: 44%;
}
.invoice-box .totals-table-box table {
  width: 100%;
  border-collapse: collapse;
  height: 100%;
}
.invoice-box .totals-table-box td {
  padding: 2px 5px;
  border: 1px solid #555;
  font-size: 10px;
}
.invoice-box .totals-table-box .lbl {
  background-color: #f0f0f0;
  font-weight: bold;
  text-align: right;
  width: 55%;
}
.invoice-box .totals-table-box .val {
  text-align: center;
  font-weight: bold;
}
.invoice-box .totals-table-box .grand-total {
  background-color: #002b5e;
  color: white;
  font-weight: bold;
}
.invoice-box .totals-table-box .remaining-row {
  background-color: #fdf2f2;
  color: #b91c1c;
  font-weight: bold;
}

.btn-pct {
  background: #ffffff;
  color: #002b5e;
  border: 1px solid #002b5e;
  border-radius: 3px;
  font-size: 9px;
  font-weight: bold;
  padding: 0 4px;
  cursor: pointer;
  line-height: 1.3;
  transition: all 0.15s;
}
.btn-pct:hover, .btn-pct.active {
  background: #002b5e;
  color: #ffffff;
}

/* Terms Box */
.invoice-box .terms-box {
  border: 1px solid #000;
  border-radius: 4px;
  padding: 6px 10px;
  margin-bottom: 4px;
  background-color: #fff;
  font-size: 9px;
  line-height: 1.35;
}
.invoice-box .terms-title {
  color: #333;
  font-weight: bold;
  font-size: 11px;
  border-bottom: 1.5px solid #a67c00;
  display: inline-block;
  padding-bottom: 1px;
  margin-bottom: 4px;
}

/* Signatures */
.invoice-box .signatures-container {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  text-align: center;
  font-weight: bold;
  font-size: 10.5px;
}

/* ----------------------------------------------------------
   6. Financial Vouchers (سندات القبض والصرف)
   ---------------------------------------------------------- */
.voucher-type-toggle {
  display: inline-flex;
  background: #e2e8f0;
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}
.voucher-toggle-btn {
  border: none;
  background: transparent;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  color: #475569;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.voucher-toggle-btn.active.receipt {
  background: #059669;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.35);
}
.voucher-toggle-btn.active.payment {
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35);
}

.voucher-number-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 900;
  color: #002b5e;
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  padding: 6px 14px;
  border-radius: 8px;
}

.amount-input-highlight {
  font-size: 1.3rem !important;
  font-weight: 900 !important;
  color: #002b5e !important;
  background-color: #fffbeb !important;
  border: 2px solid #f59e0b !important;
}

.tafqeet-display {
  background: #f8fafc;
  border: 1px dashed #94a3b8;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
  color: #1e293b;
  font-size: 0.92rem;
  margin-top: 6px;
  min-height: 38px;
  display: flex;
  align-items: center;
}

/* ==========================================================
   Receipt & Payment Voucher Sheet (Exact Official Template)
   ========================================================== */
.receipt-sheet {
  width: 800px;
  margin: 0 auto 24px auto;
  background-color: #ffffff;
  padding: 22px 28px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  border: 1px solid #c8d1db;
  box-sizing: border-box;
  direction: rtl;
}

/* Header */
.receipt-sheet .sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2.5px solid #002b5e;
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.receipt-sheet .sheet-header-text h1 {
  font-size: 21px;
  font-weight: 900;
  color: #000000;
  margin: 0 0 2px 0;
  line-height: 1.2;
}
.receipt-sheet .sheet-header-text h2 {
  font-size: 12px;
  font-weight: 700;
  color: #a67c00;
  margin: 0 0 4px 0;
}
.receipt-sheet .sheet-header-text p {
  font-size: 11px;
  color: #222222;
  line-height: 1.4;
  margin: 1px 0 0 0;
}
.receipt-sheet .sheet-header-logo img {
  height: 75px;
  width: auto;
  display: block;
}

/* Top Title Banner */
.receipt-sheet .title-banner {
  background-color: #002b5e;
  color: #ffffff;
  text-align: center;
  padding: 5px 10px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 1px;
  margin-bottom: 10px;
  border-radius: 4px;
  position: relative;
  transition: background-color 0.3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.receipt-sheet .title-banner.payment {
  background-color: #8e1c1c !important;
}

/* Universal Section Box */
.receipt-sheet .section-box {
  border: 1px solid #d0d7de;
  border-radius: 5px;
  background-color: #ffffff;
  padding: 8px 12px;
  margin-bottom: 8px;
}

/* Section 1: Info Box (Grid 2 Columns) */
.receipt-sheet .info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.receipt-sheet .info-column-header {
  font-size: 13px;
  font-weight: 800;
  color: #222222;
  border-bottom: 2px solid #e2b93b;
  padding-bottom: 3px;
  margin-bottom: 7px;
}
.receipt-sheet .field-line {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
  font-size: 11.5px;
  direction: rtl;
}
.receipt-sheet .field-label {
  font-weight: 800;
  color: #000000;
  white-space: nowrap;
  margin-left: 8px;
  flex-shrink: 0;
}
.receipt-sheet .field-input {
  flex: 1;
  min-width: 0;
  border: 1px dashed transparent;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  color: #000000;
  padding: 2px 4px;
  border-radius: 3px;
  text-align: right;
  direction: rtl;
}
.receipt-sheet .field-input:hover {
  background-color: #f0f4f9;
  border-color: #a0b2c6;
}
.receipt-sheet .field-input:focus {
  outline: none;
  background-color: #ffffff;
  border-color: #002b5e;
  box-shadow: 0 0 0 2px rgba(0, 43, 94, 0.15);
}

/* Highlight Yellow Badge inside Info Box */
.receipt-sheet .highlight-badge-wrap {
  margin-top: 5px;
}
.receipt-sheet .highlight-badge-input {
  background-color: #ffeb3b;
  color: #000000;
  font-weight: 900;
  font-size: 11px;
  text-align: center;
  padding: 4px 8px;
  border: 1px solid #d4c000;
  border-radius: 3px;
  width: 100%;
  display: block;
  box-sizing: border-box;
}
.receipt-sheet .highlight-badge-input:hover {
  background-color: #fff166;
}
.receipt-sheet .highlight-badge-input:focus {
  outline: none;
  background-color: #ffffff;
  border-color: #002b5e;
}

/* Section 2: Pricing Table Box */
.receipt-sheet .pricing-table-box {
  border: 1px solid #002b5e;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 8px;
  background-color: #ffffff;
}
.receipt-sheet .pricing-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
}
.receipt-sheet .pricing-table th {
  background-color: #002b5e;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 800;
  padding: 5px 10px;
  width: 50%;
  border: 1px solid #002b5e;
}
.receipt-sheet .pricing-table .sub-pricing-row th {
  background-color: #003672 !important;
  color: #ffffff !important;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border: 1px solid #002b5e;
}
.receipt-sheet .pricing-table td {
  padding: 6px 10px;
  border: 1px solid #d0d7de;
  background-color: #ffffff;
}
.receipt-sheet .pricing-val-input {
  border: 1px dashed transparent;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 900;
  color: #000000;
  text-align: center;
  width: 100%;
  padding: 2px;
  border-radius: 3px;
}
.receipt-sheet .pricing-val-input:hover {
  background-color: #f0f4f9;
  border-color: #a0b2c6;
}
.receipt-sheet .pricing-val-input:focus {
  outline: none;
  background-color: #ffffff;
  border-color: #002b5e;
  box-shadow: 0 0 0 2px rgba(0, 43, 94, 0.15);
}
.receipt-sheet .paid-val-input {
  color: #002b5e;
  font-weight: 900;
}
.receipt-sheet .remaining-val-input {
  color: #16a34a;
  font-weight: 900;
}

/* Section 3: Bank Box */
.receipt-sheet .bank-box {
  border: 1px solid #002b5e;
  border-radius: 5px;
  padding: 8px 12px;
  margin-bottom: 8px;
  position: relative;
  background-color: #ffffff;
  font-size: 10.5px;
  line-height: 1.65;
}
.receipt-sheet .bank-box-badge {
  position: absolute;
  top: -9px;
  right: 14px;
  background: #ffffff;
  padding: 0 8px;
  color: #002b5e;
  font-weight: 800;
  font-size: 11px;
}
.receipt-sheet .bank-line {
  margin-bottom: 1px;
}
.receipt-sheet .bank-line strong {
  color: #000000;
  font-weight: 800;
}
.receipt-sheet .bank-highlight {
  color: #002b5e;
  font-weight: 800;
}

/* Section 4: Terms Box */
.receipt-sheet .terms-box {
  border: 1px solid #666666;
  border-radius: 5px;
  padding: 8px 12px;
  margin-bottom: 8px;
  background-color: #ffffff;
  font-size: 10px;
  line-height: 1.5;
}
.receipt-sheet .terms-title-badge {
  font-size: 11.5px;
  font-weight: 800;
  color: #000000;
  border-bottom: 2px solid #e2b93b;
  display: inline-block;
  padding-bottom: 2px;
  margin-bottom: 5px;
}
.receipt-sheet .term-group-head {
  color: #a67c00;
  font-weight: 800;
  font-size: 10.5px;
  margin-top: 3px;
  margin-bottom: 2px;
}
.receipt-sheet .term-group-head:first-child {
  margin-top: 0;
}
.receipt-sheet .term-items {
  list-style: none;
  padding-right: 0;
  margin: 0;
}
.receipt-sheet .term-items li {
  margin-bottom: 2px;
  color: #222222;
}

/* Section 5: Signatures Box */
.receipt-sheet .signatures-box {
  border-top: 1px dashed #777777;
  padding-top: 8px;
  margin-top: 5px;
  display: flex;
  justify-content: space-between;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
}
.receipt-sheet .sig-col {
  width: 45%;
}
.receipt-sheet .sig-title {
  font-size: 11.5px;
  font-weight: 800;
  color: #000000;
  margin-bottom: 6px;
}
.receipt-sheet .sig-input {
  border: 1px dashed transparent;
  background: transparent;
  font-family: inherit;
  font-weight: 800;
  font-size: 11.5px;
  text-align: center;
  color: #000000;
  width: 100%;
  padding: 2px;
  border-radius: 3px;
}
.receipt-sheet .sig-input:hover {
  background-color: #f0f4f9;
  border-color: #a0b2c6;
}
.receipt-sheet .sig-input:focus {
  outline: none;
  background-color: #ffffff;
  border-color: #002b5e;
}
.receipt-sheet .sig-subtitle {
  font-size: 10.5px;
  color: #555555;
  margin-top: 2px;
}

/* ----------------------------------------------------------
   7. Data Tables (Clients, Archive, Users)
   ---------------------------------------------------------- */
.modern-data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.modern-data-table th {
  background: #002b5e;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 10px 12px;
  text-align: right;
  white-space: nowrap;
}
.modern-data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.88rem;
  vertical-align: middle;
}
.modern-data-table tbody tr:hover {
  background: #f8fafc;
}
.table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}
.btn-sm-action {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}
.btn-sm-primary { background: #e0f2fe; color: #0369a1; border-color: #bae6fd; }
.btn-sm-primary:hover { background: #0284c7; color: #ffffff; }
.btn-sm-edit { background: #fef3c7; color: #b45309; border-color: #fde68a; }
.btn-sm-edit:hover { background: #f59e0b; color: #ffffff; }
.btn-sm-print { background: #f3e8ff; color: #7e22ce; border-color: #e9d5ff; }
.btn-sm-print:hover { background: #9333ea; color: #ffffff; }
.btn-sm-danger { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.btn-sm-danger:hover { background: #dc2626; color: #ffffff; }

/* Status Badges */
.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 800;
}
.status-pill.success { background: #dcfce7; color: #15803d; }
.status-pill.warning { background: #fef9c3; color: #a16207; }
.status-pill.danger { background: #fee2e2; color: #b91c1c; }
.status-pill.info { background: #e0e7ff; color: #4338ca; }

/* ----------------------------------------------------------
   8. Permissions Checkbox Grid & Modals
   ---------------------------------------------------------- */
.permissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
}
.permission-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.permission-checkbox-item:hover {
  background: #edf2f7;
}
.permission-checkbox-item input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #002b5e;
  cursor: pointer;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 16px;
}
.modal-backdrop.hidden {
  display: none !important;
}
.modal-window {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #002b5e;
}
.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
}
.modal-close-btn:hover {
  color: #0f172a;
}
.modal-body {
  padding: 20px;
}
.modal-footer {
  padding: 14px 20px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ----------------------------------------------------------
   9. Print Media Override
   ---------------------------------------------------------- */
@media print {
  .no-print,
  .app-navbar,
  .preview-toolbar,
  .nav-tabs,
  .stats-overview,
  .auth-overlay,
  .modal-backdrop,
  .btn-add-meal,
  .btn-del-row,
  .doc-type-selector-wrap,
  #toast {
    display: none !important;
  }
  body {
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .invoice-box,
  .receipt-sheet,
  .official-voucher-sheet,
  .document-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 4mm 6mm !important;
    box-shadow: none !important;
    border: none !important;
  }
  .invoice-box input,
  .invoice-box select,
  .receipt-sheet input,
  .receipt-sheet select {
    border: none !important;
    background: transparent !important;
  }
  .receipt-sheet .highlight-badge-input {
    background-color: #ffeb3b !important;
    border: 1px solid #d4c000 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .receipt-sheet .title-banner {
    color: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .receipt-sheet .pricing-table th,
  .receipt-sheet .pricing-table .sub-pricing-row th {
    background-color: #002b5e !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .client-select-banner,
  .header-client-picker {
    display: none !important;
  }
}

/* ==========================================================
   Client Quick Dropdown & Header Picker Styles
   ========================================================== */
.client-quick-dropdown {
  background: #ffffff !important;
  border: 1.5px solid #2563eb !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  color: #002b5e !important;
  cursor: pointer !important;
  outline: none !important;
  transition: all 0.2s ease !important;
  max-width: 100% !important;
}

.client-quick-dropdown:hover,
.client-quick-dropdown:focus {
  border-color: #1d4ed8 !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18) !important;
}

.header-client-picker {
  transition: all 0.2s ease;
}

.header-client-picker:hover {
  background: #dbeafe !important;
  border-color: #2563eb !important;
}

.header-client-select {
  cursor: pointer;
}

/* ==========================================================
   Tax, Transfers & Purchases Module Styles
   ========================================================== */
.tax-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.tax-stat-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 18px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 43, 94, 0.04);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.tax-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 43, 94, 0.08);
}

.tax-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 4px;
  background: #cbd5e1;
}

.tax-stat-card.incoming::before { background: #059669; }
.tax-stat-card.purchases::before { background: #d97706; }
.tax-stat-card.tax-due::before { background: #dc2626; }
.tax-stat-card.tax-refund::before { background: #2563eb; }
.tax-stat-card.zakat::before { background: #7c3aed; }

.tax-stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tax-stat-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
}

.tax-stat-icon {
  font-size: 1.2rem;
}

.tax-stat-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: #002b5e;
  font-family: monospace;
}

.tax-stat-sub {
  font-size: 0.76rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
}

.tax-report-sheet {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  max-width: 960px;
  margin: 0 auto;
}

@media print {
  .tax-no-print {
    display: none !important;
  }
  .tax-report-sheet {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    max-width: 100% !important;
  }
}


