/* Земельный Практикум — домашние задания: сроки, доработки и внимание v1 */

body[data-role="student"][data-active="homework"] .student-homework-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 100%;
  margin: 16px 0 18px;
}

body[data-role="student"][data-active="homework"] .student-homework-summary-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label value"
    "hint hint";
  align-items: center;
  gap: 8px 14px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 88px;
  padding: 16px 17px;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid rgba(36, 84, 52, .12);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.99), rgba(248,251,249,.98));
  color: #17211b;
  text-align: left;
  box-shadow:
    0 8px 22px rgba(26, 65, 39, .065),
    0 1px 0 rgba(255,255,255,.9) inset;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

body[data-role="student"][data-active="homework"] .student-homework-summary-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 0 0, rgba(45,150,80,.075), transparent 42%);
  pointer-events: none;
}

body[data-role="student"][data-active="homework"] .student-homework-summary-card:hover,
body[data-role="student"][data-active="homework"] .student-homework-summary-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(43, 132, 67, .22);
  background: linear-gradient(145deg, #fff, #f7fbf8);
  box-shadow:
    0 13px 28px rgba(24, 78, 43, .105),
    0 1px 0 rgba(255,255,255,.95) inset;
  outline: none;
}

body[data-role="student"][data-active="homework"] .student-homework-summary-card > span {
  grid-area: label;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #667169;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .055em;
  line-height: 1.2;
  text-transform: uppercase;
}

body[data-role="student"][data-active="homework"] .student-homework-summary-card > span::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #2d9650;
  box-shadow: 0 0 0 4px rgba(45,150,80,.09);
}

body[data-role="student"][data-active="homework"] .student-homework-summary-card > strong {
  grid-area: value;
  position: relative;
  justify-self: end;
  color: #17211b;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.035em;
}

body[data-role="student"][data-active="homework"] .student-homework-summary-card > small {
  grid-area: hint;
  position: relative;
  min-width: 0;
  color: #7a857d;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

body[data-role="student"][data-active="homework"] .student-homework-summary-card.tone-today::before {
  background: radial-gradient(circle at 0 0, rgba(226,154,39,.09), transparent 42%);
}
body[data-role="student"][data-active="homework"] .student-homework-summary-card.tone-overdue::before {
  background: radial-gradient(circle at 0 0, rgba(216,72,72,.085), transparent 42%);
}
body[data-role="student"][data-active="homework"] .student-homework-summary-card.tone-returned::before {
  background: radial-gradient(circle at 0 0, rgba(221,119,42,.09), transparent 42%);
}
body[data-role="student"][data-active="homework"] .student-homework-summary-card.tone-submitted::before {
  background: radial-gradient(circle at 0 0, rgba(75,130,207,.09), transparent 42%);
}
body[data-role="student"][data-active="homework"] .student-homework-summary-card.tone-today > span::before {
  background: #e29a27;
  box-shadow: 0 0 0 4px rgba(226,154,39,.10);
}
body[data-role="student"][data-active="homework"] .student-homework-summary-card.tone-overdue > span::before {
  background: #d84848;
  box-shadow: 0 0 0 4px rgba(216,72,72,.10);
}
body[data-role="student"][data-active="homework"] .student-homework-summary-card.tone-returned > span::before {
  background: #dd772a;
  box-shadow: 0 0 0 4px rgba(221,119,42,.10);
}
body[data-role="student"][data-active="homework"] .student-homework-summary-card.tone-submitted > span::before {
  background: #4b82cf;
  box-shadow: 0 0 0 4px rgba(75,130,207,.10);
}

body[data-role="student"][data-active="homework"] .student-homework-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

body[data-role="student"][data-active="homework"] .student-homework-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 52px;
  padding: 12px 15px;
  border: 1px solid rgba(44, 74, 54, .14);
  border-radius: 14px;
  background: #fff;
  color: #30373d;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, color .18s ease, background .18s ease, border-color .18s ease;
}

