/* Smart Timetable - SCSS */
:root {
  --bg: #0b0b0b;
  --panel: #121212;
  --card: #171717;
  --muted: #a3a3a3;
  --text: #f3f3f3;
  --accent: #22c55e;
  --danger: #ef4444;
  --warn: #f59e0b;
  --border: #262626;
  --ring: #3b82f6;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0, 0, 0, .35);
  --slot-height: 36px;
  --time-rail-width: 70px;
  --gap: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
}

h1,
h2,
h3 {
  margin: 0 0 8px;
}

a {
  color: inherit;
}

.app-header,
.app-footer {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}
.app-header h1 {
  font-size: 22px;
  letter-spacing: 0.3px;
}

.app-footer {
  display: flex;
  justify-content: space-between;
}
.app-footer span a {
  text-decoration: none;
}
.app-footer span a:hover {
  text-decoration: underline;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.divider {
  width: 1px;
  height: 28px;
  background: var(--border);
  margin: 0 4px;
}

.layout {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px 24px;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
}

.left-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-grid label {
  display: grid;
  gap: 6px;
}
.form-grid label span {
  color: var(--muted);
  font-size: 12px;
}
.form-grid label input,
.form-grid label select {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  background: #111;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
}
.form-grid label input[type=color] {
  padding: 2px;
  height: 36px;
}

.days {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0 6px;
}
.days legend {
  color: var(--muted);
  font-size: 12px;
  padding: 0 4px;
}
.days label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #121212;
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
}
.days label input {
  accent-color: var(--accent);
}

.actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.help-text {
  color: var(--muted);
  font-size: 12px;
  margin-top: 12px;
}

.btn,
.select {
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #1c1c1c;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
}

.btn {
  display: flex;
  align-items: center;
}

.btn:hover {
  border-color: #2f2f2f;
}

.btn-primary {
  background: var(--accent);
  color: #061207;
  border-color: #1faa55;
}

.btn-danger {
  background: #2a1515;
  border-color: #3a1b1b;
  color: #ffb3b3;
}

.timetable-panel {
  display: grid;
  gap: 10px;
}

.timetable {
  overflow: hidden;
  padding: 0;
}

.timetable-header {
  display: grid;
  grid-template-columns: var(--time-rail-width) repeat(7, 1fr);
  background: #141414;
  border-bottom: 1px solid var(--border);
}
.timetable-header .cell {
  padding: 10px 8px;
  text-align: center;
  font-weight: 600;
  color: #d9d9d9;
  border-right: 1px solid var(--border);
}
.timetable-header .cell--corner {
  position: sticky;
  left: 0;
  background: #141414;
  border-right: 1px solid var(--border);
}

.timetable-body {
  display: grid;
  grid-template-columns: var(--time-rail-width) 1fr;
  min-height: 720px;
}

