body {
    font-family: 'Tahoma', sans-serif;
    background-color: #ffffff;
    padding: 0px;
  }
  
  .card {
    display: flex;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    margin: auto;
    direction: rtl;
    flex-direction: column;
  }
  
  .card-logo img {
    margin-top: -20px;
    width: 200px;
    height: 100px;
   
    object-fit: contain;
}
  
  .card-content {
    padding: 1px;
    text-align: center;
    flex: 1;
    margin-top: -80px;
  }
  
  .card-title {
    margin-bottom: 10px;
    font-size: 1.4em;
    color: #2c3e50;
  }
  
  /* Responsive behavior */
  @media (max-width: 600px) {
    .card {
      flex-direction: column;
      text-align: center;
    }
  
    .card-logo img {
      margin: auto;
    }
  
    .card-content {
      margin-top: -20px;
      padding: 1px;
    }
    #id_table_coursec{
      width: 800px;
      overflow-x: scroll;
    }
    #id_tab_language{
       width: 800px;
      overflow-x: scroll;
    }
  }
  
  .card-bottom {
    padding: 0px;
    background-color: #f9f9f9;
    width: 100%;
  }
  /* -------------------استایل وظییفه صفحه اول  */
  .form-container {
    background: white;
    padding: 1px;
    border-radius: 10px;
    max-width: 100%;
    margin: auto;
    /* box-shadow: 0 4px 12px rgba(0,0,0,0.1); */
  }
  
  h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
  }
  
  /* Floating Input & Select */
  .form-group-floating {
    position: relative;
    margin-bottom: 20px;
  }
  
  .floating-input,
  .floating-select {
    width: 100%;
    padding: 14px 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
    outline: none;
    background: transparent;
    transition: border-color 0.3s, box-shadow 0.3s;
  }
  
  .floating-select {
    appearance: none;
    background-color: white;
  }
  
  .floating-input:focus,
  .floating-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 4px #007bff55;
  }
  
  .floating-label {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: white;
    padding: 0 5px;
    color: #999;
    font-size: 16px;
    pointer-events: none;
    transition: 0.3s ease all;
  }
  
  .floating-input:focus + .floating-label,
  .floating-input:not(:placeholder-shown) + .floating-label,
  .floating-select:focus + .floating-label,
  .floating-select:not([value=""]):valid + .floating-label {
    top: 0;
    right: 10px;
    font-size: 16px;
    color: #007bff;
  }

  /* Checkbox */
  .custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 15px;
    user-select: none;
    margin: 15px 0;
  }
  
  .custom-checkbox input {
    display: none;
  }
  
  .checkbox-box {
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 4px;
    margin-left: 10px;
    position: relative;
    transition: 0.3s;
  }
  
  .custom-checkbox input:checked + .checkbox-box {
    background-color: #007bff;
    border-color: #007bff;
  }
  
  .checkbox-box::after {
    content: "";
    position: absolute;
    display: none;
    top: 2px;
    right: 5px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
  }
  
  .custom-checkbox input:checked + .checkbox-box::after {
    display: block;
  }
  
  /* Radio Buttons */
  .radio-group {
    display: flex;
    gap: 20px;
    margin: 15px 0;
  }
  
  .custom-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-size: 15px;
  }
  
  .custom-radio input {
    display: none;
  }
  
  .radio-mark {
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 50%;
    margin-left: 8px;
    position: relative;
    transition: 0.3s;
  }
  
  .custom-radio input:checked + .radio-mark {
    border-color: #007bff;
    background: radial-gradient(circle at center, #007bff 40%, transparent 41%);
  }
  
  /* Submit Button */
  button {
    width: 100%;
    padding: 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
  }
  
  button:hover {
    background: #0056b3;
  }
  
  /* Responsive */
  @media (max-width: 600px) {
    .radio-group {
      flex-direction: column;
    }
   
  }
  .floating-input,
.floating-select {
  width: 100%;
  box-sizing: border-box;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
  }
  
  /* در سایز بزرگ، نمایش دو ستونه */
  @media (min-width: 768px) {
    .form-grid {
      grid-template-columns: 1fr 1fr;
    }
  }
  .line-with-text {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
  }

  .line-with-text::before,
  .line-with-text::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #000;
  }

  .line-with-text:not(:empty)::before {
    margin-left: 10px;
  }

  .line-with-text:not(:empty)::after {
    margin-right: 10px;
  }

  .line-text {
    padding: 0 10px;
    white-space: nowrap;
  }

  /* tabel style  */
  .table-container {
    overflow-x: scroll;
  }

  table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    direction: rtl;
    white-space: nowrap;
  }

  th, td {
    padding: 10px;
    text-align: right;
    border: 1px solid #ccc;
    white-space: nowrap;
  }

  th {
    background-color: #007bff;
    color: white;
    white-space: nowrap;
  }

  td[contenteditable="true"] {
    background-color: #ffffff;
    cursor: text;
  }

  @media (max-width: 768px) {
    table, thead, tbody, th, td, tr {
      font-size: 12px;
      width: max-content;
    }
  }


  /* footer  */
  footer {
    background-color: #000000;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 50px;
  }

  .footer-logo {
    font-size: 1.5rem;
    font-weight: bold;
  }

  nav.footer-nav {
    display: flex;
    gap: 20px;
  }

  nav.footer-nav a {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background 0.3s;
  }

  nav.footer-nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
  }

  .social-icons {
    display: flex;
    gap: 15px;
  }

  .social-icons a {
    color: white;
    font-size: 1.2rem;
    text-decoration: none;
  }

  .social-icons a:hover {
    color: #ffcb05;
  }

  /* Responsive styling */
  @media (max-width: 768px) {
    footer {
      flex-direction: column;
      align-items: flex-start;
    }

    nav.footer-nav {
      margin-top: 15px;
    }

    .social-icons {
      margin-top: 15px;
    }
  }
  footer {
    background-color: #000000;
    color: white;
    padding: 20px;
    display: flex;
    flex-direction: column; /* برای قرار دادن آیتم‌ها به صورت عمودی */
    align-items: start; /* برای مرکز چین کردن آیتم‌ها */
    font-size: 13px;
  }

  .footer-logo {
    font-size: 1rem;
    font-weight: bold;
    margin: 10px 0; /* فاصله بین لوگوها */
  }


  /* استایل برای بخش با کلاس 'file' */
