/* ===== Fonts ===== */
@font-face {
  font-family: 'Vazirmatn';
  src: url('/assets/fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/assets/fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/assets/fonts/Vazirmatn-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/assets/fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
}
/* ===== Reset ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: 'Vazirmatn', sans-serif;
  background: #0d1117;
  color: #e6edf3;
  overflow: hidden;
}

/* ===== Root App ===== */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
}

/* ===== Header ===== */
.app-header {
  height: 64px;
  background: linear-gradient(135deg, #161b22, #0d1117);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #21262d;
}

.app-header h1 {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ===== Content ===== */
.app-content {
  flex: 1;
  display: block;
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== Welcome Box ===== */
.welcome {
  width: 100%;
  max-width: 420px;
  background: #161b22;
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
  box-shadow:
    0 0 0 1px #21262d,
    0 20px 40px rgba(0, 0, 0, 0.6);
}

.welcome p {
  font-size: 1.1rem;
  opacity: 0.8;
  margin-bottom: 28px;
}

/* ===== Buttons ===== */
.primary-btn {
  width: 100%;
  height: 56px;
  border-radius: 14px;
  border: none;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  color: #0d1117;
  background: linear-gradient(135deg, #2f81f7, #58a6ff);
  box-shadow:
    0 8px 24px rgba(47, 129, 247, 0.35);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.primary-btn:active {
  transform: scale(0.97);
  box-shadow:
    0 4px 12px rgba(47, 129, 247, 0.25);
}

/* Focus Outline برای دسترسی */
button:focus, input:focus, select:focus, textarea:focus {
  outline: 2px solid #58a6ff;
  outline-offset: 2px;
}

/* ===== Footer ===== */
.app-footer {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #8b949e;
  border-top: 1px solid #21262d;
}

/* ===== Responsive POS ===== */
@media (min-width: 720px) {
  .app-header {
    height: 72px;
  }

  .welcome {
    max-width: 520px;
    padding: 40px 32px;
  }

  .primary-btn {
    height: 64px;
    font-size: 1.2rem;
  }
}

/* ===== Page 1 ===== */
.page1 {
  width: 100%;
  max-width: 520px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0 auto;
  text-align: center;
}

.company-name {
  font-size: 1.2rem;
  font-weight: 500;
  opacity: 0.9;
}

/* ===== Projects box ===== */
.projects-box {
  background: #161b22;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 0 0 1px #21262d;

  display: flex;
  flex-direction: column;
}

/* ===== Projects list ===== */
.projects-list {
  max-height: 55vh;
  overflow-y: auto;

  padding-right: 4px;

  display: flex;
  flex-direction: column;
  gap: 12px;
}

.projects-list .project-item {
  flex-shrink: 0;

  padding: 12px 14px;
  font-size: 13px;
  border-radius: 14px;
  background: linear-gradient(145deg, #1b3a2e, #2da65b, #3bbf63);
  color: #e6edf3;
  border: 1px solid #196c28;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);

  display: flex;
  flex-direction: column;
  gap: 6px;
}

.projects-list .project-item h3 {
  font-size: 14px;
  font-weight: 600;
}

.projects-list .project-details div {
  font-size: 12px;
  color: #c8e6c9;
}

/* ===== Touch buttons with professional SVG ===== */
.project-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.project-actions button {
  all: unset;
  min-width: 50px;
  min-height: 50px;
  border-radius: 16px;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #222; /* مشکی روشن */
  border: 1px solid #555;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  color: currentColor;
}

.project-actions button:active {
  transform: scale(0.92);
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

/* Delete */
.project-actions .delete {
  color: #ff4c4c;
}
.project-actions .delete svg {
  stroke: #ff4c4c;
  fill: #ff4c4c;
}

/* Details */
.project-actions .details {
  color: #ffffff;
}
.project-actions .details svg {
  stroke: #ffffff;
  fill: none;
}

/* Download */
.project-actions .download {
  color: #28a745;
}
.project-actions .download svg {
  stroke: #28a745;
  fill: none;
}

/* ===== Empty ===== */
.projects-list .empty {
  text-align: center;
  opacity: 0.6;
  padding: 20px 0;
}


/* ===== Page 2 ===== */
.page2 {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0 auto;
  text-align: center;
}

.section-title {
  font-size: 1.1rem;
  opacity: 0.85;
}

.date-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.date-inputs input {
  width: 100px;
  height: 54px;
  border-radius: 12px;
  border: 1px solid #21262d;
  background: #0d1117;
  color: #e6edf3;
  font-size: 1rem;
  text-align: center;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.field label {
  font-size: 0.85rem;
  color: #8b949e;
  text-align: right;
}

.field input {
  height: 54px;
  border-radius: 12px;
  border: 1px solid #21262d;
  background: #0d1117;
  color: #e6edf3;
  font-size: 1rem;
  padding: 0 12px;
  text-align: center;
}

.secondary-btn {
  width: 100%;
  height: 52px;
  border-radius: 14px;
  background: transparent;
  border: 1px solid #30363d;
  color: #8b949e;
  font-size: 1rem;
}

.danger-btn {
  width: 100%;
  height: 56px;
  border-radius: 14px;
  border: none;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(135deg, #da3633, #f85149);
  box-shadow: 0 8px 24px rgba(218, 54, 51, 0.35);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.danger-btn:active {
  transform: scale(0.97);
  box-shadow: 0 4px 12px rgba(218, 54, 51, 0.25);
}

/* ===== Page 3 ===== */
.page3 {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0 auto;
  text-align: center;
}

.page3 .section-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: #e6edf3;
}

.page3 .readonly-field {
  width: 100%;
  text-align: right;
  font-size: 0.9rem;
  color: #e6edf3;
  padding: .05px 0;
  margin-bottom: .05px;
  border-bottom: none;
  display: inline-block;
}

.page3 .field input,
.page3 .field select,
.page3 .field textarea {
  width: 100%;
  height: 54px;
  border-radius: 12px;
  border: 1px solid #21262d;
  background: #0d1117;
  color: #e6edf3;
  font-size: 1rem;
  padding: 0 12px;
  text-align: center;
}

/* ===== Touch Optimized Select (Page 3) ===== */
.page3 .field select {
  appearance: none;
  -webkit-appearance: none;

  width: 100%;
  height: 64px;

  border-radius: 18px;
  border: 1px solid #30363d;

  background-color: #0d1117;
  color: #e6edf3;

  font-size: 1.05rem;
  font-weight: 600;

  padding: 0 52px 0 16px;
  cursor: pointer;

  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.03),
    0 6px 16px rgba(0,0,0,0.35);

  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    border-color 0.12s ease;
}

.page3 .field select:active {
  transform: scale(0.97);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.06),
    0 3px 8px rgba(0,0,0,0.25);
}

.page3 .field select:focus {
  border-color: #58a6ff;
  box-shadow:
    0 0 0 3px rgba(88,166,255,0.25),
    0 6px 16px rgba(0,0,0,0.35);
}

/* فلش اختصاصی */
.page3 .field select {
  background-image:
    linear-gradient(45deg, transparent 50%, #8b949e 50%),
    linear-gradient(135deg, #8b949e 50%, transparent 50%);
  background-position:
    calc(100% - 22px) 50%,
    calc(100% - 16px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

/* گزینه‌ها */
.page3 select option {
  background-color: #0d1117;
  color: #e6edf3;
}


/* responsive موبایل */
@media (max-width: 480px) {
  .page3 .field select {
    font-size: 0.95rem;
    padding: 10px 14px;
  }
}


.page3 .field textarea {
  height: 80px;
  resize: none;
  padding-top: 8px;
}

.page3 .page3-buttons {
  width: 100%;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.page3 .page3-buttons button {
  flex: 1;
  height: 40px;
  font-size: 0.9rem;
}

/* پلاک */
.truck-plate {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  overflow-x: auto; /* اضافه شده برای تعداد زیاد پلاک */
}

.plate {
  width: 340px;
  height: 82px;
  background: #f3c300;
  border: 3px solid #000;
  border-radius: 12px;
  display: flex;
  overflow: hidden;
  direction: ltr;
}

/* بخش آبی */
.plate-blue {
  width: 40px;
  background: #003399;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.plate-blue span {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.plate-blue img {
  width: 30px;
}

/* بخش اصلی پلاک */
.plate-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.plate-main input {
  direction: ltr;
}

/* عدد دو رقمی اول */
.first-two-digit {
  width: 50px;
  font-size: 32px;
  font-weight: 900;
  border: none;
  background: transparent;
  text-align: center;
}

/* حرف وسط */
.plate-letter {
  font-size: 30px;
  font-weight: 900;
  color: #000;
}

/* عدد سه رقمی */
.three-digit {
  width: 70px;
  font-size: 32px;
  font-weight: 900;
  border: none;
  background: transparent;
  text-align: center;
}

.plate-city {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  border-left: 3px solid #000; 
  height: 100%;
  padding-top: 6px;
  padding-left: 4px;
}

.plate-city small {
  font-size: 12px;
  font-weight: 700;
  color: #000;
  margin-bottom: 2px;
}

.plate-city input {
  width: 50px;
  font-size: 32px;
  font-weight: 900;
  border: none;
  background: transparent;
  text-align: center;
}

/* ===== Modal / POS ===== */
#receipt-modal.hidden {
  display: none;
}

#receipt-modal {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

#receipt-content {
  background: #fff;
  color: #000;
  width: 380px;
  max-width: 90%;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

/* POS Receipt */
.pos-receipt {
  width: 58mm;
  margin: 0 auto;
  font-family: Tahoma, monospace;
  font-size: 12px;
  color: #000;
  direction: rtl;
}

.pos-center { text-align: center; }
.pos-title { font-size: 16px; font-weight: 700; }
.pos-subtitle { font-size: 13px; margin-top: 2px; }
.pos-divider { border-top: 1px dashed #000; margin: 6px 0; }
.pos-row { display: flex; justify-content: space-between; gap: 6px; margin: 2px 0; }
.pos-row span:last-child { text-align: left; }
.pos-footer { text-align: center; font-size: 11px; margin-top: 6px; }
.ltr { direction: ltr; unicode-bidi: bidi-override; display: inline-block; text-align: left; }

.modal-buttons {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.modal-buttons button {
  flex: 1;
  padding: 8px 0;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}
#confirm-print-btn {
  background: linear-gradient(135deg, #2f81f7, #58a6ff);
  color: #fff;
}
#close-modal-btn {
  background: linear-gradient(135deg, #da3633, #f85149);
  color: #fff;
}

/* ===== Print اصلاح شده برای رسید کارت خان ===== */
@media print {
  body * {
    visibility: hidden; /* مخفی کردن همه عناصر غیر ضروری */
  }

  #print-container, 
  #print-container * {
    visibility: visible; /* فقط محتوای رسید نمایش داده شود */
  }

  #print-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 58mm;
    padding: 4mm;
    box-shadow: none;
    border-radius: 0;
    background: #fff;
    color: #000;
    font-family: Tahoma, monospace;
    font-size: 12px;
    line-height: 1.2;
    direction: rtl;
  }

  /* ردیف‌ها و ستون‌ها */
  #print-container .pos-row {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    margin: 2px 0;
  }
  #print-container .pos-row span:last-child {
    text-align: left;
    direction: ltr;
    unicode-bidi: bidi-override;
  }

  /* عنوان‌ها */
  #print-container .pos-title { font-size: 16px; font-weight: 700; text-align: center; }
  #print-container .pos-subtitle { font-size: 13px; text-align: center; margin-top: 2px; }

  /* خط جداکننده */
  #print-container .pos-divider { border-top: 1px dashed #000; margin: 6px 0; }

  /* فوتر */
  #print-container .pos-footer { text-align: center; font-size: 11px; margin-top: 6px; }
}

/* اندازه و حاشیه صفحه چاپ */
@page {
  size: 58mm auto;
  margin: 0;
}

/* ===== FIX اصلی مشکل تو 👇 ===== */
.page3 select option {
  background-color: #0d1117; /* بک‌گراند تیره */
  color: #e6edf3;           /* متن روشن */
  font-size: 1rem;
}

/* حالت انتخاب‌شده */
.page3 select option:checked {
  background-color: #161b22;
}

/* برای بعضی گوشی‌ها */
.page3 select option:hover {
  background-color: #21262d;
}


/* ===== Page 4 : Project Details ===== */
/* ===== Page 4 ===== */
.page4 {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}

/* هدر پروژه */
.page4 .project-header {
  background: #161b22;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 0 0 1px #21262d;
}

.page4 .project-header h2 {
  font-size: 1.2rem;
  margin-bottom: 6px;
  color: #e6edf3;
}

.page4 .project-meta {
  font-size: 0.9rem;
  color: #8b949e;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* لیست پته‌ها */
.page4 .receipts-box {
  background: #161b22;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 0 0 1px #21262d;
}

.page4 .receipts-title {
  font-size: 1rem;
  color: #8b949e;
  margin-bottom: 8px;
}

/* اسکرول پته‌ها */
.page4 .receipts-list {
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

/* کارت پته ثابت */
.page4 .receipt-item {
  background: linear-gradient(145deg, #1b3a2e, #2da65b, #3bbf63); /* سبز درباری ثابت */
  border-radius: 12px;
  padding: 10px 14px;
  color: #e6edf3;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.35);
  cursor: pointer;
}

/* ردیف‌های داخل پته */
.page4 .receipt-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.page4 .receipt-row span {
  white-space: nowrap;
}

.page4 .empty {
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.6;
  padding: 20px 0;
}

/* دکمه برگشت */
.page4 .back-btn {
  margin-top: 10px;
}

/* استایل برای نمایش توضیحات در کارت‌های لیست صفحه 4 */
.receipt-desc-container {
  margin-top: 5px;
  word-wrap: break-word;
}
.receipt-desc-label {
  font-weight: bold;
  font-size: 0.9em;
  margin-bottom: 2px;
}
.receipt-desc-text {
  font-size: 0.9em;
  line-height: 1.4;
}

/* ====================== MODAL TOUCH-FRIENDLY ====================== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px); /* Blur پشت زمینه */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.modal.show {
  visibility: visible;
  opacity: 1;
}

.modal .modal-content {
  background: #161b22;
  color: #e6edf3;
  padding: 28px 24px;
  border-radius: 18px;
  text-align: center;
  width: 85%;
  max-width: 380px;
  box-shadow:
    0 8px 24px rgba(0,0,0,0.4),
    0 0 0 1px #21262d;
  transform: scale(0.9) translateY(-20px);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* Scroll لمسی */
}

.modal.show .modal-content {
  transform: scale(1) translateY(0);
}

.modal .modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.modal .modal-message {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 20px;
  color: #c8e6c9;
}

.modal .modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal .modal-buttons button {
  padding: 16px 0;           
  font-size: 1.1rem;         
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px; /* فاصله بین آیکون و متن */
  -webkit-tap-highlight-color: transparent;
}

.modal .modal-buttons button:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.modal .modal-buttons button:active {
  transform: scale(0.95);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* رنگ‌ها با گرادیانت متفاوت */
.modal .btn-primary { /* عملیات اصلی */
  background: linear-gradient(135deg, #2f81f7, #58a6ff);
  color: #fff;
}
.modal .btn-success { /* موفقیت / مثبت */
  background: linear-gradient(135deg, #28a745, #62d286);
  color: #fff;
}
.modal .btn-danger { /* لغو / حذف / خطرناک */
  background: linear-gradient(135deg, #da3633, #f85149);
  color: #fff;
}
.modal .btn-warning { /* اختیاری: هشدار */
  background: linear-gradient(135deg, #f5a623, #fcd34d);
  color: #000;
}


/* Responsive موبایل */
@media (max-width: 480px) {
  .modal .modal-content {
    width: 90%;
    padding: 24px 20px;
  }
}

.pos-receipt {
  width: 58mm;
  padding: 4mm;
  font-size: 12px;
}
.pos-divider {
  border-top: 1px dashed #000;
  margin: 6px 0;
}
.ltr {
  direction: ltr;
  text-align: left;
}

/* ===== Login Screen Styles ===== */
#login-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0d1117; /* همرنگ پس‌زمینه اصلی */
  color: #e6edf3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  font-family: 'Vazirmatn', sans-serif;
}

.login-box {
  background: #161b22; /* همرنگ باکس‌ها */
  padding: 2.5rem 2rem;
  border-radius: 20px;
  box-shadow:
    0 0 0 1px #21262d,
    0 20px 40px rgba(0, 0, 0, 0.6);
  width: 90%;
  max-width: 360px;
  text-align: center;
}

.login-box h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #e6edf3;
}

.login-box p {
  font-size: 0.9rem;
  color: #8b949e;
  margin-bottom: 2rem;
}

.login-input {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  margin-bottom: 1rem;
  border-radius: 14px;
  border: 1px solid #21262d;
  background: #0d1117;
  color: #e6edf3;
  font-size: 1rem;
  font-family: 'Vazirmatn', sans-serif;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-input:focus {
  outline: none;
  border-color: #58a6ff;
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.25);
}

.login-btn {
  width: 100%;
  height: 56px;
  border-radius: 14px;
  border: none;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  color: #0d1117;
  background: linear-gradient(135deg, #2f81f7, #58a6ff); /* گرادیانت آبی استاندارد */
  box-shadow: 0 8px 24px rgba(47, 129, 247, 0.35);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  font-family: 'Vazirmatn', sans-serif;
}

.login-btn:active {
  transform: scale(0.97);
  box-shadow: 0 4px 12px rgba(47, 129, 247, 0.25);
}

.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* پیام خطا */
.login-error {
  color: #f85149;
  font-size: 0.85rem;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
  min-height: 1.2em;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.login-error.visible {
  opacity: 1;
}


/* ================= PROFESSIONAL UI UPGRADE ================= */
/* فقط بهبود ظاهری - بدون تغییر منطق برنامه */

.projects-list .project-item,
.page4 .receipt-item{
  border:1px solid rgba(255,255,255,.08);
  box-shadow:
    0 10px 24px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.05);
  transition:transform .18s ease, box-shadow .18s ease;
}

.projects-list .project-item:active,
.page4 .receipt-item:active{
  transform:scale(.985);
}

.project-actions button{
  background:rgba(13,17,23,.78);
  backdrop-filter:blur(10px);
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 6px 18px rgba(0,0,0,.25);
}

.field input,
.field textarea,
.date-inputs input,
.page3 .field select,
.login-input{
  transition:border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}

.field input:focus,
.field textarea:focus,
.date-inputs input:focus,
.page3 .field select:focus,
.login-input:focus{
  transform:translateY(-1px);
}

.page4 .project-header,
.projects-box,
.welcome,
.login-box{
  box-shadow:
    0 12px 32px rgba(0,0,0,.32),
    0 0 0 1px #21262d;
}

.primary-btn,
.danger-btn,
.login-btn{
  position:relative;
  overflow:hidden;
}

.primary-btn::before,
.danger-btn::before,
.login-btn::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,.14),
    transparent
  );
  transform:translateX(-100%);
}

.primary-btn:active::before,
.danger-btn:active::before,
.login-btn:active::before{
  transform:translateX(100%);
  transition:.45s;
}

.modal .modal-content{
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 20px 60px rgba(0,0,0,.45);
}

::-webkit-scrollbar{
  width:6px;
}

::-webkit-scrollbar-thumb{
  background:#30363d;
  border-radius:20px;
}

::-webkit-scrollbar-thumb:hover{
  background:#58a6ff;
}



/* ================= PROFESSIONAL PLUS ================= */

.company-name{
  font-size:1.45rem;
  font-weight:700;
  letter-spacing:.4px;
}

.app-header{
  backdrop-filter:blur(12px);
  box-shadow:0 4px 20px rgba(0,0,0,.25);
}

.projects-box,
.page4 .receipts-box{
  border-radius:22px;
}

.projects-list .project-item{
  border-radius:20px;
  padding:18px;
}

.projects-list .project-details{
  margin-top:4px;
}

.projects-list .project-details div{
  opacity:.95;
  line-height:1.7;
}

.page4 .receipt-item{
  border-radius:18px;
  padding:14px 16px;
}

.page4 .receipt-row{
  padding:2px 0;
}

.field label{
  font-weight:600;
  margin-bottom:4px;
}

.field input,
.field textarea,
.date-inputs input,
.page3 .field select,
.login-input{
  border:1px solid #30363d;
  border-radius:16px;
}

.page3 .readonly-field{
  background:#161b22;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid #21262d;
}

.page3 .page3-buttons button{
  height:48px;
  border-radius:14px;
  font-weight:700;
}

.plate{
  box-shadow:
    0 10px 24px rgba(0,0,0,.25),
    inset 0 1px 0 rgba(255,255,255,.2);
}

.modal .modal-content{
  border-radius:24px;
}

#receipt-content{
  border-radius:20px;
}

.primary-btn:hover,
.danger-btn:hover,
.login-btn:hover{
  filter:brightness(1.05);
}

@media (min-width:720px){
  .projects-list .project-item:hover,
  .page4 .receipt-item:hover{
    transform:translateY(-2px);
    box-shadow:
      0 16px 32px rgba(0,0,0,.4),
      inset 0 1px 0 rgba(255,255,255,.05);
  }
}



/* ================= ULTRA UI ================= */

html,body{
  background:
    radial-gradient(circle at top right,#1a2333 0%,#0d1117 45%),
    #0d1117;
}

.app-header{
  background:rgba(22,27,34,.82);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}

.projects-box,
.page4 .receipts-box,
.page4 .project-header,
.login-box,
.welcome{
  background:rgba(22,27,34,.88);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}

.projects-list .project-item{
  background:
    linear-gradient(
      135deg,
      #1f7a42,
      #2da65b
    );
}

.page4 .receipt-item{
  background:
    linear-gradient(
      135deg,
      #1d6b3c,
      #2c9c55
    );
}

.primary-btn,
.login-btn{
  box-shadow:
    0 12px 30px rgba(47,129,247,.35);
}

.danger-btn{
  box-shadow:
    0 12px 30px rgba(218,54,51,.35);
}

.field input,
.field textarea,
.date-inputs input,
.page3 .field select,
.login-input{
  background:#111827;
}

.field input::placeholder,
.field textarea::placeholder,
.login-input::placeholder{
  color:#7d8590;
}

.page3 .readonly-field{
  background:linear-gradient(
    135deg,
    rgba(47,129,247,.10),
    rgba(88,166,255,.05)
  );
}

.modal{
  backdrop-filter:blur(8px);
}

.modal .modal-content{
  background:rgba(22,27,34,.95);
}

.page4 .project-header h2,
.company-name{
  text-shadow:0 2px 12px rgba(88,166,255,.25);
}

.projects-list,
.page4 .receipts-list{
  padding-right:6px;
}

@media (min-width:720px){
  .projects-box:hover,
  .page4 .receipts-box:hover,
  .page4 .project-header:hover{
    transform:translateY(-2px);
    transition:.2s ease;
  }
}



/* ================= ENTERPRISE PREMIUM UI ================= */

/* حس اپلیکیشن تجاری واقعی */
body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(circle at 15% 20%, rgba(88,166,255,.08), transparent 30%),
    radial-gradient(circle at 85% 10%, rgba(47,129,247,.08), transparent 25%);
}

/* کارت‌ها */
.projects-box,
.page4 .project-header,
.page4 .receipts-box,
.login-box,
.welcome{
  border-radius:28px;
  border:1px solid rgba(255,255,255,.08);
  box-shadow:
    0 24px 60px rgba(0,0,0,.45),
    inset 0 1px 0 rgba(255,255,255,.08);
}

/* پروژه‌ها */
.projects-list .project-item{
  border-radius:24px;
  padding:20px;
  position:relative;
  overflow:hidden;
}

.projects-list .project-item::after{
  content:"";
  position:absolute;
  top:0;
  right:0;
  width:5px;
  height:100%;
  background:rgba(255,255,255,.25);
}

.projects-list .project-item h3{
  font-size:1rem;
  font-weight:700;
}

.projects-list .project-details{
  margin-top:8px;
}

.projects-list .project-details div{
  line-height:1.8;
}

/* دکمه‌ها */
.primary-btn,
.danger-btn,
.login-btn{
  height:60px;
  border-radius:18px;
  font-weight:800;
  letter-spacing:.3px;
}

.primary-btn{
  background:linear-gradient(135deg,#2f81f7,#66b3ff);
}

.primary-btn,
.danger-btn,
.login-btn{
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    filter .18s ease;
}

.primary-btn:hover,
.danger-btn:hover,
.login-btn:hover{
  transform:translateY(-2px);
}

/* فرم‌ها */
.field input,
.field textarea,
.date-inputs input,
.page3 .field select,
.login-input{
  height:60px;
  border-radius:18px;
  font-size:1rem;
  padding-inline:16px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03);
}

.field textarea{
  min-height:110px;
  padding-top:14px;
}

.field label{
  font-size:.9rem;
  font-weight:700;
  color:#b8c1cc;
}

/* صفحه پلاک */
.plate{
  border-radius:18px;
  transform:scale(1.03);
  box-shadow:
    0 18px 40px rgba(0,0,0,.35);
}

.first-two-digit,
.three-digit,
.plate-city input{
  transition:.15s ease;
}

.first-two-digit:focus,
.three-digit:focus,
.plate-city input:focus{
  transform:scale(1.08);
}

/* اطلاعات پروژه صفحه 3 */
.page3 .readonly-field{
  border-radius:16px;
  margin-bottom:6px;
  font-weight:600;
}

/* لیست پته‌ها */
.page4 .receipt-item{
  border-radius:22px;
  padding:18px;
}

.page4 .receipt-row{
  padding:4px 0;
}

.page4 .receipt-item::before{
  content:"";
  display:block;
  height:1px;
  background:rgba(255,255,255,.08);
  margin-bottom:8px;
}

.page4 .receipt-item::before:first-child{
  display:none;
}

/* مودال */
.modal .modal-content,
#receipt-content{
  border-radius:28px;
}

.modal .modal-title{
  font-size:1.45rem;
}

.modal .modal-message{
  font-size:1.05rem;
}

/* اسکرول */
::-webkit-scrollbar{
  width:8px;
}

::-webkit-scrollbar-thumb{
  background:linear-gradient(#58a6ff,#2f81f7);
}

/* دسکتاپ */
@media (min-width:720px){
  .projects-list .project-item:hover,
  .page4 .receipt-item:hover{
    transform:translateY(-4px);
  }
}
