body {
  direction: rtl;
  font-family: 'Segoe UI', 'Arial', sans-serif;
    background: #fcf8f8;
  color: #fff;
  margin: 0;
  min-height: 100vh;
}

.container {
  max-width: 700px;
  margin: 40px auto;
   background: #232323;
  color: #fff;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  border-radius: 18px;
  padding: 32px 24px 24px 24px;
}

.tab-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
}

.tab-btn {
  background: #e3eafc;
  color: #2d3a4b;
  border: none;
  border-radius: 24px 24px 0 0;
  padding: 12px 32px;
  font-size: 1.1em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  outline: none;
  box-shadow: 0 2px 8px 0 rgba(31, 38, 135, 0.07);
}

.tab-btn.active,
.tab-btn:hover {
  background: #1976d2;
  color: #fff;
}

.tab-content {
  display: none;
  animation: fadeIn 0.5s;
  border-radius: 0 0 18px 18px;
   background: transparent;
  color: #fff;
  padding: 28px 18px 18px 18px;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px 0 rgba(31, 38, 135, 0.07);
}

.tab-content.active {
  display: block;
}

h2 {
  margin-top: 0;
  color: #1976d2;
  font-weight: 600;
  font-size: 1.3em;
}

.form-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.form-group label {
  width: 120px;      /* רוחב קבוע! */
  min-width: 120px;
  max-width: 120px;
  text-align: start;
  margin-left: 0;
  margin-right: 0;
  flex-shrink: 0;
  flex-grow: 0;
}

.form-group select {
  flex: 1 1 0;
  min-width: 160px;
  max-width: 100%;
  margin-right: 0;
  margin-left: 0;
}
.form-group.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-inline: 8px;
}

.form-group select,
.form-group input[type="file"] {
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid #b0bec5;
  background: #f5f7fa;
  font-size: 1em;
  transition: border 0.2s;
}

.form-group select:focus,
.form-group input[type="file"]:focus {
  border: 1.5px solid #1976d2;
  outline: none;
}

.main-btn {
  display: block;
  width: 100%;
  padding: 14px 0;
  background: linear-gradient(90deg, #1976d2 60%, #64b5f6 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1.2em;
  font-weight: 600;
  cursor: pointer;
  margin-top: 18px;
  box-shadow: 0 2px 8px 0 rgba(31, 38, 135, 0.10);
  transition: background 0.2s;
}

.lang-flags {
  display: flex;
  gap: 16px;
  align-items: center;
  background: #181818;
  padding: 10px 18px;
  border-radius: 16px;
  border: 2px solid #fff;
  width: fit-content;
}

.lang-flag {
  width: 40px;
  height: 30px;
  cursor: pointer;
  opacity: 0.6;
  border: 2px solid #fff;
  border-radius: 8px;
  background: #232323;
  transition: border 0.2s, opacity 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px #0004;
}

.lang-flag + .lang-flag {
  border-right: 2px solid #fff;
  padding-right: 8px;
  margin-right: 8px;
}

[dir="ltr"] .lang-flag + .lang-flag {
  border-right: none;
  border-left: 2px solid #fff;
  padding-right: 0;
  margin-right: 0;
  padding-left: 8px;
  margin-left: 8px;
}

.lang-flag.selected,
.lang-flag:hover {
  opacity: 1;
  border-color: #1976d2;
  box-shadow: 0 0 0 3px #1976d2;
}

.sub-tab-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}
.main-btn:hover {
  background: linear-gradient(90deg, #1565c0 60%, #42a5f5 100%);
}

.switch {
  position: relative;
  display: inline-block;
  width: 15px;    
  height: 4px;
  margin-left: 6px;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  width: 30px;   
  height: 8px;    
  background-color: #bbb;
  border-radius: 4px;
  transition: .3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width:14px;
  left: -3px;
  bottom: -3px;
  background-color: rgb(241, 40, 207);
  border-radius: 50%;
  transition: .3s;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}


.switch input:checked + .slider {
  background-color: #f0f4f0; 
}

.switch input:checked + .slider:before {
  transform: translateX(15px); /* תזוזה קטנה */
}

.interface3-layout {
  display: flex;
  flex-direction: row;
  gap: 20px;
}

/* הצד הימני: כפתורי הטורים */
[dir="rtl"] .interface3-layout {
  flex-direction: row-reverse;
}

.interface3-right {
  width: 30%;
  display: flex;
  flex-direction: column;
  align-items: flex-start; 
 
}

/* הצד השמאלי: התוכן */
.interface3-left {
  flex: 1;
  background: #2d2d2d;
  padding: 10px;
  border-radius: 12px;
}

/* עיצוב שורות טופס בממשק 3 */
.interface3-left .form-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

/* .interface3-left label,
.interface3-left span {
  min-width: 90px;
  font-weight: 500;
  color: #fff;
  text-align: right;
  font-size: 1em;
} */
/* 
.interface3-left select,
.interface3-left input[type="text"] {
  flex: 1 1 0;
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid #b0bec5;
  background: #f5f7fa;
  color: #232323;
  font-size: 1em;
  margin-right: 0;
  margin-left: 0;
} */

/* .interface3-left input[type="checkbox"] {
  margin-right: 8px;
  accent-color: #1976d2;
} */

.interface3-left label,
.interface3-left span {
  min-width: 120px;      /* רוחב קבוע כמו בממשקים אחרים */
  max-width: 120px;      /* מגביל את הרוחב המקסימלי */
  width: 120px;          /* רוחב מדויק */
  font-weight: 500;
  color: #fff;
  text-align: right;     /* יישור לימין בעברית */
  font-size: 0.7em;
  flex-shrink: 0;        /* מונע התכווצות */
  flex-grow: 0;          /* מונע התרחבות */
  margin-left: 0;
  margin-right: 0;
  display: inline-block; /* מבטיח רוחב קבוע */
}

/* וידוא שתיבות הבחירה מתחילות באותו מקום */
.interface3-left select,
.interface3-left input[type="text"],
.interface3-left input[type="number"] {
  flex: 1 1 0;
  min-width: 120px;  
  max-width: 120px;    /* רוחב מינימלי */
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid #b0bec5;
  background: #f5f7fa;
  color: #232323;
  font-size: 0.7em;
  margin-right: 0;
  margin-left: 0;
}

/* יישור שמאל לאנגלית */
[dir="ltr"] .interface3-left label,
[dir="ltr"] .interface3-left span {
  text-align: left;
}


.interface3-left .circle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 1em;
  color: #fff;
}

