.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: 7px;
  border: 1px solid var(--gold);
  border-radius: 7px;
  color: var(--gold);
  font-size: 16px;
  vertical-align: middle;
}

textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel2);
  color: var(--text);
  font: inherit;
  line-height: 1.5;
}

textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.manual-edit-hint {
  margin: 4px 2px 18px;
}

.observations-card p {
  margin-top: -8px;
}

.login-page {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(5, 7, 11, .88) 0%, rgba(5, 7, 11, .68) 38%, rgba(5, 7, 11, .10) 72%),
    url("wallpaper-eite.webp") center center / cover no-repeat fixed;
}

.login-main {
  width: 100%;
  max-width: none;
  justify-items: start;
  padding-left: clamp(28px, 8vw, 150px);
  padding-right: 28px;
}

.login-card {
  width: min(520px, 100%);
  border-color: rgba(211, 168, 63, .52);
  background: rgba(12, 16, 23, .90);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .48);
  backdrop-filter: blur(9px);
}

.login-logo {
  display: block;
  width: 108px;
  height: 108px;
  margin: 0 0 20px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(211, 168, 63, .45);
}

.login-card h1 {
  margin-bottom: 7px;
}

.login-card form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

@media (max-width: 720px) {
  .login-page {
    background-position: 58% center;
  }

  .login-main {
    justify-items: center;
    padding: 24px;
  }

  .login-card {
    padding: 28px;
  }

  .login-logo {
    width: 88px;
    height: 88px;
  }
}

/* Interface interna — identidade visual EITE */
.sidebar {
  display: flex;
  flex-direction: column;
  width: 278px;
  padding: 24px 18px 18px;
  background: linear-gradient(180deg, #11151d 0%, #171b24 58%, #101319 100%);
  border-right-color: rgba(211, 168, 63, .28);
  box-shadow: 14px 0 40px rgba(0, 0, 0, .16);
}

.with-sidebar {
  margin-left: 278px;
  padding: 42px clamp(24px, 3vw, 52px) 60px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px 22px;
  border-bottom: 1px solid rgba(211, 168, 63, .18);
}

.sidebar-brand img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(211, 168, 63, .45);
}

.sidebar-brand div,
.user-card div {
  display: grid;
  min-width: 0;
}

.sidebar-brand strong {
  font-size: 18px;
  letter-spacing: -.25px;
}

.sidebar-brand span,
.user-card span:not(.user-avatar):not(.profile-badge),
.sidebar-footer > span {
  color: var(--muted);
  font-size: 12px;
}

.user-card {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  margin: 20px 0 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .025);
}

.user-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(211, 168, 63, .65);
  border-radius: 50%;
  background: rgba(211, 168, 63, .1);
  color: #f1d580;
  font-weight: 800;
}

.user-card strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-badge {
  grid-column: 2;
  width: max-content;
  margin-top: 5px;
  padding: 3px 7px;
  border-radius: 20px;
  background: rgba(73, 182, 117, .12);
  color: #7bd89f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .45px;
  text-transform: uppercase;
}

.sidebar nav {
  margin: 22px 0;
}

.nav-label {
  padding: 0 10px 5px;
  color: #777f8e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  border-color: transparent;
  color: #cdd2dc;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  border-color: rgba(211, 168, 63, .3);
  background: rgba(211, 168, 63, .08);
  color: #fff;
}

.sidebar nav a.active {
  box-shadow: inset 3px 0 0 var(--gold);
}

.nav-symbol {
  width: 8px;
  height: 8px;
  border: 1px solid var(--gold);
  border-radius: 2px;
  transform: rotate(45deg);
}

.sidebar-footer {
  display: grid;
  gap: 13px;
  margin-top: auto;
}

.sidebar-footer > span {
  text-align: center;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 25px;
}

.page-header h1 {
  margin: 3px 0 4px;
  letter-spacing: -.8px;
}

.page-header p {
  margin: 0;
}

.eyebrow,
.field-kicker {
  color: #d8b85b;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 1.25px;
}

.secure-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 30px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.secure-status > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(73, 182, 117, .12);
}

.with-sidebar .card {
  border-color: #303847;
  border-radius: 13px;
  background: linear-gradient(145deg, #171c26 0%, #151a23 100%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .08);
}

.with-sidebar .card:hover {
  border-color: #3a4354;
}

.card-heading {
  margin-bottom: 18px;
}

.card-heading > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-heading h2,
.card-heading p {
  margin: 0;
}

.section-index {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(211, 168, 63, .42);
  border-radius: 8px;
  background: rgba(211, 168, 63, .08);
  color: #e2c978;
  font-size: 11px;
  font-weight: 850;
}

.attendance-bar {
  position: relative;
  margin-top: 0;
  padding-left: 24px;
  border-left: 3px solid var(--gold) !important;
}

.attendance-bar select {
  min-height: 44px;
  font-weight: 700;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.upload-field {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .018);
}

.upload-field > span {
  font-size: 13px;
}

.upload-field small {
  margin-top: -4px;
  color: var(--muted);
  font-weight: 400;
}

.upload-field input[type="file"] {
  margin-top: 5px;
  min-height: 46px;
  padding: 6px;
}

input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 8px 11px;
  border: 1px solid #5a6477;
  border-radius: 6px;
  background: #29303d;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.upload-wide {
  grid-column: 1 / -1;
}

.process-button {
  grid-column: 1 / -1;
  min-height: 44px;
}

.with-sidebar .primary {
  background: linear-gradient(135deg, #c4932f, #e0bc5b);
  color: #151109;
  box-shadow: 0 6px 18px rgba(196, 147, 47, .15);
}

.with-sidebar .primary:hover {
  filter: brightness(1.07);
}

.with-sidebar input,
.with-sidebar select,
.with-sidebar textarea {
  border-color: #3a4352;
  background: #202633;
}

.table-card {
  padding: 0 !important;
  overflow: hidden;
}

.table-card .section-title {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.table-card .table-wrap {
  padding: 0 20px 18px;
}

.with-sidebar th {
  padding-top: 12px;
  padding-bottom: 12px;
  color: #d8b85b;
  letter-spacing: .45px;
}

.with-sidebar tbody tr:hover {
  background: rgba(255, 255, 255, .018);
}

.actions {
  position: static;
  display: flex;
  align-items: center;
  margin-top: 20px;
  padding: 18px 20px;
  border: 1px solid rgba(211, 168, 63, .28);
  border-radius: 12px;
  background: linear-gradient(100deg, #161b24, #1c2028);
}

.actions > div:first-child {
  display: grid;
  margin-right: auto;
}

.actions > div:first-child span {
  color: var(--muted);
  font-size: 12px;
}

.pdf-button {
  border-color: rgba(211, 168, 63, .65);
  color: #efd277;
}

.admin-actions input {
  min-width: 145px;
}

@media (max-width: 900px) {
  .sidebar {
    position: static;
    width: auto;
  }

  .sidebar-footer {
    margin-top: 12px;
  }

  .with-sidebar {
    margin-left: 0;
    padding: 24px 20px 40px;
  }

  .page-header,
  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .secure-status {
    width: max-content;
  }

  .upload-grid {
    grid-template-columns: 1fr;
  }

  .upload-wide,
  .process-button {
    grid-column: auto;
  }

  .actions > div:first-child {
    margin-right: 0;
  }
}
