/* Nova shell desktop (DEC-301): topbar institucional verde, rail de módulos,
   menu de contexto e conteúdo único em .portal-main. Visível a partir de 1001 px. */
.topbar, .sidebar { display: none; }

@media (min-width: 1001px) {
  .mobile-header, .bottom-nav { display: none !important; }
  .inicio-mobile { display: none !important; }
  .inicio-desktop { display: block; }

  .topbar {
    display: flex;
    align-items: center;
    gap: 22px;
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 40;
    height: 96px;
    padding: 0 28px;
    background: var(--green-dark, #103f2d);
    color: #fff;
    box-shadow: 0 1px 0 rgb(255 255 255 / 8%);
  }
  .topbar a { color: inherit; }
  .topbar-brand { display: grid; align-content: center; min-width: 250px; color: #fff; text-decoration: none; }
  .topbar-brand__title { font-size: 1.55rem; font-weight: 760; line-height: 1.1; letter-spacing: -.02em; }
  .topbar-brand__campus { margin-top: 4px; color: #d6e9df; font-size: .95rem; }
  .topbar-search {
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(620px, 44vw);
    min-height: 48px;
    margin-inline: auto;
    padding: 0 18px;
    border: 0;
    border-radius: 9px;
    background: #fff;
    color: #60716a;
    font: inherit;
    font-size: 1rem;
    text-align: left;
    cursor: default;
  }
  .topbar-search .icon { width: 21px; height: 21px; color: var(--green-dark); }
  .topbar-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; }
  .topbar-icon {
    display: grid; place-items: center; width: 42px; height: 42px; padding: 0;
    border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: default;
  }
  .topbar-icon .icon { width: 25px; height: 25px; }
  .topbar-divider { width: 1px; height: 34px; background: rgb(255 255 255 / 45%); }
  .account-menu { position: relative; }
  .account-menu summary { display: flex; align-items: center; gap: 11px; min-height: 52px; padding: 5px 0; color: #fff; list-style: none; cursor: pointer; }
  .account-menu summary::-webkit-details-marker { display: none; }
  .account-menu .avatar { width: 38px; height: 38px; background: #fff; color: var(--green-dark); }
  .account-menu strong { display: block; color: #fff; font-size: .95rem; line-height: 1.2; }
  .account-menu small { display: block; margin-top: 2px; color: #d6e9df; font-size: .78rem; }
  .account-menu .chevron { width: 18px; height: 18px; }
  .account-menu__panel {
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 45; min-width: 200px;
    padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff;
    box-shadow: 0 18px 38px rgb(9 34 24 / 18%);
  }
  .account-menu__panel a, .account-menu__panel .logout-button {
    display: flex; align-items: center; width: 100%; min-height: 40px; padding: 8px 10px;
    border: 0; border-radius: 6px; color: var(--text); background: transparent;
    font: inherit; text-align: left; text-decoration: none; cursor: pointer;
  }
  .account-menu__panel a:hover, .account-menu__panel .logout-button:hover { background: var(--green-soft); color: var(--green-dark); }
  .account-menu__panel .logout-form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--line); }

  .sidebar {
    display: flex;
    position: fixed;
    top: 96px;
    bottom: 0;
    left: 0;
    z-index: 35;
    width: 356px;
    background: #fff;
    border-right: 1px solid #e3ebe6;
  }
  .module-rail { display: flex; flex-direction: column; width: 128px; flex: none; padding: 14px 9px 12px; border-right: 1px solid #e8eeea; }
  .rail-label { margin: 0 0 8px; color: var(--muted); font-size: .68rem; font-weight: 700; text-align: center; letter-spacing: .08em; text-transform: uppercase; }
  .rail-link {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
    min-height: 94px; margin-bottom: 4px; padding: 10px 4px; border-radius: 9px;
    color: #34463d; font-size: .82rem; line-height: 1.15; text-align: center; text-decoration: none;
  }
  .rail-link .icon { width: 30px; height: 30px; }
  .rail-link:hover { background: #f3f7f4; color: var(--green-dark); }
  .rail-link[aria-current="page"] { background: #e4f1e7; color: var(--green-dark); font-weight: 750; }

  .context-menu { flex: 1; min-width: 0; padding: 24px 18px 18px; overflow-y: auto; }
  .context-title { margin: 0 12px 14px; color: var(--text); font-size: 1.08rem; font-weight: 750; letter-spacing: -.01em; }
  .context-group { margin: 24px 12px 8px; color: var(--text); font-size: 1rem; font-weight: 750; }
  .context-link {
    display: flex; align-items: center; gap: 11px; min-height: 46px; padding: 9px 12px;
    border-radius: 8px; color: #26372f; font-size: .98rem; text-decoration: none;
  }
  .context-link .icon { width: 20px; height: 20px; color: #4b5f55; }
  .context-link:hover { background: #f3f7f4; color: var(--green-dark); }
  .context-link[aria-current="page"] { background: #e4f1e7; color: var(--green-dark); font-weight: 750; }
  .context-link[aria-current="page"] .icon { color: var(--green-dark); }
  .context-help { margin: 20px 12px 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }

  .portal-main {
    margin-left: 356px;
    padding: 122px 34px 38px;
    min-height: 100vh;
    background: #f5f7f5;
  }
  .portal-main--anonimo { margin-left: 0; padding: 0; background: #f3f6f4; }

  .sidebar-collapsed .sidebar { width: 128px; }
  .sidebar-collapsed .context-menu { display: none; }
  .sidebar-collapsed .portal-main { margin-left: 128px; }
  .sidebar-collapsed .topbar-brand { min-width: 0; }
  .sidebar-collapsed .topbar-brand span { display: none; }
  .sidebar-collapsed .topbar-search { margin-left: 0; }
  .sidebar-collapsed .rail-label { display: none; }
}

/* Conteúdo comum do desktop (protótipos de 19/11/2026). */
@media (min-width: 1001px) {
  .breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 0 0 14px; color: #56675f; font-size: .92rem; }
  .breadcrumb a { color: var(--green-dark); text-decoration: none; }
  .breadcrumb a:hover { text-decoration: underline; text-underline-offset: 3px; }
  .breadcrumb .icon { width: 18px; height: 18px; color: #56675f; }
  .page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
  .page-heading h1 { margin: 0; font-size: clamp(1.8rem, 2.2vw, 2.15rem); line-height: 1.12; letter-spacing: -.035em; }
  .page-heading .muted { max-width: 60ch; margin: 7px 0 0; color: #5c6b63; font-size: .98rem; }
  .page-heading__actions { display: flex; flex-shrink: 0; align-items: center; gap: 10px; padding-top: 4px; }
  .page-heading__actions .button { width: auto; min-height: 46px; margin: 0; padding: 10px 18px; white-space: nowrap; }
  .muted { color: #5c6b63; }
  .filter-panel { margin: 0 0 22px; padding: 18px 20px 16px; border: 1px solid #e0e9e3; border-radius: 10px; background: #eef6f0; }
  .filter-grid { display: grid; grid-template-columns: minmax(220px, 2.1fr) repeat(3, minmax(145px, 1fr)) auto; align-items: end; gap: 14px; }
  .filter-grid .field { display: grid; gap: 6px; min-width: 0; }
  .filter-grid .field label { margin: 0; color: var(--text); font-size: .9rem; font-weight: 750; }
  .filter-grid .control { width: 100%; min-height: 44px; margin: 0; background: #fff; }
  .filter-grid .button { min-height: 44px; padding: 8px 19px; }
  .filter-more { margin: 12px 0 0; border: 0; background: transparent; }
  .filter-more summary { display: inline-flex; align-items: center; gap: 6px; color: var(--green-dark); font-weight: 700; cursor: pointer; list-style: none; }
  .filter-more summary::-webkit-details-marker { display: none; }
  .filter-more[open] summary { margin-bottom: 12px; }
  .filter-more .filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 18px 0 10px; }
  .list-toolbar p { margin: 0; color: var(--text); font-size: 1.05rem; font-weight: 750; }
  .list-toolbar .text-button { width: auto; min-height: 36px; margin: 0; padding: 4px 6px; border: 0; background: transparent; color: var(--green-dark); font: inherit; font-weight: 650; cursor: pointer; }
  .table-wrap { overflow-x: auto; border: 1px solid #e0e9e3; border-radius: 9px; background: #fff; }
  .data-table { width: 100%; border-collapse: collapse; font-size: .94rem; }
  .data-table caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .data-table th, .data-table td { padding: 13px 15px; border-bottom: 1px solid #e8eeea; text-align: left; vertical-align: middle; }
  .data-table thead th { background: #edf5ef; color: #26372f; font-size: .86rem; font-weight: 750; white-space: nowrap; }
  .data-table tbody tr:last-child td { border-bottom: 0; }
  .data-table tbody tr:hover { background: #fafcfb; }
  .data-table .code { color: var(--green-dark); font-weight: 700; text-decoration: none; white-space: nowrap; }
  .data-table .code:hover, .data-table .row-action:hover { text-decoration: underline; text-underline-offset: 3px; }
  .data-table .row-action { color: var(--green-dark); font-weight: 650; text-decoration: none; white-space: nowrap; }
  .data-table .row-primary { font-weight: 700; }
  .data-table .row-secondary { display: block; margin-top: 2px; color: #66756d; font-size: .84rem; }
  .data-table .row-date { white-space: nowrap; }
  .badge { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 10px; border-radius: 5px; font-size: .82rem; font-weight: 700; white-space: nowrap; }
  .badge--green { background: #dff3e4; color: #176c3c; }
  .badge--blue { background: #e0edf8; color: #22577a; }
  .badge--amber { background: #fff1d7; color: #805b12; }
  .badge--red { background: #fde2e1; color: #a22d24; }
  .badge--gray { background: #edf0ee; color: #4d5b53; }
  .table-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-top: 1px solid #e8eeea; color: #5c6b63; font-size: .93rem; }
  .pagination-controls { display: flex; align-items: center; gap: 6px; }
  .pagination-controls .button { width: auto; min-height: 34px; margin: 0; padding: 5px 11px; font-size: .86rem; }
  .pagination-controls .page-current { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 5px; background: var(--green-dark); color: #fff; font-weight: 700; }
  .empty-state { margin: 18px 0 0; padding: 28px; border: 1px dashed #cbd9d0; border-radius: 9px; background: #fff; color: #56675f; text-align: center; }
  .empty-state h2 { margin: 0 0 6px; font-size: 1.12rem; color: var(--text); }
  .empty-state p { margin: 0; }
}