.sub-tab-buttons button {
  width: 130%;
  padding: 8px 18px;
  font-size: 0.70em;
  border: none;
  border-radius: 15px;
  background: linear-gradient(90deg, #e3eafc 60%, #f5f7fa 100%);
  color: #2d3a4b;
  cursor: pointer;
  transition: 
    background 0.2s, 
    color 0.2s, 
    box-shadow 0.2s, 
    transform 0.12s;
  box-shadow: 0 2px 8px 0 rgba(31, 38, 135, 0.07);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
  font-weight: 500;
}

.sub-tab-buttons button.active,
.sub-tab-buttons button:hover {
  background: linear-gradient(90deg, #1976d2 60%, #64b5f6 100%);
  color: #fff;
  font-weight: bold;
  border-right: 0;
  box-shadow: 0 4px 16px 0 rgba(25, 118, 210, 0.15);
  transform: translateY(-2px) scale(1.03);
  outline: none;
}

.sub-tab-buttons button:focus {
  outline: 2px solid #1976d2;
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .container {
    padding: 10px 2vw;
  }
  .tab-content {
    padding: 14px 4px 10px 4px;
  }
  .tab-btn {
    padding: 10px 10px;
    font-size: 1em;
  }
  .form-group label {
    min-width: 80px;
    font-size: 0.95em;
  }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px);}
  to { opacity: 1; transform: translateY(0);}
}
/* יישור טקסט בתיבות select לפי כיוון הדף */
select, .form-group select, .interface3-left select {
  direction: inherit;
  text-align: inherit;
}

/* רספונסיביות לפריסת ממשק 3 */
@media (max-width: 900px) {
  .interface3-layout {
    flex-direction: column;
    gap: 12px;
  }
  .interface3-right,
  .interface3-left {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .sub-tab-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
  }
  .sub-tab-buttons button {
    min-width: 90px;
    max-width: 45vw;
    flex: 1 1 40%;
    font-size: 0.95em;
    padding: 8px 6px;
    text-align: center;
    white-space: normal;
  }
}

/* עיצוב checkbox */
.form-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #1976d2; /* צבע מסומן */
  cursor: pointer;
}

.form-row input[type="checkbox"]:disabled {
  opacity: 0.6; /* שקיפות ל־checkbox לא פעיל */
  cursor: not-allowed;
}

.circle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1em;
}
/* רספונסיביות כללית */
@media (max-width: 600px) {
  .container {
    padding: 10px 2vw;
  }
  .tab-content {
    padding: 14px 4px 10px 4px;
  }
  .tab-btn {
    padding: 10px 10px;
    font-size: 1em;
  }
  .form-group label {
    min-width: 80px;
    font-size: 0.95em;
  }
  .interface3-left {
    padding: 8px;
  }
}