.file {
  width: 97%;
  text-align: right;
  margin: 0 auto; /* برای قرار دادن محتوای فایل در وسط صفحه */
  padding: 20px;
  background-color: #f9f9f9; /* رنگ پس‌زمینه */
  border-radius: 8px; /* گوشه‌های گرد */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* سایه ملایم برای بخش */
}

.file h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #333; /* رنگ متن عنوان */
}

.file label {
  display: block;
  font-size: 1rem;
  margin: 10px 0 5px;
  color: #555; /* رنگ متن برچسب */
}

.file input[type="file"] {
  display: block;
  width: 100%;
  padding: 8px;
  font-size: 1rem;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
}

.file input[type="file"]:focus {
  border-color: #007bff; /* رنگ مرز هنگام فوکوس */
  outline: none;
}

.file .buttons {
  margin-top: 20px;
  text-align: left; /* چیدمان دکمه‌ها یا بخش‌های دیگر */
}

/* Media Queries برای ریسپانسیو کردن طراحی در موبایل */
@media (max-width: 768px) {
  .file {
    padding: 15px; /* کاهش پدینگ برای موبایل */
    width: 100%; /* عرض 100% برای موبایل */
  }

  .file h3 {
    font-size: 1rem; /* کاهش اندازه فونت عنوان در موبایل */
  }

  .file label {
    font-size: 0.9rem; /* کاهش اندازه فونت برچسب در موبایل */
  }

  .file input[type="file"] {
    padding: 10px;
    width: 90%; /* افزایش پدینگ برای ورودی‌ها در موبایل */
  }

  .file .buttons {
    text-align: center; /* تنظیم دکمه‌ها به مرکز در موبایل */
  }
}



/* ======================================================== */

.progress-bar-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background-color: #ddd;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background-color: #28a745;
  transition: width linear;
}


/* ===================================== */
/* ------------------------------------- */
/* ====================================== */
table td select.form-control {
  width: 100%;
  height: 100%;
  border: none;
  padding: 8px;
  font-size: 14px;
  box-sizing: border-box;
  background-color: transparent;
  outline: none;
}

/* table td {
  padding: 0;
  margin: 0;
} */

.checkbox-cell {
  text-align: center;
  vertical-align: middle;
  padding: 0;
}

.checkbox-cell input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.radio-cell {
  text-align: center;
  vertical-align: middle;
  padding: 0;
}

.radio-cell input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.language_2{
  width: 18px;
  height: 18px;
}



.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #345b84;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background-color 0.3s;
  width: 100%;
  max-width: 300px;
  margin-top: 30px;
}

.submit-btn:hover {
  background-color: #0056b3;
}