.time-rail {
  position: relative;
  border-right: 1px solid var(--border);
  background: repeating-linear-gradient(to bottom, #111 0, #111 1px, transparent 1px, transparent var(--slot-height));
}

.time-rail .tick {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 1px solid #1e1e1e;
}

.time-rail .label {
  position: absolute;
  transform: translateY(-50%);
  left: 8px;
  font-size: 12px;
  color: var(--muted);
  background: #0f0f0f;
  padding: 0 4px;
  border-radius: 6px;
}

.day-columns {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  position: relative;
}

.day {
  position: relative;
  height: 100%;
  min-height: calc(var(--slot-height) * 24);
  border-right: 1px solid var(--border);
  background: repeating-linear-gradient(to bottom, #111 0, #111 1px, transparent 1px, transparent var(--slot-height));
  outline: none;
}

.day:last-child {
  border-right: none;
}

.day:focus {
  box-shadow: inset 0 0 0 2px var(--ring);
}

.session-block {
  position: absolute;
  left: 6px;
  right: 6px;
  border-radius: 12px;
  color: #061207;
  background: var(--accent);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  padding: 8px 10px;
  border: 2px solid rgba(0, 0, 0, 0.15);
  cursor: grab;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.session-block:active {
  cursor: grabbing;
}

.session-block .title {
  font-weight: 700;
  font-size: 14px;
  color: #05230c;
}

.session-block .meta {
  font-size: 12px;
  color: #063d15;
  margin-top: 2px;
  opacity: 0.9;
}

.session-block.is-overlap {
  outline: 2px dashed var(--warn);
}

.session-block:focus {
  outline: 2px solid var(--ring);
  outline-offset: 0;
}

.legend {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
}

.dot.ok {
  background: #3f3f3f;
}

.dot.warn {
  background: var(--warn);
}

#toast {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: #171717;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
  display: none;
  z-index: 9999;
}

#toast.show {
  display: inline-block;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

#editDialog {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0;
  background: var(--panel);
  color: var(--text);
}

.edit-form {
  padding: 16px;
  min-width: 320px;
}

.edit-form label {
  display: grid;
  gap: 6px;
  margin: 8px 0;
}

.edit-form input {
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  background: #101010;
  color: var(--text);
  border: 1px solid var(--border);
}

.edit-form menu {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}

@media print {
  body {
    background: #fff;
    color: #000;
  }
  .app-header,
  .left-panel,
  .legend,
  .app-footer {
    display: none !important;
  }
  .timetable {
    box-shadow: none;
    border: none;
  }
  .timetable-header,
  .time-rail,
  .day {
    border-color: #ddd;
  }
  .session-block {
    color: #000;
    border-color: rgba(0, 0, 0, 0.1333333333);
  }
}
@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .timetable-header {
    font-size: 14px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}/*# sourceMappingURL=style.css.map */
/* Fixed shell and icon footer */
body { padding-top: 88px; }
.app-header { position: fixed; z-index: 20; top: 0; left: 0; right: 0; max-width: none; margin: 0; padding: 14px max(16px, calc((100% - 1440px) / 2 + 16px)); background: rgba(11, 11, 11, .94); border-bottom: 1px solid var(--border); backdrop-filter: blur(14px); }
.brand-lockup { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-lockup h1 { margin: 0; }
.brand-lockup > div { display: grid; gap: 2px; }
.brand-lockup > div > span { color: var(--muted); font-size: 11px; }
.brand-logo { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 12px; background: #161616; transition: border-color .18s ease, box-shadow .18s ease; }
.brand-logo img { width: 30px; height: 30px; object-fit: contain; }
.brand-logo:hover { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(34, 197, 94, .12); }
.app-footer { align-items: center; gap: 20px; border-top: 1px solid var(--border); }
.footer-copy { color: var(--muted); font-size: 13px; }
.footer-copy a { color: var(--text); font-weight: 700; text-decoration: none; }
.footer-copy a:hover { color: var(--accent); text-shadow: 0 0 14px rgba(34, 197, 94, .28); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.footer-links a { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 7px; border: 1px solid var(--border); border-radius: 9px; color: var(--muted); font-size: 11px; font-weight: 800; text-decoration: none; transition: border-color .18s ease, color .18s ease, box-shadow .18s ease; }
.footer-links a:hover { color: var(--text); border-color: var(--accent); box-shadow: 0 0 15px rgba(34, 197, 94, .16); }
@media (max-width: 700px) { body { padding-top: 122px; } .app-header { align-items: flex-start; flex-direction: column; padding: 12px 14px; } .header-actions { width: 100%; } .header-actions .divider { display: none; } .header-actions .btn { flex: 1 1 auto; justify-content: center; font-size: 12px; } .app-footer { align-items: flex-start; flex-direction: column; } .footer-links { justify-content: flex-start; } }
.goTop { position: fixed; right: 22px; bottom: 22px; z-index: 30; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; color: var(--text); background: var(--panel); box-shadow: 0 10px 26px rgba(0, 0, 0, .24); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 160ms ease, visibility 160ms ease, border-color 160ms ease, box-shadow 160ms ease, text-shadow 160ms ease; }
.goTop.visible { opacity: 1; visibility: visible; pointer-events: auto; }
.goTop:hover { color: var(--accent); border-color: var(--accent); box-shadow: 0 0 18px rgba(34, 197, 94, .22); text-shadow: 0 0 8px rgba(34, 197, 94, .65); }
@media (max-width: 700px) { .goTop { right: 16px; bottom: 16px; } }