/* ===================================== */
/* DESIGN SYSTEM - COLEGIO SATELITE      */
/* ===================================== */
:root {
    --bg: #070b15;
    --bg-soft: #0b1220;
    --surface: #101827;
    --surface-2: #151f31;
    --surface-3: #1b2638;
    --border: rgba(226, 232, 240, 0.12);
    --border-strong: rgba(96, 165, 250, 0.22);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --blue: #2563eb;
    --blue-2: #3b82f6;
    --blue-soft: rgba(37, 99, 235, 0.18);
    --yellow: #facc15;
    --yellow-2: #f59e0b;
    --yellow-soft: rgba(250, 204, 21, 0.16);
    --success: #22c55e;
    --danger: #ef4444;
    --pink: #ec4899;
    --primary: #6366f1;
    --primary-light: rgba(99, 102, 241, 0.16);
    --warning: #f59e0b;
    --radius: 8px;
    --shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.16);
    --font: "Segoe UI", Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    font-family: var(--font);
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.12), transparent 34%),
        linear-gradient(180deg, #0a1020 0%, #070b15 52%, #060912 100%);
}

a,
button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: inherit;
}

button,
a {
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

button:hover,
a:hover {
    transform: none;
}

::selection {
    background: rgba(37, 99, 235, 0.55);
    color: #ffffff;
}

::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.45);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb {
    background: rgba(96, 165, 250, 0.52);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(250, 204, 21, 0.72);
}

/* ===================================== */
/* BRAND                                 */
/* ===================================== */
.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.logo-main {
    display: block;
    max-width: 100%;
    object-fit: contain;
}

.login-brand__logo {
    width: min(260px, 56vw);
    height: 54px;
    object-fit: contain;
    object-position: left center;
}

/* ===================================== */
/* BRANDING - PADRAO INSTITUCIONAL       */
/* ===================================== */

/* Login: logo vertical */
.brand-login {
    display: block;
    width: min(180px, 40vw);
    height: auto;
    max-height: 120px;
    object-fit: contain;
    flex: 0 0 auto;
}

/* Sidebar expandida: logo horizontal branca */
.brand-sidebar-expanded {
    display: block;
    width: 100%;
    height: 42px;
    object-fit: contain;
    object-position: left center;
    flex: 0 0 auto;
}

/* Sidebar recolhida: somente simbolo */
.brand-sidebar-collapsed {
    display: none;
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex: 0 0 auto;
}

/* TV: logo horizontal colorida */
.brand-tv {
    display: block;
    width: clamp(120px, 14vw, 200px);
    height: auto;
    max-height: 64px;
    object-fit: contain;
    flex: 0 0 auto;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(96, 165, 250, 0.18);
    padding: 6px 12px;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.18);
}

/* Admin header: logo horizontal branca */
.brand-admin {
    display: block;
    width: min(160px, 30vw);
    height: auto;
    max-height: 48px;
    object-fit: contain;
    flex: 0 0 auto;
    margin-bottom: 8px;
}

.brand-text {
    display: none;
    gap: 0;
    min-width: 0;
}

.brand-text small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0;
}

.brand-text strong {
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
    font-weight: 700;
}

.login-navbar .brand-lockup {
    min-height: 58px;
}

.admin-kicker,
.tv-kicker,
.login-kicker,
.form-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--yellow);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.admin-kicker::before,
.tv-kicker::before,
.login-kicker::before,
.form-kicker::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--blue-2);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
}

/* ===================================== */
/* APP SHELL / SIDEBAR                   */
/* ===================================== */
html.sidebar-collapsed-pending {
    --sidebar-width: 60px;
}

html.sidebar-collapsed-pending .app-sidebar__brand-logo--full,
html.sidebar-collapsed-pending .app-sidebar__brand-text,
html.sidebar-collapsed-pending .app-sidebar__text {
    opacity: 0;
}

html.sidebar-collapsed-pending .app-sidebar__brand-logo--mark {
    display: block;
}

.app-shell {
    --sidebar-width: 228px;
    min-height: 100vh;
    display: block;
    transition: none;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.1), transparent 34%),
        linear-gradient(180deg, #0a1020 0%, #070b15 52%, #060912 100%);
}

.app-shell--sidebar-collapsed {
    --sidebar-width: 60px;
}

.app-main {
    min-width: 0;
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    transition: margin-left 220ms ease, width 220ms ease;
}

.app-shell--sidebar-ready .app-main {
    transition: padding 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-main--tv {
    min-height: 100vh;
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 80;
    min-width: 0;
    width: var(--sidebar-width);
    height: 100dvh;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
    border-right: 1px solid rgba(96, 165, 250, 0.14);
    background:
        linear-gradient(180deg, rgba(9, 14, 27, 0.98), rgba(5, 8, 16, 0.98)),
        var(--surface);
    box-shadow: 12px 0 28px rgba(0, 0, 0, 0.18);
}

.app-sidebar--ready {
    transition:
        padding 0.24s cubic-bezier(0.4, 0, 0.2, 1),
        gap 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-sidebar--ready .app-sidebar__text,
.app-sidebar--ready .app-sidebar__brand-logo--full,
.app-sidebar--ready .app-sidebar__brand-logo--mark {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.app-sidebar__text {
    white-space: nowrap;
    overflow: hidden;
    opacity: 1;
    transform: translateX(0);
}

.app-sidebar__brand {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    border-radius: var(--radius);
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.18);
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.app-sidebar__brand:hover,
.app-sidebar__brand:focus-visible {
    outline: none;
    border-color: rgba(250, 204, 21, 0.36);
    background: rgba(250, 204, 21, 0.08);
}

.app-sidebar__logo {
    width: 42px;
    height: 42px;
}

.app-sidebar__brand-logo {
    display: block;
    width: 100%;
    height: 42px;
    object-fit: contain;
    object-position: center;
    flex: 0 0 auto;
}

.app-sidebar__brand-logo--expanded {
    display: block;
}

.app-sidebar__brand-logo--collapsed {
    display: none;
}

.app-sidebar__brand-logo--full {
    width: 100%;
    height: 54px;
    object-position: center;
}

.app-sidebar__brand-logo--mark {
    display: none;
    width: 42px;
    height: 42px;
}

.app-sidebar__brand-mark {
    width: 42px;
    height: 42px;
}

.app-sidebar__brand-text {
    display: none;
    text-align: left;
}

.app-sidebar__brand-text small {
    display: none;
    font-size: 10px;
    color: var(--muted);
}

.app-sidebar__brand-text strong {
    display: none;
    font-size: 24px;
}

.app-sidebar__title {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.app-sidebar__title strong {
    color: #ffffff;
    font-size: 17px;
    line-height: 1.1;
    font-weight: 700;
}

.app-sidebar__title small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.25;
    text-transform: uppercase;
}


.app-sidebar__nav {
    display: grid;
    gap: 8px;
}

.app-sidebar__link,
.app-sidebar__logout-button {
    min-height: 40px;
    width: 100%;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    border-radius: 10px;
    border: 1px solid transparent;
    color: var(--muted);
    background: transparent;
    text-decoration: none;
    cursor: pointer;
    transition:
        color 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.app-sidebar__link span,
.app-sidebar__logout-button span {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    color: #ffffff;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.14);
    font-size: 11px;
    font-weight: 700;
    transition:
        width 0.2s ease,
        height 0.2s ease,
        background 0.18s ease,
        border-color 0.18s ease;
}

.app-sidebar__icon-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: invert(1);
    opacity: 0.92;
}

.app-sidebar__link strong,
.app-sidebar__logout-button strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 700;
}

.app-sidebar__link:hover,
.app-sidebar__link:focus-visible,
.app-sidebar__logout-button:hover,
.app-sidebar__logout-button:focus-visible {
    color: #ffffff;
    outline: none;
    border-color: rgba(96, 165, 250, 0.28);
    background: rgba(37, 99, 235, 0.12);
}

.app-sidebar__link--active {
    color: #ffffff;
    border-color: rgba(250, 204, 21, 0.32);
    background:
        linear-gradient(90deg, rgba(250, 204, 21, 0.1), rgba(37, 99, 235, 0.08)),
        rgba(15, 23, 42, 0.8);
    box-shadow: inset 3px 0 0 var(--yellow);
}

.app-sidebar__link--active span {
    color: #0f172a;
    background: linear-gradient(135deg, var(--yellow), var(--yellow-2));
    border-color: rgba(250, 204, 21, 0.4);
}

.app-sidebar__link--active .app-sidebar__icon-img {
    filter: none;
    opacity: 1;
}

.app-sidebar__link--disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.app-sidebar__link--disabled:hover {
    color: var(--muted);
    border-color: transparent;
    background: transparent;
    transform: none;
}

.app-sidebar__logout {
    margin-top: auto;
}

.app-sidebar__logout-button {
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.22);
    background: rgba(239, 68, 68, 0.08);
}

.app-sidebar__logout-button span {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.24);
}

.app-sidebar--collapsed {
    align-items: center;
    padding-inline: 6px;
    gap: 10px;
}

.app-sidebar--collapsed .app-sidebar__brand {
    width: 52px;
    min-height: 52px;
    justify-content: center;
    padding: 4px;
}

.app-sidebar--collapsed .app-sidebar__brand-logo {
    width: 44px;
    height: 44px;
}

.app-sidebar--collapsed .app-sidebar__brand-logo--expanded {
    display: none;
}

.app-sidebar--collapsed .app-sidebar__brand-logo--collapsed {
    display: block;
    width: 44px;
    height: 44px;
}

.app-sidebar--collapsed .app-sidebar__logo,
.app-sidebar--collapsed .app-sidebar__brand-logo--mark {
    width: 30px;
    height: 30px;
}

.app-sidebar--collapsed .app-sidebar__brand-logo--full {
    display: none;
}

.app-sidebar--collapsed .app-sidebar__brand-text {
    display: none;
}

.app-sidebar--collapsed .app-sidebar__brand-logo--mark {
    display: block;
}

.app-sidebar--collapsed .app-sidebar__title,
.app-sidebar--collapsed .app-sidebar__text {
    opacity: 0;
    transform: translateX(-6px);
    pointer-events: none;
    width: 0;
    margin: 0;
    padding: 0;
}


.app-sidebar--collapsed .app-sidebar__nav {
    gap: 4px;
}

.app-sidebar--collapsed .app-sidebar__link,
.app-sidebar--collapsed .app-sidebar__logout-button {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 40px;
    padding: 5px;
}

.app-sidebar--collapsed .app-sidebar__link span,
.app-sidebar--collapsed .app-sidebar__logout-button span {
    width: 30px;
    height: 30px;
}

.app-sidebar--collapsed .app-sidebar__icon-img {
    width: 18px;
    height: 18px;
}

.app-shell--tv {
    --sidebar-width: 68px;
}

.app-sidebar--tv {
    padding: 12px 9px;
    gap: 14px;
}

.app-sidebar--tv .app-sidebar__brand {
    min-height: 58px;
    justify-content: center;
    padding: 8px;
}

.app-sidebar--tv .app-sidebar__brand-logo {
    width: 38px;
    height: 38px;
}

.app-sidebar--tv .app-sidebar__logo {
    width: 38px;
    height: 38px;
}

.app-sidebar--tv .app-sidebar__brand-logo--full {
    display: none;
}

.app-sidebar--tv .app-sidebar__brand-logo--mark {
    display: block;
    width: 38px;
    height: 38px;
}

.app-sidebar--tv .app-sidebar__brand-text {
    display: none;
}

.app-sidebar--tv .app-sidebar__title,
.app-sidebar--tv .app-sidebar__text,
.app-sidebar--tv .app-sidebar__link--disabled {
    display: none;
}

.app-sidebar--tv .app-sidebar__link {
    min-height: 46px;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 6px;
}

.app-sidebar--tv .app-sidebar__link span {
    width: 36px;
    height: 36px;
}

/* ===================================== */
/* LOGIN                                 */
/* ===================================== */
body.login-page {
    min-height: 100vh;
    overflow-x: hidden;
}

.login-shell {
    min-height: 100vh;
    padding: 22px 44px 44px;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 40px;
}

.login-navbar {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 14px 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(9, 14, 27, 0.84);
    box-shadow: var(--shadow-soft);
}



.login-panel {
    width: min(1480px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(430px, 0.85fr) minmax(520px, 1.15fr);
    gap: 56px;
    align-items: center;
}

.login-copy {
    min-width: 0;
}

.login-copy h1 {
    color: #ffffff;
    font-size: 58px;
    line-height: 1.08;
    font-weight: 700;
    max-width: 12ch;
    margin-bottom: 22px;
}

.login-copy h1 strong {
    color: var(--blue-2);
    display: block;
}

.login-copy p {
    color: var(--muted);
    font-size: 19px;
    line-height: 1.6;
    max-width: 48ch;
}

.login-feature-list {
    margin-top: 26px;
    display: grid;
    gap: 12px;
}

.login-feature {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: rgba(15, 24, 39, 0.72);
}

.login-feature span {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-weight: 700;
    background: var(--blue-soft);
}

.login-feature strong {
    color: #ffffff;
    display: block;
    margin-bottom: 4px;
    font-size: 17px;
}

.login-feature p {
    font-size: 15px;
    line-height: 1.45;
}

.login-feature-blue {
    border-left: 4px solid var(--blue-2);
}

.login-feature-yellow {
    border-left: 4px solid var(--yellow);
}

.login-feature-yellow span {
    background: rgba(250, 204, 21, 0.16);
    color: var(--yellow);
}

.login-feature-pink {
    border-left: 4px solid var(--pink);
}

.login-feature-pink span {
    background: rgba(236, 72, 153, 0.16);
    color: #f9a8d4;
}

.login-card {
    min-height: 620px;
    padding: 28px;
    display: grid;
    align-content: center;
    gap: 18px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background:
        linear-gradient(145deg, rgba(21, 31, 49, 0.94), rgba(7, 11, 21, 0.92)),
        var(--surface);
    box-shadow: var(--shadow);
}

.login-preview-card {
    position: relative;
    min-height: 300px;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid rgba(96, 165, 250, 0.22);
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.2), transparent 46%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(2, 6, 23, 0.92));
    padding: 34px;
}

.preview-sun {
    position: absolute;
    right: 52px;
    top: 28px;
    width: 128px;
    height: 58px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--yellow), var(--yellow-2));
    transform: rotate(-8deg);
    opacity: 0.92;
}

.preview-window {
    position: relative;
    z-index: 1;
    width: min(440px, 100%);
    height: 230px;
    margin: 20px auto 0;
    border-radius: var(--radius);
    background: #070b15;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
    display: grid;
    grid-template-columns: 98px 1fr;
    overflow: hidden;
}

.preview-sidebar {
    background: rgba(15, 23, 42, 0.9);
    border-right: 1px solid var(--border);
}

.preview-calendar {
    padding: 28px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 34px;
    gap: 10px;
}

.preview-calendar span,
.preview-calendar strong {
    border-radius: 6px;
    background: rgba(148, 163, 184, 0.12);
}

.preview-calendar strong:nth-of-type(1) {
    grid-column: 1 / 3;
    background: rgba(37, 99, 235, 0.58);
    border: 1px solid rgba(96, 165, 250, 0.7);
}

.preview-calendar strong:nth-of-type(2) {
    grid-column: 2 / 4;
    background: rgba(250, 204, 21, 0.44);
    border: 1px solid rgba(250, 204, 21, 0.65);
}

.preview-calendar strong:nth-of-type(3) {
    grid-column: 1 / 3;
    background: rgba(236, 72, 153, 0.36);
    border: 1px solid rgba(236, 72, 153, 0.52);
}

.preview-status {
    position: absolute;
    right: 24px;
    bottom: 22px;
    z-index: 2;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid var(--border);
    color: #ffffff;
    font-weight: 700;
}

.preview-status::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
}

.login-card h2 {
    color: #ffffff;
    font-size: 28px;
    line-height: 1.1;
}

.google-login-button,
.admin-logout-button,
.admin-action-card,
.btn-editar,
.btn-deletar,
.tv-switch-link,
.tv-action-link {
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 700;
}

.google-login-button {
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 18px;
    color: #0f172a;
    background: linear-gradient(135deg, var(--yellow), var(--yellow-2));
    box-shadow: 0 8px 20px rgba(250, 204, 21, 0.14);
    border: 1px solid rgba(250, 204, 21, 0.6);
}

.google-mark {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    background: var(--blue);
    font-weight: 700;
}

.oauth-setup-alert,
.login-message,
.admin-empty,
.form-alerta {
    border-radius: var(--radius);
    padding: 14px 16px;
    line-height: 1.45;
}

.oauth-setup-alert {
    display: grid;
    gap: 10px;
    color: #fde68a;
    background: rgba(250, 204, 21, 0.12);
    border: 1px solid rgba(250, 204, 21, 0.34);
}

