:root {
  --brand: #991a26;
  --brand-dark: #68101a;
  --ink: #1b1718;
  --muted: #71676a;
  --paper: #fbfaf8;
  --panel: #ffffff;
  --line: #e6dedb;
  --gold: #b89454;
  --green: #2f7d57;
  --amber: #b86e16;
  --red: #b4232f;
}

html {
  font-size: 15px;
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

a {
  color: var(--brand);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand));
  box-shadow: 0 10px 30px rgba(27, 23, 24, 0.15);
}

.navbar {
  min-height: 76px;
  padding: 0.65rem 1rem;
}

.navbar-brand {
  color: #fff;
  line-height: 1.1;
}

.navbar-brand .brand-title {
  font-size: 14.75px;
}

.navbar-brand:hover,
.navbar-brand:focus {
  color: #fff;
}

.navbar-brand small {
  display: block;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.78rem;
  font-weight: 500;
}

.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
}

.navbar .nav-link {
  color: rgba(255, 255, 255, 0.82);
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
  font-weight: 600;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.5);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  filter: none;
}

.user-context-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(27, 23, 24, 0.18);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.82rem;
  font-weight: 600;
}

.user-context-bar .container-fluid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  padding: 0.4rem 1rem;
}

.user-context-bar strong {
  color: #fff;
}

.app-main {
  padding: 1.25rem 0 2rem;
}

.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.page-title h1 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--ink);
}

.page-title p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.personal-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.personal-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.personal-breadcrumb a:hover {
  color: var(--brand);
}

.personal-breadcrumb .separator {
  color: #b7adb0;
  font-weight: 800;
}

.personal-breadcrumb .current {
  color: var(--brand);
}

.panel,
.metric,
.login-panel,
.scanner-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(27, 23, 24, 0.05);
}

.panel {
  padding: 1rem;
}

.system-error-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 180px);
  padding: 2rem 0;
}

.system-error-card {
  display: grid;
  grid-template-columns: minmax(110px, 180px) minmax(0, 1fr);
  gap: 1.5rem;
  width: min(920px, 100%);
  padding: 1.5rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 6px solid var(--brand);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(27, 23, 24, 0.09);
}

.system-error-code {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  border-radius: 8px;
  background: #f8eef0;
  color: var(--brand);
  font-size: clamp(2.6rem, 8vw, 5rem);
  font-weight: 900;
  line-height: 1;
}

.system-error-content h1 {
  margin: 0.35rem 0 0.75rem;
  color: var(--ink);
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 850;
}

.system-error-message {
  margin-bottom: 0.45rem;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
}

.system-error-description {
  margin-bottom: 0;
  color: var(--muted);
}

.system-error-reference {
  margin-top: 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf8;
}

.system-error-reference span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.system-error-reference code {
  color: var(--brand);
  word-break: break-word;
}

.metric {
  padding: 1rem;
  min-height: 112px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 700;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 2rem;
  color: var(--ink);
}

.metric.present strong {
  color: var(--green);
}

.metric.late strong {
  color: var(--amber);
}

.metric.absent strong {
  color: var(--red);
}

.metric.attendance-total strong {
  color: var(--brand);
}

.metric.risk-critical-metric strong {
  color: var(--ink);
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 1rem;
}

.report-summary-grid .metric {
  height: 100%;
}

.recurrent-summary-card {
  min-height: 104px;
}

.table {
  --bs-table-bg: transparent;
}

.table thead th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0;
  border-bottom-color: var(--line);
}

.table td {
  vertical-align: middle;
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 168px;
  padding: 2rem;
  border: 1px dashed rgba(153, 26, 38, 0.28);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #faf8f7);
  text-align: left;
}

.empty-state-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 2px solid rgba(153, 26, 38, 0.35);
  border-radius: 50%;
  position: relative;
}

.empty-state-icon::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 2px;
  right: -9px;
  bottom: 5px;
  border-radius: 999px;
  background: rgba(153, 26, 38, 0.45);
  transform: rotate(45deg);
}

.empty-state h3 {
  margin: 0 0 0.25rem;
  color: var(--brand);
  font-size: 1rem;
  font-weight: 800;
}

.empty-state p {
  margin: 0 0 0.75rem;
  color: var(--muted);
}

.btn-primary {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-dark);
  --bs-btn-hover-border-color: var(--brand-dark);
}

.btn-outline-primary {
  --bs-btn-color: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand);
  --bs-btn-hover-border-color: var(--brand);
}

