/* =======================
   CSS כללי
======================= */
* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  padding: 0;
}

body {
  background: #eef2f7;
  direction: rtl; 
  padding: 0;
  margin: 0;
}

/* =======================
   מיכל מרכזי
======================= */
.app {
  max-width: 480px;
  margin: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* =======================
   כרטיסים
======================= */
.card {
  background: white;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

h1, h2 {
  margin-bottom: 12px;
}

/* =======================
   קלטים וכפתורים
======================= */
input[type="text"] {
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 16px;
}

button {
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: #4f46e5;
  color: white;
  font-size: 16px;
  cursor: pointer;
}

button:hover {
  background: #3730a3;
}

/* =======================
   רשימות והרגלים
======================= */
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f9fafb;
  margin-bottom: 8px;
  min-height: 48px;
}

/* טיפול בטקסט - שורה אחת עם נקודות, לחיץ */
li span {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 16px;
  line-height: 1.4;
  cursor: pointer;
  flex: 1;
}

/* =======================
   Checkbox מעודכן - לא ייחתך
======================= */
li input[type="checkbox"] {
  transform: scale(1.3);
  margin-left: 12px;  /* מרווח מהטקסט */
  margin-right: 4px;  /* מרווח מהקצה כדי שלא ייחתך */
  cursor: pointer;
  flex-shrink: 0;     /* מונע התכווצות */
}

/* =======================
   היסטוריה
======================= */
#history div {
  background: #f3f4f6;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 6px;
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

/* =======================
   רספונסיביות
======================= */
@media (max-width: 400px) {
  .app {
    padding: 10px;
  }
  h2 {
    font-size: 16px;
  }
  input, button {
    font-size: 14px;
    padding: 10px;
  }
  li {
    padding: 8px 10px;
  }
}
