@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --ink: #202d35;
  --action-color: #123c56;
  --action-hover: #204e68;
  --muted: #68777b;
  --line: #d9e3df;
  --teal: #176f69;
  --teal-deep: #11554f;
  --mint: #dcefe6;
  --coral: #c76554;
  --coral-soft: #f8e9e2;
  --surface: #fffefa;
  --paper: #f4f5ed;
  --sage: #e9eee4;
  --shadow: 0 18px 48px rgb(37 67 58 / 8%);
  font-family: 'DM Sans', sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 12% 15%, rgb(220 239 230 / 72%), transparent 32rem),
    linear-gradient(145deg, #f6f6ef 0%, #f2f5ef 52%, #f8f1e9 100%);
}
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
[hidden] { display: none !important; }

.page-shell { width: min(1240px, calc(100% - 48px)); min-height: 100dvh; margin: auto; display: flex; flex-direction: column; }
.site-header { min-height: 96px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid rgb(32 45 53 / 10%); }
.brand { display:inline-flex; flex:0 0 auto; width:200px; height:80px; overflow:hidden; }
.brand img { width:100%; height:100%; object-fit:cover; object-position:center; }
.environment-tag { padding:8px 13px; border:1px solid #d6c6a5; border-radius:999px; color:#765a2f; background:#f5eddb; font-size:.78rem; font-weight:700; letter-spacing:.02em; }
.login-layout { flex:1; display:grid; grid-template-columns:minmax(0,1fr) minmax(330px,.78fr); gap:clamp(38px,8vw,110px); align-items:center; padding:64px 0 74px; }
.welcome-copy { max-width:610px; }
.eyebrow { margin:0 0 12px; color:var(--teal); font-size:.72rem; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
h1,h2,h3,p { margin-top:0; }
h1,h2,h3 { font-family:'Manrope', sans-serif; }
h1 { max-width:690px; margin-bottom:18px; font-size:clamp(2.3rem,5.2vw,4.6rem); line-height:1.04; letter-spacing:-.055em; }
h2 { margin-bottom:9px; font-size:1.43rem; letter-spacing:-.035em; }
h3 { margin-bottom:8px; font-size:1.08rem; letter-spacing:-.025em; }
.intro { max-width:540px; color:var(--muted); font-size:1.08rem; line-height:1.65; }
.role-list { display:grid; gap:13px; padding:22px 0 0; margin:28px 0 0; border-top:1px solid var(--line); list-style:none; color:#43525a; }
.role-list li { display:flex; gap:11px; align-items:flex-start; line-height:1.45; }
.role-list li::before { content:""; width:9px; height:9px; margin-top:6px; flex:0 0 auto; border-radius:50% 50% 3px 50%; background:var(--coral); }
.card { padding:clamp(21px,3vw,32px); border:1px solid #dfe6df; border-radius:20px; background:var(--surface); box-shadow:var(--shadow); }
.login-card { display:grid; gap:11px; }
.card-heading { display:flex; gap:14px; align-items:center; margin-bottom:12px; }
.card-heading p { margin:0; color:var(--muted); font-size:.92rem; }
.step-mark { display:grid; width:45px; height:45px; place-items:center; border-radius:15px 15px 15px 4px; color:var(--teal-deep); background:var(--mint); font-size:.76rem; font-weight:800; }
label { display:grid; gap:7px; color:#33434a; font-size:.88rem; font-weight:700; }
input,select,textarea { width:100%; min-height:46px; padding:10px 12px; border:1px solid #cad7d1; border-radius:10px; color:var(--ink); background:#fff; }
textarea { min-height:100px; resize:vertical; }
input:focus,select:focus,textarea:focus,button:focus-visible,a:focus-visible { outline:3px solid rgb(23 111 105 / 26%); outline-offset:2px; border-color:var(--teal); }
.button { min-height:43px; padding:10px 16px; border:1px solid transparent; border-radius:10px; color:var(--ink); font-weight:750; transition:transform .16s ease,background .16s ease,border-color .16s ease; }
.button:hover { transform:translateY(-1px); }
.button-primary { color:#fffefa; background:var(--teal); }
.button-primary:hover { background:var(--teal-deep); }
.button-outline { border-color:#cbd7d1; color:var(--ink); background:#fffefa; }
.button-outline:hover { background:var(--sage); }
.button-soft { color:var(--teal-deep); background:var(--mint); }
.button-danger { color:#8f392d; background:var(--coral-soft); }
.button-small { min-height:35px; padding:7px 11px; font-size:.82rem; }
.login-card .button { margin-top:7px; }
.small-note,.field-hint { margin:0; color:var(--muted); font-size:.81rem; line-height:1.52; }
.form-message { min-height:1.2em; margin:0; color:#17664f; font-size:.89rem; line-height:1.45; }
.form-message.is-error { color:#a33f31; }

.dashboard-view { flex:1; padding:42px 0 68px; }
.dashboard-heading,.section-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; }
.dashboard-heading { padding:10px 0 27px; border-bottom:1px solid rgb(32 45 53 / 12%); }
.dashboard-heading h1 { margin-bottom:8px; font-size:clamp(2rem,4vw,3.3rem); }
.dashboard-heading .intro { margin-bottom:0; font-size:1rem; }
.action-feedback { padding-top:8px; }
.dashboard-heading-actions { display:flex; gap:10px; flex-wrap:wrap; }
.admin-panel { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; margin-top:22px; }
.admin-panel>.card { min-width:0; }
.section-heading { align-items:center; margin-bottom:20px; }
.section-heading p { margin:0; }
.count-badge,.status-pill { display:inline-flex; align-items:center; gap:7px; padding:7px 11px; border-radius:999px; color:#185e57; background:var(--mint); font-size:.78rem; font-weight:750; white-space:nowrap; }
.form-grid { display:grid; gap:13px; }
.form-grid > .button[type="submit"] { justify-self: start; align-self: end; min-height: 44px; height: auto; max-width: 100%; }
.partner-list,.stack-list { display:grid; gap:10px; margin-top:16px; }
.partner-item,.list-item { padding:14px; border:1px solid var(--line); border-radius:12px; background:#fcfdf9; }
.partner-item strong,.list-item strong { display:block; margin-bottom:4px; }
.partner-item span,.list-item p { color:var(--muted); font-size:.86rem; line-height:1.5; }
.partner-card,.role-card { max-width:690px; margin-top:20px; }
.partner-card p:last-child,.role-card p:last-child { margin-bottom:0; color:var(--muted); }
.role-icon { display:grid; width:43px; height:43px; margin-bottom:17px; place-items:center; border-radius:14px 14px 14px 4px; color:var(--teal-deep); background:var(--mint); font-size:1.1rem; font-weight:800; }

/* Role-specific Phase B workspaces */
.phase-workspace { padding-top:24px; }
.workspace-grid { display:grid; grid-template-columns:250px minmax(0,1fr); gap:22px; align-items:start; }
.workspace-nav { position:sticky; top:16px; display:grid; gap:6px; padding:12px; border:1px solid var(--line); border-radius:16px; background:rgb(255 254 250 / 83%); }
.workspace-nav button { min-height:42px; padding:9px 12px; border:0; border-radius:9px; color:#526267; background:transparent; text-align:left; font-weight:700; }
.workspace-nav button[aria-current="page"],.workspace-nav button:hover { color:var(--teal-deep); background:var(--mint); }
.workspace-content { min-width:0; display:grid; gap:18px; }
.workspace-section { min-width:0; }
.panel-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:16px; }
.panel-head p { margin:0; color:var(--muted); }
.action-row { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.action-row > .button { flex:0 0 auto; }
.form-grid.two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.form-grid.three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.span-all { grid-column:1/-1; }
.inline-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding:17px; border:1px solid var(--line); border-radius:14px; background:#f8faf4; }
.inline-form[hidden] { display:none; }
.inline-form .span-all { grid-column:1/-1; }
.data-card { display:grid; gap:14px; padding:18px; border:1px solid var(--line); border-radius:15px; background:#fffefa; }
.data-card + .data-card { margin-top:11px; }
.data-card-top { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.data-card-title { margin:0; font-family:'Manrope',sans-serif; font-size:1.05rem; font-weight:800; }
.data-card p { margin:0; color:var(--muted); line-height:1.5; }
.meta-line { display:flex; flex-wrap:wrap; gap:8px 14px; color:#68777b; font-size:.82rem; }
.empty-state,.error-state,.loading-state { padding:23px; border:1px dashed #cbd8d0; border-radius:14px; color:var(--muted); background:#f9faf5; line-height:1.55; }
.error-state { border-color:#e4b8ac; color:#8e3d32; background:#fcf1ec; }
.empty-state strong,.error-state strong { display:block; margin-bottom:5px; color:var(--ink); }
.message-region { min-height:1.2em; }
.segmented { display:flex; flex-wrap:wrap; gap:6px; padding:5px; border-radius:11px; background:var(--sage); }
.segmented button { padding:8px 11px; border:0; border-radius:8px; color:#56656a; background:transparent; font-size:.84rem; font-weight:700; }
.segmented button[aria-pressed="true"] { color:var(--teal-deep); background:#fffefa; box-shadow:0 1px 5px rgb(35 59 49 / 9%); }
.progress-track { height:8px; overflow:hidden; border-radius:999px; background:#e7ece5; }
.progress-track span { display:block; height:100%; border-radius:inherit; background:var(--teal); }
.material-content { padding:12px 14px; border-left:3px solid #d5a18e; border-radius:0 9px 9px 0; color:#46565a; background:#faf3ed; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.6; }
.link-safe { color:var(--teal-deep); font-weight:700; overflow-wrap:anywhere; }
.table-wrap { overflow-x:auto; border:1px solid var(--line); border-radius:13px; }
table { width:100%; border-collapse:collapse; text-align:left; font-size:.87rem; }
th,td { padding:12px 13px; border-bottom:1px solid #e7ece6; vertical-align:top; }
th { color:#516167; background:#f1f5ed; font-size:.76rem; letter-spacing:.04em; text-transform:uppercase; }
tr:last-child td { border-bottom:0; }
.notice { padding:13px 15px; border-left:3px solid #c76554; border-radius:0 10px 10px 0; color:#665247; background:#fbf1e9; font-size:.87rem; line-height:1.55; }
.detail-split { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.class-card { overflow:hidden; }
.class-card::before { content:""; display:block; width:48px; height:4px; margin:-18px 0 14px; border-radius:4px; background:var(--coral); }
.status-draft { color:#785b2a; background:#f5eddb; }
.status-open { color:#185e57; background:var(--mint); }
.status-closed { color:#5d6366; background:#ecefeb; }
.status-pending { color:#88553b; background:#f9e8d9; }
.site-footer { display:flex; justify-content:space-between; gap:12px; padding:20px 0; border-top:1px solid rgb(32 45 53 / 10%); color:var(--muted); font-size:.79rem; }

@media (max-width:900px) {
  .workspace-grid { grid-template-columns:1fr; }
  .workspace-nav { position:static; display:flex; overflow:auto; }
  .workspace-nav button { flex:0 0 auto; }
  .admin-panel { grid-template-columns:1fr; }
}
@media (max-width:700px) {
  .page-shell { width:min(100% - 30px, 560px); }
  .site-header { min-height:80px; }
  .brand { width:166px; height:66px; }
  .login-layout { grid-template-columns:1fr; gap:26px; padding:40px 0 48px; }
  h1 { font-size:clamp(2.25rem,10vw,3.35rem); }
  .role-list { grid-template-columns:1fr 1fr; gap:11px; font-size:.88rem; }
  .dashboard-view { padding-top:30px; }
  .dashboard-heading { align-items:flex-start; }
  .dashboard-heading-actions { flex-direction:column; align-items:stretch; }
  .form-grid.two,.form-grid.three,.inline-form,.detail-split { grid-template-columns:1fr; }
  .inline-form .span-all,.form-grid .span-all { grid-column:auto; }
  .panel-head { flex-direction:column; }
}
@media (max-width:430px) {
  .page-shell { width:calc(100% - 24px); }
  .role-list { grid-template-columns:1fr; }
  .site-footer { flex-direction:column; }
  .dashboard-heading { flex-direction:column; }
  .dashboard-heading-actions { width:100%; flex-direction:row; }
  .dashboard-heading-actions .button { flex:1; }
  .card { padding:20px; }
  .data-card { padding:14px; }
  .data-card-top { flex-direction:column; }
  .action-row .button { flex:1 1 auto; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { transition:none!important; scroll-behavior:auto!important; }
}

/* Compact permission controls, isolated from the other forms. */
#admin-permissions .inline-form {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
#admin-permissions label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  line-height: 1.45;
  cursor: pointer;
}
#admin-permissions input[type="checkbox"] {
  order: -1;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
  accent-color: var(--teal);
}
#admin-permissions .inline-form > .button {
  width: 100%;
  min-height: 43px;
  align-self: start;
}

/* Match the administrative action buttons to the shared primary style. */
#admin-release .inline-form > .button[type="submit"],
#admin-privacy .inline-form > .button[type="submit"] {
  align-self: end;
  width: 100%;
  height: 43px;
  min-height: 43px;
  padding: 10px 16px;
}

/* Keep list search actions aligned with their input and the primary buttons. */
.inline-form[role="search"] > .button[type="submit"] {
  align-self: end;
  width: 100%;
  height: 43px;
  min-height: 43px;
  padding: 10px 16px;
}

/* Etapa 2: navegação por perfil e assuntos, sem alterar autorizações. */
:root {
  --ink: #17232f;
  --muted: #526171;
  --line: #d7e0ea;
  --teal: #145f82;
  --teal-deep: #104663;
  --mint: #e6f9f7;
  --surface: #ffffff;
  --paper: #f5f7fa;
  --sage: #eef4fa;
  --shadow: 0 3px 16px rgb(20 42 64 / 4%);
}
body { background: var(--paper); }
.page-shell { width: min(1500px, calc(100% - 40px)); }
.site-header { min-height: 92px; }
h1 { letter-spacing: -.035em; line-height: 1.12; }
h2,h3 { letter-spacing: -.02em; }
p { line-height: 1.55; }
.card { border-radius: 14px; border-color: var(--line); background: #fff; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; line-height: 1.3; text-decoration: none; }
.button-small { min-height: 44px; font-size: .88rem; }
.button-primary { background: #4387f4; color: #101820; border-color: #4387f4; }
.button-primary:hover { background: #6ba1f7; }
.button:disabled { cursor: not-allowed; opacity: .65; transform: none; }
.button:focus-visible, a:focus-visible, input:focus, select:focus, textarea:focus { outline: 3px solid #145f82; outline-offset: 3px; }
.skip-link { position: absolute; left: 20px; top: -100px; z-index: 20; padding: 12px 18px; background: white; color: #17232f; border: 2px solid #145f82; }
.skip-link:focus { top: 8px; }
.login-layout { grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr); gap: 60px; padding: 42px 0; align-items: center; }
.welcome-copy { padding: 36px; border-radius: 20px; background: #e8f1fe; }
.welcome-copy h1 { font-size: clamp(2rem, 3.3vw, 3.5rem); }
.welcome-note { margin-bottom: 0; color: #34475a; }
.entry-panel { min-width: 0; }
.entry-heading p { color: var(--muted); }
.profile-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.profile-choice { min-height: 115px; padding: 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; background: white; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; }
.profile-choice strong { font-size: 1rem; }
.profile-choice span { font-size: .88rem; line-height: 1.5; color: var(--muted); }
.profile-choice:hover { border-color: #4387f4; background: #f3f7ff; }
.profile-choice[aria-pressed="true"] { border: 2px solid #145f82; padding: 17px; background: #eaf5fc; }
.profile-choice:focus-visible { outline: 3px solid #145f82; outline-offset: 3px; }
.signup-entry { margin: 16px 0 10px; width: 100%; }
.login-card { margin-top: 14px; padding: 22px; box-shadow: none; }
.login-card h2 { font-size: 1.15rem; }
.login-card .card-heading { margin-bottom: 0; }
.dashboard-view { padding: 20px 0 40px; }
.dashboard-heading { padding: 0 0 15px; align-items: center; }
.dashboard-heading h1 { font-size: clamp(1.35rem, 2.2vw, 1.85rem); margin-bottom: 5px; }
.dashboard-heading .eyebrow { margin-bottom: 5px; }
.dashboard-heading .intro { font-size: .95rem; max-width: 800px; }
.phase-workspace { padding-top: 18px; }
.workspace-grid { grid-template-columns: 245px minmax(0, 1fr); gap: 22px; }
.workspace-nav { top: 16px; gap: 4px; padding: 16px 12px; border: 0; border-radius: 14px; background: #152533; max-height: calc(100dvh - 40px); overflow-y: auto; }
.nav-caption { padding: 4px 12px 10px; margin-bottom: 2px; color: #b8d0df; font-size: .74rem; font-weight: 700; letter-spacing: .08em; }
.workspace-nav button { color: #e5eff6; font-size: .93rem; min-height: 46px; line-height: 1.4; white-space: normal; }
.workspace-nav button:hover { background: #253e51; color: white; }
.workspace-nav button[aria-current="page"] { color: #101820; background: #18ecd0; }
.workspace-nav button:focus-visible { outline: 3px solid #18ecd0; outline-offset: 0; }
.workspace-content { align-content: start; }
.workspace-content > section:focus { outline: none; }
.workspace-content > section:focus-visible { outline: 3px solid #145f82; outline-offset: 3px; }
.menu-toggle { display: none; }
.home-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.home-actions .button { min-height: 64px; text-align: center; }
.home-summary { margin-top: 24px; padding: 16px; background: #f0f6fd; color: #33475b; border-radius: 12px; line-height: 1.6; }
.home-summary:empty { display: none; }
.home-help { margin-top: 20px; }
.class-context { display: flex; align-items: center; gap: 20px; padding: 15px 18px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.class-context label { flex: 1; max-width: 560px; }
.class-context p { flex: 1; }
.partner-card { max-width: none; margin-top: 14px; padding: 12px 18px; box-shadow: none; }
.partner-card .eyebrow { margin-bottom: 4px; }
.partner-card h2 { font-size: 1rem; margin-bottom: 3px; }
.partner-card p:last-child { font-size: .84rem; }
.action-feedback { position: fixed; z-index: 15; left: 50%; bottom: 18px; transform: translateX(-50%); max-width: min(620px, calc(100% - 32px)); padding: 13px 18px; color: #124b37; background: #e5fbf1; border: 1px solid #509d7d; border-radius: 12px; box-shadow: 0 4px 16px rgb(0 0 0 / 12%); }
.action-feedback:empty { display: none; }
.action-feedback.is-error { color: #76241e; border-color: #b55545; background: #fff1ec; }
.inline-form { background: #f7f9fc; }
label:has(input[type="checkbox"]),label:has(input[type="radio"]) { display: flex; align-items: center; gap: 10px; min-height: 44px; line-height: 1.5; cursor: pointer; }
input[type="checkbox"],input[type="radio"] { order: -1; flex: 0 0 20px; width: 20px; height: 20px; min-height: 20px; margin: 0; padding: 0; accent-color: #145f82; }
.inline-form > .button[type="submit"],#admin-release .inline-form > .button[type="submit"],#admin-privacy .inline-form > .button[type="submit"] { min-height: 44px; height: auto; align-self: end; }
#admin-permissions label:has(input[type="checkbox"]) { min-height: 44px; }
.data-card,.list-item,.partner-item { background: #fff; }
.data-card-title,.meta-line,.partner-item span { overflow-wrap: anywhere; }
.form-grid .field-hint { grid-column: 1/-1; }
@media (max-width: 1050px) {
  .workspace-grid { grid-template-columns: 220px minmax(0, 1fr); gap: 16px; }
  .home-actions { grid-template-columns: 1fr; }
  .login-layout { gap: 28px; }
  .welcome-copy { padding: 24px; }
}
@media (max-width: 900px) {
  .workspace-grid { grid-template-columns: 1fr; }
  .menu-toggle { display: inline-flex; width: 100%; margin-bottom: 12px; justify-content: space-between; }
  .workspace-nav { display: none; position: static; max-height: none; }
  .workspace-nav.menu-open { display: grid; }
  .workspace-nav button { width: 100%; }
  .login-layout { grid-template-columns: 1fr; max-width: 650px; margin: auto; }
  .welcome-copy h1 { font-size: 2.1rem; }
  .welcome-copy { padding: 22px; }
}
@media (max-width: 700px) {
  .page-shell { width: calc(100% - 24px); }
  .site-header { min-height: 80px; }
  .login-layout { padding: 24px 0; gap: 24px; }
  .profile-choices { gap: 10px; }
  .profile-choice { padding: 14px; min-height: 130px; }
  .profile-choice[aria-pressed="true"] { padding: 13px; }
  .dashboard-heading { align-items: flex-start; }
  .dashboard-heading h1 { font-size: 1.45rem; }
  .dashboard-heading .intro { font-size: .88rem; }
  .class-context { flex-direction: column; align-items: stretch; gap: 8px; }
  .inline-form,.form-grid.two,.form-grid.three { grid-template-columns: 1fr; }
  .home-actions { margin-top: 16px; }
  .home-actions .button { min-height: 52px; }
  .action-feedback { bottom: 12px; font-size: .86rem; }
}
@media (max-width: 430px) {
  .dashboard-heading { flex-direction: row; gap: 10px; }
  .dashboard-heading > div { min-width: 0; }
  .profile-choice { min-height: 145px; }
  .welcome-copy h1 { font-size: 1.85rem; }
  .card { padding: 18px; }
}
.action-feedback { display: flex; align-items: center; gap: 16px; }
.action-feedback > button { flex: 0 0 auto; min-height: 44px; }
@media (max-width: 430px) { .action-feedback { width: calc(100% - 24px); gap: 10px; } }
@media (max-width: 700px) {
  .welcome-copy { padding: 18px; }
  .welcome-copy h1 { font-size: 1.5rem; margin-bottom: 0; }
  .welcome-copy .eyebrow { font-size: .68rem; margin-bottom: 8px; }
  .welcome-copy .intro,.welcome-copy .welcome-note { display: none; }
}

/* Padronização dos atalhos da tela inicial */
.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.home-actions .button {
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  min-height: 44px;
  padding: 10px 16px;
}
@media (max-width: 430px) {
  .home-actions .button {
    flex: 1 1 100%;
    width: 100%;
  }
}

/* Área interna: navegação lateral integrada à tela, conforme referência aprovada. */
body.signed-in { --sidebar-width: 280px; background: #f4f7fa; }
.signed-in .page-shell { width: auto; min-height: 100dvh; margin: 0 0 0 var(--sidebar-width); padding: 0 32px 24px; }
.signed-in .site-header { display: none; }
.signed-in .dashboard-view { padding: 0; width: 100%; }
.signed-in .dashboard-heading { display: flex; gap: 16px; min-height: 100px; margin: 0 -32px 24px; padding: 18px 32px; background: #fff; border-bottom: 1px solid #dce5ed; }
.signed-in .dashboard-heading > div { flex: 1; min-width: 0; }
.signed-in .dashboard-heading h1 { font-size: 1.45rem; margin: 3px 0; }
.signed-in .dashboard-heading .intro { margin: 0; font-size: .86rem; }
.signed-in .dashboard-heading .eyebrow { font-size: .7rem; margin: 0; }
.signed-in .phase-workspace { padding-top: 0; }
.signed-in .workspace-grid { display: block; }
.signed-in .workspace-nav { position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar-width); height: 100dvh; max-height: none; display: flex; flex-direction: column; gap: 0; border-radius: 0; padding: 24px 14px 16px; background: var(--action-color); overflow-y: auto; }
.sidebar-brand { display: flex; flex-direction: column; gap: 10px; padding: 0 12px 24px; color: #fff; }
.sidebar-brand img { display: block; width: 100px; height: 100px; object-fit: contain; background: #fff; border-radius: 12px; }
.sidebar-brand strong { font-size: 1rem; line-height: 1.45; max-width: 210px; }
.sidebar-environment { color: #bfd6e4; font-size: .75rem; }
.signed-in .nav-caption { padding: 4px 12px 12px; font-size: .7rem; }
.sidebar-items { display: grid; gap: 4px; }
.signed-in .workspace-nav .sidebar-items button { width: 100%; display: block; padding: 12px 14px; min-height: 48px; border: 0; border-left: 3px solid transparent; border-radius: 6px; text-align: left; color: #e8f0f6; background: transparent; font-size: .91rem; }
.signed-in .workspace-nav .sidebar-items button:hover { background: var(--action-hover); }
.signed-in .workspace-nav .sidebar-items button[aria-current="page"] { color: #fff; background: var(--action-hover); border-left-color: #18ecd0; font-weight: 700; }
.sidebar-profile { display: grid; gap: 6px; margin-top: auto; padding: 22px 12px 0; color: #fff; overflow-wrap: anywhere; }
.sidebar-profile span { color: #bfd6e4; font-size: .8rem; }
.signed-in .workspace-content { display: grid; gap: 20px; min-width: 0; }
.signed-in .partner-card { margin: 0 0 18px; }
.signed-in .workspace-content > section { scroll-margin-top: 20px; }
.signed-in .page-footer { padding-top: 20px; font-size: .76rem; }
.sidebar-backdrop { position: fixed; inset: 0; z-index: 25; border: 0; border-radius: 0; background: rgb(9 26 39 / 55%); }
.sidebar-backdrop[hidden] { display: none; }
@media (min-width: 901px) { .sidebar-backdrop { display: none; } }
@media (max-width: 1100px) and (min-width: 901px) { body.signed-in { --sidebar-width: 250px; } }
@media (max-width: 900px) {
  .signed-in .page-shell { margin-left: 0; padding: 0 20px 24px; }
  .signed-in .dashboard-heading { margin: 0 -20px 20px; padding: 16px 20px; }
  .signed-in .dashboard-heading .menu-toggle { display: inline-flex; width: auto; margin: 0; flex: 0 0 auto; }
  .signed-in .workspace-nav { display: none; width: min(280px, calc(100vw - 56px)); }
  .signed-in .workspace-nav.menu-open { display: flex; }
}
@media (max-width: 520px) {
  .signed-in .page-shell { padding: 0 14px 20px; }
  .signed-in .dashboard-heading { margin: 0 -14px 18px; padding: 14px; flex-wrap: wrap; gap: 10px; }
  .signed-in .dashboard-heading > div { flex-basis: calc(100% - 90px); }
  .signed-in .dashboard-heading h1 { font-size: 1.15rem; }
  .signed-in .dashboard-heading #logout-button { margin-left: auto; }
}

/* Menu compacto; no computador, toda a página usa a rolagem do lado direito. */
body.signed-in { position: relative; }
.signed-in .workspace-nav { position: absolute; bottom: auto; height: auto; min-height: 100dvh; overflow: visible; padding: 18px 14px 14px; }
.sidebar-brand { gap: 6px; padding: 0 12px 14px; }
.sidebar-brand img { width: 180px; height: 80px; max-width: 100%; object-fit: cover; object-position: center; background: transparent; border-radius: 0; }
.sidebar-brand strong { font-size: .9rem; line-height: 1.35; }
.signed-in .nav-caption { padding-bottom: 8px; }
.sidebar-items { gap: 2px; }
.signed-in .workspace-nav .sidebar-items button { min-height: 40px; padding: 9px 12px; font-size: .88rem; line-height: 1.3; }
.sidebar-profile { padding-top: 16px; font-size: .86rem; }
@media (max-width: 900px) {
  .signed-in .workspace-nav { position: fixed; bottom: 0; height: 100dvh; min-height: 0; overflow-y: auto; }
  .signed-in .workspace-nav .sidebar-items button { min-height: 44px; }
}

/* A faixa azul acompanha também páginas maiores que a altura do Preview. */
.signed-in .page-shell { min-height: max(100dvh, var(--sidebar-content-height, 0px)); }
@media (min-width: 901px) {
  .signed-in .workspace-nav { bottom: 0; height: auto; }
}

/* Todas as ações usam a mesma cor da barra lateral, inclusive os formulários. */
body .button { color: #fff; background: var(--action-color); border-color: var(--action-color); }
body .button:hover { color: #fff; background: var(--action-hover); border-color: var(--action-hover); }

/* Ações auxiliares claras e compactas, com espaço antes dos títulos e listas. */
body .button.button-small, body .button.button-soft {
  color: #11554f; background: #dcefe6; border-color: #bfded0;
}
body .button.button-small:hover, body .button.button-soft:hover {
  color: #11554f; background: #c9e7d8; border-color: #a4cdb9;
}
body .button.button-small { min-height: 34px; padding: 6px 10px; font-size: .84rem; line-height: 1.3; }
body .button.button-small:disabled { opacity: 1; color: #64796e; background: #e7f1eb; border-color: #d6e5dc; }
.pagination-controls { row-gap: 10px; padding-block: 2px; }
.stack-list:has(> .pagination-controls) { margin-bottom: 16px; }
.workspace-section > .pagination-controls, .workspace-section > .action-row { margin: 12px 0 16px; }
.workspace-section > .button-small { margin: 4px 0 14px; }
@media (max-width: 900px) {
  body .button.button-small { min-height: 44px; padding-block: 10px; }
}

/* Assuntos concentrados do Administrador. */
.admin-tabs { margin-bottom:16px; }
.admin-tabs [aria-pressed="true"] { background:#bde2d4; border-color:#11554f; color:#11554f; }
.admin-group-content > .card { margin:0; padding:16px 0 0; border:0; box-shadow:none; background:transparent; }
.admin-summary-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:12px 0 18px; }
.admin-summary-grid .data-card { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.institutional-editor { margin:12px 0; }
.institutional-editor > summary { cursor:pointer; padding:10px 0; font-weight:700; color:var(--teal-deep); }
.institutional-editor > form { margin-top:12px; }
.history-values { display:grid; grid-template-columns:minmax(100px,1fr) 2fr; gap:8px; overflow-wrap:anywhere; }
.history-values dd { margin:0; }
.settings-brand-preview { width:220px; height:100px; object-fit:contain; background:var(--action-color); border-radius:8px; padding:10px; margin-bottom:16px; }
@media(max-width:700px){ .admin-summary-grid { grid-template-columns:1fr; } .admin-summary-grid .data-card { align-items:flex-start; flex-wrap:wrap; } }

/* Report actions keep the compact platform size; details have their own spacing. */
.role-report-card > .button, .report-progress > .button { justify-self: start; max-width: 100%; }
.report-progress:not(:empty) { display: grid; gap: 12px; padding-top: 8px; }
.report-progress h4 { margin: 0; }

/* Senhas e nomes de arquivos: controles utilizáveis sem alargar cartões. */
.password-field { position: relative; display: block; width: 100%; min-width: 0; }
.password-field input { padding-right: 56px; }
.password-toggle { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 8px; background: transparent; color: #145f82; }
.password-toggle:hover { background: #eef4fa; }
.password-toggle svg { display: block; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.password-toggle .eye-slash { display: none; }
.password-toggle[aria-pressed="true"] .eye-slash { display: block; }
.data-card { min-width: 0; grid-template-columns: minmax(0, 1fr); }
.data-card > *, .data-card-top > div { min-width: 0; max-width: 100%; }
.data-card p, .data-card .button { overflow-wrap: anywhere; white-space: normal; }
.data-card .button { min-width: 0; max-width: 100%; height: auto; }

/* Painéis de início com apresentação comum aos três perfis de gestão. */
.home-summary.operational-dashboard { background: transparent; padding: 0; margin: 20px 0 24px; color: #19364b; }
.dashboard-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.dashboard-section-head h3, .dashboard-lower h3 { margin: 0 0 12px; }
.dashboard-section-head p { margin: 0; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
body button.dashboard-metric { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 8px; height: auto; min-height: 140px; background: #fff; color: #123c56; padding: 18px; border: 1px solid #cfdfeb; border-top: 4px solid #18bfa9; border-radius: 12px; white-space: normal; line-height: 1.4; width: 100%; }
body button.dashboard-metric:hover { background: #effbf8; border-color: #149b8b; }
body button.dashboard-metric:focus-visible { outline: 3px solid #4387f4; outline-offset: 3px; }
.dashboard-metric-label { font-size: 14px; font-weight: 700; }
.dashboard-metric-value { font-size: 34px; line-height: 1.1; }
.dashboard-metric-hint { font-size: 12px; font-weight: 400; color: #506579; }
.dashboard-lower { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: 24px; margin-top: 24px; }
.dashboard-pending { display: grid; gap: 10px; }
.dashboard-pending-item, .dashboard-meeting { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; border: 1px solid #d4e1ec; background: #fff; border-radius: 10px; }
.dashboard-pending-item > div { display: flex; gap: 12px; align-items: center; min-width: 0; }
.dashboard-pending-item strong { font-size: 22px; }
.dashboard-pending-item span { font-size: 14px; }
.dashboard-pending-item button, .dashboard-meeting button, .dashboard-section-head button { flex-shrink: 0; width: auto; }
.dashboard-meeting { margin-bottom: 12px; }
.dashboard-meeting p { margin: 4px 0 0; }
.dashboard-shortcuts-title { margin-top: 20px; }
@media(max-width:1200px) { .dashboard-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); } .dashboard-lower { grid-template-columns: 1fr; } }
@media(max-width:600px) { .dashboard-section-head { align-items: flex-start; flex-direction: column; } body button.dashboard-metric { padding: 14px; min-height: 145px; } .dashboard-pending-item, .dashboard-meeting { align-items: flex-start; flex-direction: column; } .dashboard-metrics { gap: 10px; } .dashboard-metric-value { font-size: 28px; } }

