/* Apoio ao Professor — v5.2 | Painel moderno e compacto.
 * Extensão de app.css v5.1.2. Não interfere nas regras do gerador nem nas rotas.
 * Intenção: etapa Identificação inteiramente visível em desktops usuais.
 */
:root {
  --compact-ink: #142f4b;
  --compact-accent: #087f79;
  --compact-line: #dce6ed;
  --compact-shadow: 0 7px 24px rgba(18, 44, 75, .045);
}
body:has(.v5-workspace), body:has(.v5-dashboard) {
  background: #f5f7fb;
}
body:has(.v5-workspace) .topbar,
body:has(.v5-dashboard) .topbar {
  min-height: 58px;
  padding: 7px clamp(16px, 2.2vw, 36px);
  border-bottom: 1px solid #e2eaf1;
  box-shadow: 0 2px 12px rgba(18, 43, 70, .025);
}
body:has(.v5-workspace) .brand,
body:has(.v5-dashboard) .brand {gap: 9px; font-size: .96rem; line-height: 1.16;}
body:has(.v5-workspace) .brand-icon,
body:has(.v5-dashboard) .brand-icon {
  width: 36px; height: 36px; border-radius: 10px; font-size: 22px;
}
body:has(.v5-workspace) .brand small,
body:has(.v5-dashboard) .brand small {font-size: .55rem; letter-spacing: .13em; margin-top: 2px;}
body:has(.v5-workspace) .topbar nav,
body:has(.v5-dashboard) .topbar nav {gap: 10px; font-size: .81rem;}
body:has(.v5-workspace) .topbar .btn,
body:has(.v5-dashboard) .topbar .btn {min-height: 35px; padding: 6px 12px;}

