/* ==== BASE.CSS OPTIMIZED ==== */

/* فونت پایه و رنگ پس‌زمینه کلی */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;700&display=swap');

body {
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  background-color: #f5f5f5;
  font-size: 14px;
  color: #333;
  padding: 20px;
}

/* سرتیترها */
h1, h2, h3 {
  color: #3f51b5;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
}

/* باکس بخش‌ها */
.section-box {
  background-color: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* دکمه‌ها */
.btn-primary {
  background-color: #3f51b5;
  color: white;
  padding: 10px 16px;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: background-color 0.3s ease-in-out, transform 0.1s ease-in-out;
}
.btn-primary:hover {
  background-color: #2c3e9e;
}
.btn-primary:active {
  transform: scale(0.97);
}
.btn-danger {
  background-color: #e53935;
  color: white;
  transition: background-color 0.3s ease-in-out, transform 0.1s ease-in-out;
}
.btn-danger:hover {
  background-color: #c62828;
}
.btn-danger:active {
  transform: scale(0.97);
}

/* فرم‌ها */
input, select, textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
  background-color: #fff;
  transition: all 0.2s ease-in-out;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #3f51b5;
  box-shadow: 0 0 3px #3f51b5;
}

/* جداول */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table th, table td {
  padding: 10px;
  border: 1px solid #ccc;
  text-align: center;
}
table th {
  background-color: #3f51b5;
  color: white;
}

/* لینک بازگشت */
.back-link {
  text-align: right;
  margin-bottom: 20px;
}
.back-link a {
  color: #3f51b5;
  font-weight: bold;
  text-decoration: none;
}

/* جدول ریسپانسیو */
@media (max-width: 768px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }
  table thead {
    display: none;
  }
  table tr {
    margin-bottom: 15px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    padding: 10px;
  }
  table td {
    text-align: right;
    padding-left: 50%;
    position: relative;
  }
  table td::before {
    content: attr(data-label);
    position: absolute;
    left: 15px;
    top: 10px;
    font-weight: bold;
    color: #555;
  }
}


/* ==== Universal Responsive for all screens ==== */
@media (max-width: 600px) {
  body {
    font-size: 13px;
    padding: 10px;
  }

  h1, h2, h3 {
    font-size: 16px;
  }

  .section-box, .section {
    padding: 15px;
    margin-bottom: 20px;
  }

  .btn-primary, .btn-danger {
    padding: 8px 12px;
    font-size: 13px;
  }

  input, select, textarea {
    font-size: 13px;
    padding: 8px;
  }

  .progress-bar {
    font-size: 12px;
  }

  table {
    font-size: 13px;
  }
}



/* ==== Extra Buttons ==== */
.btn-warning {
  background-color: #ff9800;
  color: white;
}
.btn-warning:hover {
  background-color: #e68900;
}
.btn-success {
  background-color: #4caf50;
  color: white;
}
.btn-success:hover {
  background-color: #388e3c;
}
.btn-outline {
  background-color: transparent;
  border: 2px solid #3f51b5;
  color: #3f51b5;
}
.btn-outline:hover {
  background-color: #3f51b5;
  color: white;
}

/* ==== Spacing Utilities ==== */
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.p-2 { padding: 20px; }

/* ==== Cards and Summary Boxes ==== */
.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  padding: 16px;
  margin-bottom: 16px;
}

/* ==== Ultra Mobile Support ==== */
@media (max-width: 480px) {
  body {
    font-size: 12px;
  }

  h1, h2, h3 {
    font-size: 14px;
  }

  .section-box, .section {
    padding: 12px;
    margin-bottom: 16px;
  }

  .btn-primary, .btn-danger, .btn-warning, .btn-success {
    padding: 6px 10px;
    font-size: 12px;
  }

  input, select, textarea {
    font-size: 12px;
    padding: 6px;
  }

  .progress-bar {
    font-size: 11px;
  }

  table {
    font-size: 12px;
  }
}


/* ==== Extra Mobile Enhancement for manager/admin UI ==== */
@media (max-width: 600px) {
  .section-box, .section, .summary, ul, p {
    font-size: 14.5px !important;
    line-height: 1.7;
  }
}