body[data-role="student"][data-active="homework"] .student-homework-tab:hover,
body[data-role="student"][data-active="homework"] .student-homework-tab:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(29, 66, 42, .09);
  outline: none;
}

body[data-role="student"][data-active="homework"] .student-homework-tab .tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 27px;
  height: 27px;
  margin: 0;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(30, 55, 39, .07);
  font-size: 12px;
  font-weight: 900;
}

body[data-role="student"][data-active="homework"] .student-homework-tab.tab-active.active {
  border-color: #48a85e;
  background: linear-gradient(135deg, #58bd70, #3ca957);
  color: #fff;
  box-shadow: 0 12px 26px rgba(55, 153, 80, .22);
}
body[data-role="student"][data-active="homework"] .student-homework-tab.tab-active.active .tab-count { background: rgba(255,255,255,.18); }

body[data-role="student"][data-active="homework"] .student-homework-tab.tab-submitted.active {
  border-color: #4d83c9;
  background: linear-gradient(135deg, #6d9bd6, #477dc3);
  color: #fff;
  box-shadow: 0 12px 26px rgba(63, 112, 177, .22);
}
body[data-role="student"][data-active="homework"] .student-homework-tab.tab-submitted.active .tab-count { background: rgba(255,255,255,.18); }

body[data-role="student"][data-active="homework"] .student-homework-tab.tab-returned {
  border-color: rgba(221, 119, 42, .28);
  background: linear-gradient(135deg, #fff9f2, #fff4e8);
  color: #a94e18;
}
body[data-role="student"][data-active="homework"] .student-homework-tab.tab-returned .tab-count { background: rgba(221, 119, 42, .13); }
body[data-role="student"][data-active="homework"] .student-homework-tab.tab-returned.active {
  border-color: #dc762b;
  background: linear-gradient(135deg, #ef9a4a, #d96c25);
  color: #fff;
  box-shadow: 0 12px 26px rgba(205, 94, 31, .22);
}
body[data-role="student"][data-active="homework"] .student-homework-tab.tab-returned.active .tab-count { background: rgba(255,255,255,.2); }

body[data-role="student"][data-active="homework"] .student-homework-tab.tab-accepted.active {
  border-color: #2e8f66;
  background: linear-gradient(135deg, #4aaa7d, #287d5c);
  color: #fff;
  box-shadow: 0 12px 26px rgba(41, 126, 91, .2);
}
body[data-role="student"][data-active="homework"] .student-homework-tab.tab-accepted.active .tab-count { background: rgba(255,255,255,.18); }

body[data-role="student"][data-active="homework"] .student-homework-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "head head"
    "title actions"
    "meta actions"
    "recipient actions"
    "comment comment";
  align-items: center;
  gap: 8px 24px;
  overflow: hidden;
  min-height: 0;
  padding: 20px 22px 20px 26px;
  border: 1px solid rgba(35, 105, 57, .14);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(62, 154, 84, .055), transparent 30%),
    #fff;
  box-shadow: 0 12px 30px rgba(25, 68, 40, .075);
}

body[data-role="student"][data-active="homework"] .student-homework-card-accent {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: #45a95e;
}

body[data-role="student"][data-active="homework"] .student-homework-card.status-submitted .student-homework-card-accent { background: #4c83ca; }
body[data-role="student"][data-active="homework"] .student-homework-card.status-returned .student-homework-card-accent { background: #dd7629; }
body[data-role="student"][data-active="homework"] .student-homework-card.status-overdue .student-homework-card-accent { background: #d64848; }
body[data-role="student"][data-active="homework"] .student-homework-card.status-accepted .student-homework-card-accent { background: #2c8a61; }

body[data-role="student"][data-active="homework"] .student-homework-card-head {
  grid-area: head;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(39, 89, 55, .09);
}

body[data-role="student"][data-active="homework"] .student-homework-card-head > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

body[data-role="student"][data-active="homework"] .student-homework-course {
  display: block;
  color: #267d43;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

body[data-role="student"][data-active="homework"] .student-homework-path {
  display: block;
  color: #748078;
  font-size: 13px;
  line-height: 1.4;
}

body[data-role="student"][data-active="homework"] .student-homework-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #e9f6ec;
  color: #277942;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

body[data-role="student"][data-active="homework"] .student-homework-status-chip.status-submitted { background: #eaf1fb; color: #35649f; }
body[data-role="student"][data-active="homework"] .student-homework-status-chip.status-returned { background: #fff0e1; color: #a84c15; }
body[data-role="student"][data-active="homework"] .student-homework-status-chip.status-overdue { background: #ffe9e9; color: #b53232; }
body[data-role="student"][data-active="homework"] .student-homework-status-chip.status-accepted { background: #e7f4ed; color: #246d4d; }

body[data-role="student"][data-active="homework"] .student-homework-card h3 {
  grid-area: title;
  min-width: 0;
  margin: 2px 0 0;
  font-size: clamp(20px, 2vw, 25px);
  line-height: 1.2;
}

body[data-role="student"][data-active="homework"] .student-homework-card-meta {
  grid-area: meta;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
}

body[data-role="student"][data-active="homework"] .student-homework-deadline {
  display: grid;
  gap: 2px;
  min-width: 190px;
  padding: 10px 13px;
  border-radius: 12px;
  background: #f4f7f5;
  color: #33443a;
}

body[data-role="student"][data-active="homework"] .student-homework-deadline b { font-size: 13px; }
body[data-role="student"][data-active="homework"] .student-homework-deadline small { color: #748078; font-size: 11px; }
body[data-role="student"][data-active="homework"] .student-homework-deadline.is-today,
body[data-role="student"][data-active="homework"] .student-homework-deadline.is-soon { background: #fff5de; color: #98620e; }
body[data-role="student"][data-active="homework"] .student-homework-deadline.is-overdue { background: #ffe9e9; color: #ad3030; }

body[data-role="student"][data-active="homework"] .student-homework-returned-at {
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f5f7f6;
  color: #6d7871;
  font-size: 12px;
}

body[data-role="student"][data-active="homework"] .student-homework-recipient {
  grid-area: recipient;
  margin: 0;
  color: #7b867f;
  font-size: 12px;
}

body[data-role="student"][data-active="homework"] .student-homework-card.is-returned {
  border-color: rgba(221, 119, 42, .38);
  background: linear-gradient(145deg, #fff7ed, #fffdfb 72%);
  box-shadow: 0 15px 34px rgba(190, 82, 24, .13);
}

body[data-role="student"][data-active="homework"] .student-homework-teacher-comment {
  grid-area: comment;
  margin-top: 4px;
  border: 1px solid rgba(221, 119, 42, .2);
  background: rgba(255, 239, 222, .8);
}

body[data-role="student"][data-active="homework"] .student-homework-teacher-comment.is-empty { opacity: .8; }

body[data-role="student"][data-active="homework"] .student-homework-card-actions {
  grid-area: actions;
  display: flex;
  align-self: center;
  justify-content: flex-end;
  min-width: 190px;
}

body[data-role="student"][data-active="homework"] .student-homework-card-actions .btn {
  min-width: 190px;
  min-height: 48px;
  margin: 0;
}

body[data-role="student"][data-active="homework"] .student-homework-card:hover {
  border-color: rgba(38, 125, 67, .25);
  box-shadow: 0 16px 38px rgba(25, 68, 40, .11);
}

.student-homework-home-alert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin: 0 0 18px;
  padding: 18px 20px !important;
  border-color: rgba(214, 91, 40, .28) !important;
  background:
    radial-gradient(circle at 0 50%, rgba(231, 127, 65, .12), transparent 26%),
    linear-gradient(135deg, #fff9f2, #fffdf9) !important;
  box-shadow: 0 14px 32px rgba(167, 67, 22, .09) !important;
}

.student-homework-home-alert-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(145deg, #ed944f, #d96b29);
  color: #fff;
  font-size: 24px;
  font-weight: 950;
  box-shadow: 0 9px 20px rgba(205, 93, 36, .22);
}

.student-homework-home-alert-copy { min-width: 0; }
.student-homework-home-alert-kicker {
  color: #a64c18;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.student-homework-home-alert h2 {
  margin: 3px 0 8px;
  font-size: clamp(18px, 2vw, 24px);
}
.student-homework-home-alert-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.student-homework-home-alert-facts span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: #6f4b38;
  font-size: 12px;
}
.student-homework-home-alert-facts .tone-overdue { color: #a72f2f; }
.student-homework-home-alert-facts .tone-returned { color: #a44d18; }
.student-homework-home-alert-facts .tone-today { color: #93600f; }
.student-homework-home-alert-action { white-space: nowrap; }

.homework-menu-dot {
  background: linear-gradient(145deg, #f08a42, #d24f37) !important;
  box-shadow: 0 0 0 3px rgba(225, 91, 49, .12), 0 5px 14px rgba(202, 74, 42, .28) !important;
}

body[data-theme="dark"][data-role="student"][data-active="homework"] .student-homework-summary-card,
body[data-theme="dark"][data-role="student"][data-active="homework"] .student-homework-tab,
body[data-theme="dark"][data-role="student"][data-active="homework"] .student-homework-card {
  border-color: rgba(167, 202, 177, .14);
  background: linear-gradient(145deg, rgba(27, 42, 34, .98), rgba(20, 33, 27, .98));
  color: #eef6f0;
}

body[data-theme="dark"][data-role="student"][data-active="homework"] .student-homework-summary-card {
  box-shadow: 0 10px 24px rgba(0,0,0,.22), 0 1px 0 rgba(255,255,255,.025) inset;
}
body[data-theme="dark"][data-role="student"][data-active="homework"] .student-homework-summary-card:hover,
body[data-theme="dark"][data-role="student"][data-active="homework"] .student-homework-summary-card:focus-visible {
  border-color: rgba(119, 201, 139, .22);
  background: linear-gradient(145deg, rgba(31, 48, 38, .99), rgba(23, 37, 30, .99));
  box-shadow: 0 15px 30px rgba(0,0,0,.28), 0 0 22px rgba(66,164,89,.055);
}
body[data-theme="dark"][data-role="student"][data-active="homework"] .student-homework-summary-card > span,
body[data-theme="dark"][data-role="student"][data-active="homework"] .student-homework-summary-card > small {
  color: rgba(226, 239, 230, .66);
}
body[data-theme="dark"][data-role="student"][data-active="homework"] .student-homework-summary-card > strong {
  color: #f1f7f3;
}

body[data-theme="dark"][data-role="student"][data-active="homework"] .student-homework-tab.tab-returned {
  border-color: rgba(235, 143, 73, .26);
  background: linear-gradient(145deg, rgba(77, 47, 29, .92), rgba(54, 36, 26, .92));
  color: #ffc99f;
}

body[data-theme="dark"][data-role="student"][data-active="homework"] .student-homework-card.is-returned {
  border-color: rgba(232, 130, 59, .34);
  background: linear-gradient(145deg, rgba(70, 43, 27, .92), rgba(36, 31, 25, .97));
}

body[data-theme="dark"][data-role="student"][data-active="homework"] .student-homework-deadline,
body[data-theme="dark"][data-role="student"][data-active="homework"] .student-homework-returned-at {
  background: rgba(255,255,255,.055);
  color: #edf5ef;
}
body[data-theme="dark"][data-role="student"][data-active="homework"] .student-homework-deadline small,
body[data-theme="dark"][data-role="student"][data-active="homework"] .student-homework-returned-at { color: rgba(228, 239, 231, .65); }
body[data-theme="dark"][data-role="student"][data-active="homework"] .student-homework-deadline.is-today,
body[data-theme="dark"][data-role="student"][data-active="homework"] .student-homework-deadline.is-soon { background: rgba(215, 151, 39, .12); color: #ffd58b; }
body[data-theme="dark"][data-role="student"][data-active="homework"] .student-homework-deadline.is-overdue { background: rgba(218, 67, 67, .13); color: #ffadad; }
body[data-theme="dark"][data-role="student"][data-active="homework"] .student-homework-teacher-comment { background: rgba(221, 119, 42, .1); }

body[data-theme="dark"] .student-homework-home-alert {
  border-color: rgba(232, 132, 66, .25) !important;
  background:
    radial-gradient(circle at 0 50%, rgba(217, 108, 43, .12), transparent 28%),
    linear-gradient(135deg, rgba(55, 38, 27, .96), rgba(28, 31, 27, .98)) !important;
  color: #f6f1ec;
}
body[data-theme="dark"] .student-homework-home-alert-facts span { background: rgba(255,255,255,.06); color: #ead8ca; }

@media (max-width: 760px) {
  body[data-role="student"][data-active="homework"] .student-homework-summary {
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 10px;
  }
  body[data-role="student"][data-active="homework"] .student-homework-summary-card {
    min-height: 82px;
    padding: 14px 15px;
  }
  body[data-role="student"][data-active="homework"] .student-homework-summary-card > strong { font-size: 25px; }

  body[data-role="student"][data-active="homework"] .student-homework-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-role="student"][data-active="homework"] .student-homework-card { grid-template-columns: 1fr; padding: 17px 16px 17px 20px; }
  body[data-role="student"][data-active="homework"] .student-homework-card-head { align-items: stretch; flex-direction: column; }
  body[data-role="student"][data-active="homework"] .student-homework-status-chip { align-self: flex-start; }
  body[data-role="student"][data-active="homework"] .student-homework-card-meta { flex-direction: column; }
  body[data-role="student"][data-active="homework"] .student-homework-card-actions .btn { width: 100%; }
  .student-homework-home-alert { grid-template-columns: auto minmax(0, 1fr); }
  .student-homework-home-alert-action { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 470px) {
  body[data-role="student"][data-active="homework"] .student-homework-tabs { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-role="student"][data-active="homework"] .student-homework-summary-card,
  body[data-role="student"][data-active="homework"] .student-homework-tab { transition-duration: .01ms !important; }
}

/* Compact homework cards v5 */
body[data-theme="dark"][data-role="student"][data-active="homework"] .student-homework-card {
  border-color: rgba(126, 174, 140, .16) !important;
  background:
    radial-gradient(circle at 100% 0, rgba(86, 179, 107, .07), transparent 30%),
    var(--dark-card) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .27) !important;
}
body[data-theme="dark"][data-role="student"][data-active="homework"] .student-homework-card-head { border-bottom-color: rgba(235, 244, 237, .08); }
body[data-theme="dark"][data-role="student"][data-active="homework"] .student-homework-course { color: #8ee5a3; }
body[data-theme="dark"][data-role="student"][data-active="homework"] .student-homework-path,
body[data-theme="dark"][data-role="student"][data-active="homework"] .student-homework-recipient { color: #a8b8ae; }

@media (max-width: 980px) {
  body[data-role="student"][data-active="homework"] .student-homework-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "title"
      "meta"
      "recipient"
      "comment"
      "actions";
    gap: 10px;
    padding: 18px 18px 18px 22px;
  }
  body[data-role="student"][data-active="homework"] .student-homework-card-actions,
  body[data-role="student"][data-active="homework"] .student-homework-card-actions .btn {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 620px) {
  body[data-role="student"][data-active="homework"] .student-homework-card-head {
    align-items: stretch;
    flex-direction: column;
  }
  body[data-role="student"][data-active="homework"] .student-homework-status-chip { align-self: flex-start; }
  body[data-role="student"][data-active="homework"] .student-homework-card-meta { flex-direction: column; }
  body[data-role="student"][data-active="homework"] .student-homework-deadline { min-width: 0; }
}

