/* =========================================================
   NoiseNotes calm/minimal visual refresh
   ---------------------------------------------------------
   Loaded last so existing page markup remains unchanged.
   ========================================================= */

:root {
  --bg: #fafafa;
  --text: #171717;
  --card: #ffffff;
  --border: #e5e7eb;
  --muted: #667085;
  --muted-2: #98a2b3;
  --accent: #0f9fa8;
  --accent-strong: #08757c;
  --focus: #0f9fa8;
  --radius: 4px;
  --shadow: none;
  --nn-shell-bg: #fafafa;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body,
button,
input,
select,
textarea {
  font-family: inherit;
}

body.nn-has-app-shell {
  background: var(--nn-shell-bg);
  color: var(--text);
}

/* App shell */
.nn-app-shell {
  grid-template-columns: 224px minmax(0, 1fr);
  background: var(--nn-shell-bg);
}

.nn-app-sidebar {
  width: 224px;
  background: var(--nn-sidebar-bg);
  border-right: 1px solid var(--nn-sidebar-border);
  box-shadow: none;
}

.nn-app-sidebar__brand {
  min-height: 72px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--nn-sidebar-border);
}

.nn-app-sidebar__logo {
  gap: 10px;
  color: var(--nn-sidebar-text);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

.nn-app-sidebar__logo:hover { color: var(--nn-sidebar-text); }
.nn-app-sidebar__logo img { width: 28px; height: 28px; object-fit: contain; }

.nn-app-sidebar__nav {
  gap: 2px;
  padding: 18px 12px;
}

.nn-app-sidebar__footer {
  padding: 12px;
  border-top: 1px solid var(--nn-sidebar-border);
}

.nn-app-sidebar__separator {
  height: 1px;
  margin: 12px 8px;
  background: var(--nn-sidebar-border);
}

.nn-app-sidebar__link {
  min-height: 40px;
  gap: 11px;
  padding: 0 12px;
  border-radius: 0;
  color: var(--nn-sidebar-text);
  font-size: .91rem;
  font-weight: 500;
  transition: background .14s ease, color .14s ease;
}

.nn-app-sidebar__link i {
  width: 18px;
  flex-basis: 18px;
  color: var(--nn-sidebar-text);
  font-size: .92rem;
}

.nn-app-sidebar__link:hover {
  background: var(--nn-sidebar-hover-bg);
  color: var(--nn-sidebar-text);
}

.nn-app-sidebar__link:hover i { color: var(--nn-sidebar-text); }

.nn-app-sidebar__link.is-active,
.nn-app-sidebar__toggle.is-active {
  background: var(--nn-sidebar-active-bg);
  color: var(--nn-sidebar-active-text);
  font-weight: 650;
}

.nn-app-sidebar__link.is-active::before {
  left: -12px;
  top: 5px;
  bottom: 5px;
  width: 3px;
  border-radius: 0;
  background: var(--nn-color-accent);
}

.nn-app-sidebar__link.is-active i { color: var(--nn-sidebar-active-text); }
.nn-app-sidebar__sublink { border-radius: 0 !important; }

.nn-app-main {
  max-width: 1500px;
  padding: 30px 36px 48px;
}

/* General surfaces and controls */
.card,
.nn-dashboard-card,
.nn-settings-panel,
.nn-settings-hub__hero,
.nn-students-card,
.nn-report-card,
.nn-tool-card {
  border-color: var(--border);
  border-radius: 0;
  box-shadow: none;
}

.btn,
button,
input,
select,
textarea,
.nn-row-edit,
.nn-row-icon,
.nn-date-arrow,
.nn-date-display-wrap,
.nn-date-today {
  border-radius: var(--radius);
}

.btn,
button {
  box-shadow: none;
}

.btn--primary,
.nn-primary-button {
  background: #101828;
  border-color: #101828;
  color: #fff;
}

.btn--primary:hover,
.nn-primary-button:hover {
  background: #1d2939;
  border-color: #1d2939;
}

/* Dashboard */
.nn-teacher-v2 {
  display: grid;
  gap: 28px;
}

.nn-teacher-hero {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.nn-teacher-hero::before,
.nn-teacher-hero::after { display: none; }

.nn-teacher-hero__copy h1 {
  margin: 0;
  color: #101828;
  font-size: clamp(1.75rem, 2.4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -.04em;
}

.nn-teacher-hero__copy p {
  margin: 7px 0 0;
  color: #667085;
  font-size: 1rem;
}

.nn-teacher-hero__profile { display: none; }

.nn-dashboard-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--border);
  background: #fff;
}

.nn-stat-card {
  position: relative;
  display: block;
  min-height: 132px;
  padding: 20px;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  transition: background .14s ease;
}

.nn-stat-card:last-child { border-right: 0; }

.nn-stat-card:hover,
.nn-stat-card:focus-visible {
  transform: none;
  border-color: var(--border);
  background: #fafafa;
  box-shadow: none;
}

.nn-stat-card__icon {
  position: absolute;
  top: 20px;
  right: 20px;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: #667085;
  font-size: .95rem;
}

.nn-stat-card__label {
  display: block;
  padding-right: 28px;
  color: #344054;
  font-size: .83rem;
  font-weight: 500;
}

.nn-stat-card strong {
  display: block;
  margin-top: 12px;
  color: #101828;
  font-size: clamp(1.65rem, 2vw, 2rem);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: 1;
}

.nn-stat-card__link {
  display: block;
  margin-top: 11px;
  color: #667085;
  font-size: .78rem;
  font-weight: 400;
}

.nn-stat-card__link i { display: none; }

.nn-dashboard-card {
  border: 0;
  background: transparent;
}

.nn-dashboard-card__head {
  min-height: 48px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--border);
}

