:root {
  --brand-red: #e4242c;
  --brand-red-dark: #c91f27;
  --brand-red-soft: #fff0f1;
  --brand-charcoal: #323232;
  --brand-gray: #565656;
  --page-gray: #e9e9e9;
  --panel-gray: #f4f4f4;
  --line: #e1e1e1;
  --text: #555555;
  --muted: #7a7a7a;
  --white: #ffffff;
  --shadow: 0 22px 60px rgba(38, 38, 38, 0.12);
}

.absence-panel {
  margin-top: 1.5rem;
}

.absence-panel .day-card header {
  flex-wrap: wrap;
  gap: .5rem;
}

.absence-reason {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page-gray);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(228, 36, 44, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(228, 36, 44, 0.035) 1px, transparent 1px),
    var(--page-gray);
  background-size: 48px 48px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

body > .container {
  width: 100%;
  max-width: none;
  padding: 0;
}

body > .container > main {
  display: grid;
  min-height: 100vh;
  padding: 2rem;
  place-items: center;
}

.login-shell {
  position: relative;
  display: grid;
  width: min(1120px, 100%);
  min-height: 690px;
  overflow: hidden;
  grid-template-columns: 1.08fr 0.92fr;
  border: 1px solid rgba(50, 50, 50, 0.1);
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.login-shell::before {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--brand-red);
  content: "";
}

.login-language {
  position: absolute;
  z-index: 5;
  top: 1.5rem;
  right: 1.5rem;
}

.language-selector {
  display: inline-flex;
  gap: 0.15rem;
  padding: 0.22rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
}

.language-selector button {
  min-width: 2.15rem;
  height: 2rem;
  padding: 0 0.45rem;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  transition: color 150ms ease, background 150ms ease;
}

.language-selector button:hover {
  color: var(--brand-red);
  background: var(--brand-red-soft);
}

.language-selector button.active {
  color: var(--white);
  background: var(--brand-red);
}

.brand-panel {
  position: relative;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(2.5rem, 6vw, 5rem);
  background: var(--panel-gray);
}

.brand-panel::after {
  position: absolute;
  right: -8rem;
  bottom: -10rem;
  width: 27rem;
  height: 27rem;
  border: 5rem solid rgba(228, 36, 44, 0.08);
  border-radius: 50%;
  content: "";
}

.brand-logo-link {
  position: absolute;
  z-index: 2;
  top: clamp(2.5rem, 6vw, 4.5rem);
  left: clamp(2.5rem, 6vw, 5rem);
  display: inline-block;
}

.brand-logo {
  display: block;
  width: min(240px, 44vw);
  height: auto;
}

.brand-copy {
  position: relative;
  z-index: 2;
}

.eyebrow,
.step-label {
  margin: 0 0 0.9rem;
  color: var(--brand-red);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.brand-panel h1 {
  max-width: 540px;
  margin: 0 0 1.35rem;
  color: var(--brand-charcoal);
  font-size: clamp(3rem, 5.2vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-transform: uppercase;
}

.brand-copy > p:last-child {
  max-width: 430px;
  margin: 0;
  color: var(--brand-gray);
  font-size: 1rem;
  line-height: 1.7;
}

.brand-rings {
  position: absolute;
  z-index: 1;
  top: 25%;
  right: -4rem;
  width: 13rem;
  height: 13rem;
  transform: rotate(-18deg);
}

.brand-rings span {
  position: absolute;
  inset: 0;
  border: 2.4rem solid rgba(86, 86, 86, 0.06);
  border-radius: 50%;
}

.brand-rings span:last-child {
  inset: 3.2rem -3rem -3.2rem 3rem;
  border-color: rgba(228, 36, 44, 0.09);
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 6vw, 5rem);
  background: var(--white);
}

.login-panel h2 {
  margin: 0 0 0.8rem;
  color: var(--brand-charcoal);
  font-size: clamp(2.1rem, 4vw, 3.3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.form-intro {
  max-width: 430px;
  margin: 0 0 2.25rem;
  color: var(--muted);
  line-height: 1.65;
}

.login-panel form {
  display: flex;
  flex-direction: column;
}

.login-panel label {
  margin-bottom: 0.55rem;
  color: var(--brand-charcoal);
  font-size: 0.8rem;
  font-weight: 750;
}

.login-panel label:not(:first-of-type) {
  margin-top: 1.1rem;
}

.login-panel input {
  width: 100%;
  height: 3.55rem;
  padding: 0 1.15rem;
  border: 1px solid #d5d5d5;
  border-radius: 12px;
  outline: 0;
  color: var(--brand-charcoal);
  background: #fafafa;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.login-panel input:hover {
  border-color: #bcbcbc;
  background: var(--white);
}

.login-panel input:focus {
  border-color: var(--brand-red);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(228, 36, 44, 0.11);
}

.login-panel .remember-login {
  display: flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.6rem;
  margin-top: 1rem;
  margin-bottom: 0;
  cursor: pointer;
  color: var(--muted);
  font-weight: 650;
}

.login-panel .remember-login input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--brand-red);
}

.login-panel button[type="submit"] {
  height: 3.5rem;
  margin-top: 1.4rem;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--brand-red);
  font-weight: 750;
  box-shadow: 0 8px 20px rgba(228, 36, 44, 0.22);
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.login-panel button[type="submit"]:hover {
  transform: translateY(-1px);
  background: var(--brand-red-dark);
  box-shadow: 0 10px 26px rgba(228, 36, 44, 0.28);
}

.login-panel button[type="submit"]:focus-visible,
.logout-button:focus-visible {
  outline: 3px solid rgba(228, 36, 44, 0.28);
  outline-offset: 3px;
}

.login-panel button[type="submit"]:disabled {
  cursor: wait;
  opacity: 0.65;
}

.login-error {
  margin-bottom: 1rem;
  color: var(--brand-red-dark);
  font-size: 0.85rem;
  font-weight: 650;
}

.login-error:empty {
  display: none;
}

.login-error ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.login-panel span.login-error {
  margin-top: 0.45rem;
  margin-bottom: 0;
}

.password-requirements {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.login-panel .password-change-logout-form {
  margin-top: 0.7rem;
}

.login-panel button.password-change-logout[type="submit"] {
  margin-top: 0;
  color: var(--brand-charcoal);
  background: transparent;
  box-shadow: none;
}

.login-panel button.password-change-logout[type="submit"]:hover {
  background: #f2f2f2;
  box-shadow: none;
}

.privacy-note {
  margin: auto 0 0;
  padding-top: 2.5rem;
  color: #999999;
  font-size: 0.72rem;
}

.welcome-card {
  width: min(680px, 100%);
  padding: clamp(2rem, 7vw, 5rem);
  border-top: 5px solid var(--brand-red);
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.dashboard-page {
  display: grid;
  width: min(900px, 100%);
  gap: 1rem;
  place-items: center;
}

.attendance-warning {
  width: 100%;
  overflow: hidden;
  border: 1px solid #e8a8ac;
  border-left: 5px solid var(--brand-red);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 12px 32px rgba(111, 24, 30, 0.1);
}

.attendance-warning-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  background: var(--brand-red-soft);
}

.attendance-warning-heading .eyebrow {
  margin-bottom: 0.35rem;
}

.attendance-warning-heading h2 {
  margin: 0;
  color: var(--brand-charcoal);
  font-size: 1.2rem;
  font-weight: 820;
  letter-spacing: -0.02em;
}

.attendance-warning-heading p:last-child {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.attendance-warning-heading button {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(228, 36, 44, 0.18);
  border-radius: 50%;
  color: var(--brand-red-dark);
  background: var(--white);
  font-size: 1.2rem;
}

.attendance-warning-list {
  max-height: 340px;
  overflow-y: auto;
}

.attendance-warning-list > a {
  display: grid;
  min-height: 68px;
  align-items: center;
  padding: 0.7rem 1rem;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 1rem;
  border-top: 1px solid #f0dddd;
  color: var(--brand-charcoal);
  text-decoration: none;
}

.attendance-warning-list > a:first-child {
  border-top: 0;
}

.attendance-warning-list > a:hover {
  background: #fffafa;
}

.attendance-warning-list time {
  display: flex;
  min-width: 54px;
  flex-direction: column;
  color: var(--brand-red-dark);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.attendance-warning-list time strong {
  font-size: 0.78rem;
}

.attendance-warning-list time span {
  font-size: 0.72rem;
}

.attendance-warning-class {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.attendance-warning-class strong,
.attendance-warning-class small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attendance-warning-class small {
  margin-top: 0.15rem;
  color: var(--muted);
}

.attendance-warning-count {
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  color: #8f181e;
  background: #fce3e5;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.attendance-warning-arrow {
  color: var(--brand-red);
  font-size: 1.1rem;
}

.welcome-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 7vw, 4.5rem);
}

.welcome-toolbar img {
  width: min(210px, 52vw);
  height: auto;
}

.welcome-card h1 {
  margin: 0 0 1rem;
  color: var(--brand-charcoal);
  font-size: clamp(2.4rem, 8vw, 4.8rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}

.welcome-card > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.05rem;
}

.dashboard-coming-soon {
  margin-top: 2rem;
  padding: 1rem 1.15rem;
  border-left: 4px solid var(--brand-red);
  border-radius: 0 10px 10px 0;
  background: var(--brand-red-soft);
}

.professor-context {
  margin-top: 2rem;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-gray);
}

.professor-context h2 {
  margin: 0 0 0.45rem;
  color: var(--brand-charcoal);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.professor-context > p:not(.step-label) {
  margin: 0 0 1.15rem;
  color: var(--muted);
  line-height: 1.55;
}

.dashboard-inline-alert {
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid #efb8bb;
  border-radius: 12px;
  color: #8f181e;
  background: #fff0f1;
  font-size: 0.85rem;
  font-weight: 650;
}

.dashboard-time-registration {
  display: grid;
  align-items: center;
  margin-top: 2rem;
  padding: 1.25rem;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(228, 36, 44, 0.08), transparent 42%),
    var(--white);
}

.dashboard-time-registration h2 {
  margin: 0;
  color: var(--brand-charcoal);
  font-size: clamp(1.55rem, 4vw, 2.2rem);
  font-weight: 820;
  letter-spacing: -0.035em;
}

.dashboard-time-registration p:not(.step-label) {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.dashboard-time-registration form {
  margin: 0;
}

.dashboard-inline-notice {
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid #a8d5b7;
  border-radius: 12px;
  color: #235b36;
  background: #effaf1;
  font-size: 0.85rem;
  font-weight: 650;
}

.dashboard-automatic-action {
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--brand-red);
  border-radius: 999px;
  color: var(--brand-red-dark);
  background: var(--white);
  font-weight: 750;
}

.dashboard-automatic-action:hover {
  background: var(--brand-red-soft);
}

.dashboard-automatic-standalone {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 2rem auto 0;
}

.dashboard-time-counter {
  display: flex;
  flex-direction: column;
}

.dashboard-time-counter strong {
  color: var(--brand-red);
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
}

.dashboard-time-counter span {
  color: var(--muted);
  font-size: 0.82rem;
}

.dashboard-time-action {
  display: inline-flex;
  min-height: 3.4rem;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0 1.3rem;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--brand-red);
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(228, 36, 44, 0.22);
}

.dashboard-time-action:hover {
  background: var(--brand-red-dark);
}

.dashboard-time-action.clock-out {
  background: #343434;
  box-shadow: 0 10px 24px rgba(30, 30, 30, 0.18);
}

.dashboard-time-action.clock-out:hover {
  background: #1f1f1f;
}

.dashboard-time-action span {
  display: grid;
  width: 1.85rem;
  height: 1.85rem;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.72rem;
}

.professor-selector label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--brand-charcoal);
  font-size: 0.78rem;
  font-weight: 750;
}