.badge-status {
  display: inline-flex;
  min-width: 86px;
  justify-content: center;
  border-radius: 6px;
  padding: 0.38rem 0.55rem;
  font-weight: 800;
}

.badge-status.presente {
  color: #fff;
  background: var(--green);
}

.badge-status.retardo {
  color: #fff;
  background: var(--amber);
}

.badge-status.ausente {
  color: #fff;
  background: var(--red);
}

.badge-status.sinhorario {
  color: #fff;
  background: #355c7d;
}

.automation-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 0.38rem 0.55rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.automation-status-operating {
  color: #0b5d3d;
  background: #e3f3eb;
  border-color: #b9dfcd;
}

.automation-status-warning {
  color: #704b00;
  background: #fff3cd;
  border-color: #ead48d;
}

.automation-status-error {
  color: #842029;
  background: #f8d7da;
  border-color: #e5aeb3;
}

.condition-note-link {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.condition-note-link:hover,
.condition-note-link:focus {
  color: var(--brand-dark);
  text-decoration: underline;
}

.correction-note-box {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf8;
  padding: 0.9rem;
  text-align: left;
  white-space: pre-line;
}

.student-photo {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f1ece8;
}

.student-photo-lg {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f1ece8;
}

.institution-logo-box {
  min-height: 178px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfaf9;
}

.institution-logo-preview {
  max-width: 100%;
  max-height: 150px;
  object-fit: contain;
}

.institution-logo-empty {
  width: 100%;
  min-height: 130px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.78rem;
  border-radius: 8px;
  background: #f4f1ee;
}

.camera-capture {
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.camera-preview {
  width: min(360px, 100%);
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111;
}

.qr-preview {
  width: min(280px, 100%);
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0.75rem;
}

.scanner-panel {
  max-width: 820px;
  margin: 0 auto;
  padding: 1.25rem;
}

.scanner-session-note {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0;
  opacity: 0.42;
  text-align: right;
  margin: -0.45rem 0 0.35rem;
}

.scanner-input {
  min-height: 58px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0;
}

.camera-box {
  display: none;
  overflow: hidden;
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111;
}

.camera-box.active {
  display: block;
}

.kiosk-layout {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

.kiosk-main-panel,
.kiosk-last-panel,
.kiosk-clock-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(27, 23, 24, 0.05);
}

.kiosk-main-panel {
  min-height: 430px;
  padding: clamp(1.25rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-top: 6px solid var(--brand);
}

.kiosk-mode-note {
  align-self: stretch;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: right;
  opacity: 0.58;
}

.kiosk-status {
  color: var(--brand);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
}

.kiosk-message {
  max-width: 760px;
  margin: 0.75rem auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 600;
}

.kiosk-student {
  width: 100%;
  max-width: 820px;
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  text-align: left;
}

.kiosk-photo {
  width: clamp(132px, 18vw, 190px);
  height: clamp(132px, 18vw, 190px);
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f1ece8;
}

.kiosk-student-data {
  flex: 1 1 420px;
  min-width: 0;
}

.kiosk-student-data h2 {
  margin: 0 0 0.75rem;
  color: var(--ink);
  font-size: clamp(1.35rem, 3vw, 2.4rem);
  font-weight: 900;
}

.kiosk-data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.kiosk-data-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.kiosk-data-grid strong {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
}

.kiosk-result-line,
.kiosk-last-result-line {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: var(--ink);
  font-weight: 800;
}

.kiosk-result-line {
  font-size: clamp(1rem, 2vw, 1.18rem);
  text-transform: uppercase;
}

.kiosk-last-result-line {
  font-weight: 400;
}

.kiosk-line-separator {
  color: var(--muted);
  font-weight: 700;
  opacity: 0.7;
}

.kiosk-last-result-line .kiosk-line-separator {
  color: var(--ink);
  font-weight: 400;
  opacity: 1;
}

.kiosk-student-inactive {
  color: var(--red);
  font-weight: 900;
}

.kiosk-last-result-line .kiosk-student-inactive {
  font-weight: 400;
}

.kiosk-state-badge {
  display: inline-flex;
  min-width: 122px;
  justify-content: center;
  border-radius: 6px;
  padding: 0.45rem 0.7rem;
  color: #fff;
  background: var(--brand);
  font-weight: 900;
  text-transform: uppercase;
}

.kiosk-main-panel.kiosk-processing {
  border-top-color: var(--gold);
}

.kiosk-main-panel.kiosk-processing .kiosk-status {
  color: var(--gold);
}

.kiosk-main-panel.kiosk-success {
  border-top-color: var(--green);
}

.kiosk-main-panel.kiosk-success .kiosk-status,
.kiosk-state-success {
  color: #fff;
  background: var(--green);
}

.kiosk-main-panel.kiosk-success .kiosk-status {
  color: var(--green);
  background: transparent;
}

.kiosk-main-panel.kiosk-late,
.kiosk-main-panel.kiosk-duplicate,
.kiosk-main-panel.kiosk-review {
  border-top-color: var(--amber);
}

.kiosk-main-panel.kiosk-late .kiosk-status,
.kiosk-main-panel.kiosk-duplicate .kiosk-status,
.kiosk-main-panel.kiosk-review .kiosk-status {
  color: var(--amber);
}

.kiosk-state-late,
.kiosk-state-duplicate,
.kiosk-state-review {
  background: var(--amber);
}

.kiosk-main-panel.kiosk-invalid,
.kiosk-main-panel.kiosk-error,
.kiosk-main-panel.kiosk-inactive {
  border-top-color: var(--red);
}

.kiosk-main-panel.kiosk-invalid .kiosk-status,
.kiosk-main-panel.kiosk-error .kiosk-status,
.kiosk-main-panel.kiosk-inactive .kiosk-status {
  color: var(--red);
}

.kiosk-state-invalid,
.kiosk-state-error,
.kiosk-state-inactive {
  background: var(--red);
}

.kiosk-last-panel {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.kiosk-last-content {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: min(420px, 100%);
}

.kiosk-last-photo {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f1ece8;
}

.kiosk-clock-panel {
  padding: clamp(1rem, 2vw, 1.4rem);
  text-align: center;
  border-top: 4px solid var(--brand);
}

.kiosk-clock-panel .section-label {
  margin-bottom: 0.7rem;
  text-align: center;
}

.kiosk-live-clock {
  display: block;
  color: var(--ink);
  font-size: clamp(3rem, 7vw, 5.25rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: 0;
}

.kiosk-live-date {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: clamp(0.9rem, 1.8vw, 1.05rem);
  font-weight: 600;
}

.mobile-kiosk-layout {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

.mobile-scan-card,
.mobile-result-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 6px solid var(--brand);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(27, 23, 24, 0.05);
  padding: clamp(1rem, 3vw, 1.4rem);
}

.mobile-camera-shell {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 260px;
  border-radius: 8px;
  background: #111;
}

.mobile-camera-shell video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.mobile-qr-fallback-reader {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #111;
  overflow: hidden;
}

.mobile-qr-fallback-reader video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

.mobile-qr-fallback-reader > div,
.mobile-qr-fallback-reader #mobileQrFallbackReader__scan_region {
  width: 100% !important;
  height: 100% !important;
}

.mobile-camera-shell.mobile-camera-fallback-active .mobile-qr-fallback-reader,
.mobile-camera-shell.mobile-camera-fallback-active .mobile-qr-fallback-reader > div,
.mobile-camera-shell.mobile-camera-fallback-active .mobile-qr-fallback-reader [id$="__scan_region"] {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  border: 0 !important;
}

.mobile-camera-shell.mobile-camera-fallback-active .mobile-qr-fallback-reader video {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.mobile-camera-shell.mobile-camera-fallback-active .mobile-qr-fallback-reader #qr-shaded-region,
.mobile-camera-shell.mobile-camera-fallback-active .mobile-qr-fallback-reader [id*="qr-shaded-region"] {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

.mobile-camera-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(153, 26, 38, 0.42), rgba(27, 23, 24, 0.72));
  z-index: 3;
}

.mobile-scan-frame {
  position: absolute;
  inset: 18%;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.24);
  pointer-events: none;
  z-index: 2;
}

.mobile-status-block {
  margin-top: 1rem;
  text-align: center;
}

.mobile-status {
  color: var(--brand);
  font-size: clamp(1.45rem, 5vw, 2.35rem);
  font-weight: 900;
  line-height: 1.08;
  text-transform: uppercase;
}

.mobile-message {
  margin: 0.45rem auto 0;
  color: var(--muted);
  font-weight: 600;
}

.mobile-kiosk-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin-top: 1rem;
}

.mobile-kiosk-actions .btn {
  min-height: 44px;
}

.mobile-result-content {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.mobile-result-photo {
  width: clamp(88px, 22vw, 138px);
  height: clamp(88px, 22vw, 138px);
  flex: 0 0 auto;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f1ece8;
}

.mobile-result-data {
  min-width: 0;
}

.mobile-result-data h2 {
  margin: 0 0 0.45rem;
  color: var(--ink);
  font-size: clamp(1.15rem, 4vw, 1.8rem);
  font-weight: 900;
}

.mobile-student-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.8rem;
  margin-bottom: 0.55rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.mobile-scan-card.mobile-processing,
.mobile-scan-card.mobile-late,
.mobile-scan-card.mobile-duplicate {
  border-top-color: var(--amber);
}

.mobile-scan-card.mobile-processing .mobile-status,
.mobile-scan-card.mobile-late .mobile-status,
.mobile-scan-card.mobile-duplicate .mobile-status {
  color: var(--amber);
}

.mobile-scan-card.mobile-success {
  border-top-color: var(--green);
}

.mobile-scan-card.mobile-success .mobile-status {
  color: var(--green);
}

.mobile-scan-card.mobile-invalid,
.mobile-scan-card.mobile-error,
.mobile-scan-card.mobile-inactive,
.mobile-scan-card.mobile-unsupported {
  border-top-color: var(--red);
}

.mobile-scan-card.mobile-invalid .mobile-status,
.mobile-scan-card.mobile-error .mobile-status,
.mobile-scan-card.mobile-inactive .mobile-status,
.mobile-scan-card.mobile-unsupported .mobile-status {
  color: var(--red);
}

@media (min-width: 860px) {
  .mobile-kiosk-layout {
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    align-items: start;
  }

  .mobile-last-panel {
    grid-column: 1 / -1;
  }

  .mobile-kiosk-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .mobile-result-content {
    align-items: center;
    text-align: center;
    flex-direction: column;
  }

  .mobile-student-details,
  .mobile-result-line {
    justify-content: center;
  }

  .mobile-camera-shell {
    min-height: 230px;
  }
}

@media (max-width: 720px) {
  .kiosk-student,
  .kiosk-last-panel,
  .kiosk-last-content {
    align-items: center;
    text-align: center;
    flex-direction: column;
  }

  .kiosk-data-grid {
    grid-template-columns: 1fr;
  }

  .kiosk-mode-note {
    text-align: center;
  }
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: radial-gradient(circle at top left, rgba(153, 26, 38, 0.12), transparent 34%), var(--paper);
}

.login-panel {
  width: min(420px, 100%);
  padding: 1.5rem;
}

.login-logo {
  width: min(320px, 100%);
  height: auto;
  max-height: 130px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 6px;
  border: 1px solid var(--line);
}

.btn-login-primary {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.btn-login-primary:hover,
.btn-login-primary:focus {
  background-color: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 0.2rem rgba(153, 26, 38, 0.15);
}

.section-label {
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-count-panel {
  border-color: rgba(153, 26, 38, 0.22);
  box-shadow: 0 10px 28px rgba(27, 23, 24, 0.06);
}

.text-muted-2 {
  color: var(--muted);
}

.dashboard-pie-panel {
  min-height: 300px;
}

.system-status-panel {
  border-left: 4px solid var(--green);
}

.system-status-panel.vacaciones {
  border-left-color: var(--brand);
}

.system-status-panel.suspension {
  border-left-color: var(--gold);
}

.system-status-panel.fin-semana {
  border-left-color: var(--muted);
}

.system-status-content {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-top: 0.75rem;
}

.system-status-context {
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  margin-bottom: 0.2rem;
  text-transform: uppercase;
}

.system-status-divider {
  border-top: 1px solid var(--border);
  margin: 0.85rem 0 0.1rem;
}

.system-status-content.personal-status .system-status-indicator {
  background: var(--green);
}

.system-status-content.personal-status.personal-jornada .system-status-indicator {
  background: var(--brand);
}

.system-status-content.personal-status.personal-sin-jornada .system-status-indicator {
  background: var(--muted);
}

.system-status-indicator {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin-top: 0.2rem;
  border-radius: 50%;
  background: var(--green);
}

.system-status-panel.vacaciones .system-status-indicator {
  background: var(--brand);
}

.system-status-panel.suspension .system-status-indicator {
  background: var(--gold);
}

.system-status-panel.fin-semana .system-status-indicator {
  background: var(--muted);
}

.upcoming-events-panel {
  border-left: 4px solid var(--brand);
}

.upcoming-events-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.upcoming-events-subtitle {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.upcoming-events-group + .upcoming-events-group {
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
}

.upcoming-event-item {
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.upcoming-event-item.personal-event {
  border-left: 3px solid var(--brand);
}

.upcoming-event-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.upcoming-event-type {
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.upcoming-event-date {
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 800;
}

.upcoming-event-range {
  margin-bottom: 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.upcoming-event-separator {
  display: inline-block;
  margin: 0 0.35rem;
  color: var(--muted);
}

.upcoming-event-item p {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
}

.personnel-absences-panel {
  border-left: 4px solid var(--brand);
}

.personnel-absence-list {
  display: grid;
  gap: 0.55rem;
}

.personnel-absence-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--line);
}

.personnel-absence-item a {
  color: var(--ink);
  text-decoration: none;
}

.personnel-absence-item a:hover,
.personnel-absence-item a:focus {
  color: var(--brand);
  text-decoration: underline;
}

.personnel-absence-status {
  flex: 0 0 auto;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.personnel-absence-status.pending {
  background: rgba(180, 35, 47, 0.1);
  color: var(--red);
}

.personnel-absence-status.justified {
  background: rgba(47, 125, 87, 0.12);
  color: var(--green);
}

.table-row-highlight > * {
  background: rgba(153, 26, 38, 0.08) !important;
}

.table-row-highlight > :first-child {
  box-shadow: inset 4px 0 0 var(--brand);
}

.conduct-summary-panel {
  border-left: 4px solid var(--brand);
}

.conduct-summary-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.conduct-summary-metrics > div {
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.conduct-summary-metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.conduct-summary-metrics strong {
  display: block;
  margin-top: 0.2rem;
  color: var(--brand);
  font-size: 1.35rem;
}

.conduct-summary-low strong {
  color: var(--green);
}

.conduct-summary-medium strong {
  color: var(--amber);
}

.conduct-summary-high strong {
  color: var(--red);
}

.conduct-summary-critical strong {
  color: var(--ink);
}

.conduct-case-list {
  display: grid;
  gap: 0.55rem;
}

.conduct-case-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--line);
}

.conduct-case-item a {
  color: var(--ink);
  text-decoration: none;
}

.conduct-case-item a:hover,
.conduct-case-item a:focus {
  color: var(--brand);
  text-decoration: underline;
}

.conduct-case-detail {
  margin-top: 0.15rem;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.35;
}

.absence-risk-panel {
  border-left: 4px solid var(--amber);
}

.absence-risk-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.absence-risk-metrics > div {
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.absence-risk-metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.absence-risk-metrics strong {
  display: block;
  margin-top: 0.2rem;
  color: var(--brand);
  font-size: 1.35rem;
}

.absence-risk-metric-low strong {
  color: var(--green);
}

.absence-risk-metric-medium strong {
  color: var(--amber);
}

.absence-risk-metric-high strong {
  color: var(--red);
}

.absence-risk-metric-critical strong {
  color: var(--ink);
}

.absence-risk-list {
  display: grid;
  gap: 0.55rem;
}

.absence-risk-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--line);
}

.absence-risk-item a {
  color: var(--ink);
  text-decoration: none;
}

.absence-risk-item a:hover,
.absence-risk-item a:focus {
  color: var(--brand);
  text-decoration: underline;
}

.absence-risk-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.absence-cause-text {
  display: block;
  max-width: 100%;
  margin-top: 0.15rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.35;
}

.report-chart-panel {
  min-height: 420px;
}

.report-line-chart-panel {
  min-height: 0;
}

.report-filter-button {
  min-width: 150px;
}

.attendance-filter-button {
  min-width: 165px;
}

.recurrent-filter-button {
  min-width: 145px;
}

.tutor-filter-button {
  min-width: 165px;
}

.btn-pdf-export {
  background-color: #F40F02;
  border-color: #F40F02;
  color: #fff;
}

.btn-pdf-export:hover,
.btn-pdf-export:focus {
  background-color: #cf0d02;
  border-color: #cf0d02;
  color: #fff;
}

.report-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.report-filter-tags span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.28rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
}

.report-filter-tags strong {
  color: var(--brand);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.dashboard-pie-layout {
  display: grid;
  grid-template-columns: minmax(170px, 220px) 1fr;
  gap: 1rem;
  align-items: center;
}

.report-pie-layout {
  grid-template-columns: minmax(220px, 320px) minmax(260px, 1fr);
  gap: 1.5rem;
}

.pie-chart {
  width: min(220px, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 50%;
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(27, 23, 24, 0.03);
}

.report-pie-chart {
  width: min(320px, 100%);
}

.pie-hole {
  width: 54%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  line-height: 1;
}

.pie-hole strong,
.pie-hole span {
  display: block;
}

.pie-hole strong {
  font-size: 1.7rem;
  color: var(--ink);
}

.pie-hole span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.pie-legend {
  display: grid;
  gap: 0.55rem;
}

.pie-legend-row {
  display: grid;
  grid-template-columns: 14px minmax(88px, 1fr) 42px 52px;
  gap: 0.55rem;
  align-items: center;
  padding: 0.52rem 0;
  border-bottom: 1px solid var(--line);
}

.pie-legend-row:last-child {
  border-bottom: 0;
}

.pie-legend-row strong {
  text-align: right;
  color: var(--ink);
}

.pie-legend-row small {
  text-align: right;
  color: var(--muted);
  font-weight: 700;
}

.pie-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.pie-swatch.present {
  background: var(--green);
}

.pie-swatch.late {
  background: var(--amber);
}

.pie-swatch.absent {
  background: var(--red);
}

.pie-swatch.justified {
  background: var(--gold);
}

.pie-swatch.early-exit {
  background: #355c7d;
}

.line-chart-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.35rem 0 0.8rem;
}

.monthly-line-chart {
  display: block;
  width: 100%;
  height: auto;
}

.trend-grid-line {
  stroke: #e6dedb;
  stroke-width: 1;
}

.trend-axis-line,
.trend-tick-line {
  stroke: #9c9290;
  stroke-width: 1.2;
}

.trend-axis-value,
.trend-month-label {
  fill: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.trend-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-dot {
  stroke: #fff;
  stroke-width: 2;
}

.trend-present {
  stroke: var(--green);
  fill: var(--green);
}

.trend-absent {
  stroke: var(--red);
  fill: var(--red);
}

.trend-late {
  stroke: var(--amber);
  fill: var(--amber);
}

.trend-early-exit {
  stroke: #355c7d;
  fill: #355c7d;
}

.trend-justified {
  stroke: var(--gold);
  fill: var(--gold);
}

.monthly-line-chart .trend-line.trend-present,
.monthly-line-chart .trend-line.trend-absent,
.monthly-line-chart .trend-line.trend-late,
.monthly-line-chart .trend-line.trend-early-exit,
.monthly-line-chart .trend-line.trend-justified {
  fill: none;
}

.trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.trend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.trend-swatch.trend-present {
  background: var(--green);
}

.trend-swatch.trend-absent {
  background: var(--red);
}

.trend-swatch.trend-late {
  background: var(--amber);
}

.trend-swatch.trend-early-exit {
  background: #355c7d;
}

.trend-swatch.trend-justified {
  background: var(--gold);
}

.section-title {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
}

.risk-badge {
  display: inline-flex;
  min-width: 72px;
  justify-content: center;
  border-radius: 6px;
  padding: 0.36rem 0.55rem;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.risk-badge.risk-low {
  background: var(--green);
}

.risk-badge.risk-medium {
  background: var(--amber);
}

.risk-badge.risk-high {
  background: var(--red);
}

.risk-badge.risk-critical {
  background: var(--ink);
}

.metric-list {
  display: grid;
  gap: 0.75rem;
}

.metric-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.75rem;
}

.metric-list > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.metric-list span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.metric-list strong {
  color: var(--brand);
  font-size: 1.5rem;
}

.timeline-item {
  border-left: 3px solid var(--brand);
  padding: 0.15rem 0 0.85rem 0.85rem;
  margin-bottom: 0.85rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.role-privilege-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 116px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  background: rgba(153, 26, 38, 0.08);
  color: var(--brand);
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1;
  padding: 0.42rem 0.85rem;
}

.role-privilege-pill:hover,
.role-privilege-pill:focus {
  background: var(--brand);
  color: #fff;
}

.role-privilege-modal .modal-header {
  border-bottom-color: var(--line);
}

.modal-kicker {
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.role-user-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.role-user-summary div,
.privilege-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 0.85rem;
}

.role-user-summary span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.role-user-summary strong {
  display: block;
  color: var(--ink);
  margin-top: 0.2rem;
}

.privilege-box {
  height: 100%;
}

.privilege-box h3 {
  color: var(--brand);
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 0.65rem;
}

.privilege-box ul {
  margin: 0;
  padding-left: 1.05rem;
}

.privilege-box li {
  margin-bottom: 0.45rem;
}

.role-turn-note {
  border-left: 4px solid var(--brand);
  background: rgba(153, 26, 38, 0.08);
  border-radius: 6px;
  color: var(--ink);
  padding: 0.8rem 0.9rem;
}

.role-privilege-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 1rem;
}

.role-privilege-card-title {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
}

.personal-module-shell {
  max-width: 1180px;
  margin: 0 auto;
}

.personal-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 252px));
  gap: clamp(1rem, 2.2vw, 1.75rem);
  align-items: center;
  justify-content: center;
}

.personal-nav-card {
  position: relative;
  min-height: 330px;
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--ink);
  text-decoration: none;
  background:
    radial-gradient(circle at 83% 43%, rgba(153, 26, 38, 0.055) 0 2px, transparent 3px),
    radial-gradient(circle at 86% 49%, rgba(153, 26, 38, 0.055) 0 2px, transparent 3px),
    #fff;
  border: 1px solid rgba(230, 222, 219, 0.88);
  border-radius: 8px;
  box-shadow: 0 18px 36px rgba(27, 23, 24, 0.09);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.personal-nav-card:hover,
.personal-nav-card:focus {
  color: var(--ink);
  transform: translateY(-3px);
  border-color: rgba(153, 26, 38, 0.28);
  box-shadow: 0 22px 44px rgba(27, 23, 24, 0.13);
}

.personal-nav-image-card {
  width: min(100%, 252px);
  height: 334px;
  min-height: 0;
  padding: 0;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.personal-nav-image-card:hover,
.personal-nav-image-card:focus {
  transform: translateY(-6px) scale(1.015);
  border-color: transparent;
  box-shadow: none;
  filter: drop-shadow(0 20px 26px rgba(27, 23, 24, 0.16));
}

.personal-nav-image-card:focus-visible {
  outline: 3px solid rgba(153, 26, 38, 0.32);
  outline-offset: 6px;
}

.personal-nav-card-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  margin: 0 auto;
  user-select: none;
}

.personal-nav-image-card-kiosco .personal-nav-card-image {
  max-width: 100%;
  transform: scale(1.04);
  transform-origin: center;
}

.personal-card-visual {
  position: absolute;
  top: 1.25rem;
  left: 50%;
  width: min(72%, 220px);
  height: 150px;
  transform: translateX(-50%);
  color: var(--brand);
}

.personal-card-visual svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.personal-card-content {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 0.9rem;
  align-items: start;
  position: relative;
  z-index: 1;
}

.personal-card-arrow {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 8px 16px rgba(153, 26, 38, 0.24);
  font-size: 1.9rem;
  font-weight: 900;
  line-height: 1;
}

.personal-card-title {
  margin: 0;
  color: #0f0d0e;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  line-height: 1.05;
  font-weight: 900;
}

.personal-card-rule {
  width: 44px;
  height: 3px;
  margin: 0.75rem 0 0.75rem;
  background: var(--brand);
  border-radius: 999px;
}

.personal-card-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.35;
}

.personal-kiosk-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 6px solid var(--brand);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(27, 23, 24, 0.06);
  padding: clamp(1.4rem, 3vw, 2rem);
}

.personal-kiosk-status {
  color: var(--brand);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
}

.personal-kiosk-message {
  margin: 0.75rem 0 1.4rem;
  color: var(--muted);
  font-size: clamp(1rem, 2.5vw, 1.45rem);
  font-weight: 700;
  text-align: center;
}

.personal-kiosk-person {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  max-width: 760px;
  margin: 0 auto;
}

.personal-kiosk-photo {
  width: 120px;
  height: 140px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.personal-kiosk-name {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  font-weight: 900;
  text-transform: uppercase;
}

.personal-kiosk-line {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 700;
}

.personal-kiosk-panel.state-success {
  border-top-color: var(--green);
}

.personal-kiosk-panel.state-success .personal-kiosk-status {
  color: var(--green);
}

.personal-kiosk-panel.state-late,
.personal-kiosk-panel.state-duplicate,
.personal-kiosk-panel.state-review {
  border-top-color: var(--amber);
}

.personal-kiosk-panel.state-late .personal-kiosk-status,
.personal-kiosk-panel.state-duplicate .personal-kiosk-status,
.personal-kiosk-panel.state-review .personal-kiosk-status {
  color: var(--amber);
}

.personal-kiosk-panel.state-invalid,
.personal-kiosk-panel.state-inactive,
.personal-kiosk-panel.state-error {
  border-top-color: var(--red);
}

.personal-kiosk-panel.state-invalid .personal-kiosk-status,
.personal-kiosk-panel.state-inactive .personal-kiosk-status,
.personal-kiosk-panel.state-error .personal-kiosk-status {
  color: var(--red);
}

.horario-form,
.jornada-form {
  align-items: flex-start;
}

.credential-export-form [data-export-validation] {
  display: block;
  min-height: 1.25rem;
}

.credential-group-form [data-group-validation] {
  display: block;
  min-height: 1.25rem;
}

.credential-group-form [data-group-validation].d-none {
  display: block !important;
  visibility: hidden;
}

.credential-individual-actions {
  padding-top: 2rem;
}

@media (max-width: 767.98px) {
  .credential-individual-actions {
    padding-top: 0;
  }
}

.personal-catalog-position-form [data-position-validation] {
  display: block;
  min-height: 1.25rem;
}

.personal-catalog-position-form [data-position-validation].d-none {
  display: block !important;
  visibility: hidden;
}

.personal-catalog-position-action {
  padding-top: 2rem;
}

.catalog-create-form .catalog-validation-message {
  display: block;
  min-height: 1.25rem;
}

.catalog-create-form .catalog-validation-message.d-none {
  display: block !important;
  visibility: hidden;
}

.credential-export-form [data-export-validation].d-none {
  display: block !important;
  visibility: hidden;
}

.credential-export-action {
  margin-top: 0.25rem;
}

.horario-form .field-validation-valid,
.horario-form .field-validation-error,
.jornada-form .field-validation-valid,
.jornada-form .field-validation-error {
  display: block;
  min-height: 1.25rem;
  margin-top: 0.25rem;
}

.personal-bulk-form .field-validation-valid,
.personal-bulk-form .field-validation-error {
  display: block;
  min-height: 1.25rem;
  margin-top: 0.25rem;
}

.horario-form .form-text {
  margin-top: 0;
  max-width: 360px;
  line-height: 1.25;
}

.jornada-check-option {
  min-width: 180px;
}

.tutor-mode-selector {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f4f3;
}

.tutor-mode-selector .btn {
  min-width: 190px;
}

.tutor-search-results {
  max-height: 310px;
  margin-top: 8px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.tutor-search-result {
  display: block;
  width: 100%;
  padding: 11px 14px;
  color: var(--ink);
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.tutor-search-result:last-child {
  border-bottom: 0;
}

.tutor-search-result:hover,
.tutor-search-result:focus-visible {
  outline: 0;
  background: #f8f1f2;
  box-shadow: inset 3px 0 0 var(--brand);
}

.tutor-search-result strong,
.tutor-search-contact {
  display: block;
}

.tutor-search-contact {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.86rem;
}

.tutor-selected-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 6px;
  background: #fcfaf9;
}

.tutor-selected-label {
  margin-bottom: 2px;
  color: var(--brand);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.tutor-phone-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 10px 12px;
  color: #6b3f0b;
  border-left: 3px solid var(--amber);
  background: #fff8e9;
}

.horario-form-actions,
.jornada-form-actions {
  padding-top: 2rem;
}

@media (max-width: 640px) {
  .tutor-mode-selector,
  .tutor-mode-selector .btn {
    width: 100%;
  }

  .tutor-selected-summary,
  .tutor-phone-notice {
    align-items: stretch;
    flex-direction: column;
  }

  .system-error-card {
    grid-template-columns: 1fr;
  }

  .system-error-code {
    min-height: 96px;
  }

  .personal-module-grid {
    grid-template-columns: minmax(190px, 252px);
  }

  .personal-nav-card {
    min-height: 300px;
  }

  .personal-nav-image-card {
    height: 334px;
    min-height: 0;
  }

  .personal-kiosk-person {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .page-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .navbar {
    min-height: auto;
  }

  .brand-logo {
    width: 44px;
    height: 44px;
  }

  .dashboard-pie-layout {
    grid-template-columns: 1fr;
  }

  .report-pie-layout {
    grid-template-columns: 1fr;
  }

  .role-user-summary {
    grid-template-columns: 1fr;
  }
}