.nn-dashboard-card__titlewrap { gap: 0; }
.nn-dashboard-card__icon { display: none; }

.nn-dashboard-card h2 {
  color: #101828;
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -.025em;
}

.nn-dashboard-card p { color: #667085; }

.nn-dashboard-schedule {
  border: 0;
}

.nn-dashboard-schedule__head {
  background: transparent;
  color: #101828;
}

.nn-dashboard-schedule__button {
  min-height: 36px;
  border-color: #d0d5dd;
  border-radius: var(--radius);
  background: #fff;
  color: #344054;
}

.nn-dashboard-table-wrap {
  padding: 0;
  overflow-x: auto;
}

.nn-dashboard-table th {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  color: #667085;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.nn-dashboard-table td {
  padding: 14px 10px;
  border-bottom: 1px solid #eef0f2;
}

.nn-dashboard-table tbody tr:hover { background: #fafafa; }
.nn-dashboard-table tbody tr.is-now { background: #f0fafa; box-shadow: inset 3px 0 0 var(--accent); }

.nn-dashboard-table__time {
  color: #344054;
  font-size: .9rem;
  font-weight: 550;
}

.nn-dashboard-table__student .nn-student-avatar {
  width: 32px;
  height: 32px;
  margin-right: 10px;
  border-radius: 50%;
  background: #eef7f7;
  color: #345b5e;
  font-size: .72rem;
  font-weight: 600;
}

.nn-dashboard-studentText a,
.nn-dashboard-studentText strong {
  color: #101828;
  font-size: .92rem;
  font-weight: 550;
}

.nn-dashboard-studentText small {
  color: #667085;
  font-size: .78rem;
}

.nn-attendance-select {
  min-height: 32px;
  border-radius: var(--radius);
  font-size: .8rem;
}

.nn-dashboard-schedule .nn-school-day-banner {
  margin: 12px 0 14px;
  border-radius: 0;
  background: #f9fafb;
}

/* Tables throughout the app */
table { border-radius: 0; }
.nn-table,
.nn-invoicing-table,
.nn-students-table { border-collapse: collapse; }

.nn-table th,
.nn-invoicing-table th,
.nn-students-table th {
  background: transparent;
  color: #667085;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.nn-table tbody tr:hover,
.nn-invoicing-table tbody tr:hover,
.nn-students-table tbody tr:hover { background: #fafafa; }

/* Responsive */
@media (max-width: 1260px) {
  .nn-dashboard-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nn-stat-card:nth-child(3) { border-right: 0; }
  .nn-stat-card:nth-child(-n+3) { border-bottom: 1px solid var(--border); }
}

@media (max-width: 1180px) and (min-width: 768px) {
  .nn-app-shell { grid-template-columns: 72px minmax(0, 1fr); }
  .nn-app-sidebar { width: 72px; }
}

@media (max-width: 767px) {
  .nn-app-main { padding: 18px 16px 32px; }
  .nn-dashboard-stats { grid-template-columns: 1fr 1fr; }
  .nn-stat-card { min-height: 116px; border-bottom: 1px solid var(--border); }
  .nn-stat-card:nth-child(odd) { border-right: 1px solid var(--border); }
  .nn-stat-card:nth-child(even) { border-right: 0; }
  .nn-stat-card:last-child { border-bottom: 0; }
}

/* =========================================================
   Teacher dashboard refinements — v0.3.1
   ========================================================= */

/* Keep the dashboard focused on today's work. */
.nn-teacher-v2 .nn-dashboard-actions {
  display: none;
}

/* School-day information should read as metadata, not a banner. */
.nn-dashboard-schedule .nn-school-day-banner,
.nn-dashboard-schedule .nn-school-day-banner.is-open,
.nn-dashboard-schedule .nn-school-day-banner.is-closed,
.nn-dashboard-schedule .nn-school-day-banner.is-out_of_term,
.nn-dashboard-schedule .nn-school-day-banner.is-no_school {
  margin: 10px 0 14px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
}

.nn-dashboard-schedule .nn-school-day-banner strong,
.nn-dashboard-schedule .nn-school-day-banner.is-closed strong {
  color: var(--text);
}

/* One clean row per lesson: semantic six-column dashboard layout. */
.nn-dashboard-table {
  table-layout: fixed;
}

.nn-dashboard-table__time {
  width: 9%;
}

.nn-dashboard-table__student {
  width: 30%;
}

.nn-dashboard-table__year,
.nn-dashboard-table__yearHead {
  width: 14%;
}

.nn-dashboard-table__attendance {
  width: 18%;
}

.nn-dashboard-table__practice,
.nn-dashboard-table__practiceHead {
  width: 7%;
}

.nn-dashboard-table__actions,
.nn-dashboard-table__actionsHead {
  width: 22%;
}

.nn-dashboard-table__student {
  display: table-cell;
  min-width: 0;
  vertical-align: middle;
}

.nn-dashboard-studentText {
  display: block;
  min-width: 0;
}

.nn-dashboard-studentText a,
.nn-dashboard-studentText strong {
  display: inline;
  color: var(--text);
  font-size: .92rem;
  font-weight: 450;
  line-height: 1.35;
}

.nn-dashboard-table__year {
  color: var(--muted);
  font-size: .86rem;
  font-weight: 400;
  white-space: nowrap;
}

.nn-dashboard-table .nn-student-avatar,
.nn-dashboard-table .nn-kit-badge,
.nn-dashboard-table .nn-dashboard-studentText small {
  display: none !important;
}

/* Make the entire visible date control reliably open the native picker. */
.nn-date-display-wrap {
  cursor: pointer;
  user-select: none;
}

.nn-date-display-wrap:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--focus) 45%, transparent);
  outline-offset: 2px;
}

.nn-date-display-wrap #nn-date-input {
  width: 1px;
  height: 1px;
  inset: auto;
  right: 0;
  bottom: 0;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 767px) {
  .nn-dashboard-table {
    table-layout: auto;
  }

  .nn-dashboard-table__year {
    white-space: normal;
  }
}

/* Sidebar submenu states use the canonical dark navigation tokens. */
.nn-app-sidebar__sublink {
  color: var(--nn-sidebar-muted);
  background: transparent;
  font-weight: 450;
}

.nn-app-sidebar__sublink:hover,
.nn-app-sidebar__sublink:focus-visible {
  color: var(--nn-sidebar-text);
  background: var(--nn-sidebar-hover-bg);
  text-decoration: none;
}

.nn-app-sidebar__sublink.is-active {
  color: var(--nn-sidebar-active-text);
  background: var(--nn-sidebar-active-bg);
  font-weight: 600;
}