.professor-selector > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.professor-selector select {
  min-width: 0;
  height: 3rem;
  padding: 0 2.5rem 0 0.9rem;
  border: 1px solid #d5d5d5;
  border-radius: 10px;
  color: var(--brand-charcoal);
  background: var(--white);
}

.professor-selector select:focus {
  border-color: var(--brand-red);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(228, 36, 44, 0.1);
}

.professor-selector button {
  padding: 0 1.2rem;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--brand-red);
  font-weight: 750;
}

.professor-selector button:hover {
  background: var(--brand-red-dark);
}

.logout-button {
  width: 100%;
  min-height: 3rem;
  padding: 0 1.35rem;
  border: 1px solid var(--brand-red);
  border-radius: 999px;
  color: var(--white);
  background: var(--brand-red);
  font-weight: 750;
  box-shadow: 0 8px 20px rgba(228, 36, 44, 0.2);
  transition: background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.logout-button:hover {
  background: var(--brand-red-dark);
  box-shadow: 0 10px 24px rgba(228, 36, 44, 0.26);
  transform: translateY(-1px);
}

.dashboard-actions {
  display: grid;
  width: min(100%, 24rem);
  gap: 0.75rem;
  margin: 1.5rem auto 0;
}

.dashboard-actions form {
  margin: 0;
}

.dashboard-action {
  display: flex;
  width: 100%;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0 1.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--brand-charcoal);
  background: var(--white);
  font-weight: 750;
  text-align: center;
  text-decoration: none;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.dashboard-action:hover {
  border-color: #b8b8b8;
  color: var(--brand-charcoal);
  background: var(--panel-gray);
  transform: translateY(-1px);
}

.dashboard-action:focus-visible {
  outline: 3px solid rgba(228, 36, 44, 0.2);
  outline-offset: 3px;
}

.primary-link {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  margin-top: 1.25rem;
  padding: 0 1.35rem;
  border-radius: 999px;
  color: var(--white);
  background: var(--brand-red);
  font-weight: 750;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(228, 36, 44, 0.2);
}

.primary-link:hover {
  color: var(--white);
  background: var(--brand-red-dark);
}

.secondary-link {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  margin-top: 1.25rem;
  margin-left: 0.5rem;
  padding: 0 1.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--brand-charcoal);
  background: var(--white);
  font-weight: 750;
  text-decoration: none;
}

.secondary-link:hover {
  border-color: var(--brand-red);
  color: var(--brand-red);
}

.app-shell {
  width: min(1540px, 100%);
  min-height: calc(100vh - 4rem);
  overflow: hidden;
  border: 1px solid rgba(50, 50, 50, 0.1);
  border-radius: 24px;
  background: #f7f7f5;
  box-shadow: var(--shadow);
}

.app-header {
  display: grid;
  min-height: 82px;
  align-items: center;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  padding: 0.9rem clamp(1.25rem, 3vw, 2.5rem);
  border-top: 5px solid var(--brand-red);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--brand-charcoal);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-decoration: none;
  text-transform: uppercase;
}

.app-brand img {
  width: 155px;
  height: auto;
}

.app-brand span {
  padding-left: 1rem;
  border-left: 1px solid var(--line);
}

.app-nav {
  display: flex;
  align-items: center;
  min-width: 0;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.app-nav a {
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.app-nav a:hover,
.app-nav a.active {
  color: var(--brand-red);
  background: var(--brand-red-soft);
}

.app-user {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 0.4rem;
  color: var(--brand-charcoal);
  font-size: 0.8rem;
  font-weight: 650;
}

.app-user-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
}

.app-user form {
  display: flex;
  margin: 0;
}

.app-user-actions > form button {
  min-height: 2.25rem;
  padding: 0 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 0.72rem;
  font-weight: 700;
}

.app-user-actions > form button:hover {
  border-color: var(--brand-red);
  color: var(--brand-red);
}

.app-header-automatic {
  min-height: 2.25rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--brand-red);
  border-radius: 999px;
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
  font-size: 0.72rem;
  font-weight: 750;
}

.app-header-automatic:hover {
  background: var(--white);
}
.app-header-clock.clock-in { color: #15803d; border-color: #15803d; background: #edf8f0; }
.app-header-clock.clock-out { background: var(--brand-red-soft); box-shadow: none; }
.app-header-clock.clock-out:hover { background: var(--white); box-shadow: none; }
.app-header-clock:disabled { cursor: default; opacity: .5; }
.dashboard-actions .app-header-clock-form button { width: 100%; min-height: 3rem; }

.app-user .language-selector button {
  min-width: 1.9rem;
  height: 1.8rem;
  padding: 0 0.3rem;
  font-size: 0.6rem;
}

.schedule-main {
  padding: clamp(1.25rem, 3vw, 3rem);
}

.schedule-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.schedule-heading h1 {
  margin: 0;
  color: var(--brand-charcoal);
  font-size: clamp(2.25rem, 5vw, 4.25rem);
  font-weight: 830;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.schedule-heading > div:first-child > p:last-child {
  max-width: 630px;
  margin: 1rem 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.context-badge {
  display: flex;
  min-width: 230px;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--white);
  text-align: right;
}

.context-badge span {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.context-badge strong {
  overflow: hidden;
  color: var(--brand-charcoal);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-professor-selector {
  display: grid;
  align-items: end;
  margin-bottom: 1rem;
  padding: 1rem 1.15rem;
  grid-template-columns: auto minmax(220px, 420px);
  gap: 0.75rem;
  border: 1px solid #f0c7c9;
  border-radius: 14px;
  background: var(--brand-red-soft);
}

.schedule-professor-selector label {
  align-self: center;
  color: var(--brand-charcoal);
  font-size: 0.76rem;
  font-weight: 780;
}

.schedule-professor-selector select,
.schedule-filters select {
  height: 2.75rem;
  padding: 0 2.2rem 0 0.8rem;
  border: 1px solid #d5d5d5;
  border-radius: 10px;
  outline: 0;
  color: var(--brand-charcoal);
  background: var(--white);
}

.schedule-professor-selector select:focus,
.schedule-filters select:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(228, 36, 44, 0.1);
}

.schedule-professor-selector button {
  height: 2.75rem;
  padding: 0 1.1rem;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--brand-red);
  font-weight: 750;
}

.schedule-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
}

.schedule-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.4rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: #fbfbfa;
}

.schedule-toolbar > div:first-child > p {
  margin: 0 0 0.25rem;
  color: var(--brand-red);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.schedule-toolbar h2 {
  margin: 0;
  color: var(--brand-charcoal);
  font-size: 1.55rem;
  font-weight: 810;
  letter-spacing: -0.03em;
}

.schedule-filters {
  display: flex;
  gap: 0.7rem;
}

.schedule-toolbar-actions {
  display: flex;
  align-items: flex-end;
  gap: 0.8rem;
}

.schedule-export-link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  border-radius: 999px;
  color: var(--white);
  background: var(--brand-red);
  font-size: 0.75rem;
  font-weight: 780;
  text-decoration: none;
  white-space: nowrap;
}

.schedule-export-link:hover {
  color: var(--white);
  background: var(--brand-red-dark);
}

.schedule-filters label {
  display: flex;
  min-width: 170px;
  flex-direction: column;
  gap: 0.35rem;
}

