/* ── Notes page ──────────────────────────────────────────────────────────── */

/* Tabs */
.notes-tabs {
  border-bottom: 1px solid var(--border, #e8e4df);
  gap: 4px;
  margin-bottom: 20px;
}

.notes-tabs .nav-link {
  border: none;
  background: none;
  color: var(--stone, #888);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.notes-tabs .nav-link:hover { color: var(--charcoal, #444); }

.notes-tabs .nav-link.active {
  color: var(--ink, #1a1a1a);
  border-bottom-color: var(--accent, #6b8f71);
  background: none;
}

/* Student filter */
.notes-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.notes-filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--stone, #888);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin: 0;
}

.notes-filter-select {
  border: 1px solid var(--border, #e8e4df);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--charcoal, #444);
  background: #fff;
  min-width: 180px;
}

/* Feed */
.notes-feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.notes-entry-student {
  font-size: 12px;
  font-weight: 600;
  color: var(--olive, #6b8f71);
  text-decoration: none;
}

.notes-entry-student:hover { text-decoration: underline; }

/* ── Media tab ───────────────────────────────────────────────────────────── */

.media-storage-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.media-storage-bar-wrap {
  flex: 1;
  max-width: 320px;
  height: 6px;
  background: var(--sand, #f4f1ec);
  border-radius: 6px;
  overflow: hidden;
}

.media-storage-bar {
  height: 100%;
  border-radius: 6px;
  background: var(--accent, #6b8f71);
  transition: width .4s ease, background .3s;
}

.media-storage-bar.warn { background: #e8a838; }
.media-storage-bar.full { background: var(--color-danger, #c0392b); }

.media-storage-label {
  font-size: 12px;
  color: var(--stone, #888);
  white-space: nowrap;
}

.media-filters {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
}

.ml-filter-btn {
  border: none;
  background: var(--sand, #f4f1ec);
  color: var(--charcoal, #444);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.ml-filter-btn:hover { background: var(--stone-light, #e6e1da); }
.ml-filter-btn.active { background: var(--ink, #1a1a1a); color: #fff; }

.media-loading {
  text-align: center;
  padding: 48px 0;
  color: var(--stone, #aaa);
  font-size: 24px;
}

.media-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--stone, #aaa);
  font-size: 14px;
}

.ml-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--stone, #888);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 18px 0 8px;
}

.ml-section-label:first-child { margin-top: 0; }

/* Image grid */
.ml-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}

.ml-image-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--sand, #f4f1ec);
}

.ml-image-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .2s;
}

.ml-image-item:hover img { transform: scale(1.04); }

.ml-image-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
  font-size: 11px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* File / link rows */
.ml-row-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ml-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background .12s;
  min-width: 0;
}

.ml-row:hover { background: var(--sand, #f4f1ec); }

.ml-row-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--sand, #f4f1ec);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--charcoal, #444);
}

.ml-row-body { flex: 1; min-width: 0; }

.ml-row-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink, #1a1a1a);
}

.ml-row-sub {
  display: block;
  font-size: 12px;
  color: var(--stone, #888);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Teacher private note (student profile Notes tab) ────────────────────── */

.teacher-note-block {
  background: #fefce8;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 14px 16px 10px;
  margin-bottom: 20px;
}

.teacher-note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 8px;
}

.teacher-note-status {
  font-size: 11px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: #92400e;
  opacity: 0;
  transition: opacity .3s;
}

.teacher-note-status.visible { opacity: 1; }

.teacher-note-textarea {
  width: 100%;
  min-height: 90px;
  border: none;
  background: transparent;
  resize: vertical;
  font-family: var(--serif, Georgia, serif);
  font-size: 15px;
  line-height: 1.5;
  color: var(--charcoal, #444);
  outline: none;
  padding: 0;
}

.teacher-note-textarea::placeholder { color: #b45309; opacity: .55; }

.teacher-note-meta {
  font-size: 11px;
  color: #b45309;
  margin-top: 6px;
  opacity: .7;
}

.teacher-note-collapsed {
  font-size: 13px;
  color: #b45309;
  opacity: .65;
  cursor: pointer;
  user-select: none;
  padding: 2px 0;
  transition: opacity .15s;
}

.teacher-note-collapsed:hover { opacity: 1; }
