/* =========================================================
   Modern Schedule UI for gymn3mogv2
   Clean standalone stylesheet. Replace old schedule.css fully.
========================================================= */

.schedule-app {
  --schedule-green: var(--gm-green, #007044);
  --schedule-text: #071b35;
  --schedule-muted: #6b7a8a;
  --schedule-border: #dfe9e5;
  --schedule-bg: #ffffff;
  --schedule-soft: #f6faf8;
  --schedule-shadow: 0 14px 34px rgba(7, 27, 53, .045);

  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 22px;

  color: var(--schedule-text);
  font-size: 14px;
  line-height: 1.35;
}

/* ---------- Controls ---------- */

.schedule-topbar {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(260px, 330px) minmax(180px, auto) minmax(150px, auto);
  align-items: center;
  gap: 18px;
}

.schedule-select-wrap {
  position: relative;
  height: 52px;
}

.schedule-select-wrap::before {
  content: '\f0c0';
  font-family: 'Font Awesome 5 Pro';
  font-weight: 900;
  position: absolute;
  left: 17px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  font-size: 14px;
  color: #10243f;
}

.schedule-select-wrap::after {
  content: '\f107';
  font-family: 'Font Awesome 5 Pro';
  font-weight: 900;
  position: absolute;
  right: 17px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  font-size: 12px;
  color: #10243f;
  pointer-events: none;
}

.schedule-select {
  width: 100%;
  height: 52px;
  padding: 0 44px 0 46px;

  border: 1px solid var(--schedule-border);
  border-radius: 14px;

  background: #fff;
  color: #10243f;

  font-size: 15px;
  font-weight: 800;

  outline: none;
  cursor: pointer;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: none;

  box-shadow: 0 8px 22px rgba(7, 27, 53, .035);
}

.schedule-week-nav {
  height: 52px;
  display: grid;
  grid-template-columns: 52px 1fr 52px;

  border: 1px solid var(--schedule-border);
  border-radius: 14px;

  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 22px rgba(7, 27, 53, .035);
}

.schedule-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;

  border: 0;
  background: #fff;

  color: #10243f;
  font-size: 20px;
  font-weight: 900;

  cursor: pointer;
}

.schedule-nav-btn:hover {
  background: #eef8f3;
  color: var(--schedule-green);
}

.schedule-week-label {
  display: flex;
  align-items: center;
  justify-content: center;

  border-left: 1px solid var(--schedule-border);
  border-right: 1px solid var(--schedule-border);

  color: #10243f;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.schedule-view-switch {
  height: 52px;
  display: grid;
  grid-template-columns: 1fr 1fr;

  border: 1px solid var(--schedule-border);
  border-radius: 14px;

  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 22px rgba(7, 27, 53, .035);
}

.schedule-view-btn {
  height: 52px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0 20px;

  border: 0;
  background: #fff;

  color: #10243f;
  font-size: 15px;
  font-weight: 800;

  cursor: pointer;
}

.schedule-view-btn.is-active {
  background: #eef8f3;
  color: var(--schedule-green);
  box-shadow: inset 0 0 0 1px var(--schedule-green);
}

.schedule-print {
  height: 52px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: 0 22px;

  border: 1px solid var(--schedule-border);
  border-radius: 14px;

  background: #fff;
  color: #10243f;

  font-size: 15px;
  font-weight: 800;

  cursor: pointer;
  box-shadow: 0 8px 22px rgba(7, 27, 53, .035);
}

.schedule-print::before {
  content: '\f02f';
  font-family: 'Font Awesome 5 Pro';
  font-weight: 900;
  font-size: 14px;
}

.schedule-print:hover {
  background: #f6faf8;
}

/* ---------- Week grid ---------- */

.schedule-board {
  width: 100%;
  overflow-x: auto;

  border: 1px solid var(--schedule-border);
  border-radius: 18px;

  background: #fff;
  box-shadow: var(--schedule-shadow);
}

.schedule-week-table {
  min-width: 980px;
  display: grid;
  grid-template-columns: 120px repeat(6, minmax(130px, 1fr));
}

.schedule-cell {
  min-height: 94px;
  padding: 10px;

  border-right: 1px solid var(--schedule-border);
  border-bottom: 1px solid var(--schedule-border);

  background: #fff;
}

.schedule-cell:nth-child(7n) {
  border-right: 0;
}

.schedule-head {
  min-height: 72px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;

  color: #10243f;
  font-size: 15px;
  font-weight: 900;
}

.schedule-head span {
  margin-top: 5px;

  color: var(--schedule-muted);
  font-size: 12px;
  font-weight: 800;
}

.schedule-time-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
}