.schedule-filters label span {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.schedule-status {
  min-height: 2rem;
  padding: 0.6rem 1.5rem 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.schedule-status [data-calendar-error] {
  color: var(--brand-red-dark);
  font-weight: 700;
}

.class-schedule-calendar {
  padding: 0.5rem 1.25rem 1.25rem;
}

.class-schedule-calendar .fc {
  --fc-border-color: #e4e4e2;
  --fc-button-bg-color: #3b3b3b;
  --fc-button-border-color: #3b3b3b;
  --fc-button-hover-bg-color: #222222;
  --fc-button-hover-border-color: #222222;
  --fc-button-active-bg-color: var(--brand-red);
  --fc-button-active-border-color: var(--brand-red);
  --fc-today-bg-color: rgba(228, 36, 44, 0.045);
  --fc-now-indicator-color: var(--brand-red);
  color: var(--text);
}

.class-schedule-calendar .fc .fc-toolbar {
  margin-bottom: 1rem;
}

.class-schedule-calendar .fc .fc-toolbar-title {
  color: var(--brand-charcoal);
  font-size: clamp(1.05rem, 2.5vw, 1.5rem);
  font-weight: 800;
  text-transform: capitalize;
}

.class-schedule-calendar .fc .fc-button {
  min-height: 2.35rem;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  box-shadow: none;
  text-transform: capitalize;
}

.class-schedule-calendar .fc .fc-col-header-cell-cushion {
  padding: 0.65rem 0.2rem;
  color: var(--brand-charcoal);
  font-size: 0.7rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.class-schedule-calendar .fc .fc-timegrid-slot-label-cushion {
  color: var(--muted);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}

.class-schedule-calendar [class*="event-type-"] {
  --fc-event-color: yellow !important;
  --fc-event-contrast-color: #1f1f1f !important;
  overflow: hidden;
  border-color: yellow !important;
  border-left: 3px solid rgba(0, 0, 0, 0.22) !important;
  border-radius: 5px;
  color: var(--fc-event-contrast-color) !important;
  background-color: var(--fc-event-color) !important;
  box-shadow: 0 2px 5px rgba(50, 50, 50, 0.13);
  cursor: pointer;
}

.class-schedule-calendar [class*="event-type-"] * {
  color: var(--fc-event-contrast-color) !important;
}

.class-schedule-calendar [class*="event-type-"]:hover {
  filter: brightness(0.94);
}

.class-schedule-calendar .event-type-3 {
  --fc-event-color: green !important;
  --fc-event-contrast-color: var(--white) !important;
  border-color: green !important;
}

.class-schedule-calendar [class*="event-type-"].event-state-1 {
  --fc-event-color: palevioletred !important;
  border-color: palevioletred !important;
}

.class-schedule-calendar [class*="event-type-"].event-state-2 {
  --fc-event-color: orange !important;
  --fc-event-contrast-color: #1f1f1f !important;
  border-color: orange !important;
}

.class-schedule-calendar [class*="event-type-"].event-state-3 {
  --fc-event-color: blue !important;
  border-color: blue !important;
}

.class-schedule-calendar [class*="event-type-"].event-state-4 {
  --fc-event-color: gray !important;
  border-color: gray !important;
}

.class-schedule-calendar [class*="event-type-"].event-state-5 {
  --fc-event-color: #8b4513 !important;
  border-color: #8b4513 !important;
}

.class-schedule-calendar .event-type-4 {
  --fc-event-color: purple !important;
  --fc-event-contrast-color: var(--white) !important;
  border-color: purple !important;
}

.class-schedule-calendar .fc-list-event-title a,
.class-schedule-calendar .fc-list-event-time {
  color: var(--brand-charcoal);
  text-decoration: none;
}

.schedule-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  padding: 0 1.5rem 1.25rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.schedule-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.schedule-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: green;
}

.schedule-legend .legend-recovery {
  background: blue;
}

.schedule-legend .legend-cancelled {
  background: palevioletred;
}

.schedule-legend .legend-to-recover {
  background: orange;
}

.schedule-legend .legend-unscheduled {
  background: gray;
}

.schedule-legend .legend-expired {
  background: #8b4513;
}

.schedule-legend .legend-oral-test {
  background: purple;
}

.schedule-legend .legend-other {
  border: 1px solid #b9a800;
  background: yellow;
}

.class-details-dialog {
  width: min(520px, calc(100% - 2rem));
  padding: 2rem;
  border: 0;
  border-top: 5px solid var(--brand-red);
  border-radius: 18px;
  color: var(--text);
  background: var(--white);
  box-shadow: 0 24px 80px rgba(30, 30, 30, 0.25);
}

.class-details-dialog::backdrop {
  background: rgba(30, 30, 30, 0.48);
  backdrop-filter: blur(2px);
}

.class-details-dialog > form {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
}

.dialog-close {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: var(--white);
  font-size: 1.5rem;
  line-height: 1;
}

.class-details-dialog h2 {
  max-width: calc(100% - 3rem);
  margin: 0 0 0.5rem;
  color: var(--brand-charcoal);
  font-size: 1.8rem;
  font-weight: 820;
  letter-spacing: -0.035em;
}

.class-details-time {
  margin: 0 0 1.4rem;
  color: var(--brand-red);
  font-weight: 700;
  text-transform: capitalize;
}

.class-details-dialog dl {
  display: grid;
  margin: 0;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.class-details-dialog dl > div {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
}

.class-details-dialog dl > div:nth-child(even) {
  border-left: 1px solid var(--line);
}

.class-details-dialog dl > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.class-details-dialog dt {
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.class-details-dialog dd {
  margin: 0;
  color: var(--brand-charcoal);
  font-weight: 700;
}

.class-details-description {
  margin: 1rem 0 0;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: var(--panel-gray);
  white-space: pre-wrap;
}

.dialog-detail-link {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  margin-top: 1.25rem;
  padding: 0 1.15rem;
  border-radius: 999px;
  color: var(--white);
  background: var(--brand-red);
  font-weight: 750;
  text-decoration: none;
}

.dialog-detail-link:hover {
  color: var(--white);
  background: var(--brand-red-dark);
}

.room-schedule-toolbar {
  align-items: center;
}

.room-date-navigation {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.room-date-navigation button,
.room-date-navigation input {
  min-height: 2.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--brand-charcoal);
  background: var(--white);
  font-size: 0.78rem;
  font-weight: 720;
}

.room-date-navigation button {
  padding: 0 0.85rem;
}

.room-date-navigation input {
  padding: 0 0.7rem;
}

.room-date-navigation button:hover {
  border-color: var(--brand-red);
  color: var(--brand-red);
}

.room-schedule-scroll {
  max-width: 100%;
  max-height: min(900px, calc(100vh - 210px));
  overflow: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.room-schedule-grid {
  position: relative;
  min-width: 100%;
}

.room-grid-header {
  position: sticky;
  z-index: 12;
  top: 0;
  display: grid;
  min-height: 54px;
  border-bottom: 1px solid #cecece;
  background: #f7f7f5;
}

.room-grid-corner,
.room-grid-room {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  padding: 0.65rem;
  border-left: 1px solid var(--line);
  color: var(--brand-charcoal);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
  overflow-wrap: anywhere;
}

.room-grid-corner {
  position: sticky;
  z-index: 14;
  left: 0;
  border-left: 0;
  background: #f7f7f5;
}

.room-grid-body {
  position: relative;
  min-height: 840px;
}

.room-time-axis {
  position: sticky;
  z-index: 10;
  top: 0;
  left: 0;
  height: 100%;
  border-right: 1px solid #cecece;
  background: #fafaf9;
}

.room-time-label {
  position: absolute;
  right: 0.55rem;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.62rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.room-grid-lanes {
  position: absolute;
  inset: 0 0 0 auto;
  display: grid;
}

.room-grid-lane {
  position: relative;
  min-width: 0;
  border-right: 1px solid var(--line);
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 29px,
      #ececea 29px,
      #ececea 30px
    );
}

.room-event {
  position: absolute;
  z-index: 2;
  right: 4px;
  left: 4px;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.28rem 0.4rem;
  border: 0;
  border-left: 4px solid rgba(0, 0, 0, 0.25);
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(30, 30, 30, 0.14);
  text-align: left;
}

.room-event:hover,
.room-event:focus-visible {
  z-index: 5;
  outline: 2px solid var(--brand-charcoal);
  outline-offset: 1px;
  filter: brightness(0.96);
}

.room-event.is-other-professor {
  border-left-color: #999999;
}

.room-event-time {
  font-size: 0.58rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.room-event-title {
  max-width: 100%;
  overflow: hidden;
  font-size: 0.68rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 821px) {
  .room-grid-room {
    padding-right: 0.3rem;
    padding-left: 0.3rem;
    font-size: 0.65rem;
  }

  .room-event {
    right: 2px;
    left: 2px;
    padding-right: 0.25rem;
    padding-left: 0.25rem;
  }

  .room-event-professor {
    font-size: 0.54rem;
  }
}

.room-event-professor {
  max-width: 100%;
  overflow: hidden;
  opacity: 0.82;
  font-size: 0.58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-schedule-empty {
  width: 100%;
  margin: 0;
  padding: 4rem 1.5rem;
  color: var(--muted);
  text-align: center;
}

.legend-other-professor {
  background: #d3d3d3;
}

.other-professor-notice {
  margin: 1rem 0 0;
  padding: 0.8rem 0.9rem;
  border-radius: 10px;
  color: #555555;
  background: #eeeeee;
  font-size: 0.78rem;
}

.class-detail-main {
  padding: clamp(1.25rem, 3vw, 3rem);
}

.back-link {
  display: inline-flex;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.back-link:hover {
  color: var(--brand-red);
}

.save-status {
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid #b9dfca;
  border-radius: 12px;
  color: #17623e;
  background: #eef9f3;
  font-weight: 700;
}

.save-status.is-error {
  border-color: #efb8bb;
  color: #8f181e;
  background: #fff0f1;
}

.class-summary,
.attendance-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(38, 38, 38, 0.06);
}

.class-summary {
  padding: clamp(1.4rem, 3vw, 2.4rem);
}

.class-summary-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}

.class-summary h1 {
  margin: 0;
  color: var(--brand-charcoal);
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 830;
  letter-spacing: -0.052em;
  line-height: 1;
  overflow-wrap: anywhere;
}

.class-summary-time {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-weight: 650;
  text-transform: capitalize;
}

.class-state {
  flex: 0 0 auto;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  color: var(--white);
  background: green;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.class-state.state-1 {
  background: palevioletred;
}

.class-state.state-2 {
  color: #1f1f1f;
  background: orange;
}

.class-state.state-3 {
  background: blue;
}

.class-state.state-4 {
  background: gray;
}

.class-state.state-5 {
  background: #8b4513;
}

.class-facts {
  display: grid;
  margin: 2rem 0 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.class-facts > div {
  min-width: 0;
  padding: 1rem 1.1rem;
  border-left: 1px solid var(--line);
}

.class-facts > div:first-child {
  border-left: 0;
}

.class-facts dt,
.class-details-dialog dt {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.class-facts dd {
  overflow: hidden;
  margin: 0.25rem 0 0;
  color: var(--brand-charcoal);
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.class-note,
.class-description {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 11px;
  background: var(--panel-gray);
}

.class-note strong,
.class-description summary {
  color: var(--brand-charcoal);
  font-size: 0.75rem;
  font-weight: 800;
}

.class-note p,
.class-description p {
  margin: 0.5rem 0 0;
  white-space: pre-wrap;
}

.class-description summary {
  cursor: pointer;
}

.class-facts-expanded > div:nth-child(4n + 1) {
  border-left: 0;
}

.class-facts-expanded > div:nth-child(n + 5) {
  border-top: 1px solid var(--line);
}

.class-wide-facts {
  display: grid;
  margin-top: 1rem;
  gap: 0.75rem;
}

.class-wide-facts > div {
  display: grid;
  min-width: 0;
  padding: 0.85rem 1rem;
  grid-template-columns: minmax(150px, 0.2fr) minmax(0, 1fr);
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel-gray);
}

.class-wide-facts span {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.class-wide-facts strong,
.class-wide-facts a {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--brand-charcoal);
  font-weight: 700;
  white-space: pre-wrap;
}

.class-wide-facts a {
  color: var(--brand-red-dark);
}

.class-content-card {
  margin-top: 1.25rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(38, 38, 38, 0.06);
}

.class-tabs {
  display: flex;
  padding: 0 1.25rem;
  gap: 0.25rem;
  border-bottom: 1px solid var(--line);
  background: #fbfbfa;
}

.class-tabs button {
  position: relative;
  min-height: 58px;
  padding: 0 1rem;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-weight: 780;
}

.class-tabs button::after {
  position: absolute;
  right: 0.75rem;
  bottom: -1px;
  left: 0.75rem;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
  content: "";
}

.class-tabs button:hover,
.class-tabs button.active {
  color: var(--brand-charcoal);
}

.class-tabs button.active::after {
  background: var(--brand-red);
}

.class-tabs button span {
  display: inline-grid;
  min-width: 1.4rem;
  height: 1.4rem;
  margin-left: 0.35rem;
  padding: 0 0.3rem;
  place-items: center;
  border-radius: 999px;
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
  font-size: 0.65rem;
}

.description-panel {
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.description-panel h2 {
  margin: 0;
  color: var(--brand-charcoal);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 820;
  letter-spacing: -0.035em;
}

.description-field {
  min-height: 180px;
  margin-top: 1.25rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--brand-charcoal);
  background: var(--panel-gray);
  line-height: 1.65;
  white-space: pre-wrap;
}

.attendance-card {
  margin-top: 1.25rem;
  overflow: hidden;
}

.attendance-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.attendance-heading h2 {
  margin: 0;
  color: var(--brand-charcoal);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 820;
  letter-spacing: -0.035em;
}

.attendance-heading > div > p:last-child {
  margin: 0.55rem 0 0;
  color: var(--muted);
}

.student-count {
  flex: 0 0 auto;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
  font-size: 0.72rem;
  font-weight: 800;
}

.empty-students {
  padding: 3.5rem 1.5rem;
  color: var(--muted);
  text-align: center;
}

.empty-students strong {
  color: var(--brand-charcoal);
  font-size: 1.1rem;
}

.empty-students p {
  margin: 0.5rem 0 0;
}

.attendance-bulk-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  background: #fbfbfa;
}

.attendance-bulk-actions button {
  min-height: 2.35rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--brand-charcoal);
  background: var(--white);
  font-size: 0.72rem;
  font-weight: 720;
}

.attendance-bulk-actions button:hover {
  border-color: var(--brand-red);
  color: var(--brand-red);
}

.attendance-table {
  width: 100%;
}

.attendance-table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.attendance-table-expanded {
  min-width: 1320px;
}

.attendance-table-expanded .attendance-row {
  grid-template-columns:
    minmax(142px, 0.75fr)
    minmax(142px, 0.75fr)
    minmax(230px, 0.9fr)
    minmax(70px, 0.38fr)
    minmax(115px, 0.6fr)
    minmax(115px, 0.6fr)
    minmax(230px, 1.3fr)
    minmax(70px, 0.38fr);
}

.attendance-table-expanded .attendance-header {
  position: sticky;
  z-index: 2;
  top: 0;
}

.attendance-row {
  display: grid;
  min-height: 64px;
  align-items: center;
  grid-template-columns: minmax(240px, 1fr) minmax(150px, 0.42fr) minmax(150px, 0.42fr);
  border-bottom: 1px solid #eeeeec;
}

.attendance-row:last-child {
  border-bottom: 0;
}

.attendance-row > * {
  min-width: 0;
  padding: 0.75rem 1rem;
}

.attendance-row > * + * {
  border-left: 1px solid #eeeeec;
}

.attendance-header {
  min-height: 42px;
  color: var(--muted);
  background: #f7f7f5;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.student-name {
  display: grid;
  align-items: center;
  grid-template-columns: 1.85rem minmax(0, 1fr);
  column-gap: 0.6rem;
  row-gap: 0.2rem;
}

.student-name > span:first-child {
  display: grid;
  width: 1.85rem;
  height: 1.85rem;
  grid-row: 1 / span 2;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: var(--panel-gray);
  font-size: 0.68rem;
  font-weight: 800;
}

.student-name .first-class-badge {
  display: inline-flex;
  width: auto;
  height: auto;
  grid-column: 2;
  justify-self: start;
  padding: 0.3rem 0.45rem;
  border: 1px solid var(--brand-charcoal);
  border-radius: 6px;
  color: var(--brand-charcoal);
  background: var(--white);
  font-size: 0.68rem;
  line-height: 1.2;
  white-space: nowrap;
}

.student-name strong {
  display: -webkit-box;
  grid-column: 2;
  overflow: hidden;
  color: var(--brand-charcoal);
  line-height: 1.25;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.student-data {
  overflow: hidden;
  color: var(--brand-charcoal);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teacher-info {
  color: var(--muted);
}

.image-status {
  font-weight: 750;
  text-align: center;
}

.student-photo-link {
  display: inline-block;
  line-height: 0;
  border-radius: 8px;
}

.student-photo-link:focus-visible {
  outline: 2px solid var(--brand-red-dark);
  outline-offset: 2px;
}

.student-photo-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--panel-gray);
}

.evaluation-summary-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  flex-shrink: 0;
}

.student-photo {
  display: block;
  width: 165px;
  max-width: 40vw;
  max-height: 220px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--panel-gray);
}

.tristate-checkbox {
  display: inline-flex;
  min-width: 112px;
  min-height: 2.55rem;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.75rem;
  border: 1px solid #d6d6d6;
  border-radius: 10px;
  color: var(--muted);
  background: var(--white);
  font-size: 0.76rem;
  font-weight: 750;
}

.tristate-checkbox:hover,
.tristate-checkbox:focus-visible {
  border-color: var(--brand-red);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(228, 36, 44, 0.09);
}

.tristate-box {
  position: relative;
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  border: 2px solid #b7b7b7;
  border-radius: 4px;
  background: #f3f3f3;
}

.state-pending .tristate-box::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.55rem;
  height: 2px;
  transform: translate(-50%, -50%);
  background: #8a8a8a;
  content: "";
}

.tristate-checkbox.state-yes {
  border-color: #9bcdb3;
  color: #17623e;
  background: #eef9f3;
}

.state-yes .tristate-box {
  border-color: #238557;
  background: #238557;
}

.state-yes .tristate-box::after {
  position: absolute;
  top: 0.05rem;
  left: 0.29rem;
  width: 0.35rem;
  height: 0.65rem;
  transform: rotate(45deg);
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  content: "";
}

.tristate-checkbox.state-no {
  border-color: #efb8bb;
  color: #8f181e;
  background: #fff0f1;
}

.state-no .tristate-box {
  border-color: var(--brand-red);
  background: var(--white);
}

.attendance-actions {
  position: sticky;
  z-index: 5;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.attendance-actions span {
  color: var(--muted);
  font-size: 0.75rem;
}

.attendance-actions button {
  min-width: 150px;
  min-height: 3rem;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--brand-red);
  font-weight: 780;
  box-shadow: 0 8px 20px rgba(228, 36, 44, 0.2);
}

.attendance-actions button:hover {
  background: var(--brand-red-dark);
}

.evaluation-list-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(38, 38, 38, 0.06);
}

.evaluation-list-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.evaluation-list-heading h2 {
  margin: 0;
  color: var(--brand-charcoal);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 820;
  letter-spacing: -0.035em;
}

.evaluation-list-row {
  display: grid;
  min-height: 66px;
  align-items: center;
  grid-template-columns: minmax(150px, 1fr) minmax(190px, 1.25fr) minmax(160px, 1fr) 100px minmax(160px, 1fr) 44px;
  border-bottom: 1px solid #eeeeec;
  color: var(--brand-charcoal);
  text-decoration: none;
}

.evaluation-list-table {
  overflow-x: auto;
}

.evaluation-list-row:last-child {
  border-bottom: 0;
}

.evaluation-list-row > * {
  min-width: 0;
  padding: 0.8rem 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.evaluation-list-row:hover {
  background: #fff8f8;
}

.evaluation-list-header {
  min-height: 42px;
  color: var(--muted);
  background: #f7f7f5;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.evaluation-progress {
  display: inline-flex;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  color: #8a5c10;
  background: #fff3d6;
  font-size: 0.72rem;
  font-weight: 800;
}

.evaluation-progress.is-complete {
  color: #17623e;
  background: #e9f7ef;
}

.evaluation-open {
  color: var(--brand-red);
  font-size: 1.25rem;
  font-weight: 800;
  text-align: center;
}

.evaluation-levels {
  display: grid;
  padding: 1.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.evaluation-levels label {
  display: grid;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 780;
}

.evaluation-levels select,
.evaluation-question input,
.evaluation-question select,
.evaluation-question textarea {
  width: 100%;
  border: 1px solid #d8d8d5;
  border-radius: 10px;
  color: var(--brand-charcoal);
  background: var(--white);
  font: inherit;
}

.evaluation-levels select,
.evaluation-question input,
.evaluation-question select {
  min-height: 46px;
  padding: 0 0.85rem;
}

.evaluation-question textarea {
  min-height: 110px;
  padding: 0.8rem;
  resize: vertical;
}

.evaluation-levels select:focus,
.evaluation-question input:focus,
.evaluation-question select:focus,
.evaluation-question textarea:focus {
  border-color: var(--brand-red);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(228, 36, 44, 0.09);
}

.evaluation-group-heading {
  margin: 0;
  padding: 1.1rem 1.5rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--brand-charcoal);
  background: #f7f7f5;
  font-size: 1rem;
  font-weight: 820;
}

.evaluation-question {
  display: grid;
  padding: 1.25rem 1.5rem;
  grid-template-columns: minmax(240px, 0.8fr) minmax(280px, 1.2fr);
  align-items: start;
  gap: 1.5rem;
  border-bottom: 1px solid #eeeeec;
}

.evaluation-question label {
  display: grid;
  gap: 0.35rem;
  color: var(--brand-charcoal);
  font-weight: 720;
}

.evaluation-question label small {
  color: var(--muted);
  font-weight: 500;
}

.evaluation-actions {
  position: sticky;
  z-index: 5;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  gap: 1rem;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.evaluation-record-navigation,
.evaluation-primary-actions {
  display: flex;
  gap: 0.65rem;
}

.evaluation-actions button {
  min-height: 2.8rem;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--brand-charcoal);
  background: var(--white);
  font-weight: 760;
}

.evaluation-actions button:disabled {
  opacity: 0.4;
}

.evaluation-actions .evaluation-save,
.evaluation-actions .evaluation-confirm {
  border-color: var(--brand-red);
  color: var(--white);
  background: var(--brand-red);
}

.evaluation-actions .evaluation-confirm {
  background: var(--brand-red-dark);
}

.evaluation-history-grid {
  display: grid;
  margin-top: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.evaluation-history-card {
  margin-top: 0;
}

.evaluation-history-card > summary {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  color: var(--brand-charcoal);
  font-weight: 800;
}

.evaluation-history-card > summary span {
  display: inline-grid;
  min-width: 1.45rem;
  height: 1.45rem;
  margin-left: 0.4rem;
  place-items: center;
  border-radius: 999px;
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
  font-size: 0.68rem;
}

.evaluation-history-list article {
  display: grid;
  padding: 1rem 1.5rem;
  gap: 0.2rem;
  border-top: 1px solid var(--line);
}

.evaluation-history-list span,
.evaluation-history-list small,
.evaluation-history-list p,
.evaluation-empty-history {
  color: var(--muted);
}

.evaluation-history-list p {
  margin: 0.35rem 0 0;
}

.evaluation-previous {
  border-top: 1px solid var(--line);
}

.evaluation-previous > summary {
  display: grid;
  padding: 1rem 1.5rem 1rem 2.5rem;
  gap: 0.2rem;
  position: relative;
  cursor: pointer;
  list-style: none;
}

.evaluation-previous > summary::-webkit-details-marker {
  display: none;
}

.evaluation-previous > summary::before {
  content: "\25B8";
  position: absolute;
  left: 1.5rem;
  top: 1rem;
  color: var(--muted);
  transition: transform 0.15s ease;
}

.evaluation-previous[open] > summary::before {
  transform: rotate(90deg);
}

.evaluation-previous > summary:hover strong {
  color: var(--brand-red-dark);
}

.evaluation-previous-body {
  display: grid;
  padding: 0 1.5rem 1.25rem 2.5rem;
  gap: 0.6rem;
}

.evaluation-previous-levels {
  display: grid;
  margin: 0 0 0.25rem;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: 0.75rem;
}

.evaluation-previous-levels dt {
  color: var(--muted);
  font-size: 0.72rem;
}

.evaluation-previous-levels dd {
  margin: 0.1rem 0 0;
  font-weight: 700;
}

.evaluation-previous-group {
  margin: 0.6rem 0 0;
  font-size: 0.85rem;
  font-weight: 800;
}

.evaluation-previous-answer {
  display: grid;
  gap: 0.15rem;
}

.evaluation-previous-answer > span {
  color: var(--muted);
  font-size: 0.82rem;
}

.evaluation-previous-answer > span small {
  display: block;
}

.evaluation-history-list .evaluation-previous-answer p {
  margin: 0;
  color: var(--brand-charcoal);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.evaluation-empty-history {
  margin: 0;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 820px) {
  body > .container > main {
    display: block;
    padding: 0;
  }

  .login-shell {
    width: 100%;
    min-height: 100vh;
    grid-template-columns: 1fr;
    border: 0;
    border-radius: 0;
  }

  .brand-panel {
    min-height: 310px;
    justify-content: flex-end;
    padding: 6.5rem 1.5rem 2rem;
  }

  .brand-logo-link {
    top: 1.75rem;
    left: 1.5rem;
  }

  .brand-logo {
    width: 170px;
  }

  .login-language {
    top: 1.25rem;
    right: 1.25rem;
  }

  .brand-panel h1 {
    margin-bottom: 0;
    font-size: clamp(2.25rem, 11vw, 3.25rem);
  }

  .brand-copy > p:last-child,
  .brand-rings {
    display: none;
  }

  .login-panel {
    min-height: calc(100vh - 310px);
    justify-content: flex-start;
    padding: 2.5rem 1.5rem;
  }

  .welcome-card {
    min-height: 100vh;
    border-radius: 0;
  }

  .dashboard-page {
    width: 100%;
  }

  .attendance-warning {
    border-right: 0;
    border-left-width: 4px;
    border-radius: 0;
  }

  .attendance-warning-list > a {
    padding: 0.75rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.7rem;
  }

  .attendance-warning-count {
    grid-column: 2 / 3;
    justify-self: start;
  }

  .attendance-warning-arrow {
    grid-row: 1 / span 2;
    grid-column: 3;
  }

  .welcome-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .professor-selector > div {
    grid-template-columns: 1fr;
  }

  .dashboard-time-registration {
    grid-template-columns: 1fr;
  }

  .dashboard-time-action {
    width: 100%;
  }

  .dashboard-automatic-action {
    width: 100%;
  }

  .professor-selector button {
    min-height: 3rem;
  }

  .app-shell {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .app-header {
    position: sticky;
    z-index: 20;
    top: 0;
    min-height: 68px;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
  }

  .app-brand img {
    width: 126px;
  }

  .app-brand span,
  .app-user-actions > span {
    display: none;
  }

  .app-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
  }

  .app-nav a {
    flex: 0 0 auto;
  }

  .app-user {
    display: contents;
  }

  .app-user-actions {
    grid-column: 2;
    grid-row: 1;
    gap: 0.35rem;
  }

  .app-header-automatic {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: end;
  }

  .app-header .app-header-clock-form {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: end;
  }

  .app-header:has(.app-header-automatic) .app-nav {
    grid-row: 3;
  }

  .app-user .language-selector button {
    min-width: 1.65rem;
    padding: 0 0.2rem;
  }

  .app-user-actions > form button {
    min-height: 2.1rem;
    padding: 0 0.6rem;
  }

  .app-user-actions > form {
    display: none;
  }

  .schedule-main {
    padding: 1.5rem 0.85rem 3rem;
  }

  .schedule-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 1.25rem;
  }

  .schedule-heading h1 {
    font-size: clamp(2.5rem, 13vw, 3.5rem);
  }

  .context-badge {
    min-width: 0;
    text-align: left;
  }

  .schedule-professor-selector {
    grid-template-columns: 1fr;
  }

  .schedule-professor-selector label {
    align-self: auto;
  }

  .schedule-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 1rem;
    padding: 1.15rem;
  }

  .schedule-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .schedule-toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .schedule-export-link {
    min-height: 2.9rem;
  }

  .schedule-filters label {
    min-width: 0;
  }

  .class-schedule-calendar {
    padding: 0.25rem 0.75rem 1rem;
  }

  .class-schedule-calendar .fc .fc-toolbar {
    align-items: center;
    gap: 0.4rem;
  }

  .class-schedule-calendar .fc .fc-toolbar-title {
    font-size: 1rem;
  }

  .class-schedule-calendar .fc .fc-button {
    min-height: 2.25rem;
    padding: 0.35rem 0.55rem;
  }

  .schedule-legend {
    padding: 0 1rem 1rem;
  }

  .class-details-dialog {
    width: 100%;
    max-width: none;
    margin: auto 0 0;
    padding: 1.5rem 1rem;
    border-radius: 20px 20px 0 0;
  }

  .class-details-dialog dl {
    grid-template-columns: 1fr;
  }

  .class-details-dialog dl > div,
  .class-details-dialog dl > div:nth-child(even),
  .class-details-dialog dl > div:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    border-left: 0;
  }

  .class-details-dialog dl > div:last-child {
    border-bottom: 0;
  }

  .class-detail-main {
    padding: 1rem 0.75rem 3rem;
  }

  .secondary-link {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }

  .room-schedule-toolbar,
  .room-date-navigation {
    align-items: stretch;
    flex-direction: column;
  }

  .room-date-navigation {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr auto;
  }

  .room-date-navigation [data-room-today] {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .room-date-navigation input {
    width: 100%;
  }

  .room-schedule-scroll {
    max-height: 72vh;
  }

  .class-summary,
  .attendance-card {
    border-radius: 16px;
  }

  .class-summary-heading,
  .attendance-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

  .class-summary h1 {
    font-size: clamp(2.2rem, 12vw, 3.2rem);
  }

  .attendance-heading > div {
    min-width: 0;
  }

  .attendance-heading > div > p:last-child {
    overflow-wrap: anywhere;
  }

  .class-facts {
    grid-template-columns: 1fr 1fr;
  }

  .class-facts > div:nth-child(odd) {
    border-left: 0;
  }

  .class-facts > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .class-facts-expanded > div:nth-child(odd) {
    border-left: 0;
  }

  .class-facts-expanded > div:nth-child(even) {
    border-left: 1px solid var(--line);
  }

  .class-wide-facts > div {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .attendance-bulk-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .attendance-bulk-actions button {
    min-height: 2.8rem;
  }

  .attendance-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .attendance-actions span {
    text-align: center;
  }

  .class-content-card {
    border-radius: 16px;
  }

  .class-tabs {
    padding: 0 0.5rem;
  }

  .class-tabs button {
    min-height: 52px;
    flex: 1 1 0;
    padding: 0 0.5rem;
  }

  .attendance-table-expanded {
    min-width: 1070px;
  }

  .attendance-table-expanded .attendance-row {
    grid-template-columns: 210px 130px 130px 70px 120px 120px 220px 70px;
  }

  .attendance-table-expanded .attendance-header > :nth-child(3),
  .attendance-table-expanded .student-name {
    position: sticky;
    z-index: 1;
    left: 0;
    order: -1;
    border-left: 0;
    border-right: 1px solid #eeeeec;
    background: var(--white);
    box-shadow: 3px 0 6px rgba(38, 38, 38, 0.06);
  }

  .attendance-table-expanded .attendance-header > :nth-child(3) {
    z-index: 3;
    background: #f7f7f5;
  }

  .attendance-table-expanded .attendance-row > :first-child {
    border-left: 1px solid #eeeeec;
  }

  .evaluation-list-header {
    display: none;
  }

  .evaluation-list-table {
    display: grid;
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .evaluation-list-row {
    grid-template-columns: 1fr 1fr;
    padding: 0.55rem;
    border: 1px solid var(--line);
    border-radius: 12px;
  }

  .evaluation-list-row > * {
    display: grid;
    padding: 0.45rem 0.55rem;
    gap: 0.2rem;
    overflow: visible;
    white-space: normal;
  }

  .evaluation-list-row > *::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .evaluation-list-row > :nth-child(2),
  .evaluation-list-row > :nth-child(3),
  .evaluation-list-row > :nth-child(5) {
    grid-column: 1 / -1;
  }

  .evaluation-open {
    display: none;
  }

  .evaluation-levels,
  .evaluation-question,
  .evaluation-history-grid,
  .evaluation-previous-levels {
    grid-template-columns: 1fr;
  }

  .evaluation-question {
    gap: 0.75rem;
  }

  .evaluation-actions {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .evaluation-record-navigation,
  .evaluation-primary-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .evaluation-primary-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

.time-registration-shell {
  width: min(1440px, 100%);
  min-height: calc(100vh - 4rem);
  overflow: hidden;
  border: 1px solid rgba(50, 50, 50, 0.1);
  border-radius: 24px;
  background: #f7f7f5;
  box-shadow: var(--shadow);
}

.time-registration-header {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1.25rem, 3vw, 2.5rem);
  border-top: 5px solid var(--brand-red);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.time-registration-brand {
  display: flex;
  align-items: center;
  gap: 1.3rem;
  color: var(--brand-charcoal);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.time-registration-brand img {
  width: 168px;
  height: auto;
}

.time-registration-brand span {
  padding-left: 1.3rem;
  border-left: 1px solid var(--line);
}

.time-registration-user,
.time-registration-user form {
  display: flex;
  align-items: center;
}

.time-registration-user {
  gap: 1rem;
  color: var(--brand-charcoal);
  font-size: 0.85rem;
  font-weight: 650;
}

.time-registration-user button,
.time-registration-back {
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}

.time-registration-user button:hover,
.time-registration-back:hover {
  border-color: var(--brand-red);
  color: var(--brand-red);
}

.time-registration-user .language-selector {
  margin-right: 0.25rem;
}

.time-registration-user .language-selector button {
  min-width: 2rem;
  height: 1.85rem;
  padding: 0 0.35rem;
  border: 0;
  font-size: 0.62rem;
}

.time-registration-user .language-selector button.active {
  color: var(--white);
}

.time-registration-alert {
  margin: 1.25rem 1.25rem 0;
  padding: 0.9rem 1rem;
  border: 1px solid #efb8bb;
  border-radius: 12px;
  color: #8f181e;
  background: #fff0f1;
  font-weight: 650;
}

.time-registration-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.74fr) minmax(520px, 1.26fr);
}

.time-registration-grid.is-professor {
  display: block;
}

.professor-manual-action {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  padding: 1.25rem clamp(1.5rem, 3.5vw, 3.5rem) 0;
}

.professor-manual-action .manual-action {
  width: auto;
  margin: 0;
  padding: 0 1.25rem;
}

.clock-panel {
  position: relative;
  display: flex;
  min-height: calc(100vh - 12rem);
  flex-direction: column;
  padding: clamp(2rem, 4.5vw, 4.5rem);
  border-right: 1px solid var(--line);
  background:
    radial-gradient(circle at 90% 15%, rgba(228, 36, 44, 0.07), transparent 30%),
    var(--white);
}

.clock-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.section-kicker {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.105em;
  text-transform: uppercase;
}

.clock-heading h1 {
  margin: 0;
  color: var(--brand-charcoal);
  font-size: clamp(2rem, 4vw, 3.8rem);
  font-weight: 820;
  letter-spacing: -0.045em;
  line-height: 1;
}

.status-dot {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  margin-top: 0.35rem;
  border: 4px solid #f1d9da;
  border-radius: 50%;
  background: var(--brand-red);
  box-sizing: content-box;
}

.is-working .status-dot {
  border-color: #d9eee4;
  background: #198754;
  box-shadow: 0 0 0 6px rgba(25, 135, 84, 0.05);
}

.live-counter {
  display: flex;
  flex-direction: column;
  margin: clamp(2.5rem, 7vh, 5.5rem) 0 clamp(2rem, 5vh, 4rem);
}

.live-counter strong {
  color: var(--brand-charcoal);
  font-size: clamp(3.7rem, 7vw, 7.2rem);
  font-variant-numeric: tabular-nums;
  font-weight: 830;
  letter-spacing: -0.065em;
  line-height: 0.9;
}

.live-counter span {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.live-counter.is-idle strong {
  color: #686868;
}

.primary-clock-form {
  margin-top: auto;
}

.clock-action {
  display: flex;
  width: 100%;
  min-height: 94px;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 1rem 2rem;
  border: 0;
  border-radius: 18px;
  color: var(--white);
  background: var(--brand-red);
  box-shadow: 0 14px 30px rgba(228, 36, 44, 0.24);
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.clock-action:hover {
  transform: translateY(-2px);
  background: var(--brand-red-dark);
  box-shadow: 0 18px 34px rgba(228, 36, 44, 0.3);
}

.clock-action:focus-visible,
.manual-action:focus-visible,
.mark-row:focus-visible,
.month-arrow:focus-visible {
  outline: 3px solid rgba(228, 36, 44, 0.28);
  outline-offset: 3px;
}

.clock-action-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.9rem;
}

.clock-action > span:last-child {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
}

.clock-action strong {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}

.clock-action small {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.clock-out {
  background: #343434;
  box-shadow: 0 14px 30px rgba(30, 30, 30, 0.2);
}

.clock-out:hover {
  background: #1f1f1f;
  box-shadow: 0 18px 34px rgba(30, 30, 30, 0.25);
}

.manual-action {
  width: 100%;
  min-height: 50px;
  margin-top: 0.85rem;
  border: 1px solid #d6d6d6;
  border-radius: 14px;
  color: var(--brand-charcoal);
  background: var(--white);
  font-weight: 730;
}

.manual-action:hover {
  border-color: var(--brand-red);
  color: var(--brand-red);
  background: var(--brand-red-soft);
}

.manual-action span {
  margin-right: 0.35rem;
  color: var(--brand-red);
  font-size: 1.2rem;
}

.today-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.today-summary strong {
  color: var(--brand-charcoal);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.history-panel {
  min-width: 0;
  padding: clamp(1.5rem, 3.5vw, 3.5rem);
}

.month-navigation {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.month-navigation h2 {
  margin: 0;
  color: var(--brand-charcoal);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 810;
  letter-spacing: -0.035em;
  text-transform: capitalize;
}

.month-arrow {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--brand-charcoal);
  background: var(--white);
  font-size: 2rem;
  line-height: 1;
  text-decoration: none;
}

.month-arrow:hover {
  border-color: var(--brand-red);
  color: var(--brand-red);
}

.month-arrow.is-disabled {
  cursor: default;
  opacity: 0.28;
}

.registration-stat-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr));
  align-items: start;
  gap: 1rem;
  margin: 2rem 0 1.5rem;
}
.registration-period-summary { min-width: 0; }
.registration-period-summary > h3 { margin: 0 0 .5rem; color: var(--brand-charcoal); font-size: .95rem; }
.registration-stat-range { margin: 0 0 .5rem; color: var(--muted); font-size: .75rem; }
.registration-average-note { display: block; margin: .4rem 0 0; color: var(--muted); font-size: .72rem; line-height: 1.4; }
.registration-stat-panels .month-stats { margin: 0; }
.registration-stat-panels .month-stats span { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.4; }
@media (min-width: 601px) {
  .registration-stat-panels .month-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.month-stats {
  display: grid;
  margin: 2rem 0 1.5rem;
  grid-template-columns: 1.5fr 1fr 0.75fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}

.month-stats > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.15rem 1.3rem;
  border-left: 1px solid var(--line);
}

.month-stats > div:first-child {
  border-left: 0;
}

.month-stats span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.month-stats strong {
  color: var(--brand-charcoal);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-variant-numeric: tabular-nums;
}

.stat-primary strong {
  color: var(--brand-red);
}

.day-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.time-week-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}

.time-week-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)) auto;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.2rem;
  background: #fbfbfa;
  cursor: pointer;
  list-style: none;
}

.time-week-summary::-webkit-details-marker { display: none; }
.time-week-summary::after { content: "›"; color: var(--muted); font-size: 1.6rem; line-height: 1; }
.time-week-group[open] > .time-week-summary::after { transform: rotate(90deg); }
.time-week-summary:hover { background: #f4f4f1; }
.time-week-summary:focus-visible { outline: 2px solid var(--brand-red); outline-offset: -3px; }
.time-week-range { color: var(--brand-charcoal); font-size: 0.9rem; font-weight: 750; }
.time-week-stat { display: flex; min-width: 0; flex-direction: column; gap: 0.3rem; }
.time-week-stat > span { color: var(--muted); font-size: 0.7rem; }
.time-week-stat > strong { color: var(--brand-charcoal); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.time-week-stat.is-total > strong { color: var(--brand-red); }
.time-week-days { display: flex; flex-direction: column; gap: 0.75rem; padding: 1rem; border-top: 1px solid var(--line); }

@media (max-width: 600px) {
  .time-week-summary { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 0.8rem 0.5rem; padding: 0.85rem; }
  .time-week-range { grid-column: 1 / 4; }
  .time-week-summary::after { grid-column: 4; grid-row: 1; }
  .time-week-stat > strong { font-size: 0.8rem; }
  .time-week-days { padding: 0.6rem; }
}

.day-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}

.day-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid #eeeeec;
  background: #fbfbfa;
}

.day-card > header div {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}

.day-card > header div strong {
  color: var(--brand-charcoal);
  font-size: 0.76rem;
  font-weight: 830;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.day-card > header div span {
  color: var(--muted);
  font-size: 0.8rem;
}

.day-total {
  color: var(--brand-charcoal);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.correction-mark-type {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfbfa;
}
.correction-mark-type > span { color: var(--muted); font-size: 0.85rem; }
.correction-mark-type > strong { color: var(--brand-charcoal); }

.mark-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mark-row {
  display: grid;
  min-height: 62px;
  align-items: center;
  grid-template-columns: auto 1fr auto auto;
  gap: 0.65rem;
  padding: 0.8rem 1.15rem;
  border: 0;
  border-top: 1px solid #f0f0ee;
  color: var(--brand-charcoal);
  background: var(--white);
  text-align: left;
}

.mark-row:nth-child(-n + 2) {
  border-top: 0;
}

.mark-row:nth-child(even) {
  border-left: 1px solid #f0f0ee;
}

.mark-row:hover {
  background: #fff8f8;
}

.mark-symbol {
  width: 9px;
  height: 9px;
  border: 2px solid var(--brand-red);
  border-radius: 50%;
}

.mark-symbol.exit {
  border-color: #686868;
  border-radius: 2px;
}

.mark-kind {
  color: var(--muted);
  font-size: 0.78rem;
}

.mark-row > strong {
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.mark-badge {
  padding: 0.18rem 0.4rem;
  border-radius: 999px;
  color: #795b10;
  background: #fff4d3;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mark-badge.corrected {
  color: #75407a;
  background: #f8eafa;
}

.edit-mark-label {
  display: none;
  color: var(--brand-red);
  font-size: 0.68rem;
  font-weight: 750;
}

.mark-row:hover .edit-mark-label {
  display: inline;
}

.empty-history {
  padding: clamp(3rem, 8vw, 6rem) 2rem;
  border: 1px dashed #cececa;
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}

.empty-history > span {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--brand-red);
  font-size: 2.5rem;
}

.empty-history h3 {
  margin: 0 0 0.5rem;
  color: var(--brand-charcoal);
  font-size: 1.25rem;
}

.empty-history p {
  margin: 0;
  font-size: 0.85rem;
}

.time-modal {
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(30, 30, 30, 0.22);
}

.time-modal .modal-header {
  align-items: flex-start;
  padding: 1.5rem 1.5rem 1.1rem;
  border-top: 5px solid var(--brand-red);
  border-bottom: 1px solid var(--line);
}

.time-modal .modal-title {
  color: var(--brand-charcoal);
  font-size: 1.7rem;
  font-weight: 810;
  letter-spacing: -0.03em;
}

.time-modal .modal-body {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.automatic-preview {
  margin-top: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.automatic-preview h3 {
  margin: 0;
  padding: 0.8rem 1rem;
  color: var(--brand-charcoal);
  background: var(--panel-gray);
  font-size: 0.85rem;
  font-weight: 800;
}

.automatic-preview > p {
  margin: 0;
  padding: 1rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.automatic-preview [hidden] {
  display: none;
}

.automatic-preview-list {
  max-height: clamp(96px, 25dvh, 220px);
  overflow-y: auto;
}

.automatic-preview-task {
  display: grid;
  align-items: center;
  padding: 0.75rem 1rem;
  grid-template-columns: 6.7rem minmax(0, 1fr) auto;
  gap: 0.85rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}

.automatic-preview-task time,
.automatic-edit-time {
  color: var(--brand-red-dark);
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  white-space: nowrap;
}

.automatic-edit-time {
  padding: 0.35rem 0;
  border: 0;
  background: transparent;
  text-align: left;
  text-decoration: underline dotted;
  cursor: pointer;
}

.automatic-edit-time:focus-visible {
  outline: 2px solid var(--brand-red-dark);
  outline-offset: 3px;
}

.automatic-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
}

.automatic-preview-task.automatic-interval-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

.automatic-interval-row label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.25rem;
}

.automatic-interval-row input {
  width: 100%;
  min-width: 0;
}

[data-automatic-invalid] {
  color: var(--brand-red-dark);
}

@media (max-width: 550px) {
  .automatic-preview-task.automatic-interval-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .automatic-interval-row > button {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .automatic-preview-task .automatic-edit-time {
    grid-column: 1 / -1;
  }
}

.automatic-preview-task > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.automatic-preview-task strong,
.automatic-preview-task small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.automatic-preview-task small {
  color: var(--muted);
}

.automatic-preview-registered {
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  color: #235b36;
  background: #effaf1;
  font-size: 0.68rem;
  font-weight: 750;
}

.automatic-preview-totals {
  display: grid;
  padding: 0.9rem 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  border-top: 1px solid var(--line);
  background: var(--panel-gray);
}

.automatic-preview-totals > div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.automatic-preview-totals span {
  color: var(--muted);
  font-size: 0.76rem;
}

.automatic-preview-totals strong {
  color: var(--brand-charcoal);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.automatic-preview-totals > div:last-child strong {
  color: var(--brand-red-dark);
}

.time-modal .modal-body > label,
.mark-type-selector legend {
  margin: 1.1rem 0 0.45rem;
  color: var(--brand-charcoal);
  font-size: 0.76rem;
  font-weight: 760;
}

.time-modal input[type="datetime-local"],
.time-modal input[type="date"],
.time-modal input[type="time"],
.time-modal textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #d5d5d5;
  border-radius: 11px;
  outline: 0;
  color: var(--brand-charcoal);
  background: #fafafa;
}

.time-modal input[type="datetime-local"]:focus,
.time-modal input[type="date"]:focus,
.time-modal input[type="time"]:focus,
.time-modal textarea:focus {
  border-color: var(--brand-red);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(228, 36, 44, 0.1);
}

.mark-type-selector {
  display: grid;
  margin: 0;
  padding: 0;
  grid-template-columns: 1fr 1fr;
  border: 0;
}

.mark-type-selector legend {
  grid-column: 1 / -1;
  margin-top: 0;
}

.mark-type-selector input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mark-type-selector label {
  display: grid;
  min-height: 48px;
  margin: 0;
  place-items: center;
  border: 1px solid #d5d5d5;
  color: var(--muted);
  background: #fafafa;
  font-size: 0.82rem;
  font-weight: 750;
}

.mark-type-selector label:first-of-type {
  border-radius: 11px 0 0 11px;
}

.mark-type-selector label:last-of-type {
  border-left: 0;
  border-radius: 0 11px 11px 0;
}

.mark-type-selector input:checked + label {
  border-color: var(--brand-red);
  color: var(--brand-red);
  background: var(--brand-red-soft);
}

.mark-type-selector input:focus-visible + label {
  outline: 3px solid rgba(228, 36, 44, 0.2);
  outline-offset: 2px;
}

.audit-note {
  margin: 1rem 0 0;
  padding: 0.8rem 0.9rem;
  border-radius: 10px;
  color: #6d632f;
  background: #fff9dc;
  font-size: 0.75rem;
  line-height: 1.5;
}

.time-modal .modal-footer {
  display: grid;
  padding: 1rem 1.5rem 1.5rem;
  grid-template-columns: 1fr 1.35fr;
  border-top: 0;
}

.secondary-modal-action,
.primary-modal-action {
  min-height: 48px;
  border-radius: 999px;
  font-weight: 750;
}

.secondary-modal-action {
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--white);
}

.primary-modal-action {
  border: 0;
  color: var(--white);
  background: var(--brand-red);
}

.primary-modal-action:hover {
  background: var(--brand-red-dark);
}

#automaticModal .modal-dialog,
#absenceModal .modal-dialog {
  height: calc(100dvh - 1.5rem);
  max-height: calc(100dvh - 1.5rem);
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

#automaticModal .time-modal > form,
#absenceModal .time-modal > form {
  display: flex;
  min-height: 0;
  max-height: calc(100dvh - 1.5rem);
  flex-direction: column;
}

#automaticModal .modal-header,
#automaticModal .modal-footer,
#absenceModal .modal-header,
#absenceModal .modal-footer {
  flex: 0 0 auto;
}

#automaticModal .modal-header {
  padding: 0.8rem 1rem 0.65rem;
}

#automaticModal .section-kicker {
  margin-bottom: 0.3rem;
}

#automaticModal .modal-title {
  font-size: 1.3rem;
}

#automaticModal .modal-body,
#absenceModal .modal-body {
  min-height: 0;
  padding: 0.75rem 1rem;
  overflow-y: auto;
}