.oauth-setup-alert code {
    display: block;
    max-width: 100%;
    padding: 9px 10px;
    overflow-wrap: anywhere;
    border-radius: 6px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.52);
}

.login-message-success {
    color: #bbf7d0;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.34);
}

.login-message-error {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.34);
}

.login-links a {
    color: var(--yellow);
    font-weight: 700;
    text-decoration: none;
}

/* ===================================== */
/* ADMIN / COORDENADORAS                */
/* ===================================== */
body.admin-page,
body.form-page {
    min-height: 100vh;
    overflow-x: hidden;
}

.admin-shell,
.coordenadora-shell {
    width: min(1500px, calc(100% - 44px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 28px 0 44px;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 22px;
}

.coordenadora-shell {
    padding-bottom: 126px;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 22px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.58);
    box-shadow: var(--shadow-soft);
}

.admin-header h1 {
    color: #ffffff;
    font-size: clamp(30px, 3vw, 40px);
    line-height: 1.08;
    font-weight: 700;
}

.admin-header p {
    margin-top: 8px;
    color: var(--muted);
    font-size: 15px;
}

.admin-header strong {
    color: #ffffff;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.admin-logout-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.58);
    color: #ffffff;
    padding: 0 18px;
    cursor: pointer;
}

.admin-link-button {
    text-decoration: none;
}

.admin-logout-button:hover,
.admin-link-button:hover {
    border-color: var(--border-strong);
    background: rgba(37, 99, 235, 0.16);
}

.admin-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    gap: 20px;
    align-content: start;
    align-items: start;
}

.admin-main-column,
.admin-side-column {
    display: grid;
    gap: 20px;
    align-content: start;
}

.admin-side-column .admin-coordinator-grid {
    grid-template-columns: 1fr;
}

.admin-side-coordenadoras .admin-mini-card span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.admin-grid,
.admin-coordinator-grid {
    display: grid;
    gap: 16px;
}

.admin-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-coordinator-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-section,
.coordenadora-panel,
.admin-card,
.admin-mini-card,
.admin-action-card,
.coordenadora-item,
.coordenadora-check {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background:
        linear-gradient(180deg, rgba(21, 31, 49, 0.78), rgba(13, 20, 35, 0.78)),
        var(--surface);
    box-shadow: var(--shadow-soft);
}

.admin-section,
.coordenadora-panel {
    padding: clamp(18px, 1.8vw, 22px);
    min-width: 0;
}

.admin-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.admin-section-header span {
    color: var(--yellow);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.admin-section-header strong {
    color: #ffffff;
    font-size: clamp(19px, 1.8vw, 22px);
    line-height: 1.15;
}

.admin-section-header small {
    color: var(--subtle);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.admin-section-header>div {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.admin-card,
.admin-mini-card,
.admin-action-card {
    color: var(--text);
    text-decoration: none;
}

.admin-card {
    min-height: 190px;
    padding: 22px;
    display: grid;
    align-content: space-between;
    gap: 16px;
}

.admin-card span {
    color: var(--yellow);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.admin-card strong {
    color: #ffffff;
    font-size: 25px;
    line-height: 1.12;
}

.admin-card p,
.admin-mini-card span,
.admin-calendar-item p,
.coordenadora-item p,
.coordenadora-check small {
    color: var(--muted);
    line-height: 1.45;
}

.admin-card:hover,
.admin-mini-card:hover,
.admin-action-card:hover,
.coordenadora-item:hover {
    border-color: var(--border-strong);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.1);
}

.admin-empty {
    color: var(--muted);
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid var(--border);
}

.admin-alert {
    color: #fde68a;
    background: rgba(250, 204, 21, 0.12);
    border-color: rgba(250, 204, 21, 0.34);
}

.admin-calendar-list,
.admin-action-list,
.coordenadora-list {
    display: grid;
    gap: 12px;
}

.admin-calendar-item {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    border-left: 4px solid var(--blue-2);
    background: rgba(2, 6, 23, 0.22);
}

.admin-calendar-item>div:last-child {
    min-width: 0;
}

.admin-calendar-item>div:last-child strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-calendar-date {
    min-height: 62px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    background: rgba(37, 99, 235, 0.18);
    border: 1px solid rgba(96, 165, 250, 0.24);
}

.admin-calendar-date strong {
    color: #ffffff;
    font-size: 26px;
    line-height: 1;
}

.admin-calendar-date span {
    color: var(--yellow);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.admin-calendar-item>div:last-child strong,
.admin-mini-card strong,
.admin-action-card,
.coordenadora-item strong,
.coordenadora-check strong {
    color: #ffffff;
    font-weight: 700;
}

.admin-mini-card,
.admin-action-card {
    padding: 16px;
    min-height: 72px;
}

.admin-mini-card {
    display: grid;
    gap: 8px;
}

.admin-action-card {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
    border-left: 4px solid var(--blue-2);
}

.admin-action-card strong {
    flex: 1;
    min-width: 0;
}

.admin-action-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    background: rgba(37, 99, 235, 0.14);
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.admin-action-icon img {
    width: 21px;
    height: 21px;
    object-fit: contain;
    filter: invert(1);
}

.admin-action-card::after {
    content: "›";
    color: var(--muted);
    font-size: 18px;
}

.week-focus-control {
    position: relative;
    overflow: hidden;
    border-color: rgba(96, 165, 250, 0.22);
    background:
        linear-gradient(180deg, rgba(21, 31, 49, 0.78), rgba(13, 20, 35, 0.78)),
        var(--surface);
    box-shadow: var(--shadow-soft);
}

.week-focus-control::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--blue-2);
}

.week-focus-control .admin-section-header {
    position: relative;
    z-index: 1;
    align-items: center;
}

.week-focus-control__status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    background: rgba(15, 23, 42, 0.74);
    color: var(--subtle);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
}

.week-focus-control__status--active {
    border-color: rgba(34, 197, 94, 0.36);
    background: rgba(34, 197, 94, 0.14);
    color: #bbf7d0;
}

.week-focus-control__preview {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(160px, 0.75fr) minmax(0, 1.7fr) minmax(150px, 0.7fr);
    gap: 14px;
    align-items: stretch;
    margin-top: 18px;
}

.week-focus-control__preview > div {
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.34);
}

.week-focus-control__eyebrow,
.week-focus-control__meta span {
    display: block;
    margin-bottom: 8px;
    color: var(--yellow);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.week-focus-control__preview strong {
    display: block;
    color: #ffffff;
    font-size: clamp(18px, 1.6vw, 24px);
    line-height: 1.12;
}

.week-focus-control__content h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(24px, 2.4vw, 36px);
    line-height: 1.06;
}

.week-focus-control__content p {
    margin: 10px 0 0;
    max-width: 66ch;
    color: #dbeafe;
    font-size: 15px;
    line-height: 1.55;
}

.week-focus-control__meta strong {
    color: #dbeafe;
    font-size: 16px;
}

.week-focus-control__actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.week-focus-control__button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.week-focus-control__button--ghost {
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(96, 165, 250, 0.36);
    background: rgba(37, 99, 235, 0.14);
    color: #bfdbfe;
    font-weight: 700;
}

.week-focus-control__button--ghost:hover {
    border-color: rgba(96, 165, 250, 0.62);
    background: rgba(37, 99, 235, 0.24);
    color: #ffffff;
}

/* ===================================== */
/* WEEK FOCUS COLLAPSIBLE CARD           */
/* ===================================== */
.week-focus-collapsible__details {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.week-focus-collapsible__details.is-animating {
    overflow: hidden;
}

.week-focus-collapsible__summary {
    cursor: pointer;
    user-select: none;
    list-style: none;
    border-radius: var(--radius);
}

.week-focus-collapsible__summary::-webkit-details-marker {
    display: none;
}

.week-focus-collapsible__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.week-focus-collapsible__summary-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px;
    border: 1px solid rgba(96, 165, 250, 0.16);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.2);
}

.week-focus-collapsible__summary-meta span::before,
.week-focus-collapsible__toggle::before,
.week-focus-collapsible__toggle span::before {
    content: none;
    display: none;
}

.week-focus-collapsible__segment,
.week-focus-collapsible__summary-meta .week-focus-control__status,
.week-focus-collapsible__toggle {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: none;
}

.week-focus-collapsible__segment {
    border: 1px solid rgba(96, 165, 250, 0.22);
    background: rgba(37, 99, 235, 0.12);
    color: #dbeafe;
}

.week-focus-collapsible__summary-meta .week-focus-control__status {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.64);
    color: #cbd5e1;
}

.week-focus-collapsible__summary-meta .week-focus-control__status--active {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.12);
    color: #bbf7d0;
}

.week-focus-collapsible__toggle {
    min-width: 86px;
    border: 1px solid rgba(250, 204, 21, 0.24);
    background: rgba(250, 204, 21, 0.1);
    color: #fde68a;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.week-focus-collapsible__toggle:hover {
    border-color: rgba(250, 204, 21, 0.42);
    background: rgba(250, 204, 21, 0.16);
    color: #ffffff;
}

.week-focus-collapsible__toggle-open,
.week-focus-collapsible__toggle-closed {
    white-space: nowrap;
}

.week-focus-collapsible__details:not([open]) .week-focus-collapsible__toggle-open {
    display: none;
}

.week-focus-collapsible__details[open] .week-focus-collapsible__toggle-closed {
    display: none;
}

.week-focus-collapsible__details.is-collapsed .week-focus-collapsible__toggle-open {
    display: none;
}

.week-focus-collapsible__details.is-collapsed .week-focus-collapsible__toggle-closed {
    display: inline;
}

.week-focus-collapsible__content {
    position: relative;
    z-index: 1;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
    will-change: max-height, opacity, transform;
    transition:
        max-height 320ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 220ms ease,
        transform 260ms ease;
}

.week-focus-collapsible__details.is-collapsed .week-focus-collapsible__content {
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .week-focus-collapsible__content {
        transition: none;
        will-change: auto;
    }
}

/* ===================================== */
/* ADMIN DASHBOARD - ALISSANDRA          */
/* ===================================== */
.admin-header--dashboard {
    align-items: center;
    padding: clamp(20px, 2vw, 28px);
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.14), transparent 42%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(10, 16, 30, 0.94));
}

.admin-header__brand {
    min-width: 0;
}

.admin-header__brand p {
    max-width: 62ch;
}

.admin-header__account {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.admin-user-card {
    min-width: 190px;
    padding: 12px 14px;
    display: grid;
    gap: 3px;
    border-radius: var(--radius);
    border: 1px solid rgba(96, 165, 250, 0.2);
    background: rgba(2, 6, 23, 0.28);
}

.admin-user-card span {
    color: var(--yellow);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.admin-user-card strong,
.admin-user-card small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-user-card strong {
    color: #ffffff;
    font-size: 15px;
}

.admin-user-card small {
    color: var(--muted);
    font-size: 12px;
}

.admin-dashboard--control {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
    gap: 22px;
}

.admin-main-column--control,
.admin-side-column--control {
    gap: 18px;
}

.admin-dashboard--control .admin-section {
    background:
        linear-gradient(180deg, rgba(21, 31, 49, 0.86), rgba(10, 16, 30, 0.94)),
        var(--surface);
}

.admin-dashboard--control .week-focus-control {
    padding: clamp(22px, 2vw, 30px);
}

.admin-dashboard--control .week-focus-control__preview {
    grid-template-columns: minmax(180px, 0.75fr) minmax(0, 1.65fr) minmax(150px, 0.7fr);
}

.admin-dashboard--control .week-focus-control__preview>div {
    border-radius: var(--radius);
}

.admin-dashboard--control .week-focus-control__content h2 {
    font-size: clamp(30px, 3.2vw, 46px);
}

.admin-dashboard--control .week-focus-control__content p {
    color: #e0ecff;
}

.admin-summary-panel {
    border-color: rgba(96, 165, 250, 0.22);
}

.admin-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 0;
}

.admin-stat-card {
    min-height: 116px;
    position: relative;
    overflow: hidden;
    padding: 16px;
    border-color: rgba(96, 165, 250, 0.18);
    background:
        linear-gradient(180deg, rgba(37, 99, 235, 0.11), rgba(2, 6, 23, 0.2)),
        rgba(15, 23, 42, 0.72);
}

.admin-stat-card::after {
    content: "";
    position: absolute;
    right: -18px;
    top: -22px;
    width: 72px;
    height: 72px;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.1);
}

.admin-stat-card span {
    color: var(--subtle);
    text-transform: uppercase;
}

.admin-stat-card strong {
    font-size: clamp(30px, 3.2vw, 42px);
}

.admin-stat-card small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.admin-stat-card--pending {
    border-top: 3px solid var(--yellow);
}

.admin-stat-card--progress {
    border-top: 3px solid var(--blue-2);
}

.admin-stat-card--done {
    border-top: 3px solid var(--success);
}

.admin-stat-card--urgent {
    border-top: 3px solid var(--danger);
    border-color: rgba(239, 68, 68, 0.34);
    background:
        linear-gradient(180deg, rgba(239, 68, 68, 0.12), rgba(2, 6, 23, 0.22)),
        rgba(15, 23, 42, 0.72);
}

.admin-demand-feed .demanda-admin-list,
.admin-agenda-panel .admin-calendar-list {
    max-height: 430px;
    overflow-y: auto;
    padding-right: 4px;
}

.admin-agenda-panel .admin-calendar-list {
    max-height: 340px;
}

.admin-side-column--control .admin-section {
    padding: 18px;
}

