/* The 2026-11 look refresh — home. Every rule starts with body.rf (see refresh-base.css).

   «הפרויקטים שלי» in the family of the refreshed screens (built straight in code,
   no sample — 11-10):
   - the title like «הגדרות»: 22px, the count under it; «קבוצה חדשה» is the side
     menu's white button (hairline, teal +), flat;
   - each group is a white card like a kind on «קבצים»: its heading (chevron, the
     folder in the GROUP'S colour exactly like the side menu, name, meta, gear),
     then ONE grey surface with the projects on it; «ללא קבוצה» = muted folder;
   - a project is a white soft card on that grey: the picture inset on top, the
     name on one line, the meta muted; «העבר לקבוצה» / «מחק» are small quiet icons
     that stay visible (red only on hover); hover = a teal hairline, no lift;
   - with no groups at all the same cards sit straight on the page (white on the
     page, with the card shadow);
   - empty: a white card (no projects yet), a dashed white frame on the grey (an
     empty group), like «קבצים». */

/* ── the title ───────────────────────────────────────────────────────────── */
body.rf .home-header {
  padding: var(--s-6) 0 var(--s-4);
  margin-bottom: var(--s-2);
}

body.rf .home-greeting h1 {
  font-size: 22px;
  line-height: 1.25;
}

body.rf .home-count {
  margin-top: 2px;
  font-size: 12.5px;
}

/* «קבוצה חדשה»: the side menu's white button, a teal + */
body.rf .home-new-group {
  flex: none;
  height: 32px;
  padding: 0 12px;
  gap: 6px;
  border: 1px solid var(--rf-line-2);
  border-radius: 9px;
  background: var(--rf-card);
  box-shadow: none;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
}

body.rf .home-new-group:hover:not(:disabled),
body.rf .home-new-group:active:not(:disabled) {
  border-color: var(--border-strong);
  background: var(--rf-grey);
  box-shadow: none;
  color: var(--text);
  transform: none;
}

body.rf .home-new-group .home-new-group-icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

/* ── a group: a white card ───────────────────────────────────────────────── */
body.rf .home-section {
  margin-bottom: 14px;
  padding: 12px 14px 14px;
  border-radius: 14px;
  background: var(--rf-card);
  box-shadow: var(--rf-shadow);
}

body.rf .home-section-header {
  gap: 10px;
  min-height: 28px;
  margin: 0;
  padding: 0;
  border-bottom: 0;
}

body.rf .home-section-toggle {
  gap: 8px;
  color: var(--text);
}

body.rf .home-section-caret {
  flex: none;
  color: var(--text-muted);
}

body.rf .home-section-caret svg {
  display: block;
  width: 14px;
  height: 14px;
}

body.rf .home-section-toggle:hover .home-section-caret {
  color: var(--text-2);
}

/* the folder in the group's own colour — the side menu's formula and tokens */
body.rf .home-section-folder {
  display: inline-flex;
  flex: none;
  width: 15px;
  height: 15px;
  color: hsl(var(--rf-g-hue, 210) var(--rf-g-s) var(--rf-g-l));
}

body.rf .home-section-folder.muted {
  color: var(--text-muted);
}

body.rf .home-section-folder svg {
  display: block;
  width: 15px;
  height: 15px;
}

body.rf .home-section-title {
  min-width: 0;
  overflow: hidden;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.rf .home-section-meta {
  flex: none;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

/* the gear: a quiet icon button, a real size */
body.rf .home-section-gear {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--text-3);
}

body.rf .home-section-gear:hover:not(:disabled) {
  background: var(--rf-grey);
  color: var(--text);
}

body.rf .home-section-gear .ui-icon {
  width: 16px;
  height: 16px;
}

body.rf .home-section-gear svg {
  stroke-width: 1.6;
}

/* ── ONE grey surface inside, the projects on it ─────────────────────────── */
body.rf .home-section-body {
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  background: var(--rf-grey);
}

body.rf .home-section-body[hidden] {
  display: none;
}

/* an empty group: a dashed white frame, like an empty kind on «קבצים» */
body.rf .home-section-empty {
  padding: 18px;
  border: 1.5px dashed var(--rf-line-2);
  border-radius: 10px;
  background: var(--rf-card);
  color: var(--text-3);
  font-size: 12.5px;
  text-align: center;
}

/* ── the grid ────────────────────────────────────────────────────────────── */
body.rf .home .projects-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

/* ── a project: a white soft card, the picture inset on top ──────────────── */
body.rf .home .project-card {
  padding: 6px;
  border: 0;
  border-radius: 12px;
  background: var(--rf-card);
  box-shadow: none;
  transition: box-shadow 0.15s ease;
}

body.rf .home .project-card:hover,
body.rf .home .project-card:active {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent);
  transform: none;
}