#absenceModal .modal-body > * {
  flex-shrink: 0;
}

#automaticModal .modal-body > p {
  margin-bottom: 0.4rem;
  font-size: 0.83rem;
}

#automaticModal .modal-body > label {
  margin: 0.35rem 0 0.3rem;
}

.automatic-date-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.automatic-date-row label {
  margin: 0;
  color: var(--brand-charcoal);
  font-size: 0.76rem;
  font-weight: 760;
}

.automatic-date-row input,
.automatic-date-row button {
  width: min(13rem, 58%);
}

.automatic-date-row [hidden],
.automatic-calendar[hidden] {
  display: none !important;
}

.automatic-date-row button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.65rem;
  border: 1px solid #d5d5d5;
  border-radius: 8px;
  color: var(--brand-charcoal);
  background: var(--white);
  font-size: 0.82rem;
}

.automatic-date-row button:hover,
.automatic-date-row button[aria-expanded="true"] {
  border-color: var(--brand-red);
}

.automatic-calendar {
  max-height: min(45dvh, 20rem);
  margin-top: 0.5rem;
  padding: 0.55rem;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}

.automatic-calendar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  color: var(--brand-charcoal);
  font-size: 0.85rem;
}

.automatic-calendar-heading button {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: var(--panel-gray);
  font-size: 1.25rem;
}