.schedule-number {
  color: #071b35;
  font-size: 23px;
  font-weight: 900;
  line-height: 1;
}

.schedule-time {
  margin-top: 10px;

  color: #071b35;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.schedule-empty-cell {
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(250,252,251,.72));
}

/* ---------- Lesson card ---------- */

.schedule-lesson {
  position: relative;

  min-height: 76px;
  height: 100%;

  padding: 12px 34px 12px 13px;

  border-radius: 10px;

  color: #14243c;

  overflow: hidden;

  box-shadow: inset 0 0 0 1px rgba(255,255,255,.42);
}

.schedule-subject {
  color: #10243f;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.22;

  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

.schedule-room {
  margin-top: 7px;

  color: #304158;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
}

.schedule-icon {
  position: absolute;
  right: 10px;
  bottom: 10px;

  font-family: 'Font Awesome 5 Pro';
  font-weight: 900;
  font-size: 14px;

  color: #40556c;
  opacity: .78;
}

/* ---------- Subject colors ---------- */

.sch-lang {
  background: #e7f2ff;
}

.sch-math {
  background: #fff4d9;
}

.sch-nature {
  background: #e4f5dc;
}

.sch-art {
  background: #e2f4fb;
}

.sch-tech {
  background: #eee4ff;
}

.sch-sport {
  background: #efdfff;
}

.sch-other {
  background: #edf2f5;
}

/* ---------- Bottom info ---------- */

.schedule-note-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 1fr);
  align-items: center;
  gap: 28px;

  margin-top: 2px;
}

.schedule-info {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 15px;

  padding: 20px 24px;

  border-radius: 22px;
  background: linear-gradient(135deg, #f7fbff, #ffffff);
  box-shadow: 0 14px 34px rgba(7, 27, 53, .04);

  color: #66768a;
  font-size: 14px;
  font-weight: 700;
}

.schedule-info::before {
  content: '\f129';
  font-family: 'Font Awesome 5 Pro';
  font-weight: 900;

  width: 40px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  background: #5aa9e6;
  color: #fff;
}

.schedule-legend-title {
  margin-bottom: 12px;

  color: #8a96a3;
  font-size: 14px;
  font-weight: 800;
}

.schedule-legend-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.schedule-legend-item {
  padding: 8px 13px;

  border-radius: 10px;

  color: #506173;
  font-size: 12px;
  font-weight: 800;
}

/* ---------- Mobile layout ---------- */

.schedule-day-list {
  display: none;
}

.schedule-day-card {
  display: none;
}

@media (max-width: 1200px) {
  .schedule-topbar {
    grid-template-columns: 1fr 1fr;
  }

  .schedule-print,
  .schedule-view-switch {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .schedule-app {
    gap: 18px;
  }

  .schedule-topbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .schedule-board {
    display: none;
  }

  .schedule-app.is-week .schedule-day-list,
  .schedule-app.is-day .schedule-day-list {
    display: grid;
    gap: 14px;
  }

  .schedule-day-card {
    padding: 16px;

    border: 1px solid var(--schedule-border);
    border-radius: 18px;

    background: #fff;
    box-shadow: 0 10px 28px rgba(7, 27, 53, .04);
  }

  .schedule-app.is-week .schedule-day-card {
    display: block;
  }

  .schedule-app.is-day .schedule-day-card {
    display: none;
  }

  .schedule-app.is-day .schedule-day-card.is-current {
    display: block;
  }

  .schedule-day-card-title {
    margin-bottom: 12px;

    color: #063c28;
    font-size: 19px;
    font-weight: 900;
  }

  .schedule-day-card-title span {
    display: block;
    margin-top: 3px;

    color: var(--schedule-muted);
    font-size: 13px;
    font-weight: 800;
  }

  .schedule-mobile-lesson {
    position: relative;

    margin-bottom: 10px;
    padding: 13px 40px 13px 14px;

    border-radius: 14px;
  }

  .schedule-mobile-lesson:last-child {
    margin-bottom: 0;
  }

  .schedule-mobile-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;

    margin-bottom: 8px;

    font-size: 13px;
    font-weight: 900;
  }

  .schedule-note-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .schedule-info {
    padding: 18px;
    border-radius: 18px;
  }
}

/* ---------- Print ---------- */

@media print {
  .topline,
  .modern-header,
  .left-rail,
  .right-rail,
  .schedule-topbar,
  .schedule-note-row {
    display: none !important;
  }

  .layout-grid {
    display: block !important;
  }

  .content-card {
    border: 0 !important;
    box-shadow: none !important;
  }

  .schedule-board {
    overflow: visible;
    box-shadow: none;
  }

  .schedule-week-table {
    min-width: 0;
  }
}