/* no groups: the cards sit straight on the page, so they keep the card shadow */
body.rf .home > .projects-grid .project-card {
  box-shadow: var(--rf-shadow);
}

body.rf .home > .projects-grid .project-card:hover,
body.rf .home > .projects-grid .project-card:active {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent),
    var(--rf-shadow);
}

body.rf .home .project-thumb {
  border-radius: 8px;
  background: var(--rf-grey);
  cursor: pointer;
}

body.rf .home .project-body {
  padding: 8px 4px 2px;
}

body.rf .home .project-card-row {
  align-items: center;
  gap: 2px;
}

body.rf .home .project-title {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.rf .home .project-meta-row {
  gap: 4px;
  margin-top: 1px;
  color: var(--text-3);
  font-size: 11.5px;
  line-height: 1.45;
}

body.rf .home .project-meta-row .meta-dot {
  color: var(--text-muted);
}

/* «העבר לקבוצה» / «מחק»: small quiet icons, always there; red only on hover */
body.rf .home .project-group-btn,
body.rf .home .project-delete-btn {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  color: var(--text-muted);
  opacity: 1;
}

body.rf .home .project-group-btn .ui-icon,
body.rf .home .project-delete-btn .ui-icon {
  width: 14px;
  height: 14px;
}

body.rf .home .project-group-btn svg,
body.rf .home .project-delete-btn svg {
  stroke-width: 1.6;
}

body.rf .home .project-group-btn:hover:not(:disabled) {
  background: var(--rf-grey);
  color: var(--text);
}

body.rf .home .project-delete-btn:hover:not(:disabled) {
  background: var(--rf-danger-soft);
  color: var(--red);
}

/* ── no projects at all: one white card ──────────────────────────────────── */
body.rf .home-empty {
  gap: 8px;
  padding: 44px 24px 40px;
  border-radius: 14px;
  background: var(--rf-card);
  box-shadow: var(--rf-shadow);
}

body.rf .home-empty-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 6px;
  border: 0;
  border-radius: 14px;
  background: var(--rf-grey);
  box-shadow: none;
  color: var(--text-3);
}

body.rf .home-empty-icon svg {
  width: 24px;
  height: 24px;
}

body.rf .home-empty h2 {
  font-size: 17px;
}

body.rf .home-empty p {
  margin-bottom: 8px;
  font-size: 13px;
}

body.rf .home-empty .btn-lg {
  height: 34px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}

/* ── phones ──────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* the phone keeps its tighter title room (polish.css) */
  body.rf .home-header {
    padding: var(--s-4) 0 var(--s-3);
  }

  body.rf .home-section {
    padding: 10px 12px 12px;
  }

  body.rf .home-section-body {
    padding: 8px;
  }

  body.rf .home .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
  }

  /* the meta may give way to the name on a narrow heading */
  body.rf .home-section-meta {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.rf .home-empty {
    padding: 32px 16px 28px;
  }
}

@media (max-width: 480px) {
  body.rf .home-greeting h1 {
    font-size: 20px;
  }

  body.rf .home .projects-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── the user's own layout (11-11, his screenshot: «למה אתה לא חושב על כזה?») ──
   The white group card keeps the group's colour at its top; inside it there is
   no big tinted box any more — instead every PROJECT is its own soft tinted card
   (the picture, the name, the details), straight on the white. Fewer layers:
   page → white group card → tinted project cards. */
body.rf .home-section-body {
  margin-top: 14px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}
body.rf .home .projects-grid {
  gap: 14px;
}
body.rf .home .project-card {
  padding: 8px;
  border-radius: 14px;
  background: var(--rf-grey);
  box-shadow: none;
}
body.rf .home .project-card:hover,
body.rf .home .project-card:focus-visible {
  background: var(--rf-grey-2);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}
body.rf .home .project-thumb {
  border-radius: 10px;
}

/* the group's colour only around its folder — a soft square of that colour —
   not washed over the card's top (the user, 11-11); «ללא קבוצה» plain grey */
body.rf .home-section-folder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: hsl(var(--rf-g-hue, 190) var(--rf-g-s) var(--rf-g-l) / 0.16);
}
body.rf .home-section-folder.muted {
  background: var(--rf-grey);
}
body.rf .home-section-folder svg {
  width: 16px;
  height: 16px;
}
body.rf .home-section-toggle {
  gap: 10px;
}