.automatic-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.1rem;
  text-align: center;
}

.automatic-calendar-grid span,
.automatic-calendar-grid button {
  display: grid;
  min-height: 2rem;
  place-items: center;
  font-size: 0.78rem;
}

.automatic-calendar-grid span {
  color: var(--muted);
}

.automatic-calendar-grid button {
  border: 0;
  border-radius: 8px;
  color: var(--brand-charcoal);
  background: transparent;
}

.automatic-calendar-grid button:hover:not(:disabled) {
  background: var(--brand-red-soft);
}

.automatic-calendar-grid button.is-registered {
  font-weight: 900;
  text-decoration: underline;
  text-decoration-color: var(--brand-red);
  text-underline-offset: 0.2rem;
}

.automatic-calendar-grid button[aria-pressed="true"] {
  color: var(--white);
  background: var(--brand-red);
}

.automatic-calendar-grid button:disabled,
.automatic-calendar-heading button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.automatic-calendar > p {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.7rem;
}

#automaticModal input[type="date"] {
  min-height: 2.4rem;
  padding: 0.35rem 0.6rem;
}

#automaticModal .automatic-preview {
  margin-top: 0.75rem;
}

#automaticModal .automatic-preview h3 {
  padding: 0.55rem 0.75rem;
}

#automaticModal .automatic-preview-task {
  padding: 0.45rem 0.75rem;
}

