:root {
  --primary-color: #2e7d32;
  --secondary-color: #f5f5f5;
  --danger-color: #d32f2f;
  --success-color: #388e3c;
  --text-color: #333;
  --orange-report: #e67e22;
}

body {
  font-family: Tahoma, Arial, sans-serif;
  background-color: #eceff1;
  margin: 0;
  color: var(--text-color);
  line-height: 1.6;
  direction: rtl;
}

/* هدر اصلی مهندس مهران */
.app-header {
  background: var(--primary-color);
  color: white;
  padding: 20px 0 0 0; 
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  position: relative; /* بسیار مهم برای موقعیت دکمه‌ها */
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 140px; 
}

.app-header h1 { margin: 0; font-size: 1.5rem; }
.app-header p { margin: 5px 0 10px 0; font-size: 0.9rem; opacity: 0.9; }

/* استایل مشترک دکمه‌های گوشه هدر */
.customer-btn, .report-btn {
    position: absolute;
    bottom: 0; 
    border: none;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    height: 32px;
    display: flex;
    align-items: center;
    z-index: 100;
}

/* دکمه آبی - دقیقاً در گوشه راست و پایین */
.customer-btn {
    right: 0;
    background: #1976d2;
    color: white;
    border-radius: 8px 0 0 0;
}

/* دکمه نارنجی - چسبیده به سمت چپِ دکمه آبی */
.report-btn {
    right: 90px; /* با توجه به عرض دکمه آبی تنظیم شده */
    background-color: var(--orange-report);
    color: white;
    border-radius: 8px 0 0 0;
}

.customer-btn:active { background: #1565c0; }
.report-btn:active { background-color: #d35400; }

/* استایل باکس ساعت و تاریخ */
.date-container {
    background: rgba(0,0,0,0.2);
    padding: 5px 15px;
    border-radius: 20px;
    margin-bottom: 45px; 
    direction: ltr;
    font-size: 0.85rem;
}

/* سایر استایل‌های بدنه */
.container { padding: 15px; max-width: 600px; margin: 0 auto; }

.card {
  background: white;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.card h2 {
  font-size: 1.1rem;
  margin-top: 0;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 10px;
  color: var(--primary-color);
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-box {
  background: var(--secondary-color);
  padding: 12px;
  border-radius: 8px;
  text-align: center;
}

.stat-box:last-child { grid-column: span 2; background: #fff9c4; }
.stat-box span { display: block; font-size: 0.8rem; color: #666; }
.stat-box strong { font-size: 1.1rem; display: block; margin-top: 5px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-group { margin-bottom: 15px; }
label { display: block; margin-bottom: 5px; font-weight: bold; font-size: 0.9rem; }

input, select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 1rem;
  font-family: inherit;
}

input:focus { border-color: var(--primary-color); outline: none; }

.readonly-input {
  background-color: #f1f8e9;
  border: 1px dashed var(--primary-color);
  font-weight: bold;
  color: var(--primary-color);
}

.btn-submit {
  width: 100%;
  padding: 15px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
}

.transaction-list { list-style: none; padding: 0; }
.transaction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 5px;
  border-bottom: 1px solid #eee;
}

.item-info { display: flex; flex-direction: column; }
.item-desc { font-size: 0.85rem; color: #777; }
.item-amount { font-weight: bold; font-size: 1rem; }

.text-red { color: var(--danger-color); }
.text-green { color: var(--success-color); }

/* Modal برای گزارش‌گیری */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.7);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 15px;
  width: 85%;
  max-width: 450px;
  position: relative;
}

.close-modal {
  color: #aaa;
  float: left;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}