.admin-side-link,
.admin-inline-action {
    color: #bfdbfe;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.admin-side-link:hover,
.admin-inline-action:hover {
    color: #ffffff;
}

.admin-side-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.admin-inline-action {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-radius: var(--radius);
    border: 1px solid rgba(96, 165, 250, 0.2);
    background: rgba(37, 99, 235, 0.1);
}

.admin-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.admin-quick-grid .admin-action-card {
    min-height: 76px;
    padding: 13px;
    border-left-width: 3px;
}

.admin-quick-grid .admin-action-card strong {
    font-size: 13px;
    line-height: 1.2;
}

.admin-side-coordenadoras .admin-coordinator-grid {
    gap: 10px;
}

.admin-side-coordenadoras .admin-mini-card {
    min-height: 70px;
    padding-top: 14px;
    padding-bottom: 14px;
}

@media (max-width: 1220px) {
    .admin-dashboard--control {
        grid-template-columns: 1fr;
    }

    .admin-side-column--control {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .admin-header--dashboard,
    .admin-header__account {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-user-card {
        min-width: 0;
    }

    .admin-stat-grid,
    .admin-side-column--control {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .admin-stat-grid,
    .admin-quick-grid,
    .admin-side-actions,
    .admin-side-column--control {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1180px) {
    .week-focus-control__preview {
        grid-template-columns: 1fr 1fr;
    }

    .week-focus-control__content {
        grid-column: 1 / -1;
        order: -1;
    }
}

/* ===================================== */
/* TV - REFINO DE ESCALA E AUTO-SCROLL   */
/* ===================================== */

.tv-dashboard-mode [data-tv-autoscroll] {
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.tv-dashboard-mode [data-tv-autoscroll]::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.tv-dashboard-mode [data-tv-autoscroll]:hover,
.tv-dashboard-mode [data-tv-autoscroll]:focus-within {
    scrollbar-width: thin;
}

.tv-dashboard-mode [data-tv-autoscroll]:hover::-webkit-scrollbar,
.tv-dashboard-mode [data-tv-autoscroll]:focus-within::-webkit-scrollbar {
    width: 6px;
}

.tv-dashboard-mode [data-tv-autoscroll]:hover::-webkit-scrollbar-thumb,
.tv-dashboard-mode [data-tv-autoscroll]:focus-within::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.45);
}

.tv-page--semana.tv-dashboard-mode .tv-shell--semana {
    gap: clamp(6px, 0.75vh, 10px);
    padding: clamp(8px, 1vh, 14px);
}

.tv-page--semana.tv-dashboard-mode .tv-topbar {
    min-height: clamp(56px, 7.4vh, 76px);
    padding: clamp(9px, 1.1vh, 14px) clamp(12px, 1.4vw, 18px);
}

.tv-page--semana.tv-dashboard-mode .tv-topbar h1 {
    font-size: clamp(24px, 2.2vw, 32px);
}

.tv-page--semana.tv-dashboard-mode .tv-kicker {
    font-size: clamp(10px, 0.8vw, 12px);
}

.tv-page--semana.tv-dashboard-mode .tv-week-main-grid {
    grid-template-columns: minmax(190px, 0.68fr) minmax(0, 1.45fr) minmax(220px, 0.82fr);
    gap: clamp(8px, 0.9vw, 12px);
}

.tv-page--semana.tv-dashboard-mode .tv-card,
.tv-page--semana.tv-dashboard-mode .tv-panel-block,
.tv-page--semana.tv-dashboard-mode .tv-section {
    border-radius: 14px;
}

.tv-page--semana.tv-dashboard-mode .tv-panel-block,
.tv-page--semana.tv-dashboard-mode .tv-section {
    padding: clamp(10px, 1vw, 14px);
}

.tv-page--semana.tv-dashboard-mode .tv-panel-block h2,
.tv-page--semana.tv-dashboard-mode .tv-section h2 {
    margin-bottom: 8px;
    font-size: clamp(17px, 1.35vw, 22px);
}

.tv-page--semana.tv-dashboard-mode .tv-week-feature {
    min-height: clamp(252px, 35vh, 380px);
    max-height: 50vh;
}

.tv-page--semana.tv-dashboard-mode .tv-week-feature__content {
    gap: clamp(7px, 0.9vh, 11px);
    padding: clamp(10px, 1.35vw, 22px);
}

.tv-page--semana.tv-dashboard-mode .tv-week-feature__label {
    min-height: 26px;
    padding: 5px 10px;
    font-size: clamp(10px, 0.78vw, 12px);
}

.tv-page--semana.tv-dashboard-mode .tv-week-feature__segment {
    font-size: clamp(16px, 1.65vw, 25px);
}

.tv-page--semana.tv-dashboard-mode .tv-week-feature__title {
    max-width: 14ch;
    font-size: clamp(34px, 4.4vw, 66px);
}

.tv-page--semana.tv-dashboard-mode .tv-week-feature__description {
    max-width: 54ch;
    font-size: clamp(14px, 1.22vw, 19px);
    line-height: 1.34;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.tv-page--semana.tv-dashboard-mode .tv-week-feature__meta {
    gap: 7px;
}

.tv-page--semana.tv-dashboard-mode .tv-week-feature__meta span {
    min-height: 30px;
    padding: 6px 10px;
    font-size: clamp(11px, 0.8vw, 13px);
}

.tv-page--semana.tv-dashboard-mode .semana-demandas-tv {
    margin-top: 4px;
    padding: 10px;
    max-height: clamp(76px, 12vh, 112px);
}

.tv-page--semana.tv-dashboard-mode .semana-demandas-tv__list {
    gap: 7px;
}

.tv-page--semana.tv-dashboard-mode .semana-demandas-tv__item {
    padding: 7px 9px;
}

.tv-page--semana.tv-dashboard-mode .tv-aviso,
.tv-page--semana.tv-dashboard-mode .tv-mini-card,
.tv-page--semana.tv-dashboard-mode .manutencao-card {
    padding: clamp(9px, 0.9vw, 12px);
}

.tv-page--semana.tv-dashboard-mode .tv-mini-card strong,
.tv-page--semana.tv-dashboard-mode .tv-aviso strong,
.tv-page--semana.tv-dashboard-mode .manutencao-card strong {
    font-size: clamp(13px, 1.05vw, 16px);
}

.tv-page--semana.tv-dashboard-mode .tv-mini-card span,
.tv-page--semana.tv-dashboard-mode .tv-aviso span,
.tv-page--semana.tv-dashboard-mode .manutencao-card p {
    font-size: clamp(12px, 0.88vw, 14px);
    line-height: 1.32;
}

.tv-page--semana.tv-dashboard-mode .tv-week-maintenance-row {
    flex-basis: clamp(136px, 20vh, 184px);
    max-height: clamp(136px, 20vh, 184px);
}

.tv-page--semana.tv-dashboard-mode .tv-week-maintenance-grid {
    gap: clamp(8px, 0.85vw, 12px);
}

.tv-page--semana.tv-dashboard-mode .tv-week-maintenance-grid .manutencao-card {
    min-height: 0;
}

.calendar-dashboard-mode .calendar-week-tasks[data-tv-autoscroll] {
    overflow-y: auto;
}

@media (prefers-reduced-motion: reduce) {
    .tv-dashboard-mode [data-tv-autoscroll] {
        scroll-behavior: auto;
    }
}

/* ===================================== */
/* TV SEMANA - SCROLL ESTAVEL E CARDS    */
/* ===================================== */

.tv-page--semana.tv-dashboard-mode .tv-panel-block,
.tv-page--semana.tv-dashboard-mode .tv-week-notices,
.tv-page--semana.tv-dashboard-mode .tv-week-maintenance-row {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.tv-page--semana.tv-dashboard-mode .tv-panel-block > h2,
.tv-page--semana.tv-dashboard-mode .tv-week-notices > h2,
.tv-page--semana.tv-dashboard-mode .tv-week-maintenance-row > h2 {
    flex: 0 0 auto;
}

.tv-page--semana.tv-dashboard-mode .tv-panel-scroll-body {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    align-content: start;
    gap: clamp(8px, 0.8vw, 12px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
}

.tv-page--semana.tv-dashboard-mode .tv-panel-scroll-body::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.tv-page--semana.tv-dashboard-mode .tv-week-side .tv-panel-block {
    gap: 8px;
}

.tv-page--semana.tv-dashboard-mode .tv-week-maintenance-row {
    flex-basis: clamp(162px, 24vh, 228px);
    max-height: clamp(162px, 24vh, 228px);
}

.tv-page--semana.tv-dashboard-mode .tv-week-maintenance-row .tv-panel-scroll-body {
    display: block;
    padding-bottom: 2px;
}

.tv-page--semana.tv-dashboard-mode .tv-week-maintenance-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: minmax(126px, auto);
    align-items: stretch;
    align-content: start;
    gap: clamp(9px, 0.9vw, 13px);
}

.tv-page--semana.tv-dashboard-mode .manutencao-card {
    min-height: 126px;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    overflow: visible;
}

.tv-page--semana.tv-dashboard-mode .manutencao-card > div {
    min-width: 0;
}

.tv-page--semana.tv-dashboard-mode .manutencao-card p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tv-page--semana.tv-dashboard-mode .manutencao-card span {
    width: fit-content;
    max-width: 100%;
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 9px;
    overflow-wrap: anywhere;
    white-space: normal;
    line-height: 1.1;
}

/* ===================================== */
/* TV SEMANA - POLIMENTO FINAL           */
/* ===================================== */

.tv-page--semana.tv-dashboard-mode .tv-week-feature__content--empty {
    max-width: 620px;
    gap: clamp(8px, 1vh, 12px);
    opacity: 0.92;
}

.tv-page--semana.tv-dashboard-mode .tv-week-feature__content--empty .tv-week-feature__segment {
    font-size: clamp(15px, 1.25vw, 21px) !important;
}

.tv-page--semana.tv-dashboard-mode .tv-week-feature__content--empty .tv-week-feature__title {
    max-width: 520px;
    font-size: clamp(28px, 3.4vw, 48px) !important;
    line-height: 1.04 !important;
}

.tv-page--semana.tv-dashboard-mode .tv-week-feature__content--empty .tv-week-feature__description {
    max-width: 500px;
    font-size: clamp(13px, 1.05vw, 17px) !important;
    line-height: 1.35 !important;
}

.tv-page--semana.tv-dashboard-mode .tv-week-feature--sem-configuracao {
    min-height: clamp(220px, 30vh, 330px);
}

.tv-page--semana.tv-dashboard-mode .tv-week-side {
    gap: clamp(8px, 1vh, 12px);
}

.tv-page--semana.tv-dashboard-mode .tv-week-side .tv-panel-block {
    display: flex;
    flex-direction: column;
}

.tv-page--semana.tv-dashboard-mode .tv-week-side .tv-mini-card {
    flex: 0 0 auto;
}

.tv-page--semana.tv-dashboard-mode .tv-week-maintenance-row {
    padding-bottom: clamp(10px, 1vw, 14px);
}

.tv-page--semana.tv-dashboard-mode .tv-week-maintenance-grid {
    align-items: stretch;
}

.tv-page--semana.tv-dashboard-mode .manutencao-card {
    min-width: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 8px;
}

.tv-page--semana.tv-dashboard-mode .manutencao-card p {
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.tv-page--semana.tv-dashboard-mode .manutencao-card span {
    max-width: 100%;
    justify-self: start;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tv-page--semana.tv-dashboard-mode [data-tv-autoscroll] [data-clone-scroll] {
    pointer-events: none;
}

@media (max-width: 720px) {
    .week-focus-control .admin-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .week-focus-control__preview {
        grid-template-columns: 1fr;
    }

    .week-focus-control__actions {
        display: grid;
    }
}

.admin-progress-panel {
    overflow: hidden;
}

.admin-progress-list {
    display: grid;
    gap: 13px;
}

.admin-progress-item {
    --progress: 0%;
    display: grid;
    gap: 9px;
    padding: 14px;
    border-radius: var(--radius);
    background: rgba(2, 6, 23, 0.24);
    border: 1px solid var(--border);
}

.admin-progress-item__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.admin-progress-item__header strong {
    color: #ffffff;
    font-size: 15px;
}

.admin-progress-item__header span {
    color: var(--yellow);
    font-size: 13px;
    font-weight: 700;
}

.admin-progress-bar,
.coord-progress__bar {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.admin-progress-bar__fill,
.coord-progress__fill {
    display: block;
    width: var(--progress);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--blue-2), var(--yellow));
    box-shadow: 0 0 18px rgba(59, 130, 246, 0.32);
}

.coordenadora-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.coordenadora-panel-wide {
    grid-column: 1 / -1;
}

.coordenadora-item {
    padding: 16px;
    display: grid;
    gap: 9px;
    border-left: 4px solid var(--blue-2);
}

.coordenadora-item span {
    justify-self: start;
    padding: 6px 9px;
    border-radius: var(--radius);
    background: rgba(250, 204, 21, 0.14);
    color: #fde68a;
    font-size: 12px;
    font-weight: 700;
}

.coordenadora-check {
    padding: 16px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    cursor: pointer;
}

.coordenadora-check input {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--yellow);
    cursor: pointer;
}

.coordenadora-check span {
    display: grid;
    gap: 5px;
}

.coordenadora-list-horizontal {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.coordenadora-list-horizontal .admin-empty {
    grid-column: 1 / -1;
}

.coordenadora-check--done {
    opacity: 0.72;
    border-color: rgba(34, 197, 94, 0.34);
    background: rgba(34, 197, 94, 0.08);
}

.coordenadora-check--done strong {
    text-decoration: line-through;
    text-decoration-thickness: 2px;
    text-decoration-color: rgba(34, 197, 94, 0.8);
}

.checklist-progress {
    padding: 5px 8px;
    border-radius: var(--radius);
    background: rgba(37, 99, 235, 0.14);
    border: 1px solid rgba(96, 165, 250, 0.22);
}

.coord-progress {
    display: grid;
    gap: 9px;
    margin-bottom: 14px;
    padding: 14px;
    border-radius: var(--radius);
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.coord-progress__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.coord-progress__label strong {
    color: var(--yellow);
    font-size: 14px;
}

.coord-progress__fill {
    width: 0%;
}

.coord-checklist__item--done small {
    color: var(--subtle);
}

.demanda-admin-panel,
.demanda-coordenadora-panel {
    border-color: rgba(96, 165, 250, 0.2);
}

.demanda-new-button {
    min-height: 42px;
    padding-inline: 16px;
    white-space: nowrap;
    text-decoration: none;
}

.demanda-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.demanda-summary-card {
    padding: 14px;
    display: grid;
    gap: 7px;
    border-radius: var(--radius);
    border: 1px solid rgba(96, 165, 250, 0.18);
    background: rgba(37, 99, 235, 0.09);
}

.demanda-summary-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.demanda-summary-card strong {
    color: #ffffff;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1;
}

.demanda-summary-card--warning {
    border-color: rgba(250, 204, 21, 0.32);
    background: rgba(250, 204, 21, 0.09);
}

.demanda-admin-list,
.demanda-grid {
    display: grid;
    gap: 14px;
}

.demanda-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.demanda-admin-card,
.demanda-card {
    padding: 16px;
    display: grid;
    gap: 12px;
    border-radius: var(--radius);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-left: 4px solid var(--blue-2);
    background: rgba(2, 6, 23, 0.26);
}

.demanda-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.demanda-card-header>div:first-child {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.demanda-card-header strong {
    color: #ffffff;
    font-size: 17px;
    line-height: 1.2;
}

.demanda-card-header span,
.demanda-meta,
.demanda-card p,
.demanda-admin-card p {
    color: var(--muted);
}

.demanda-card p,
.demanda-admin-card p {
    font-size: 14px;
}

.demanda-badge-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.demanda-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #0f172a;
    background: var(--yellow);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.demanda-badge--prioridade-baixa {
    background: #bfdbfe;
}

.demanda-badge--prioridade-media {
    background: #fde68a;
}

.demanda-badge--prioridade-alta,
.demanda-badge--prioridade-urgente {
    background: #fecaca;
    color: #7f1d1d;
}

.demanda-badge--status-pendente {
    background: #fde68a;
}

.demanda-badge--status-andamento {
    background: #bfdbfe;
}

.demanda-badge--status-concluida {
    background: #bbf7d0;
    color: #14532d;
}

.demanda-badge--status-cancelada {
    background: #cbd5e1;
    color: #334155;
}

.demanda-prioridade-alta {
    border-left-color: var(--yellow);
}

.demanda-prioridade-urgente {
    border-left-color: var(--danger);
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.2);
}

.demanda-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 12px;
    font-weight: 700;
}

.demanda-actions,
.demanda-status-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.demanda-status-form {
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.demanda-status-form label {
    color: var(--subtle);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.demanda-status-form select {
    min-height: 38px;
    min-width: 160px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    color: var(--text);
    background: rgba(15, 23, 42, 0.64);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0 34px 0 10px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.demanda-status-form select:hover {
    border-color: rgba(96, 165, 250, 0.32);
    background-color: rgba(15, 23, 42, 0.68);
}

.demanda-status-form select:focus {
    border-color: rgba(96, 165, 250, 0.52);
    background-color: rgba(15, 23, 42, 0.78);
    box-shadow: none;
    outline: none;
}

.demanda-action-button {
    min-height: 38px;
    padding-inline: 13px;
    font-size: 13px;
}

.demanda-action-button--success {
    background: linear-gradient(135deg, var(--success), #86efac);
}

.demanda-alerta {
    border-color: rgba(250, 204, 21, 0.24);
    background: rgba(250, 204, 21, 0.08);
    color: #fde68a;
}

.demanda-notification {
    margin: 0 0 18px;
    padding: 1px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.42), rgba(37, 99, 235, 0.28));
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.demanda-notification__card {
    display: grid;
    gap: 12px;
    padding: clamp(18px, 2vw, 24px);
    border-radius: calc(var(--radius) - 1px);
    background:
        linear-gradient(135deg, rgba(250, 204, 21, 0.08), transparent 42%),
        linear-gradient(180deg, rgba(21, 31, 49, 0.98), rgba(7, 11, 21, 0.98));
}

.demanda-notification__eyebrow,
.demanda-new-pill {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #0f172a;
    background: var(--yellow);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.demanda-notification h2 {
    max-width: 720px;
    color: #ffffff;
    font-size: clamp(22px, 2.4vw, 31px);
    line-height: 1.12;
}

.demanda-notification p {
    color: var(--muted);
    font-weight: 700;
}

.demanda-notification__preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.demanda-notification__preview article {
    padding: 12px;
    display: grid;
    gap: 5px;
    border-radius: var(--radius);
    border: 1px solid rgba(250, 204, 21, 0.18);
    background: rgba(2, 6, 23, 0.34);
}

.demanda-notification__preview strong {
    color: #ffffff;
    font-size: 14px;
}

.demanda-notification__preview span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.demanda-notification__actions {
    display: flex;
    justify-content: flex-end;
}

.demanda-new-pill {
    margin-top: 2px;
    background: rgba(250, 204, 21, 0.94);
}

.demanda-progress-label {
    color: var(--subtle);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.admin-flash {
    margin: 0 0 18px;
    padding: 12px 16px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 700;
}

.admin-flash--success {
    border-color: rgba(34, 197, 94, 0.28);
    background: rgba(34, 197, 94, 0.12);
    color: #bbf7d0;
}

.admin-flash--error {
    border-color: rgba(239, 68, 68, 0.34);
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
}

.demanda-form-container {
    max-width: 900px;
}

.operation-dock {
    position: fixed;
    left: calc(var(--sidebar-width, 260px) + (100vw - var(--sidebar-width, 260px)) / 2);
    bottom: 16px;
    z-index: 40;
    width: min(1200px, calc(100vw - var(--sidebar-width, 260px) - 32px));
    transform: translateX(-50%);
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid rgba(96, 165, 250, 0.28);
    border-top: 3px solid var(--blue-2);
    background:
        linear-gradient(180deg, rgba(21, 31, 49, 0.96), rgba(7, 11, 21, 0.98)),
        var(--surface);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

.operation-dock__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.operation-dock__header div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.operation-dock__header div>span {
    color: var(--yellow);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.operation-dock__header strong {
    color: #ffffff;
    font-size: 20px;
    line-height: 1.1;
}

.operation-dock__header p {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.operation-dock__toggle {
    min-height: 40px;
    flex: 0 0 auto;
    border: 1px solid rgba(250, 204, 21, 0.32);
    border-radius: var(--radius);
    padding: 0 14px;
    color: #0f172a;
    background: linear-gradient(135deg, var(--yellow), var(--yellow-2));
    cursor: pointer;
    font-weight: 700;
}

.operation-dock__content {
    max-height: min(42vh, 360px);
    margin-top: 12px;
    padding-top: 12px;
    overflow-y: auto;
    overflow-x: hidden;
    border-top: 1px solid var(--border);
}

.operation-dock--collapsed .operation-dock__content {
    display: none;
}

/* ===================================== */
/* TV DASHBOARDS                         */
/* ===================================== */
body.tv-page {
    width: 100%;
    min-height: 100vh;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
}

body.tv-dashboard-mode {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

.tv-dashboard-shell {
    width: 100vw;
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

.tv-dashboard-main {
    width: 100vw;
    height: 100vh;
    min-height: 0;
    max-height: 100vh;
    overflow: hidden;
}

.tv-dashboard-mode .app-sidebar,
.tv-dashboard-mode .tv-switch {
    display: none;
}

.tv-shell {
    min-height: 100vh;
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 22px;
    display: grid;
    grid-template-rows: auto minmax(280px, 1fr) minmax(230px, 0.62fr);
    gap: 16px;
}

.tv-topbar {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.74);
    box-shadow: var(--shadow-soft);
}

.tv-title-block {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.tv-brand__logo {
    width: clamp(120px, 14vw, 200px);
    height: auto;
    max-height: 64px;
    flex: 0 0 auto;
    object-fit: contain;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(96, 165, 250, 0.18);
    padding: 6px 12px;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.18);
}

.tv-topbar h1 {
    color: #ffffff;
    font-size: clamp(34px, 3.1vw, 42px);
    line-height: 1;
    font-weight: 700;
}

.tv-topbar p {
    margin-top: 8px;
    color: var(--muted);
    font-size: 17px;
}

.tv-switch {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.tv-switch-link,
.tv-action-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid var(--border);
    color: #ffffff;
    background: rgba(15, 23, 42, 0.8);
}

.tv-switch-link-active,
.tv-switch-link:hover,
.tv-action-link:hover {
    color: #0f172a;
    background: linear-gradient(135deg, var(--yellow), var(--yellow-2));
    border-color: rgba(250, 204, 21, 0.72);
}

.tv-semana-layout {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 370px;
    gap: 16px;
}

/* Backwards compatibility - .semana-hero é um alias para .tv-week-feature na TV */
.semana-hero {
    min-width: 0;
    min-height: 0;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.semana-hero-label {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 34px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #ffffff;
    font-size: clamp(11px, 1vw, 14px);
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.semana-hero h2 {
    position: relative;
    z-index: 1;
    color: #ffffff;
    font-size: clamp(46px, 6.2vw, 96px);
    font-weight: 700;
    line-height: 1;
    margin: 0;
    text-wrap: balance;
    letter-spacing: -0.02em;
}

.semana-hero h3 {
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 0;
    font-size: clamp(22px, 2.4vw, 38px);
    font-weight: 700;
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.semana-hero p {
    position: relative;
    z-index: 1;
    margin: 0;
    max-width: 62ch;
    font-size: clamp(18px, 1.7vw, 28px);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.semana-hero-footer {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.semana-hero-footer span {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: var(--radius);
    color: #ffffff;
    font-weight: 700;
    border: 1px solid var(--border);
}

.tv-side-panel,
.calendario-resumo {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1vh, 14px);
}

.tv-panel-block,
.tv-section {
    min-width: 0;
    min-height: 0;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow-soft);
}

.tv-panel-block {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1 1 0;
}

.tv-panel-block h2 {
    flex: 0 0 auto;
    padding: clamp(10px, 1.2vw, 16px);
    color: #ffffff;
    font-size: clamp(16px, 1.4vw, 20px);
    line-height: 1.15;
    margin: 0;
    border-bottom: 1px solid rgba(96, 165, 250, 0.12);
}

.tv-panel-scroll-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: clamp(10px, 1.2vw, 16px);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tv-section h2 {
    color: #ffffff;
    font-size: clamp(16px, 1.4vw, 20px);
    line-height: 1.15;
}

.tv-mini-card,
.tv-aviso,
.manutencao-card,
.calendario-item {
    border-radius: var(--radius);
    background: rgba(21, 31, 49, 0.86);
    border: 1px solid var(--border);
}

.tv-mini-card,
.tv-aviso {
    display: grid;
    gap: 4px;
    padding: clamp(8px, 1vw, 13px);
    border-left: 4px solid var(--blue-2);
}

.tv-mini-card strong,
.tv-aviso strong,
.manutencao-card strong,
.calendario-item strong {
    color: #ffffff;
    font-size: clamp(15px, 1.2vw, 17px);
    line-height: 1.25;
    min-width: 0;
    overflow-wrap: anywhere;
}

.tv-mini-card span,
.tv-aviso span,
.manutencao-card p,
.calendario-item span {
    color: var(--muted);
    font-size: clamp(13px, 1vw, 15px);
    line-height: 1.35;
}

.tv-card-alta,
.manutencao-alta,
.calendario-item-alta {
    border-left-color: var(--danger);
}

.tv-card-media,
.manutencao-media,
.calendario-item-media {
    border-left-color: var(--yellow);
}

.tv-card-baixa,
.manutencao-baixa,
.calendario-item-baixa {
    border-left-color: var(--success);
}

.tv-card-google,
.calendario-item-google {
    border-left-color: var(--blue-2);
    background: rgba(37, 99, 235, 0.16);
}

.tv-bottom-grid {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 16px;
}

.tv-section {
    padding: 16px;
    overflow: hidden;
}

.tv-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.manutencao-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.manutencao-card {
    min-height: 112px;
    padding: 13px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    border-left: 4px solid var(--blue-2);
    overflow: visible;
}

.manutencao-card p {
    margin-top: 4px;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.manutencao-card span {
    align-self: flex-start;
    flex: 0 0 auto;
    padding: 4px 7px;
    border-radius: var(--radius);
    color: #0f172a;
    background: var(--yellow);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.avisos-tv-lista,
.tv-panel-block .tv-mini-card,
.manutencao-grid,
.calendar-week-tasks {
    scroll-behavior: smooth;
}

/* ===================================== */
/* TV SEMANA EM FOCO - FULLSCREEN        */
/* ===================================== */
body.tv-page.tv-page--semana {
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

body.tv-page.tv-page--semana.tv-page--dashboard {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

body.tv-page.tv-page--semana .app-shell--tv {
    min-height: 100vh;
}

body.tv-page.tv-page--semana .app-shell--dashboard-tv {
    width: 100vw;
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

body.tv-page.tv-page--semana .app-main--tv.tv-shell--semana {
    min-height: 100vh;
}

body.tv-page.tv-page--semana.tv-page--dashboard .app-main--tv.tv-shell--semana {
    width: 100vw;
    height: 100vh;
    min-height: 0;
    max-height: 100vh;
    overflow: hidden;
}

.tv-shell.tv-shell--semana {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1vh, 14px);
    padding: clamp(10px, 1.2vh, 18px);
    min-height: 100vh;
    height: auto;
    max-height: none;
    overflow: visible;
    grid-template-rows: unset;
}

.tv-page--dashboard .tv-shell.tv-shell--semana {
    min-height: 0;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

.tv-shell--semana .tv-topbar {
    flex: 0 0 auto;
    min-height: clamp(64px, 9vh, 88px);
    padding: clamp(12px, 1.4vh, 18px) clamp(14px, 1.6vw, 20px);
}

.tv-dashboard-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.tv-dashboard-timer {
    min-height: 54px;
    min-width: 178px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 9px 15px;
    border-radius: var(--radius);
    border: 1px solid rgba(250, 204, 21, 0.32);
    color: #0f172a;
    background: linear-gradient(135deg, var(--yellow), var(--yellow-2));
    box-shadow: 0 6px 18px rgba(250, 204, 21, 0.12);
}

.tv-dashboard-timer span {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.tv-dashboard-timer strong {
    min-width: 46px;
    color: #0f172a;
    font-size: clamp(24px, 2.4vw, 34px);
    line-height: 1;
    font-weight: 700;
    text-align: right;
}

.tv-dashboard-mode .tv-topbar {
    min-height: clamp(64px, 8.5vh, 88px);
    padding: clamp(12px, 1.4vh, 18px) clamp(16px, 1.8vw, 24px);
}

.tv-dashboard-mode .tv-title-block {
    gap: clamp(10px, 1vw, 14px);
}

.tv-dashboard-mode .tv-brand__logo {
    width: clamp(42px, 4.2vw, 58px);
    height: clamp(42px, 4.2vw, 58px);
}

.tv-shell--semana .tv-topbar h1 {
    font-size: clamp(26px, 2.6vw, 36px);
}

.tv-week-shell.tv-semana-layout {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 0.8vh, 12px);
    overflow: visible;
}

.tv-page--dashboard .tv-week-shell.tv-semana-layout {
    overflow: hidden;
}

.tv-week-main-grid {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(220px, 0.82fr) minmax(0, 1.45fr) minmax(240px, 0.88fr);
    gap: clamp(8px, 1vw, 14px);
    align-items: stretch;
}

.tv-week-notices {
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.tv-week-notices h2 {
    flex: 0 0 auto;
    padding: clamp(10px, 1.2vw, 16px);
    margin: 0;
    border-bottom: 1px solid rgba(96, 165, 250, 0.12);
}

.tv-week-notices .tv-panel-scroll-body {
    flex: 1 1 auto;
    min-height: 0;
}

.tv-page--dashboard .tv-week-notices .tv-panel-scroll-body {
    overflow: hidden;
}

.tv-week-feature.semana-hero {
    min-height: 0;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: clamp(18px, 2.2vh, 30px) clamp(20px, 2.4vw, 32px);
}

.tv-week-feature.semana-hero h2,
.tv-week-feature.semana-hero h3,
.tv-week-feature.semana-hero p {
    margin-left: auto;
    margin-right: auto;
}

.tv-week-feature.semana-hero h2 {
    max-width: 100%;
    font-size: clamp(34px, 4.2vw, 58px);
}

.tv-week-feature.semana-hero h3 {
    font-size: clamp(20px, 2.2vw, 28px);
}

.tv-week-feature.semana-hero p {
    max-width: 48ch;
    font-size: clamp(16px, 1.5vw, 20px);
}

.tv-week-feature .semana-hero-footer {
    justify-content: center;
}

.tv-shell--semana .semana-hero::after {
    width: clamp(72px, 8vw, 96px);
    height: clamp(72px, 8vw, 96px);
    right: clamp(16px, 2vw, 28px);
    top: clamp(16px, 2vw, 28px);
}

.tv-week-side {
    min-height: 0;
}

.tv-week-side .tv-panel-block {
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
}

.tv-page--dashboard .tv-week-side .tv-panel-block {
    overflow: hidden;
}

.tv-week-notices,
.tv-week-side,
.tv-week-maintenance-row {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.64);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.24);
}

.tv-card--notice,
.tv-card--maintenance {
    border-color: rgba(96, 165, 250, 0.14) !important;
}

.tv-card--featured {
    border-color: transparent;
}

.tv-week-maintenance-row {
    flex: 0 0 auto;
    min-height: 0;
    max-height: none;
    width: 100%;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: visible;
}

.tv-week-maintenance-grid {
    min-height: 0;
    max-height: 100%;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    overflow-y: visible;
    overflow-x: hidden;
}

.tv-week-maintenance-grid .manutencao-card {
    min-height: clamp(90px, 12vh, 120px);
}

.tv-page--dashboard .tv-week-main-grid {
    grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.58fr) minmax(260px, 0.9fr);
}

.tv-page--dashboard .tv-week-maintenance-row {
    flex-basis: clamp(164px, 24vh, 224px);
    max-height: clamp(164px, 24vh, 224px);
    overflow: hidden;
}

.tv-page--dashboard .tv-week-maintenance-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: minmax(0, 1fr);
    overflow: hidden;
}

.tv-page--dashboard .tv-week-maintenance-grid .manutencao-card {
    min-height: 0;
}

.tv-page--dashboard .tv-aviso,
.tv-page--dashboard .tv-mini-card {
    padding: clamp(10px, 1.15vh, 13px);
}

.tv-page--dashboard .tv-mini-card strong,
.tv-page--dashboard .tv-aviso strong,
.tv-page--dashboard .manutencao-card strong {
    font-size: clamp(15px, 1.25vw, 18px);
}

.tv-page--dashboard .tv-mini-card span,
.tv-page--dashboard .tv-aviso span,
.tv-page--dashboard .manutencao-card p {
    font-size: clamp(13px, 1vw, 15px);
}

.manutencao-empty {
    grid-column: 1 / -1;
}

/* ===================================== */
/* CALENDARIO                            */
/* ===================================== */
.calendario-shell {
    grid-template-rows: auto 1fr;
    min-height: 100vh;
}

.calendario-layout {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 330px);
    gap: 16px;
    align-items: stretch;
}

.calendario-principal {
    min-height: 0;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 8px;
}

.calendario-weekdays,
.calendario-grid-tv {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.calendario-weekdays span {
    padding: 10px;
    text-align: center;
    color: var(--yellow);
    font-weight: 700;
    border-radius: var(--radius);
    background: rgba(21, 31, 49, 0.88);
    border: 1px solid var(--border);
}

.calendario-grid-tv {
    min-height: 0;
    height: 100%;
}

.calendario-grid-mensal {
    grid-auto-rows: minmax(92px, 1fr);
}

.calendario-grid-semanal {
    grid-auto-rows: 1fr;
}

.calendario-grid-semanal .calendario-dia {
    min-height: 420px;
}

.calendario-dia {
    min-width: 0;
    min-height: 0;
    padding: 10px;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 8px;
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(12, 19, 34, 0.92);
    border: 1px solid var(--border);
}

.calendario-dia header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.calendario-dia header strong {
    color: #ffffff;
    font-size: clamp(22px, 1.9vw, 28px);
    line-height: 1;
}

.calendario-dia header span {
    padding: 5px 7px;
    border-radius: var(--radius);
    color: #0f172a;
    background: var(--yellow);
    font-size: 12px;
    font-weight: 700;
}

.calendario-dia-hoje {
    border-color: rgba(250, 204, 21, 0.78);
    box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.72);
}

.calendario-dia-fora {
    opacity: 0.48;
}

.calendario-itens {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    overflow-x: hidden;
}

.calendario-item {
    min-height: 30px;
    padding: 8px 9px;
    display: grid;
    gap: 3px;
    border-left: 4px solid var(--blue-2);
    overflow: hidden;
    background: rgba(21, 38, 76, 0.84);
}

.calendario-item strong {
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.calendario-item span {
    display: -webkit-box;
    line-clamp: 1;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.calendario-grid-mensal .calendario-itens {
    overflow-y: auto;
    overflow-x: hidden;
    gap: 4px;
}

.calendario-grid-mensal .calendario-item {
    min-height: 26px;
    padding: 5px 8px;
    gap: 0;
}

.calendario-grid-mensal .calendario-item strong {
    font-size: 13px;
    line-height: 1.15;
    line-clamp: 1;
    -webkit-line-clamp: 1;
}

.calendario-grid-mensal .calendario-item span {
    display: none;
}

.calendario-vazio,
.mensagem-vazia {
    color: var(--subtle);
    font-size: 14px;
    font-style: italic;
}

.calendario-grid-mensal .calendario-vazio {
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.tv-dashboard-mode .calendario-resumo .tv-panel-block {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.calendario-resumo .tv-mini-card {
    background: rgba(37, 99, 235, 0.18);
    border-color: rgba(96, 165, 250, 0.26);
}

.tv-dashboard-mode .calendario-shell {
    grid-template-rows: auto minmax(0, 1fr);
    padding: clamp(10px, 1.2vh, 18px);
    gap: clamp(10px, 1.2vh, 16px);
}

.tv-dashboard-mode .calendario-layout {
    height: 100%;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    overflow: hidden;
    gap: clamp(10px, 1.2vw, 14px);
}

.tv-dashboard-mode .calendario-resumo {
    min-height: 0;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1vh, 12px);
}

.tv-dashboard-mode .calendario-principal {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.tv-dashboard-mode .calendario-weekdays,
.tv-dashboard-mode .calendario-grid-tv {
    gap: clamp(6px, 0.8vw, 10px);
}

.tv-dashboard-mode .calendario-weekdays span {
    padding: clamp(8px, 1vh, 12px);
    font-size: clamp(14px, 1.25vw, 19px);
}

.tv-dashboard-mode .calendario-grid-mensal {
    grid-auto-rows: minmax(0, 1fr);
}

.tv-dashboard-mode .calendario-dia {
    padding: clamp(8px, 0.9vw, 13px);
    gap: clamp(6px, 0.8vh, 9px);
}

.tv-dashboard-mode .calendario-dia header strong {
    font-size: clamp(24px, 2.1vw, 34px);
}

.tv-dashboard-mode .calendario-itens {
    overflow: hidden;
}

.tv-dashboard-mode .calendario-grid-mensal .calendario-item {
    min-height: clamp(28px, 3.5vh, 42px);
    padding: clamp(6px, 0.8vh, 9px) clamp(8px, 0.9vw, 11px);
}

.tv-dashboard-mode .calendario-grid-mensal .calendario-item strong {
    font-size: clamp(13px, 1.05vw, 17px);
}

/* ===================================== */
/* FORMULARIO                            */
/* ===================================== */
.container {
    width: min(980px, calc(100% - 32px));
    margin: 32px auto 52px;
    padding: 28px;
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(21, 31, 49, 0.94), rgba(10, 16, 32, 0.94)),
        var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.form-header {
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.container h1 {
    color: #ffffff;
    font-size: 34px;
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 10px;
}

.texto-lateral {
    color: var(--muted);
    line-height: 1.5;
}

.formulario {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 16px;
}

.formulario--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.campo {
    min-width: 0;
}

.campo-completo {
    grid-column: 1 / -1;
}

.formulario label {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
}

.formulario input,
.formulario select,
.formulario textarea {
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    outline: none;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.64);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.formulario select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

.formulario input[type="date"],
.formulario input[type="time"] {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

.formulario input::placeholder,
.formulario textarea::placeholder {
    color: var(--subtle);
    opacity: 0.7;
}

.formulario textarea {
    min-height: 110px;
    resize: vertical;
}

.formulario input:hover,
.formulario select:hover,
.formulario textarea:hover {
    border-color: rgba(96, 165, 250, 0.32);
    background: rgba(15, 23, 42, 0.68);
}

.formulario input:focus,
.formulario select:focus,
.formulario textarea:focus {
    border-color: rgba(96, 165, 250, 0.52);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: none;
    outline: none;
}

.campo-invalido {
    border-color: rgba(239, 68, 68, 0.72) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.16) !important;
}

.campo-erro {
    display: block;
    margin-top: 6px;
    color: #fecaca;
    font-size: 12px;
    line-height: 1.35;
}

.campo-ajuda {
    display: block;
    margin-top: 6px;
    color: var(--subtle);
    font-size: 12px;
    line-height: 1.35;
    font-style: italic;
}

.form-alerta {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.34);
}

.lista-erros {
    margin: 8px 0 0 18px;
    color: #fecaca;
}

.acoes {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 4px;
}

.btn-editar,
.btn-deletar,
.btn-voltar,
.btn-preview {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid transparent;
    cursor: pointer;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 700;
}

.btn-editar {
    color: #0f172a;
    background: linear-gradient(135deg, var(--yellow), var(--yellow-2));
    box-shadow: 0 8px 18px rgba(250, 204, 21, 0.14);
}

.btn-deletar {
    color: #ffffff;
    background: rgba(15, 23, 42, 0.78);
    border-color: var(--border);
}

.btn-voltar {
    color: #ffffff;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid var(--border);
}

.btn-voltar:hover {
    border-color: rgba(96, 165, 250, 0.28);
    background: rgba(37, 99, 235, 0.12);
    color: #ffffff;
}

.btn-preview {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.18);
    border: 1px solid rgba(96, 165, 250, 0.28);
}

.btn-preview:hover {
    border-color: rgba(96, 165, 250, 0.62);
    background: rgba(37, 99, 235, 0.28);
    color: #ffffff;
}

/* ===================================== */
/* WEEK FOCUS FORM - EDITORIAL PANEL     */
/* ===================================== */
.week-focus-form-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.week-focus-form {
    display: grid;
    gap: 24px;
}

.week-focus-form__section {
    padding: 22px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: rgba(2, 6, 23, 0.24);
}

.week-focus-form__section-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.week-focus-form__section-title::before {
    content: "";
    width: 4px;
    height: 24px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--yellow), var(--blue-2));
}

.week-focus-status-toggle {
    display: grid;
    gap: 14px;
    padding: 16px;
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.52);
    border: 1px solid rgba(96, 165, 250, 0.14);
}

.status-info {
    display: grid;
    gap: 12px;
}

.status-label {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    border: 1px solid rgba(148, 163, 184, 0.26);
    color: var(--subtle);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

.status-badge--active {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.36);
    color: #bbf7d0;
}

.quick-date-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.quick-date-btn {
    padding: 10px 14px;
    min-height: 40px;
    border-radius: var(--radius);
    border: 1px solid rgba(96, 165, 250, 0.28);
    background: rgba(37, 99, 235, 0.14);
    color: #bfdbfe;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.quick-date-btn:hover {
    border-color: rgba(96, 165, 250, 0.62);
    background: rgba(37, 99, 235, 0.24);
    color: #ffffff;
}

.week-focus-form__actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px;
    border-top: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
}

/* ===================================== */
/* WEEK FOCUS PREVIEW - LIVE PREVIEW     */
/* ===================================== */
.week-focus-preview {
    position: sticky;
    top: 32px;
    display: grid;
    gap: 12px;
    height: fit-content;
}

.week-focus-preview__header {
    padding: 10px 14px;
    border-radius: var(--radius);
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.week-focus-preview__label {
    display: block;
    color: var(--yellow);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.week-focus-preview__card {
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid rgba(96, 165, 250, 0.24);
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.18), transparent 42%),
        linear-gradient(180deg, rgba(21, 31, 49, 0.94), rgba(7, 11, 21, 0.94));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    display: grid;
    gap: 12px;
    min-height: 280px;
}

.week-focus-preview__segment {
    display: inline-block;
    padding: 6px 10px;
    border-radius: var(--radius);
    background: rgba(250, 204, 21, 0.16);
    border: 1px solid rgba(250, 204, 21, 0.28);
    color: var(--yellow);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

.week-focus-preview__title {
    color: #ffffff;
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 700;
    line-height: 1.2;
    min-height: 54px;
    margin: 8px 0 0 0;
}

.week-focus-preview__description {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    min-height: 52px;
    max-height: 65px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    flex-grow: 1;
}

.week-focus-preview__meta {
    display: grid;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(96, 165, 250, 0.14);
    margin-top: auto;
}

.week-focus-preview__date,
.week-focus-preview__status {
    display: block;
    color: var(--subtle);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.week-focus-preview__status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--radius);
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.18);
    width: fit-content;
}

.week-focus-preview__status::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.5);
}

.week-focus-preview__status.status-active::before {
    background: #22c55e;
}

/* Responsividade */
@media (max-width: 1200px) {
    .week-focus-form-wrapper {
        grid-template-columns: 1fr;
    }

    .week-focus-preview {
        position: relative;
        top: auto;
        order: -1;
        margin-bottom: 24px;
    }
}

/* ===================================== */
/* BADGES E COMPATIBILIDADE              */
/* ===================================== */
.badge,
.mini-badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.prioridade-alta,
.status-pendente {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.34);
}

.prioridade-media,
.status-andamento {
    color: #fde68a;
    background: rgba(250, 204, 21, 0.14);
    border: 1px solid rgba(250, 204, 21, 0.34);
}

.prioridade-baixa,
.status-concluido {
    color: #bbf7d0;
    background: rgba(34, 197, 94, 0.14);
    border: 1px solid rgba(34, 197, 94, 0.34);
}

.dashboard,
.dashboard-layout {
    min-height: 100vh;
}

/* ===================================== */
/* MODAL DE CONFLITO DE AGENDA           */
/* ===================================== */
.conflito-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.conflito-modal--open {
    display: flex;
}

.conflito-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.72);
}

.conflito-modal__panel {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    max-height: min(80vh, 640px);
    display: grid;
    gap: 14px;
    padding: 22px;
    border-radius: var(--radius);
    border: 1px solid rgba(96, 165, 250, 0.28);
    background: linear-gradient(180deg, rgba(21, 31, 49, 0.98), rgba(7, 11, 21, 0.98));
    box-shadow: var(--shadow);
    overflow: hidden;
}

.conflito-modal__header h2 {
    color: #ffffff;
    font-size: clamp(22px, 2vw, 28px);
    line-height: 1.15;
}

.conflito-modal__header p {
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.conflito-modal__aviso {
    padding: 10px 12px;
    border-radius: var(--radius);
    border: 1px solid rgba(250, 204, 21, 0.28);
    background: rgba(250, 204, 21, 0.1);
    color: #fde68a;
    font-size: 13px;
    font-weight: 700;
}

.conflito-modal__lista {
    list-style: none;
    display: grid;
    gap: 10px;
    max-height: min(42vh, 320px);
    overflow-y: auto;
    padding-right: 4px;
}

.conflito-modal__item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.72);
}

.conflito-modal__item strong {
    color: #ffffff;
    font-size: 15px;
    line-height: 1.25;
}

.conflito-modal__item span {
    color: var(--muted);
    font-size: 13px;
}

.conflito-modal__origem {
    flex: 0 0 auto;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    color: #0f172a;
    background: var(--yellow);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.conflito-modal__acoes {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

@media (prefers-reduced-motion: reduce) {

    .app-shell,
    .app-main,
    .app-sidebar,
    .app-sidebar__text,
    .app-sidebar__brand-logo--full,
    .app-sidebar__brand-logo--mark {
        transition: none;
    }
}

/* ===================================== */
/* RESPONSIVIDADE                        */
/* ===================================== */
@media (max-width: 1200px) {
    body.tv-page {
        height: auto;
        overflow: auto;
    }

    body.tv-page.tv-page--semana {
        height: auto;
        max-height: none;
        overflow: auto;
    }

    body.tv-page.tv-page--semana .app-shell--tv,
    body.tv-page.tv-page--semana .app-main--tv.tv-shell--semana {
        height: auto;
        overflow: visible;
    }

    .tv-shell.tv-shell--semana {
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .login-panel,
    .admin-dashboard,
    .tv-semana-layout,
    .tv-bottom-grid,
    .tv-week-main-grid,
    .calendario-layout {
        grid-template-columns: 1fr;
    }

    .tv-week-main-grid {
        display: grid;
    }

    .tv-week-feature {
        order: 1;
    }

    .tv-week-notices {
        order: 2;
    }

    .tv-week-side {
        order: 3;
    }

    .tv-week-maintenance-row {
        order: 4;
        max-height: none;
    }

    .tv-week-side .tv-panel-block {
        flex: none;
        min-height: 160px;
        max-height: 240px;
    }

    .login-card {
        min-height: auto;
    }

    .tv-shell {
        height: auto;
        max-height: none;
        overflow-y: visible;
        grid-template-rows: auto auto auto;
    }

    .tv-side-panel,
    .calendario-resumo {
        min-height: auto;
    }

    .tv-panel-block {
        flex: none;
        min-height: 190px;
        max-height: 280px;
    }

    .admin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .demanda-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .demanda-grid {
        grid-template-columns: 1fr;
    }

    .coordenadora-list-horizontal {
        grid-template-columns: 1fr;
    }
}

@media (max-height: 820px) {
    .tv-week-feature {
        min-height: clamp(280px, 35vh, 380px);
        max-height: 50vh;
    }

    .tv-week-feature__content {
        gap: 10px;
        padding: clamp(18px, 2.2vw, 32px);
    }

    .tv-week-feature__title {
        font-size: clamp(36px, 4.8vw, 72px);
    }

    .tv-week-feature__description {
        font-size: clamp(14px, 1.4vw, 22px);
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .tv-shell--semana .semana-hero::after {
        width: clamp(72px, 8vw, 96px);
        height: clamp(72px, 8vw, 96px);
        right: clamp(16px, 2vw, 28px);
        top: clamp(16px, 2vw, 28px);
    }

    .tv-shell--semana .tv-week-maintenance-row {
        max-height: clamp(118px, 21vh, 180px);
    }
}

@media (max-width: 980px) {
    /* Sidebar rules handled by the later 980px block (fixed + collapsed) */

    .operation-dock {
        left: 50%;
        width: min(1200px, calc(100% - 24px));
    }
}

@media (max-width: 820px) {
    .login-shell {
        padding: 16px;
        gap: 22px;
    }

    .login-navbar,
    .admin-header,
    .tv-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .login-panel {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .login-copy h1,
    .admin-header h1,
    .tv-topbar h1 {
        font-size: 38px;
    }

    .login-preview-card {
        min-height: 240px;
        padding: 18px;
    }

    .preview-window {
        height: 180px;
        grid-template-columns: 70px 1fr;
    }

    .admin-shell,
    .coordenadora-shell {
        width: min(100% - 24px, 1500px);
        padding-top: 14px;
        padding-bottom: 128px;
    }

    .admin-grid,
    .admin-coordinator-grid,
    .coordenadora-grid,
    .demanda-summary-grid,
    .formulario,
    .formulario--compact {
        grid-template-columns: 1fr;
    }

    .coordenadora-panel-wide,
    .campo-completo {
        grid-column: auto;
    }

    .acoes,
    .admin-actions,
    .week-focus-form__actions {
        justify-content: stretch;
    }

    .btn-editar,
    .btn-deletar,
    .btn-voltar,
    .btn-preview,
    .admin-logout-button,
    .admin-link-button {
        width: 100%;
    }

    .demanda-card-header,
    .demanda-status-form {
        align-items: flex-start;
        flex-direction: column;
    }

    .demanda-badge-row {
        justify-content: flex-start;
    }

    .calendario-weekdays,
    .calendario-grid-tv {
        gap: 6px;
    }

    .calendario-dia {
        padding: 8px;
    }

    .operation-dock {
        bottom: 10px;
        width: calc(100% - 20px);
        padding: 12px;
    }

    .operation-dock__header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .operation-dock__header p {
        width: 100%;
    }

    .quick-date-actions {
        flex-direction: column;
    }

    .quick-date-btn {
        width: 100%;
    }

    .week-focus-form__section {
        padding: 16px;
    }

    .week-focus-form__section-title {
        font-size: 16px;
    }

    .aviso-card {
        grid-template-columns: 1fr;
    }

    .btn-excluir-aviso {
        width: 100%;
    }
}

body.tv-page.tv-page--semana.tv-page--dashboard {
    height: 100vh;
    overflow: hidden;
}

body.tv-page.tv-page--semana.tv-page--dashboard .app-shell--dashboard-tv,
body.tv-page.tv-page--semana.tv-page--dashboard .app-main--tv.tv-shell--semana {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

body.tv-page.tv-page--semana.tv-page--dashboard .tv-shell.tv-shell--semana {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

body.tv-page.tv-page--semana.tv-page--dashboard .tv-week-main-grid {
    display: grid;
    grid-template-columns: minmax(210px, 0.72fr) minmax(0, 1.58fr) minmax(240px, 0.9fr);
}

body.tv-page.tv-page--semana.tv-page--dashboard .tv-week-feature,
body.tv-page.tv-page--semana.tv-page--dashboard .tv-week-notices,
body.tv-page.tv-page--semana.tv-page--dashboard .tv-week-side,
body.tv-page.tv-page--semana.tv-page--dashboard .tv-week-maintenance-row {
    order: initial;
}

@media (max-width: 980px) {
    body.tv-page.tv-page--semana.tv-page--dashboard .tv-topbar {
        align-items: center;
        flex-direction: row;
    }

    body.tv-page.tv-page--semana.tv-page--dashboard .tv-week-main-grid {
        grid-template-columns: minmax(170px, 0.72fr) minmax(0, 1.4fr) minmax(190px, 0.86fr);
    }

    body.tv-page.tv-page--semana.tv-page--dashboard .tv-week-feature.semana-hero h2 {
        font-size: clamp(28px, 5vw, 42px);
    }
}

/* ===================================== */
/* POLIMENTO FINAL: SIDEBAR E TV FADE    */
/* ===================================== */
.app-sidebar {
    overflow: hidden;
}

.app-sidebar__nav {
    gap: 3px;
}

.app-sidebar__icon {
    display: grid;
    place-items: center;
}

.tv-dashboard-mode {
    transition:
        opacity 0.52s ease,
        filter 0.52s ease,
        transform 0.52s ease;
}

.tv-dashboard-mode.tv-page-transitioning {
    opacity: 0;
    filter: blur(8px);
    transform: scale(0.992);
}

@media (prefers-reduced-motion: reduce) {

    .tv-dashboard-mode,
    .app-sidebar__link,
    .app-sidebar__logout-button,
    .app-sidebar__link span,
    .app-sidebar__logout-button span {
        transition: none;
    }

    .tv-dashboard-mode.tv-page-transitioning {
        opacity: 1;
        filter: none;
        transform: none;
    }
}

/* ===================================== */
/* ICONES VISUAIS DAS TELAS              */
/* ===================================== */
.ui-icon,
.dashboard-card-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 14px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.18);
    border: 1px solid rgba(96, 165, 250, 0.22);
}

.ui-icon-img {
    width: 22px;
    height: 22px;
    display: block;
    object-fit: contain;
    filter: invert(1);
}

.login-feature-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(96, 165, 250, 0.22);
}

.login-feature-yellow .login-feature-icon {
    background: rgba(250, 204, 21, 0.18);
    border-color: rgba(250, 204, 21, 0.24);
}

.login-feature-pink .login-feature-icon {
    background: rgba(236, 72, 153, 0.18);
    border-color: rgba(236, 72, 153, 0.24);
}

.login-feature-icon .ui-icon-img {
    width: 23px;
    height: 23px;
    filter: invert(1);
}

.admin-section-header span,
.tv-section-header h2,
.tv-panel-block h2,
.calendario-hoje h2 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.admin-section-header span::before,
.tv-section-header h2::before,
.tv-panel-block h2::before,
.calendario-hoje h2::before {
    --screen-icon: url("/img/icons/icon-report.png");
    content: "";
    width: 18px;
    height: 18px;
    display: inline-block;
    flex: 0 0 auto;
    background: currentColor;
    -webkit-mask: var(--screen-icon) center / contain no-repeat;
    mask: var(--screen-icon) center / contain no-repeat;
}

.week-focus-control .admin-section-header span::before,
.admin-side-column .admin-section:nth-of-type(1) .admin-section-header span::before,
.tv-section-header h2::before {
    --screen-icon: url("/img/icons/icon-week.png");
}

.admin-main-column .admin-section:nth-of-type(2) .admin-section-header span::before,
.calendario-hoje h2::before {
    --screen-icon: url("/img/icons/icon-calendar.png");
}

.admin-main-column .admin-section:nth-of-type(3) .admin-section-header span::before,
.admin-side-coordenadoras .admin-section-header span::before {
    --screen-icon: url("/img/icons/icon-coordinators.png");
}

.admin-main-column .admin-section:nth-of-type(4) .admin-section-header span::before {
    --screen-icon: url("/img/icons/icon-report.png");
}

.tv-panel-block h2::before {
    --screen-icon: url("/img/icons/icon-admin.png");
}

.tv-card--maintenance .tv-section-header h2::before {
    --screen-icon: url("/img/icons/icon-settings.png");
}

.admin-side-coordenadoras .admin-mini-card {
    position: relative;
    padding-left: 58px;
}

.coordenadora-item,
.demanda-card,
.demanda-admin-card {
    position: relative;
    padding-left: 58px;
}

.admin-side-coordenadoras .admin-mini-card::before,
.coordenadora-item::before,
.demanda-card::before,
.demanda-admin-card::before {
    --screen-icon: url("/img/icons/icon-coordinators.png");
    content: "";
    position: absolute;
    left: 16px;
    top: 16px;
    width: 26px;
    height: 26px;
    border-radius: 10px;
    background: rgba(250, 204, 21, 0.18);
    border: 1px solid rgba(250, 204, 21, 0.22);
}

.admin-side-coordenadoras .admin-mini-card::after,
.coordenadora-item::after,
.demanda-card::after,
.demanda-admin-card::after {
    --screen-icon: url("/img/icons/icon-coordinators.png");
    content: "";
    position: absolute;
    left: 20px;
    top: 20px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    -webkit-mask: var(--screen-icon) center / contain no-repeat;
    mask: var(--screen-icon) center / contain no-repeat;
}

.coordenadora-item::after {
    --screen-icon: url("/img/icons/icon-calendar.png");
}

.demanda-card::after,
.demanda-admin-card::after {
    --screen-icon: url("/img/icons/icon-add.png");
}

.admin-action-card::after {
    content: "";
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    background: var(--yellow);
    -webkit-mask: url("/img/icons/icon-add.png") center / contain no-repeat;
    mask: url("/img/icons/icon-add.png") center / contain no-repeat;
}

.admin-agenda-panel .admin-section-header span::before {
    --screen-icon: url("/img/icons/icon-calendar.png");
}

.admin-summary-panel .admin-section-header span::before,
.admin-progress-panel .admin-section-header span::before {
    --screen-icon: url("/img/icons/icon-report.png");
}

.admin-demand-feed .admin-section-header span::before,
.admin-quick-panel .admin-section-header span::before {
    --screen-icon: url("/img/icons/icon-add.png");
}

.admin-side-coordenadoras .admin-section-header span::before {
    --screen-icon: url("/img/icons/icon-coordinators.png");
}

/* ===================================== */
/* SIDEBAR FINAL - FIXA, MINIMALISTA     */
/* ===================================== */

.app-shell {
    --sidebar-width: 228px;
    display: block;
    min-height: 100vh;
}

.app-shell--sidebar-collapsed,
html.sidebar-collapsed-pending {
    --sidebar-width: 68px;
}

.app-main {
    min-width: 0;
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    transition: margin-left 220ms ease, width 220ms ease;
}

/* Sidebar refinements (override initial definitions) */
.app-sidebar--ready {
    transition:
        width 220ms ease,
        padding 220ms ease,
        gap 220ms ease;
}

/* Marca superior mais discreta */
.app-sidebar__brand {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 7px 8px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    overflow: hidden;
}

.app-sidebar__brand-mark {
    display: none;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
}

.app-sidebar__brand-text {
    min-width: 0;
}

.app-sidebar__brand-text small {
    font-size: 9px;
    letter-spacing: 0.04em;
}

.app-sidebar__brand-text strong {
    font-size: 20px;
    line-height: 1;
}

/* Navegação sem scroll */
.app-sidebar__nav {
    width: 100%;
    display: grid;
    gap: 5px;
    overflow: visible;
}

.app-sidebar__link strong,
.app-sidebar__logout-button strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
}

/* Hover e ativo */
.app-sidebar__link:hover,
.app-sidebar__link:focus-visible,
.app-sidebar__logout-button:hover,
.app-sidebar__logout-button:focus-visible {
    color: #ffffff;
    outline: none;
    border-color: rgba(96, 165, 250, 0.22);
    background: rgba(37, 99, 235, 0.1);
}

.app-sidebar__link--active {
    color: #ffffff;
    border-color: rgba(250, 204, 21, 0.22);
    background: rgba(250, 204, 21, 0.11);
    box-shadow: inset 2px 0 0 var(--yellow);
}

.app-sidebar__link--active span {
    background: linear-gradient(135deg, var(--yellow), var(--yellow-2));
    border-color: rgba(250, 204, 21, 0.58);
}

.app-sidebar__link--active .app-sidebar__icon-img {
    filter: none;
    opacity: 1;
}

/* Itens futuros escondidos para não poluir a lateral */
.app-sidebar__link--disabled {
    display: none;
}

/* Logout fixo embaixo */
.app-sidebar__logout {
    width: 100%;
    margin-top: auto;
}

.app-sidebar__logout-button {
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.18);
    background: rgba(239, 68, 68, 0.06);
}

/* Estado recolhido */
.app-sidebar--collapsed {
    width: var(--sidebar-width);
    align-items: center;
    padding-inline: 8px;
}

.app-sidebar--collapsed .app-sidebar__brand {
    width: 52px;
    justify-content: center;
    min-height: 46px;
    padding: 4px;
}

.app-sidebar--collapsed .app-sidebar__brand-logo--expanded {
    display: none;
}

.app-sidebar--collapsed .app-sidebar__brand-logo--collapsed {
    display: block;
    width: 44px;
    height: 44px;
}

.app-sidebar--collapsed .app-sidebar__brand-mark {
    display: none;
    width: 44px;
    height: 44px;
}

.app-sidebar--collapsed .app-sidebar__brand-text,
.app-sidebar--collapsed .app-sidebar__text,
html.sidebar-collapsed-pending .app-sidebar__brand-text,
html.sidebar-collapsed-pending .app-sidebar__text {
    width: 0;
    max-width: 0;
    opacity: 0;
    transform: translateX(-6px);
    overflow: hidden;
    pointer-events: none;
    display: none;
}

.app-sidebar__text {
    opacity: 1;
    transform: translateX(0);
    transition:
        opacity 180ms ease,
        transform 180ms ease,
        max-width 180ms ease;
}


.app-sidebar--collapsed .app-sidebar__link,
.app-sidebar--collapsed .app-sidebar__logout-button {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 5px;
}

.app-sidebar--collapsed .app-sidebar__link span,
.app-sidebar--collapsed .app-sidebar__logout-button span {
    width: 34px;
    height: 34px;
}

/* Modo TV normal: lateral compacta */
.app-shell--tv {
    --sidebar-width: 68px;
}

.app-shell--tv .app-main {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
}

.app-shell--tv .app-sidebar,
.app-sidebar--tv {
    width: var(--sidebar-width);
    padding: 10px 8px;
    align-items: center;
}

.app-shell--tv .app-sidebar__brand,
.app-sidebar--tv .app-sidebar__brand {
    justify-content: center;
    min-height: 46px;
    padding: 6px;
}

.app-shell--tv .app-sidebar__brand-text,
.app-shell--tv .app-sidebar__text,
.app-sidebar--tv .app-sidebar__brand-text,
.app-sidebar--tv .app-sidebar__text {
    display: none;
}

.app-shell--tv .app-sidebar__link,
.app-sidebar--tv .app-sidebar__link {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 5px;
}

/* Modo Dashboard/TV puro: sem sidebar e 100% tela */
.tv-dashboard-mode .app-shell,
.app-shell--dashboard-tv {
    --sidebar-width: 0px;
}

.tv-dashboard-mode .app-sidebar,
.app-shell--dashboard-tv .app-sidebar {
    display: none !important;
}

.tv-dashboard-mode .app-main,
.app-shell--dashboard-tv .app-main {
    margin-left: 0;
    width: 100vw;
    max-width: 100vw;
    min-height: 100vh;
}

/* Responsivo: lateral recolhida e fixa */
@media (max-width: 980px) {
    .app-shell {
        --sidebar-width: 60px;
    }

    .app-main {
        margin-left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
    }

    .app-sidebar {
        width: var(--sidebar-width);
        padding: 8px 6px;
        align-items: center;
    }

    .app-sidebar__brand {
        justify-content: center;
        padding: 5px;
        min-height: 48px;
    }

    .app-sidebar__brand-text,
    .app-sidebar__text {
        display: none;
    }

    .app-sidebar__link,
    .app-sidebar__logout-button {
        grid-template-columns: 1fr;
        justify-items: center;
        min-height: 38px;
        padding: 4px;
    }

    .app-sidebar__link span,
    .app-sidebar__logout-button span {
        width: 28px;
        height: 28px;
    }

    .app-sidebar__icon-img {
        width: 16px;
        height: 16px;
    }

    .app-sidebar__nav {
        gap: 4px;
    }
}

/* Acessibilidade: reduz animações */
@media (prefers-reduced-motion: reduce) {

    .app-sidebar,
    .app-sidebar--ready,
    .app-sidebar__text,
    .app-sidebar__link,
    .app-sidebar__logout-button,
    .app-sidebar__link span,
    .app-sidebar__logout-button span {
        transition: none !important;
    }
}

/* ==========================================================================
   Demandas na TV (Semana em Foco)
   ========================================================================== */
.semana-demandas-tv {
    margin: 22px auto;
    padding: 20px;
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
    width: 100%;
    max-width: 650px;
    box-shadow: var(--shadow-soft);
}

.semana-demandas-tv__title {
    display: block;
    color: var(--yellow);
    font-size: 14px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 8px;
}

.semana-demandas-tv__list {
    display: grid;
    gap: 10px;
}

.semana-demandas-tv__item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.semana-demandas-tv__item:hover {
    transform: translateY(-2px);
    border-color: rgba(96, 165, 250, 0.2);
}

.semana-demandas-tv__item strong {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
}

/* ==========================================================================
   Semana em Foco - Destaque editorial forte por segmento
   ========================================================================== */
.tv-week-feature {
    --week-accent: var(--blue);
    --week-accent-strong: #60a5fa;
    --week-accent-soft: rgba(37, 99, 235, 0.18);
    --week-panel: rgba(15, 23, 42, 0.72);

    position: relative;
    isolation: isolate;
    min-height: clamp(260px, 32vh, 360px);
    max-height: 48vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-width: 1px;
    border-style: solid;
    border-color: color-mix(in srgb, var(--week-accent) 48%, rgba(148, 163, 184, 0.36));
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 88% 18%, color-mix(in srgb, var(--week-accent) 20%, transparent), transparent 38%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 34, 67, 0.88));
    box-shadow:
        0 0 28px color-mix(in srgb, var(--week-accent) 16%, transparent),
        0 16px 48px rgba(2, 6, 23, 0.36),
        inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.tv-week-feature::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 0;
    width: clamp(8px, 0.9vw, 14px);
    border-radius: var(--radius) 0 0 var(--radius);
    background: linear-gradient(180deg, var(--week-accent), var(--yellow));
    box-shadow: 0 0 20px color-mix(in srgb, var(--week-accent) 32%, transparent);
}

.tv-week-feature::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: var(--radius);
    border-color: color-mix(in srgb, var(--week-accent) 48%, rgba(250, 204, 21, 0.22));
    background: color-mix(in srgb, var(--week-accent) 24%, rgba(250, 204, 21, 0.16));
    pointer-events: none;
}

.tv-week-feature__content {
    position: relative;
    z-index: 1;
    width: min(100%, 920px);
    display: grid;
    gap: clamp(14px, 2vh, 24px);
    justify-items: center;
    align-items: center;
    margin: 0 auto;
    padding: clamp(24px, 3vw, 48px);
    text-align: center;
}

.tv-week-feature__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 36px;
    padding: 9px 16px;
    border: 1.5px solid color-mix(in srgb, var(--week-accent) 72%, rgba(255, 255, 255, 0.18));
    border-radius: 999px;
    background: var(--week-accent-soft);
    color: #ffffff;
    font-size: clamp(11px, 1.1vw, 15px);
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--week-accent) 56%, transparent);
}

.tv-week-feature__segment {
    display: block;
    color: var(--week-accent-strong);
    font-size: clamp(20px, 2.2vw, 36px);
    font-weight: 700;
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.tv-week-feature__title {
    max-width: 22ch;
    color: #ffffff;
    font-size: clamp(36px, 4.8vw, 64px);
    font-weight: 700;
    line-height: 1;
    text-wrap: balance;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.tv-week-feature__description {
    max-width: 66ch;
    margin: 0;
    color: #dbeafe;
    font-size: clamp(16px, 1.6vw, 26px);
    line-height: 1.55;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.tv-week-feature__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: clamp(4px, 0.6vh, 12px);
}

.tv-week-feature__meta span {
    border-color: color-mix(in srgb, var(--week-accent) 42%, rgba(148, 163, 184, 0.32));
    background: rgba(2, 6, 23, 0.52);
    color: #eff6ff;
    font-size: clamp(12px, 1vw, 16px);
}

.tv-week-feature .semana-demandas-tv {
    width: min(100%, 780px);
    margin: clamp(8px, 1.2vh, 14px) auto 0;
    border-color: color-mix(in srgb, var(--week-accent) 32%, rgba(148, 163, 184, 0.24));
    background: rgba(2, 6, 23, 0.38);
}

.tv-week-feature .semana-demandas-tv__title {
    color: var(--week-accent-strong);
    font-size: clamp(12px, 1.1vw, 15px);
}

.tv-week-feature .semana-demandas-tv__list {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.tv-week-feature .semana-demandas-tv__item {
    min-width: 0;
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.72);
    font-size: clamp(13px, 1vw, 15px);
}

.tv-week-feature__content--empty .tv-week-feature__segment {
    color: var(--yellow);
}

/* Cores por segmento */
.tv-week-feature--infantil,
.segmento-infantil {
    --week-accent: #34d399;
    --week-accent-strong: #a7f3d0;
    --week-accent-soft: rgba(52, 211, 153, 0.16);
}

.tv-week-feature--fundamental-1,
.segmento-fundamental-1 {
    --week-accent: #3b82f6;
    --week-accent-strong: #bfdbfe;
    --week-accent-soft: rgba(59, 130, 246, 0.18);
}

.tv-week-feature--fundamental-2,
.segmento-fundamental-2 {
    --week-accent: #f59e0b;
    --week-accent-strong: #fcd34d;
    --week-accent-soft: rgba(245, 158, 11, 0.18);
}

.tv-week-feature--ensino-medio,
.segmento-ensino-medio {
    --week-accent: #e879f9;
    --week-accent-strong: #f0abfc;
    --week-accent-soft: rgba(232, 121, 249, 0.16);
}

.tv-page--dashboard .tv-week-feature {
    min-height: clamp(300px, 38vh, 420px);
    max-height: 55vh;
}

.tv-page--dashboard .tv-week-feature__title {
    font-size: clamp(40px, 5.2vw, 80px);
}

.tv-page--dashboard .tv-week-feature__description {
    max-width: 58ch;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    font-size: clamp(15px, 1.4vw, 23px);
}

.tv-page--dashboard .tv-week-feature .semana-demandas-tv {
    max-height: clamp(100px, 14vh, 140px);
    overflow: hidden;
}

@media (max-height: 820px) {
    .tv-week-feature {
        min-height: clamp(280px, 35vh, 360px);
    }

    .tv-week-feature__content {
        gap: 10px;
        padding: clamp(18px, 2.2vw, 32px);
    }

    .tv-week-feature__title {
        font-size: clamp(36px, 4.8vw, 72px);
    }

    .tv-week-feature__description {
        font-size: clamp(14px, 1.4vw, 22px);
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
}

/* ===================================== */
/* AJUSTE VISUAL - FALLBACK SEMANA EM FOCO */
/* ===================================== */

.tv-week-feature__content--empty {
    max-width: 580px;
    margin: 0 auto;
    text-align: center;
    padding: clamp(16px, 2vw, 28px);
    gap: clamp(8px, 1.2vh, 14px);
    opacity: 0.88;
}

.tv-week-feature__content--empty .tv-week-feature__segment {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    font-size: clamp(13px, 1.2vw, 18px);
    line-height: 1.1;
    letter-spacing: 0.04em;
    color: var(--subtle);
    text-transform: uppercase;
}

.tv-week-feature__content--empty .tv-week-feature__title {
    max-width: 520px;
    margin: 0 auto 6px;
    font-size: clamp(22px, 2.8vw, 36px);
    line-height: 1.08;
    color: rgba(255, 255, 255, 0.72);
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tv-week-feature__content--empty .tv-week-feature__description {
    max-width: 480px;
    margin: 0 auto;
    font-size: clamp(12px, 1.05vw, 15px);
    line-height: 1.4;
    color: rgba(148, 163, 184, 0.72);
}

.tv-week-feature--sem-configuracao {
    min-height: clamp(140px, 18vh, 220px);
    background:
        linear-gradient(135deg, rgba(17, 24, 39, 0.96), rgba(7, 12, 24, 0.98)),
        var(--surface);
    border-color: rgba(59, 130, 246, 0.18);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.tv-week-feature--sem-configuracao::before {
    opacity: 0.1;
}

.tv-week-feature--sem-configuracao::after {
    opacity: 0.4;
}

.tv-week-feature--sem-configuracao .tv-week-feature__label {
    background: rgba(15, 23, 42, 0.6);
    color: rgba(148, 163, 184, 0.8);
    border-color: rgba(96, 165, 250, 0.16);
    font-size: clamp(9px, 0.8vw, 11px);
}

/* Em telas menores, fallback mais compacto */
@media (max-width: 1100px) {
    .tv-week-feature__content--empty .tv-week-feature__title {
        font-size: clamp(20px, 2.6vw, 32px);
    }

    .tv-week-feature__content--empty .tv-week-feature__segment {
        font-size: clamp(11px, 1vw, 15px);
    }
}
/* ===================================== */
/* AJUSTE CONFORTO VISUAL - SEMANA EM FOCO */
/* ===================================== */

/* Alias classe segmento quando não configurado */
.segmento-sem-configuracao {
    background:
        linear-gradient(135deg, rgba(17, 24, 39, 0.96), rgba(7, 12, 24, 0.98)),
        var(--surface);
    border-color: rgba(59, 130, 246, 0.18);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.segmento-sem-configuracao::before {
    opacity: 0.1;
}

/* Desktop/modo usuário: fonte discretamente controlada */
.tv-page:not(.tv-dashboard-mode) .tv-week-feature__content--empty .tv-week-feature__segment {
    font-size: clamp(11px, 1vw, 15px);
    letter-spacing: 0.035em;
}

.tv-page:not(.tv-dashboard-mode) .tv-week-feature__content--empty .tv-week-feature__title {
    font-size: clamp(20px, 2.6vw, 32px);
    line-height: 1.08;
    max-width: 460px;
}

.tv-page:not(.tv-dashboard-mode) .tv-week-feature__content--empty .tv-week-feature__description {
    font-size: clamp(12px, 1vw, 15px);
    line-height: 1.4;
    max-width: 420px;
}

/* TV/dashboard: discreto, mas legível à distância */
.tv-dashboard-mode .tv-week-feature__content--empty .tv-week-feature__segment,
.app-shell--dashboard-tv .tv-week-feature__content--empty .tv-week-feature__segment {
    font-size: clamp(14px, 1.2vw, 20px);
    color: var(--subtle);
}

.tv-dashboard-mode .tv-week-feature__content--empty .tv-week-feature__title,
.app-shell--dashboard-tv .tv-week-feature__content--empty .tv-week-feature__title {
    font-size: clamp(24px, 3vw, 42px);
    line-height: 1.08;
    max-width: 540px;
    color: rgba(255, 255, 255, 0.68);
}

.tv-dashboard-mode .tv-week-feature__content--empty .tv-week-feature__description,
.app-shell--dashboard-tv .tv-week-feature__content--empty .tv-week-feature__description {
    font-size: clamp(13px, 1.1vw, 18px);
    line-height: 1.4;
    max-width: 500px;
    color: rgba(148, 163, 184, 0.68);
}

/* ===================================== */
/* CALENDARIO TV - MODO DASHBOARD MENSAL */
/* ===================================== */

.calendar-dashboard-mode .calendario-shell--dashboard {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.calendar-dashboard-mode .calendario-layout {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(290px, 23vw, 390px);
    gap: clamp(12px, 1.35vw, 20px);
    align-items: stretch;
    min-height: 0;
    height: auto;
}

.calendar-dashboard-mode .calendario-principal,
.calendar-dashboard-mode .calendario-resumo,
.calendar-dashboard-mode .calendar-week-tasks {
    min-height: 0;
    overflow: hidden;
}

.calendar-dashboard-mode .calendario-resumo {
    display: block;
    height: 100%;
}

.calendar-dashboard-mode .calendario-weekdays {
    gap: clamp(7px, 0.7vw, 11px);
    margin-bottom: clamp(7px, 0.8vw, 11px);
}

.calendar-dashboard-mode .calendario-weekdays span {
    min-height: clamp(34px, 4.8vh, 48px);
    border-color: rgba(96, 165, 250, 0.2);
    background: rgba(15, 23, 42, 0.86);
    color: var(--yellow);
    font-size: clamp(14px, 1vw, 17px);
}

.calendar-dashboard-mode .calendario-grid-tv,
.calendar-dashboard-mode .calendario-grid-semanal,
.calendar-dashboard-mode .calendario-grid-mensal,
.calendar-tv-grid,
.calendar-tv-month {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-auto-rows: minmax(clamp(76px, 11.2vh, 118px), 1fr);
    gap: clamp(7px, 0.7vw, 11px);
    height: min(100%, calc(100vh - 180px));
    min-height: 0;
}

.calendar-dashboard-mode .calendario-grid-semanal .calendario-dia,
.calendar-dashboard-mode .calendario-grid-mensal .calendario-dia,
.calendar-dashboard-mode .calendario-dia,
.calendar-tv-day {
    min-height: 0;
    height: auto;
    padding: clamp(9px, 0.9vw, 13px);
    border-color: rgba(96, 165, 250, 0.22);
    background: rgba(15, 23, 42, 0.8);
}

.calendar-dashboard-mode .calendario-dia:hover {
    transform: none;
}

.calendar-dashboard-mode .calendario-dia header strong {
    color: #ffffff;
    font-size: clamp(20px, 1.8vw, 30px);
    line-height: 1;
}

.calendar-dashboard-mode .calendario-dia-hoje {
    border-color: rgba(250, 204, 21, 0.88);
    box-shadow:
        inset 0 0 0 1px rgba(250, 204, 21, 0.32),
        0 0 30px rgba(250, 204, 21, 0.12);
}

.calendar-dashboard-mode .calendario-dia header span {
    background: var(--yellow);
    color: #08111f;
    font-size: 11px;
    font-weight: 700;
}

.calendar-dashboard-mode .calendario-itens {
    gap: 5px;
    margin-top: 8px;
    overflow: hidden;
}

.calendar-dashboard-mode .calendario-item,
.calendar-dashboard-mode .calendario-evento,
.calendar-dashboard-mode .calendario-google-evento,
.calendar-tv-event {
    min-height: 0;
    padding: 5px 7px;
    border-left: 3px solid var(--blue);
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.24);
    color: #ffffff;
    font-size: clamp(11px, 0.82vw, 13px);
    font-weight: 850;
    line-height: 1.18;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-dashboard-mode .calendario-google-evento {
    border-left-color: var(--yellow);
    background: rgba(250, 204, 21, 0.15);
}

.calendar-dashboard-mode .calendario-sem-registro,
.calendar-dashboard-mode .calendario-dia-sem-registro {
    color: rgba(203, 213, 225, 0.42);
    font-size: clamp(11px, 0.8vw, 13px);
    font-style: italic;
}

.calendar-dashboard-mode .calendar-week-tasks {
    height: 100%;
    max-height: none;
    border-color: rgba(96, 165, 250, 0.24);
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 36%),
        rgba(15, 23, 42, 0.84);
}

.calendar-dashboard-mode .calendar-week-tasks h2 {
    max-width: 13ch;
    color: #ffffff;
    font-size: clamp(20px, 1.7vw, 28px);
    line-height: 1.08;
}

.calendar-dashboard-mode .calendar-week-tasks h2::before {
    --screen-icon: url("/img/icons/icon-calendar.png");
}

.calendar-dashboard-mode .calendar-week-tasks .mensagem-vazia {
    color: var(--subtle);
    font-size: clamp(14px, 1vw, 16px);
    line-height: 1.45;
}

.calendar-dashboard-mode .calendar-week-tasks__item {
    border-left: 4px solid var(--blue);
    background: rgba(30, 64, 175, 0.32);
}

.calendar-dashboard-mode .calendar-week-tasks__item strong {
    font-size: clamp(14px, 1vw, 17px);
}

.calendar-dashboard-mode .calendar-week-tasks__item span {
    color: #cbd5e1;
}

@media (max-width: 1100px) {
    .calendar-dashboard-mode .calendario-shell--dashboard {
        height: auto;
        max-height: none;
        overflow: auto;
    }

    .calendar-dashboard-mode .calendario-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .calendar-dashboard-mode .calendario-grid-tv,
    .calendar-dashboard-mode .calendario-grid-semanal,
.calendar-dashboard-mode .calendario-grid-mensal {
        height: auto;
        grid-auto-rows: minmax(96px, auto);
    }
}

/* ===================================== */
/* TV - AJUSTE FINAL DE SCROLL INTERNO   */
/* ===================================== */

.tv-dashboard-mode [data-tv-autoscroll],
.tv-page--semana.tv-dashboard-mode .avisos-tv-lista[data-tv-autoscroll],
.tv-page--semana.tv-dashboard-mode .tv-week-side .tv-panel-block[data-tv-autoscroll],
.tv-page--semana.tv-dashboard-mode .manutencao-grid[data-tv-autoscroll],
.calendar-dashboard-mode .calendar-week-tasks[data-tv-autoscroll] {
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.tv-dashboard-mode [data-tv-autoscroll]::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.tv-dashboard-mode [data-tv-autoscroll]:hover,
.tv-dashboard-mode [data-tv-autoscroll]:focus-within {
    scrollbar-width: thin;
}

.tv-dashboard-mode [data-tv-autoscroll]:hover::-webkit-scrollbar,
.tv-dashboard-mode [data-tv-autoscroll]:focus-within::-webkit-scrollbar {
    width: 6px;
}

.tv-dashboard-mode [data-tv-autoscroll]:hover::-webkit-scrollbar-thumb,
.tv-dashboard-mode [data-tv-autoscroll]:focus-within::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.45);
}

@media (prefers-reduced-motion: reduce) {
    .tv-dashboard-mode [data-tv-autoscroll] {
        scroll-behavior: auto;
    }
}

/* ===================================== */
/* RELATÓRIO DA SEMANA EM FOCO          */
/* ===================================== */

.relatorio-form {
    display: grid;
    gap: 32px;
}

.relatorio-form__section {
    display: grid;
    gap: 16px;
}

.relatorio-form__label {
    display: grid;
    gap: 8px;
}

.relatorio-form__label span {
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

.relatorio-form__textarea {
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    font-family: "Courier New", monospace;
    resize: vertical;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.relatorio-form__textarea:focus {
    outline: none;
    border-color: var(--blue-2);
    background: var(--surface-2);
    box-shadow: none;
}

.relatorio-form__textarea:disabled,
.relatorio-form__textarea--disabled {
    opacity: 0.72;
    cursor: not-allowed;
    background: var(--surface);
}

.relatorio-form__status {
    display: flex;
    gap: 12px;
    align-items: center;
}

.relatorio-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.relatorio-status--draft {
    background: rgba(250, 204, 21, 0.18);
    color: var(--yellow);
    border: 1px solid rgba(250, 204, 21, 0.34);
}

.relatorio-status--finalized {
    background: rgba(34, 197, 94, 0.18);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.34);
}

.relatorio-form__actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.relatorio-form__button {
    padding: 12px 16px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.18s ease;
}

.relatorio-form__button--primary {
    background: var(--blue);
    color: #ffffff;
    border-color: var(--blue);
}

.relatorio-form__button--primary:hover {
    background: var(--blue-2);
    border-color: var(--blue-2);
}

.relatorio-form__button--success {
    background: var(--success);
    color: #ffffff;
    border-color: var(--success);
}

.relatorio-form__button--success:hover {
    background: rgba(34, 197, 94, 0.88);
    border-color: rgba(34, 197, 94, 0.88);
}

.relatorio-form__button--secondary {
    background: transparent;
    color: var(--muted);
    border-color: var(--border);
}

.relatorio-form__button--secondary:hover {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--border-strong);
}

.relatorio-view {
    display: grid;
    gap: 32px;
}

.relatorio-view__status {
    display: flex;
    gap: 12px;
}

.relatorio-view__section {
    display: grid;
    gap: 12px;
}

.relatorio-view__section h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.relatorio-view__text {
    padding: 12px 14px;
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    border-left: 4px solid var(--blue-2);
}

.relatorio-view__actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.relatorio-info {
    margin-top: 32px;
    padding: 16px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 12px;
    color: var(--subtle);
    line-height: 1.8;
}

.relatorio-metadata {
    margin-top: 32px;
}

.relatorio-metadata__group {
    padding: 16px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
}

.relatorio-metadata__group h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.relatorio-metadata__group dl {
    display: grid;
    gap: 8px;
    font-size: 13px;
}

.relatorio-metadata__group dt {
    font-weight: 600;
    color: var(--muted);
}

.relatorio-metadata__group dd {
    color: var(--text);
    padding-left: 12px;
}

/* Card do Relatório no Dashboard */

.relatorio-card {
    padding: 16px;
    border-radius: var(--radius);
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: grid;
    gap: 12px;
}

.relatorio-card__header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
}

.relatorio-card__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.relatorio-card__meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: var(--subtle);
}

.relatorio-card__button {
    padding: 8px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--blue);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.18s ease;
}

.relatorio-card__button:hover {
    background: var(--blue-2);
    border-color: var(--blue-2);
}

/* ===================================== */
/* COLLAPSIBLE (SEMANA EM FOCO / AVISOS) */
/* ===================================== */

.avisos-collapsible {
    width: 100%;
}

.avisos-collapsible__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;

    background: transparent;
    border: none;

    padding: 0;
    margin: 0;

    cursor: pointer;
    text-align: left;
}

.avisos-collapsible__meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avisos-collapsible__body {
    overflow: hidden;
    max-height: 0;

    transition:
        max-height 0.3s ease,
        opacity 0.3s ease;

    opacity: 0;
}

.avisos-collapsible--open .avisos-collapsible__body {
    opacity: 1;
}

.avisos-collapsible__inner {
    padding: 0 22px 22px;
}

.avisos-collapsible__arrow {
    transition: transform 0.3s ease;
}

.avisos-collapsible--open .avisos-collapsible__arrow {
    transform: rotate(90deg);
}

/* ===================================== */
/* CABEÇALHO PADRÃO DOS PAINÉIS          */
/* ===================================== */

.avisos-collapsible__header{
    display:flex;
    align-items:center;
    justify-content:space-between;

    width:100%;
    min-height:64px;

    padding:12px 18px;

    border-radius:12px;

    background:linear-gradient(
        90deg,
        #0b2b68 0%,
        #123f91 50%,
        #1b57c7 100%
    );

    border:1px solid rgba(255,255,255,.12);

    box-shadow:
        0 4px 18px rgba(0,0,0,.25),
        inset 0 1px 0 rgba(255,255,255,.08);
}

/* BLOCO ESQUERDO */

.avisos-collapsible__header > div:first-child{
    display:flex;
    align-items:center;
    gap:12px;
}

/* ÍCONE */

.avisos-collapsible__header > div:first-child::before{
    content:"🎯";
    font-size:20px;
}

/* SUBTÍTULO */

.avisos-collapsible__header span{
    display:block;

    color:#cfe0ff;

    font-size:12px;
    font-weight:600;

    text-transform:uppercase;
    letter-spacing:.08em;
}

/* TÍTULO */

.avisos-collapsible__header strong{
    display:block;

    color:#fff;

    font-size:22px;
    font-weight:800;

    line-height:1.1;
}

/* CONTADOR / STATUS */

.avisos-collapsible__meta{
    color:#fff;

    background:rgba(255,255,255,.12);

    border:1px solid rgba(255,255,255,.15);

    padding:8px 14px;

    border-radius:999px;

    font-weight:700;
}

/* SETA */

.avisos-collapsible__arrow{
    color:#fff;
    font-size:18px;
}

/* ===================================== */
/* COMUNICADOS / AVISOS - ESTILIZACAO    */
/* ===================================== */

/* Painel de comunicados - identidade visual distinta */
.avisos-admin-panel {
    border-color: rgba(96, 165, 250, 0.22);
}

/* Remover icone duplicado (::before) no header dos comunicados */
.avisos-admin-panel .avisos-collapsible__header > div:first-child::before {
    content: none;
}

/* Formulario de criacao de comunicado */
.comunicado-form {
    display: grid;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.comunicado-form .campo label {
    display: block;
    margin-bottom: 6px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.comunicado-form .campo input,
.comunicado-form .campo textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    outline: none;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.64);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-family: var(--font);
    font-size: 14px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.comunicado-form .campo textarea {
    min-height: 80px;
    resize: vertical;
}

.comunicado-form .campo input:hover,
.comunicado-form .campo textarea:hover {
    border-color: rgba(96, 165, 250, 0.32);
    background: rgba(15, 23, 42, 0.68);
}

.comunicado-form .campo input:focus,
.comunicado-form .campo textarea:focus {
    border-color: rgba(96, 165, 250, 0.52);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: none;
}

/* Lista de comunicados */
.avisos-list {
    display: grid;
    gap: 12px;
}

/* Card individual de comunicado */
.aviso-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.42);
    border-left: 4px solid var(--blue-2);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.aviso-card:hover {
    border-color: var(--border-strong);
}

.aviso-card__content {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.aviso-card__content h3 {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
}

.aviso-card__content p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.aviso-card__content small {
    color: var(--subtle);
    font-size: 12px;
    font-weight: 700;
}

/* Botao excluir comunicado */
.btn-excluir-aviso {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid rgba(239, 68, 68, 0.28);
    border-radius: var(--radius);
    background: rgba(239, 68, 68, 0.1);
    color: #fecaca;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    font-family: var(--font);
    transition: background 0.18s ease, border-color 0.18s ease;
}

.btn-excluir-aviso:hover {
    background: rgba(239, 68, 68, 0.22);
    border-color: rgba(239, 68, 68, 0.48);
}

/* ===================================== */
/* RELATORIO - AJUSTES VISUAIS           */
/* ===================================== */

.relatorio-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.relatorio-card__button--ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
}

.relatorio-card__button--ghost:hover {
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(96, 165, 250, 0.34);
    color: #ffffff;
}

/* ===================================== */
/* SPRINT 3 - UTILITIES & EXTRACTED      */
/* ===================================== */

/* Utility: hidden (replaces inline style="display: none") */
.hidden {
    display: none;
}

/* Utility: inline form (replaces inline style="display: inline") */
.form-inline {
    display: inline;
}

/* Utility: flex actions row */
.demanda-actions--row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Semana em Foco - coordenadora panel */
.coordenadora-semana-foco-atual {
    padding: 10px 0;
}

.coordenadora-semana-foco-atual h3 {
    color: var(--yellow);
    margin-bottom: 8px;
    font-size: 20px;
}

.coordenadora-semana-foco-atual p {
    margin-bottom: 12px;
    font-size: 15px;
    color: var(--text);
}

.coordenadora-semana-foco-atual .demanda-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
}

/* Relatorio status: not started (replaces inline rgba styles) */
.relatorio-status--not-started {
    background: rgba(226, 232, 240, 0.12);
    color: var(--subtle);
}

/* ===============================
   USUARIOS - CENTRAL DE PERMISOES
   =============================== */

.usuarios-indicadores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.usuarios-indicadores__item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
}

.usuarios-indicadores__item--pendente {
    border-color: var(--warning);
    background: rgba(251, 191, 36, 0.08);
}

.usuarios-indicadores__valor {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
    margin-bottom: 6px;
}

.usuarios-indicadores__label {
    font-size: 13px;
    color: var(--subtle);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.usuarios-filtros {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.usuarios-filtros__input {
    flex: 1;
    min-width: 220px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--surface);
    color: var(--text);
}

.usuarios-filtros__input:focus {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}

.usuarios-filtros__select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--surface);
    color: var(--text);
    min-width: 160px;
}

.usuarios-tabela-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.usuarios-tabela {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.usuarios-tabela th {
    text-align: left;
    padding: 14px 16px;
    font-weight: 600;
    color: var(--subtle);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.usuarios-tabela td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.usuarios-tabela tr:last-child td {
    border-bottom: none;
}

.usuarios-tabela__linha--pendente {
    background: rgba(251, 191, 36, 0.06);
}

.usuarios-tabela__usuario {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.usuarios-tabela__foto {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.usuarios-tabela__acoes {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.usuarios-tabela__vazio {
    color: var(--subtle);
    font-style: italic;
}

.usuarios-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.usuarios-badge--admin {
    background: rgba(139, 92, 246, 0.12);
    color: #7c3aed;
}

.usuarios-badge--vice {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}

.usuarios-badge--coord {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.usuarios-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.usuarios-status--ativo {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.usuarios-status--pendente {
    background: rgba(251, 191, 36, 0.12);
    color: #d97706;
}

.usuarios-status--bloqueado {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

/* Usuario Editar */
.usuario-editar {
    max-width: 720px;
}

.usuario-editar__info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 24px;
}

.usuario-editar__foto {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.usuario-editar__nome {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--text);
}

.usuario-editar__email {
    font-size: 14px;
    color: var(--subtle);
    margin: 0 0 4px 0;
}

.usuario-editar__data {
    font-size: 13px;
    color: var(--subtle);
    margin: 0;
}

.usuario-editar__form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.usuario-editar__segmentos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.usuario-editar__segmento-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.usuario-editar__segmento-item:hover {
    background: rgba(99, 102, 241, 0.05);
}

.usuario-editar__segmento-item:has(input:checked) {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

.usuario-editar__acoes {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.campo-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.campo-label-checkbox {
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
}

/* ============================================
   SPRINT 7 — DASHBOARD INTELIGENTE WIDGETS
   ============================================ */

/* Widget section wrapper */
.dashboard-widget {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.dashboard-widget__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border, #e5e7eb);
}

.dashboard-widget__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text, #1f2937);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-widget__badge {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    background: var(--primary-light, #eef2ff);
    color: var(--primary, #6366f1);
    font-weight: 500;
}

/* Indicadores grid */
.indicadores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.indicador-card {
    background: var(--bg, #f9fafb);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.indicador-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.indicador-card__label {
    font-size: 12px;
    color: var(--text-secondary, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.indicador-card__value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text, #1f2937);
    line-height: 1.2;
}

.indicador-card__value--active { color: #10b981; }
.indicador-card__value--pending { color: #f59e0b; }
.indicador-card__value--progress { color: #3b82f6; }
.indicador-card__value--done { color: #6366f1; }
.indicador-card__value--urgent { color: #ef4444; }

.indicador-card__subtitle {
    font-size: 11px;
    color: var(--text-secondary, #9ca3af);
    margin-top: 2px;
}

/* Widget list items */
.widget-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.widget-list-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg, #f9fafb);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    transition: background 0.15s ease;
}

.widget-list-item:hover {
    background: var(--primary-light, #eef2ff);
}

.widget-list-item__date {
    min-width: 44px;
    text-align: center;
    flex-shrink: 0;
}

.widget-list-item__date-day {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary, #6366f1);
    line-height: 1;
}

.widget-list-item__date-month {
    font-size: 10px;
    color: var(--text-secondary, #6b7280);
    text-transform: uppercase;
}

.widget-list-item__content {
    flex: 1;
    min-width: 0;
}

.widget-list-item__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text, #1f2937);
    margin-bottom: 2px;
}

.widget-list-item__meta {
    font-size: 11px;
    color: var(--text-secondary, #6b7280);
}

/* Avisos prioritarios */
.avisos-prioritarios .aviso-card {
    border-left: 3px solid;
}

.avisos-prioritarios .aviso-card--urgente {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.avisos-prioritarios .aviso-card--alta {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

/* Pendencias widget */
.pendencias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.pendencia-item {
    background: var(--bg, #f9fafb);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.pendencia-item__count {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary, #6366f1);
}

.pendencia-item__label {
    font-size: 11px;
    color: var(--text-secondary, #6b7280);
    margin-top: 2px;
}

/* Segmento progress mini */
.segmento-progress-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.segmento-progress-mini + .segmento-progress-mini {
    border-top: 1px solid var(--border, #e5e7eb);
}

.segmento-progress-mini__name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text, #1f2937);
    min-width: 100px;
}

.segmento-progress-mini__bar {
    flex: 1;
    height: 6px;
    background: var(--border, #e5e7eb);
    border-radius: 3px;
    overflow: hidden;
}

.segmento-progress-mini__fill {
    height: 100%;
    background: var(--primary, #6366f1);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.segmento-progress-mini__percent {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary, #6b7280);
    min-width: 36px;
    text-align: right;
}

/* Demandas empty state */
.widget-empty {
    text-align: center;
    padding: 24px;
    color: var(--text-secondary, #9ca3af);
    font-size: 13px;
}

.widget-empty__icon {
    font-size: 32px;
    margin-bottom: 8px;
    opacity: 0.5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .indicadores-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pendencias-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===================================== */
/* IMPORTACAO DE DADOS                   */
/* ===================================== */
.import-page-layout {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

.import-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.import-card--form,
.import-card--preview,
.import-card--resultado {
    padding: 32px;
}

.import-card__title {
    font-size: 1rem;
    color: var(--muted);
    margin-bottom: 16px;
}

.import-card__title--lg {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.import-card__subtitle {
    color: var(--muted);
    margin-bottom: 24px;
}

.import-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.import-stat-grid--result {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    margin-bottom: 24px;
}

.import-stat-label {
    font-size: 0.75rem;
    color: var(--subtle);
}

.import-stat-value {
    font-size: 1rem;
    font-weight: 600;
}

.import-stat-value--sm {
    font-size: 0.85rem;
    font-weight: 500;
}

.import-stat-value--success {
    color: var(--success);
}

.import-stat-value--info {
    color: var(--blue-2);
}

.import-stat-value--danger {
    color: var(--danger);
}

.import-stat-value--capitalize {
    text-transform: capitalize;
}

.import-table-wrap {
    overflow-x: auto;
    margin-bottom: 24px;
}

.import-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.import-table--sm {
    font-size: 0.8rem;
}

.import-table th {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 2px solid var(--border-strong);
    color: var(--blue-2);
    font-weight: 600;
}

.import-table--errors th {
    padding: 8px;
    color: var(--danger);
    border-bottom: 1px solid var(--border);
}

.import-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
}

.import-table--errors td {
    padding: 6px 8px;
}

.import-table td--center {
    text-align: center;
    color: var(--text);
}

.import-table td--success {
    text-align: center;
    color: var(--success);
}

.import-table td--info {
    text-align: center;
    color: var(--blue-2);
}

.import-table td--subtle {
    text-align: center;
    color: var(--subtle);
}

.import-table td--danger {
    color: var(--danger);
}

.import-table td--italic {
    font-style: italic;
}

.import-banner {
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
}

.import-banner--warning {
    background: rgba(250, 204, 21, 0.1);
    border: 1px solid rgba(250, 204, 21, 0.3);
}

.import-banner--success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    padding: 12px;
    color: var(--success);
}

.import-banner--danger {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    padding: 16px;
    margin-bottom: 24px;
}

.import-banner__title {
    color: var(--yellow);
}

.import-banner__title--danger {
    color: var(--danger);
}

.import-banner__list {
    margin-top: 8px;
    padding-left: 20px;
    color: var(--muted);
    max-height: 150px;
    overflow-y: auto;
}

.import-banner__list li {
    margin-bottom: 4px;
}

.import-result-card {
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}

.import-result-card--success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.import-result-card--info {
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.import-result-card--muted {
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.import-result-card--danger {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.import-result-card__label {
    font-size: 0.75rem;
    color: var(--muted);
}

.import-result-card__value {
    font-size: 1.8rem;
    font-weight: 700;
}

.import-result-card__value--success {
    color: var(--success);
}

.import-result-card__value--info {
    color: var(--blue-2);
}

.import-result-card__value--muted {
    color: var(--subtle);
}

.import-result-card__value--danger {
    color: var(--danger);
}

.import-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 16px;
    flex-wrap: wrap;
}

.import-back-link {
    text-decoration: none;
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: 0.85rem;
}

.import-footer {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.import-footer .btn-editar {
    text-decoration: none;
}

.import-footer .btn-editar--ghost {
    background: var(--surface-2);
    border: 1px solid var(--border);
}

.import-field {
    margin-bottom: 16px;
}

.import-field--lg {
    margin-bottom: 24px;
}

.import-field input[type="file"] {
    color: var(--muted);
}

.import-hint {
    color: var(--subtle);
    font-size: 0.75rem;
    margin-top: 8px;
}

/* ===================================== */
/* TOAST NOTIFICATIONS                   */
/* ===================================== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    min-width: 300px;
    max-width: 440px;
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateX(40px);
    animation: toast-in 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.toast--success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: var(--success);
}

.toast--error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: var(--danger);
}

.toast--info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: var(--blue-2);
}

.toast--leaving {
    animation: toast-out 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(40px); }
}

/* ===================================== */
/* MOBILE SIDEBAR HAMBURGER              */
/* ===================================== */
.sidebar-hamburger {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 90;
    width: 42px;
    height: 42px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 75;
    background: rgba(0, 0, 0, 0.5);
}

@media (max-width: 980px) {
    .sidebar-hamburger {
        display: grid;
    }

    .app-sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .app-sidebar--mobile-open {
        transform: translateX(0);
    }

    .sidebar-overlay--visible {
        display: block;
    }

    .app-main {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* ===================================== */
/* LOGIN LOADING STATE                   */
/* ===================================== */
.google-login-button--loading {
    pointer-events: none;
    opacity: 0.7;
}

.google-login-button--loading .google-login-button__text {
    visibility: hidden;
}

.google-login-button--loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===================================== */
/* OPTION STYLING (dark theme fix)       */
/* ===================================== */
select option,
.campo-select option {
    background: #101827;
    color: #f8fafc;
    padding: 8px 12px;
}

/* ===================================== */
/* SIDEBAR OVERLAY Z-INDEX FIX           */
/* ===================================== */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 79;
    display: none;
}

/* ===================================== */
/* FORM-CONTAINER CLASS                  */
/* ===================================== */
.form-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 32px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

/* ===================================== */
/* USUARIO-EDITAR FORM CLASSES           */
/* ===================================== */
.campo-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.campo-input:focus {
    outline: none;
    border-color: var(--blue-2);
}

.campo-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
}

.campo-label {
    display: block;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 6px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.campo-grupo {
    margin-bottom: 18px;
}

.campo-erros {
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--danger);
}

.btn--primary {
    background: var(--blue);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn--primary:hover {
    background: var(--blue-2);
}

.btn--secondary {
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 10px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn--secondary:hover {
    background: var(--surface-3);
}

/* ===================================== */
/* FORM LOADING STATE                    */
/* ===================================== */
.btn--loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

/* ===================================== */
/* ERROR PAGE                            */
/* ===================================== */
.error-card {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

.error-actions {
    margin-top: 24px;
}

.error-login-link {
    text-decoration: none;
}

.error-links {
    margin-top: 16px;
}

/* ===================================== */
/* IMPORT PAGE UTILITIES                 */
/* ===================================== */
.import-file-hidden {
    display: none;
}

.import-result-title {
    margin-bottom: 16px;
}

.import-banner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.import-table-wrap--spaced {
    margin-bottom: 12px;
}

.td--center {
    text-align: center;
}

/* ===================================== */
/* ADMIN EMPTY STATE                     */
/* ===================================== */
.admin-empty {
    padding: 32px 24px;
    text-align: center;
    color: var(--subtle);
    font-style: italic;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

/* ===================================== */
/* ADMIN STAT GRID SECONDARY             */
/* ===================================== */
.admin-stat-grid--secondary {
    margin-top: 0.75rem;
}

/* ===================================== */
/* VISUALLY HIDDEN (screen readers)      */
/* ===================================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===================================== */
/* TABLE SCROLL WRAPPER                  */
/* ===================================== */
.usuarios-tabela-wrap--scroll {
    overflow-x: auto;
}