/* Estrutura editorial: tipografia com hierarquia forte, mas sem margens largas. */
#main:has(.v5-workspace) {
  max-width: 1840px;
  padding: 12px clamp(12px, 2vw, 30px) 10px;
  min-height: 0;
}
.v5-workspace {grid-template-columns: 230px minmax(0, 1fr); gap: 17px;}
.v5-sidebar {
  top: 10px;
  min-height: 0;
  padding: 12px 10px;
  gap: 9px;
  border-radius: 15px;
  background: linear-gradient(164deg, #153f69 0%, #112e55 58%, #0d2544 100%);
  box-shadow: 0 12px 30px rgba(14, 42, 80, .11);
}
.v5-side-brand {padding: 2px 7px 9px; gap: 8px;}
.v5-side-symbol {width: 32px; height: 32px; border-radius: 9px; font-size: 1.12rem;}
.v5-side-brand strong {font-size: .86rem; letter-spacing: -.01em;}
.v5-side-brand small {font-size: .53rem; letter-spacing: .115em; margin-top: 2px;}
.v5-current {padding: 10px 11px; gap: 3px; border-radius: 10px;}
.v5-current strong {font-size: .82rem; line-height: 1.3;}
.v5-current span {font-size: .69rem; line-height: 1.25;}
.v5-current small, .v5-plan-line small {font-size: .57rem;}
.v5-side-links {gap: 2px;}
.v5-nav-link {
  min-height: 35px;
  padding: 6px 9px;
  border-radius: 8px;
  font-size: .78rem;
  line-height: 1.25;
  gap: 8px;
}
.v5-nav-link.selected {background: #e1f5f1; border-color: #b9e4dc; color: #0b5d5b;}
.v5-nav-link:hover:not(.selected) {background: rgba(255,255,255,.11);}
.v5-nav-icon {width: 20px; font-size: .98rem;}
.v5-side-bottom {padding: 10px 11px; gap: 5px; border-radius: 10px;}
.v5-plan-line {gap: 3px;}
.v5-plan-line strong {font-size: .79rem;}
.v5-side-bottom .btn {min-height: 32px; padding: 5px 9px; font-size: .74rem;}
.v5-side-bottom .save-state {font-size: .65rem;}

.v5-crumb {padding: 0 3px 8px; gap: 8px; font-size: .7rem; min-height: 22px; align-items: center;}
.v5-panel-head {padding: 0 3px 12px; align-items: center; gap: 12px;}
.v5-panel-head .eyebrow {font-size: .61rem; margin: 0 0 3px; letter-spacing: .115em;}
.v5-panel-head h1 {font-size: clamp(1.45rem, 2vw, 1.88rem); line-height: 1.17; letter-spacing: -.038em;}
.v5-panel-head p:not(.eyebrow) {font-size: .83rem; line-height: 1.25; margin: 4px 0 0;}
.v5-panel-actions .btn {min-height: 34px; padding: 6px 12px; font-size: .78rem;}

/* A barra informa o estado real do salvamento (lógica existente v5.1). */
.v51-save-panel {
  top: 7px;
  margin-bottom: 10px;
  min-height: 49px;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 11px;
  box-shadow: 0 4px 17px rgba(25, 65, 71, .045);
}
.v51-save-symbol {width: 30px; height: 30px; font-size: 1rem;}
.v51-save-copy {gap: 1px;}
.v51-save-copy strong {font-size: .79rem; line-height: 1.2;}
.v51-save-copy small {font-size: .69rem; line-height: 1.28;}
.v51-save-panel .btn {min-height: 34px; padding: 6px 11px; font-size: .75rem; border-radius: 8px;}

/* Formulário mais denso, mantendo inputs clicáveis e labels acima dos campos. */
.v5-form-wrap {
  padding: clamp(15px, 1.45vw, 22px);
  border-radius: 13px;
  min-height: 0;
  box-shadow: var(--compact-shadow);
  border-color: var(--compact-line);
}
.v5-form-wrap .form-row {gap: 13px 15px; margin-bottom: 12px;}
.v5-form-wrap .field {gap: 4px;}
.v5-form-wrap .field label {color: var(--compact-ink); font-size: .78rem; font-weight: 750;}
.v5-form-wrap .field input,
.v5-form-wrap .field select {
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid #c8d7d7;
  border-radius: 8px;
  font-size: .88rem;
  color: #183554;
  transition: border-color .13s, box-shadow .13s;
}
.v5-form-wrap .field input:hover,
.v5-form-wrap .field select:hover {border-color: #9cbebc;}
.v5-form-wrap .field input:focus,
.v5-form-wrap .field select:focus {
  border-color: #158f87;
  outline: 2px solid rgba(13, 138, 128, .18);
  outline-offset: 1px;
  box-shadow: 0 0 0 2px rgba(13, 138, 128, .07);
}
.v5-form-wrap .field small {font-size: .69rem; line-height: 1.23;}
.v5-form-wrap .hint {
  border-radius: 9px;
  padding: 10px 12px;
  font-size: .75rem;
  line-height: 1.35;
  color: #345e55;
  background: #eef6f2;
  border-left: 3px solid #99cec1;
}
.v5-form-wrap .form-row + .hint {margin-top: 2px;}
.v5-form-wrap .card {padding: 15px 16px; margin: 12px 0;}
.v5-form-wrap .section-line {margin-top: 12px; margin-bottom: 10px;}
.v5-form-wrap > h3:first-child {margin-top: 0;}
.v5-form-wrap .table-scroll {margin: 11px 0;}
.v5-form-wrap .subtle {margin-top: 7px;}

.v5-footer-actions {
  min-height: 53px;
  margin-top: 9px;
  padding: 7px 11px;
  border-radius: 11px;
  box-shadow: var(--compact-shadow);
}
.v5-footer-actions .progress-label {font-size: .69rem; color: #8294a4;}
.v5-footer-actions .btn {min-height: 36px; border-radius: 8px; padding: 7px 12px; font-size: .78rem;}
body:has(.v5-workspace) .site-footer {padding: 4px 10px; font-size: .64rem; min-height: 0;}

/* Visão geral: cartões mais elegantes e até a lista dos horários fica à vista. */
#main:has(.v5-dashboard) {padding: 20px clamp(14px, 3vw, 48px) 22px; min-height: 0;}
.v5-dash-head {
  padding: 22px clamp(22px, 3vw, 36px);
  border-radius: 17px;
  background: linear-gradient(113deg, #e3f4ef 0%, #eef6f8 63%, #f2f6fc 100%);
  border-color: #d9eae7;
}
.v5-dash-head h1 {margin: 6px 0 8px; font-size: clamp(1.7rem, 2.65vw, 2.3rem);}
.v5-dash-head p:not(.eyebrow) {font-size: .86rem; margin-bottom: 0;}
.v5-dashboard-actions {margin-top: 13px; gap: 8px;}
.v5-dash-head .btn {min-height: 38px; padding: 8px 14px; font-size: .83rem;}
.v5-dash-head:after {font-size: 10rem; bottom: -32px;}
.v5-kpis {gap: 11px; margin: 12px 0 18px;}
.v5-kpis article {padding: 12px 17px; gap: 2px; border-radius: 11px; box-shadow: var(--compact-shadow);}
.v5-kpis small {font-size: .64rem;}
.v5-kpis strong {font-size: 1.39rem;}
.v5-kpis span {font-size: .74rem;}
.v5-section-head {margin: 11px 0 9px;}
.v5-section-head h2 {font-size: 1.3rem; margin-top: 1px;}
.v5-section-head .eyebrow {font-size: .59rem;}
.v5-section-controls .btn {min-height: 34px; padding: 6px 12px; font-size: .76rem;}
.v5-saved-list {border-radius: 12px;}
.v5-saved {padding: 11px 15px; gap: 12px;}
.v5-saved-symbol {width: 38px; height: 38px; border-radius: 9px; font-size: 1.2rem;}
.v5-saved-info h3 {font-size: .9rem;}
.v5-saved-info p {font-size: .73rem; margin-top: 2px;}
.v5-saved-actions .btn {min-height: 34px; padding: 6px 10px; font-size: .76rem;}
.v5-state {font-size: .7rem;}
.v5-feature-cards {gap: 10px; margin-top: 15px;}
.v5-feature-cards > div {padding: 12px 15px; border-radius: 11px;}
.v5-feature-cards strong {font-size: .85rem;}
.v5-feature-cards p {margin: 4px 0 0; font-size: .72rem; line-height: 1.35;}

/* Tablets: preservar uma única área de edição fácil de navegar. */
@media (max-width: 1050px) and (min-width: 761px) {
  .v5-workspace {grid-template-columns: 188px minmax(0, 1fr); gap: 11px;}
  .v5-sidebar {padding: 9px 7px; gap: 7px;}
  .v5-nav-link {font-size: .74rem;}
  .v5-panel-head h1 {font-size: 1.5rem;}
  .v5-form-wrap {padding: 14px;}
}
@media (max-width: 760px) {
  body:has(.v5-workspace) .topbar,
  body:has(.v5-dashboard) .topbar {min-height: 57px; padding: 7px 12px;}
  .v5-workspace {display: block;}
  #main:has(.v5-workspace) {padding: 9px 10px 12px;}
  .v5-sidebar {position: static; padding: 9px; gap: 5px; border-radius: 12px; margin-bottom: 8px;}
  .v5-side-brand {padding: 0 3px 6px;}
  .v5-side-links {gap: 4px; padding-bottom: 4px;}
  .v5-nav-link {min-height: 35px; padding: 7px 9px; font-size: .75rem;}
  .v5-crumb {padding: 3px 1px 6px; font-size: .66rem; flex-wrap: wrap;}
  .v5-panel-head {display: flex; padding: 3px 1px 10px; align-items: center;}
  .v5-panel-head h1 {font-size: 1.45rem;}
  .v5-panel-head p:not(.eyebrow) {font-size: .77rem;}
  .v5-panel-actions .btn {font-size: .73rem;}
  .v51-save-panel {top: 0; padding: 8px 10px; gap: 8px; margin-bottom: 8px;}
  .v51-save-copy small {font-size: .67rem;}
  .v5-form-wrap {padding: 13px 11px;}
  .v5-form-wrap .form-row {gap: 10px; margin-bottom: 9px;}
  .v5-form-wrap .field input, .v5-form-wrap .field select {min-height: 42px;}
  .v5-footer-actions {margin-top: 8px; padding: 7px 9px;}
  .v5-footer-actions .btn {min-height: 40px;}
  #main:has(.v5-dashboard) {padding: 12px 11px 16px;}
  .v5-dash-head {padding: 18px;}
  .v5-kpis {margin: 12px 0 15px;}
  .v5-feature-cards {margin-top: 12px;}
}
@media (max-width: 470px) {
  .v5-panel-head {align-items: flex-start; flex-wrap: wrap; gap: 7px;}
  .v5-panel-actions {margin-top: 0;}
  .v5-form-wrap .form-row {grid-template-columns: minmax(0, 1fr);}
  .v51-save-panel {flex-wrap: wrap;}
  .v51-save-actions {flex-direction: row; width: 100%;}
  .v51-save-panel .btn {min-height: 38px;}
  .v5-footer-actions {gap: 6px;}
  .v5-footer-actions .btn {padding: 7px 8px; font-size: .73rem;}
}
@media (max-height: 730px) and (min-width: 761px) {
  .v5-side-bottom {padding: 8px 10px;}
  .v5-sidebar {gap: 6px;}
  .v5-nav-link {min-height: 31px; padding-top: 5px; padding-bottom: 5px;}
  .v5-current {padding: 8px 10px;}
  .v5-dash-head {padding-top: 16px; padding-bottom: 16px;}
}
@media print {
  .v5-workspace .v5-sidebar, .v5-workspace .v5-crumb,
  .v5-workspace .v5-panel-head, .v5-workspace .v5-footer-actions,
  .v5-dashboard .v5-feature-cards {display:none!important;}
  .v5-form-wrap {border:0; box-shadow:none; padding:0;}
}