.btn-loader {
  display: none;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.submit-btn.loading .btn-text {
  display: none;
}

.submit-btn.loading .btn-loader {
  display: inline-block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 480px) {
  .submit-btn {
    font-size: 14px;
    padding: 10px 16px;
  }
}

checkbox-cell {
  padding: 10px;
  text-align: center;
  vertical-align: middle;
  width: 100%; /* مطمئن شوید که سلول فضای کافی دارد */
  font-size: 14px;
}

/* استایل‌دهی به تگ label */
.checkbox-label {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
}

/* استایل‌دهی به چک‌باکس واقعی */
.checkbox {
  opacity: 0; /* مخفی کردن چک‌باکس واقعی */
  position: absolute;
}

/* استایل‌دهی به نمای سفارشی چک‌باکس */
.checkbox-custom {
  width: 30px;
  height: 30px;
  border: 1px solid #3f8d7c; /* رنگ مرز */
  border-radius: 4px;
  display: inline-block;
  position: relative;
  background-color: white;
  margin: 10px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* استایل چک‌باکس زمانی که تیک خورده است */
.checkbox:checked + .checkbox-custom {
  background-color: #3f8d7c; /* رنگ پس‌زمینه وقتی که چک‌باکس تیک خورده */
  border-color: #3f8d7c;
}

/* استایل علامت تیک در چک‌باکس */
.checkbox:checked + .checkbox-custom:after {
  content: '';
  position: absolute;
  top: 6px;
  left: 8px;
  width: 7px;
  height: 14px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* برای نمایش بهتر در موبایل */
@media (max-width: 768px) {
  .checkbox-cell {
      font-size: 12px;  /* اندازه متن و چک‌باکس در صفحه موبایل کوچکتر */
  }
  .checkbox-custom {
      width: 20px;
      height: 20px;
      
  }
  /* استایل علامت تیک در چک‌باکس */
.checkbox:checked + .checkbox-custom:after {
  content: '';
  position: absolute;
  top: 0px;
  left: 5px;
  width: 7px;
  height: 14px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.forece {
    float: right; /* در موبایل سمت چپ */
    text-align: right;
  }


}
.acceptance-conditions {
  background-color: #f9f9f9;
  border: 2px solid #dcdcdc;
  padding: 15px 20px;
  border-radius: 8px;
  direction: rtl;
  text-align: right;
  font-family: "Vazir", "Tahoma", sans-serif;
  color: #333;
  margin-top: 20px;
  line-height: 1.8;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.acceptance-conditions p {
  font-weight: bold;
  margin-bottom: 10px;
}

.acceptance-conditions ul {
  list-style-type: '✅ ';
  padding-right: 20px;
}

.acceptance-conditions li {
  margin-bottom: 6px;
}
/* واکنش‌گرا برای موبایل */
@media (max-width: 600px) {
  .acceptance-conditions {
    padding: 12px 15px;
    font-size: 14px;
    border-radius: 6px;
    width: 85%;
  }

  .acceptance-conditions ul {
    padding-right: 15px;
  }

  .acceptance-conditions li {
    margin-bottom: 5px;
    font-size: 13px;
  }
}
.save_button {
  width: 250px;
  background-color: #28a745; /* سبز ملایم */
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  font-family: "Vazir", "Tahoma", sans-serif;
  display: block;
  margin: 30px auto 0 auto; /* وسط‌چین با فاصله از بالا */
  text-align: center;
}

.save_button:hover {
  background-color: #218838; /* سبز تیره‌تر هنگام هاور */
  transform: scale(1.04);
}

.save_button:active {
  transform: scale(0.97);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.custom-alert {
    position: fixed;
    top: 20px;
    left: 20px;
    max-width: 350px;
    z-index: 1050;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    border-radius: 8px;
    border: 1px solid #c3e6cb;
    padding: 15px 20px;
    background-color: #d4edda;
    color: #155724;
    font-family: 'Tahoma', sans-serif;
  }

  .message-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .progress-container {
    height: 4px;
    margin-top: 10px;
    background-color: #c3e6cb;
    border-radius: 4px;
    overflow: hidden;
  }

  .progress-bar-timer {
    height: 100%;
    width: 100%;
    background-color: #28a745;
    animation: shrinkBar 5s linear forwards;
  }

  @keyframes shrinkBar {
    from { width: 100%; }
    to { width: 0%; }
  }
  /* سلول‌های جدول که سلکت داخلشان است */
#table_education td {
  padding: 0 !important;
  margin: 0 !important;
  height: 100%;
  vertical-align: middle;
}

/* استایل انتخاب‌گرهای رشته و سال فراغت */
select.field-of-study,
select.graduation-year {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  font-family: inherit;
  font-size: 14px;
  background-color: #fff;
  direction: rtl;
  box-sizing: border-box; /* برای اینکه width و height دقیق باشد */
}

/* حالت فوکوس */
select.field-of-study:focus,
select.graduation-year:focus {
  outline: none;
  box-shadow: none;
}
.full-cell-select {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  font-size: 14px;
  background-color: transparent;
  direction: rtl;
}
select.full-cell-select:focus
{
  outline: none;
  box-shadow: none;
}