#automaticModal .automatic-preview-totals {
  padding: 0.55rem 0.75rem;
}

#automaticModal .modal-footer {
  padding: 0.5rem 1rem 0.75rem;
}

#automaticModal .modal-footer button {
  min-height: 2.5rem;
}

@media (max-width: 550px) {
  .automatic-preview-task {
    grid-template-columns: 1fr auto;
    gap: 0.3rem 0.65rem;
  }

  .automatic-preview-task time {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .professor-manual-action {
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .professor-manual-action .manual-action {
    min-width: 0;
    padding: 0.5rem 0.65rem;
    font-size: 0.82rem;
  }

  #automaticModal .modal-dialog,
  #absenceModal .modal-dialog {
    height: 100dvh;
    min-height: 0;
    max-height: 100dvh;
    margin: 0;
  }

  #automaticModal .time-modal > form,
  #absenceModal .time-modal > form {
    max-height: 100dvh;
  }

  .time-registration-shell {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .time-registration-header {
    position: sticky;
    z-index: 20;
    top: 0;
    min-height: 67px;
    padding: 0.75rem 1rem;
  }

  .time-registration-brand img {
    width: 136px;
  }

  .time-registration-brand span,
  .time-registration-user > span,
  .time-registration-back {
    display: none;
  }

  .time-registration-user button {
    min-height: 40px;
  }

  .time-registration-user {
    gap: 0.45rem;
  }

  .time-registration-user .language-selector {
    margin-right: 0;
  }

  .time-registration-user .language-selector button {
    min-width: 1.75rem;
    min-height: 1.75rem;
    padding: 0 0.25rem;
  }

  .time-registration-grid {
    display: block;
  }

  .clock-panel {
    min-height: auto;
    padding: 2rem 1.25rem 1.5rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .clock-heading h1 {
    font-size: clamp(2.15rem, 10vw, 3rem);
  }

  .live-counter {
    margin: 2.5rem 0;
    text-align: center;
  }

  .live-counter strong {
    font-size: clamp(4rem, 19vw, 5.6rem);
  }

  .clock-action {
    min-height: 82px;
    border-radius: 16px;
  }

  .clock-action > span:last-child {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
  }

  .history-panel {
    padding: 1.5rem 1rem 5rem;
  }

  .month-navigation {
    grid-template-columns: 44px 1fr 44px;
    gap: 0.5rem;
  }

  .month-arrow {
    width: 44px;
    height: 44px;
  }

  .month-stats {
    grid-template-columns: 1fr 1fr;
  }

  .month-stats > div {
    border-left: 1px solid var(--line);
  }

  .month-stats > div:nth-child(odd) {
    border-left: 0;
  }

  .month-stats > div:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    text-align: center;
  }

  .mark-list {
    display: block;
  }

  .mark-row,
  .mark-row:nth-child(-n + 2) {
    width: 100%;
    border-top: 1px solid #f0f0ee;
    border-left: 0;
  }

  .mark-row:first-child {
    border-top: 0;
  }

  .edit-mark-label {
    display: inline;
  }

  .time-modal {
    border-radius: 20px 20px 0 0;
  }

  .time-registration-modal .modal-dialog {
    min-height: 100%;
    align-items: flex-end;
    margin: 0;
  }

  .time-registration-modal .modal-dialog .modal-content {
    width: 100%;
  }
}

@media (min-width: 821px) and (max-width: 1080px) {
  .time-registration-grid {
    grid-template-columns: minmax(320px, 0.85fr) minmax(460px, 1.15fr);
  }

  .clock-panel {
    padding: 2.5rem;
  }

  .mark-list {
    display: block;
  }

  .mark-row,
  .mark-row:nth-child(-n + 2) {
    width: 100%;
    border-top: 1px solid #f0f0ee;
    border-left: 0;
  }

  .mark-row:first-child {
    border-top: 0;
  }
}
.monthly-time-chart {
  margin: 0 0 1.5rem;
  padding: 1.2rem;
  border: 1px solid #e4e8ef;
  border-radius: 18px;
  background: #fff;
}
.time-registration-evolution { margin-top: 2rem; padding: 0 clamp(1rem, 3.5vw, 3.5rem) 1.5rem; }
.chart-month-navigation { margin-bottom: 1.5rem; }
.time-registration-selector { margin-bottom: 1.5rem; }
.time-registration-viewing { color: #475569; margin-bottom: 1rem; }
.school-year-selector { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.school-year-selector label { font-weight: 600; }
.school-year-selector select { max-width: 100%; padding: .6rem; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; }
.chart-theoretical-bar { fill: #cbd5e1; stroke: #64748b; }
.chart-actual-bar { fill: #2563eb; }
.school-year-time-chart .monthly-chart-legend span::before { width: .8rem; height: .8rem; border: 0; background: currentColor; }
.monthly-chart-legend .balance { color: #b45309; }
.school-year-time-chart .monthly-chart-legend .balance::before { width: 1.5rem; height: 0; border-top: 3px solid currentColor; background: transparent; }
.chart-balance-line { fill: none; stroke: #b45309; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; pointer-events: none; }
.chart-balance-point { fill: #b45309; pointer-events: none; }
.chart-balance-zero { stroke: #b45309; stroke-width: 1; stroke-dasharray: 4 4; opacity: .45; }
.mark-row:disabled { cursor: default; opacity: 1; }
.monthly-chart-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.monthly-chart-heading h3 { margin: 0; font-size: 1.1rem; }
.monthly-chart-legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .85rem; }
.monthly-chart-legend span::before { content: ""; display: inline-block; width: 1.5rem; margin-right: .4rem; vertical-align: middle; border-top: 3px solid; }
.monthly-chart-legend .theoretical { color: #64748b; }
.monthly-chart-legend .theoretical::before { border-top-style: dashed; }
.monthly-chart-legend .actual { color: #2563eb; }
.monthly-chart-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1.2rem 0; }
.monthly-chart-stats span { display: block; color: #64748b; font-size: .8rem; }
.monthly-chart-stats strong { display: block; margin-top: .3rem; font-size: 1rem; }
.monthly-chart-stats .negative { color: #b42318; }
.monthly-chart-stats .positive { color: #15803d; }
.monthly-chart-note, .monthly-chart-detail { color: #64748b; font-size: .8rem; margin: .6rem 0; }
.monthly-chart-detail { min-height: 2.5em; color: #334155; }
.monthly-chart-notice { padding: .7rem; border-radius: 8px; background: #fff7e6; color: #854d0e; font-size: .85rem; }
.monthly-chart-scroll { overflow-x: auto; }
.monthly-chart-svg { width: 100%; min-width: 520px; height: auto; display: block; }
.chart-grid-line { stroke: #e4e8ef; stroke-width: 1; }
.chart-axis-text { font-size: 12px; fill: #64748b; }
.chart-axis-title { font-size: 13px; fill: #475569; }
.chart-theoretical-line, .chart-actual-line { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart-theoretical-line { stroke: #64748b; stroke-dasharray: 7 5; }
.chart-actual-line { stroke: #2563eb; }
.chart-actual-point { fill: #2563eb; }
.chart-day-hit { fill: transparent; cursor: pointer; }
.chart-day-hit.is-selected, .chart-day-hit:focus { fill: #2563eb; fill-opacity: .07; outline: none; stroke: #2563eb; stroke-opacity: .4; }
.monthly-chart-table summary { cursor: pointer; color: #475569; font-size: .85rem; }
.monthly-chart-table table { width: 100%; margin-top: .7rem; font-size: .85rem; }
.monthly-chart-table th, .monthly-chart-table td { text-align: left; padding: .5rem; border-bottom: 1px solid #e4e8ef; }
@media (max-width: 600px) {
  .monthly-time-chart { padding: .8rem; }
  .monthly-chart-stats { grid-template-columns: 1fr; gap: .7rem; }
  .monthly-chart-stats > div { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
}
