* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f9;
    color: #333;
}

a {
    text-decoration: none;
}

.app {
    min-height: 100vh;
}

.topbar {
    height: 64px;
    background: #0f172a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    z-index: 100;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.topbar-left small {
    display: block;
    color: #cbd5e1;
    font-size: 12px;
    margin-top: 2px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    text-align: right;
}

.user-info strong {
    display: block;
    font-size: 14px;
}

.user-info span {
    display: block;
    font-size: 12px;
    color: #cbd5e1;
}

.btn-logout {
    background: #ef4444;
    color: #fff;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 14px;
}

.btn-logout:hover {
    background: #dc2626;
}

.menu-toggle {
    display: none;
    background: #1e293b;
    color: #fff;
    border: 0;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.main-wrapper {
    display: flex;
}

.sidebar {
    width: 260px;
    background: #111827;
    color: #fff;
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 200;
}

.sidebar-logo {
    text-align: center;
    padding: 25px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo img {
    max-width: 75px;
    margin-bottom: 10px;
}

.sidebar-logo h2 {
    font-size: 22px;
    letter-spacing: 1px;
}

.sidebar-logo span {
    display: block;
    color: #9ca3af;
    font-size: 12px;
    margin-top: 4px;
}

.sidebar-menu {
    padding: 15px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #d1d5db;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 5px;
    font-size: 15px;
    transition: 0.2s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: #2563eb;
    color: #fff;
}

.content {
    margin-left: 260px;
    padding: 90px 24px 30px;
    width: calc(100% - 260px);
}

.page-header {
    background: #fff;
    padding: 22px;
    border-radius: 14px;
    margin-bottom: 22px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.04);
}

.page-header h1 {
    font-size: 26px;
    color: #111827;
}

.page-header p {
    color: #6b7280;
    margin-top: 5px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 22px;
}

.card {
    background: #fff;
    padding: 22px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.04);
    border-left: 5px solid #2563eb;
}

.card h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.card p {
    font-size: 14px;
    color: #6b7280;
}

.card-icon {
    font-size: 34px;
}

.card-blue {
    border-left-color: #2563eb;
}

.card-green {
    border-left-color: #16a34a;
}

.card-orange {
    border-left-color: #f97316;
}

.card-red {
    border-left-color: #dc2626;
}

.panel {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.04);
    overflow: hidden;
}

.panel-header {
    padding: 18px 22px;
    border-bottom: 1px solid #e5e7eb;
}

.panel-header h2 {
    font-size: 20px;
}

.panel-body {
    padding: 22px;
}

.panel-body p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.flash {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 15px;
}

.flash-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.flash-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.flash-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.flash-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-secondary {
    background: #e5e7eb;
    color: #374151;
}

.login-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 430px;
}

.login-card {
    background: #fff;
    padding: 32px;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.login-logo {
    text-align: center;
    margin-bottom: 25px;
}

.login-logo img {
    max-width: 90px;
    margin-bottom: 12px;
}

.login-logo h1 {
    font-size: 26px;
    color: #111827;
}

.login-logo p {
    color: #6b7280;
    margin-top: 5px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 17px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: bold;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    padding: 12px 13px;
    border-radius: 9px;
    font-size: 15px;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.btn {
    border: 0;
    padding: 12px 16px;
    border-radius: 9px;
    font-size: 15px;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-full {
    width: 100%;
}

@media (max-width: 992px) {
    .topbar {
        left: 0;
    }

    .menu-toggle {
        display: inline-block;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: 0.3s;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .content {
        margin-left: 0;
        width: 100%;
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .topbar {
        padding: 0 14px;
    }

    .topbar-right {
        gap: 8px;
    }

    .user-info {
        display: none;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .content {
        padding: 85px 15px 25px;
    }

    .login-card {
        padding: 25px;
    }
}

.dashboard-card-link {
    text-decoration: none;
    color: inherit;
}

.dashboard-card-link:hover {
    text-decoration: none;
}

.dashboard-card-link h3,
.dashboard-card-link p {
    text-decoration: none;
}
/** INICIO - CSS VOLTAR PARA SIGESP ABAIXO DO BOTÃO LOGIN */
.login-home-link {
    text-align: center;
    margin-top: 18px;
}

.login-home-link a {
    font-size: 14px;
    color: #64748b;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s ease;
}

.login-home-link a:hover {
    color: #2563eb;
    text-decoration: underline;
}
/** FIM - CSS VOLTAR PARA SIGESP ABAIXO DO BOTÃO LOGIN */

/** INICIO - CSS FUNÇÃO DE ADICIONAR, EDITAR, ATIVAR, DESATIVAR E EXCLUIR UNIDADES */

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
    flex-wrap: wrap;
}

/* Botões padrão do sistema */
.btn-primary {
    background: #2563eb;
    color: #ffffff;
    border: none;
}

.btn-primary:hover {
    background: #1d4ed8;
    color: #ffffff;
}

.btn-secondary {
    background: #64748b;
    color: #ffffff;
    border: none;
}

.btn-secondary:hover {
    background: #475569;
    color: #ffffff;
}

/* Editar: amarelo com texto branco */
.btn-warning {
    background: #f59e0b !important;
    color: #ffffff !important;
    border: none;
}

.btn-warning:hover {
    background: #d97706 !important;
    color: #ffffff !important;
}

/* Desativar: vermelho com texto branco */
.btn-toggle-off,
.btn-danger {
    background: #dc2626 !important;
    color: #ffffff !important;
    border: none;
}

.btn-toggle-off:hover,
.btn-danger:hover {
    background: #b91c1c !important;
    color: #ffffff !important;
}

/* Ativar: verde com texto branco */
.btn-toggle-on {
    background: #16a34a !important;
    color: #ffffff !important;
    border: none;
}

.btn-toggle-on:hover {
    background: #15803d !important;
    color: #ffffff !important;
}

/* Excluir: preto com texto branco */
.btn-delete {
    background: #111827 !important;
    color: #ffffff !important;
    border: none;
}

.btn-delete:hover {
    background: #000000 !important;
    color: #ffffff !important;
}

/* Botões pequenos */
.btn-small {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 7px;
    line-height: 1.2;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
}

/* Tabela */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
    background: #ffffff;
}

.table thead {
    background: #f8fafc;
}

.table th,
.table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
    font-size: 14px;
}

.table th {
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
}

.table td {
    color: #1e293b;
}

.table tbody tr:hover {
    background: #f8fafc;
}

.table a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.table a:hover {
    text-decoration: underline;
}

.table td img {
    display: block;
    max-width: 52px;
    height: 52px;
    object-fit: contain;
}

/* Coluna de ações */
.table td:last-child {
    white-space: nowrap;
}

.table td:last-child a,
.table td:last-child form,
.table td:last-child button {
    margin-right: 6px;
}

.table td:last-child form {
    display: inline-block;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-secondary {
    background: #e2e8f0;
    color: #334155;
}

/* Mensagens */
.flash {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 500;
}

.flash-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.flash-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.flash-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.flash-info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

/* Responsivo */
@media (max-width: 700px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        align-items: stretch;
    }

    .form-actions .btn {
        width: 100%;
    }

    .table {
        min-width: 900px;
    }
}

/** FIM - CSS FUNÇÃO DE ADICIONAR, EDITAR, ATIVAR, DESATIVAR E EXCLUIR UNIDADES */

/** INICIO - TABELA SERVIDORES EM DUAS LINHAS */

.table-servidores {
    min-width: 900px;
}

.table-servidores thead th {
    background: #f8fafc;
}

.table-servidores tbody tr:hover {
    background: transparent;
}

.table-servidores tbody tr:not(.servidor-detalhes-row) td {
    border-bottom: none;
    padding-bottom: 8px;
}

.servidor-detalhes-row td {
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    padding-top: 10px;
    padding-bottom: 14px;
}

.servidor-detalhes {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.servidor-detalhes div {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 14px;
}

.servidor-detalhes span {
    display: block;
    font-size: 12px;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.servidor-detalhes strong {
    display: block;
    font-size: 14px;
    color: #0f172a;
    font-weight: 800;
}

.servidor-detalhes small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.3;
}

.table-servidores td:last-child {
    white-space: nowrap;
}

.table-servidores td:last-child form,
.table-servidores td:last-child a {
    display: inline-block;
    margin-right: 6px;
}

@media (max-width: 900px) {
    .table-servidores {
        min-width: 850px;
    }

    .servidor-detalhes {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .servidor-detalhes {
        grid-template-columns: 1fr;
    }
}
/** INICIO - AJUSTE CARDS DE DETALHES DO SERVIDOR */

.table-servidores .servidor-detalhes {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1.2fr 1fr;
    gap: 12px;
}

.table-servidores .servidor-detalhes div {
    min-height: 78px;
    padding: 12px 14px;
}

.table-servidores .servidor-detalhes span {
    font-size: 11px;
    margin-bottom: 5px;
}

.table-servidores .servidor-detalhes strong {
    font-size: 14px;
    line-height: 1.25;
}

.table-servidores .servidor-detalhes small {
    font-size: 12px;
    line-height: 1.25;
}

/* Responsivo */
@media (max-width: 1100px) {
    .table-servidores .servidor-detalhes {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 700px) {
    .table-servidores .servidor-detalhes {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .table-servidores .servidor-detalhes {
        grid-template-columns: 1fr;
    }
}

/** FIM - AJUSTE CARDS DE DETALHES DO SERVIDOR */

/** FIM - TABELA SERVIDORES EM DUAS LINHAS */

/** INICIO - CALENDÁRIO DE FOLGAS MODERNO */

.calendar-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 14px 16px;
}

.calendar-toolbar strong {
    font-size: 18px;
    color: #0f172a;
    font-weight: 900;
}

.folgas-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    background: #f1f5f9;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 12px;
}

/* Cabeçalho dos dias da semana */
.calendar-weekday {
    background: #ffffff;
    color: #334155;
    font-weight: 900;
    font-size: 13px;
    padding: 12px 8px;
    text-align: center;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Dia normal */
.calendar-day {
    min-height: 145px;
    padding: 10px;
    border-radius: 15px;
    position: relative;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    transition: 0.2s ease;
    display: flex;
    flex-direction: column;
}

.calendar-day:hover {
    border-color: #2563eb;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

/* Espaços vazios antes do primeiro dia do mês */
.calendar-empty {
    background: transparent;
    border: 1px dashed #cbd5e1;
    box-shadow: none;
}

.calendar-empty:hover {
    transform: none;
    border-color: #cbd5e1;
    box-shadow: none;
}

/* Dias passados */
.calendar-past {
    background: #f8fafc;
    opacity: 0.7;
}

.calendar-past:hover {
    transform: none;
    border-color: #e5e7eb;
    box-shadow: none;
}

/* Número do dia */
.calendar-date {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 900;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

/* Lista de folgas dentro do dia */
.calendar-folgas {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
    flex: 1;
}

/* Item de folga aprovada */
.calendar-folga-item {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    border-left: 4px solid #16a34a;
    border-radius: 10px;
    padding: 7px 8px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.08);
}

.calendar-folga-item small {
    display: block;
    color: #047857;
    font-size: 10px;
    margin-top: 3px;
    font-weight: 800;
    text-transform: uppercase;
}

/* Botão solicitar */
.calendar-request-btn {
    width: 100%;
    border: none;
    background: #2563eb;
    color: #ffffff;
    border-radius: 10px;
    padding: 8px 9px;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    margin-top: auto;
    transition: 0.2s ease;
}

.calendar-request-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

/* Painel de solicitação aberto */
#form-solicitacao-folga {
    border: 1px solid #bfdbfe;
    box-shadow: 0 12px 35px rgba(37, 99, 235, 0.10);
}

#form-solicitacao-folga .panel-header {
    background: #eff6ff;
    border-bottom: 1px solid #bfdbfe;
}

#form-solicitacao-folga .panel-header h2 {
    color: #1d4ed8;
}

/* Legenda opcional */
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.calendar-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 8px 11px;
    border-radius: 999px;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

.calendar-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

.calendar-legend-dot.confirmada {
    background: #16a34a;
}

.calendar-legend-dot.solicitar {
    background: #2563eb;
}

.calendar-legend-dot.passado {
    background: #94a3b8;
}

/* Responsivo */
@media (max-width: 1000px) {
    .folgas-calendar {
        min-width: 980px;
    }

    .panel-body {
        overflow-x: auto;
    }
}

@media (max-width: 700px) {
    .calendar-toolbar {
        justify-content: center;
        text-align: center;
    }

    .calendar-toolbar strong {
        width: 100%;
        order: -1;
    }

    .folgas-calendar {
        min-width: 920px;
    }
}
.calendar-off-duty {
    width: 100%;
    background: #f1f5f9;
    color: #64748b;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 8px 9px;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    margin-top: auto;
}

/** FIM - CALENDÁRIO DE FOLGAS MODERNO */

/** INICIO - FOLGAS: CONSULTA, RESUMO E MOVIMENTAÇÕES */

.panel-folga-consulta,
.panel-folga-consulta .panel-body {
    overflow: visible !important;
}

.folga-search-form {
    margin-bottom: 18px;
}

.folga-search-form .form-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px;
    gap: 14px;
    align-items: end;
}

.folga-search-form .form-group {
    position: relative;
}

.folga-search-button .btn {
    width: 100%;
    height: 46px;
}

.folga-preview-results {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 9999;
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
    overflow: hidden;
    max-height: 260px;
    overflow-y: auto;
}

.folga-preview-item,
.folga-search-item {
    display: block;
    padding: 12px 14px;
    text-decoration: none !important;
    color: #0f172a;
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    word-break: break-word;
}

.folga-preview-item:last-child,
.folga-search-item:last-child {
    border-bottom: 0;
}

.folga-preview-item:hover,
.folga-search-item:hover {
    background: #eff6ff;
}

.folga-preview-item strong,
.folga-search-item strong {
    display: block;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.4;
    margin-bottom: 2px;
}

.folga-preview-item small,
.folga-search-item small {
    display: block;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

.folga-preview-empty {
    padding: 12px 14px;
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
}

.folga-search-results {
    display: grid;
    gap: 10px;
    margin: 12px 0 18px;
}

.folga-search-item {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.folga-search-item:hover {
    border-color: #2563eb;
}

.folga-resumo-box {
    margin-top: 22px;
    background: #ffffff;
    border: 1px solid #dbe3ec;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.folga-resumo-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    background: #f8fafc;
    color: #0f172a;
    padding: 16px 18px;
    border-bottom: 1px solid #e5e7eb;
}

.folga-resumo-title strong {
    display: block;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.3;
}

.folga-resumo-title span {
    display: block;
    color: #64748b;
    font-size: 13px;
    margin-top: 4px;
    font-weight: 700;
}

.folga-resumo-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: #e5e7eb;
}

.folga-resumo-line {
    background: #f8fafc;
    padding: 14px 15px;
    min-height: 74px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.folga-resumo-line span {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: 6px;
}

.folga-resumo-line strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.35;
    word-break: break-word;
}

.folga-saldo-destaque {
    background: #dcfce7 !important;
}

.folga-saldo-destaque span,
.folga-saldo-destaque strong {
    color: #166534 !important;
}

.folga-saldo-destaque strong {
    font-size: 24px;
}

.folga-ajuste-saldo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 16px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
}

.folga-ajuste-saldo form {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    padding: 12px;
    border-radius: 14px;
}

.folga-ajuste-campo label {
    display: block;
    font-size: 11px;
    font-weight: 900;
    color: #475569;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.folga-ajuste-saldo input {
    width: 100%;
    height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    padding: 0 10px;
    font-size: 14px;
    background: #ffffff;
}

.folga-ajuste-saldo button {
    height: 40px;
    white-space: nowrap;
}

.folga-movimentacoes {
    padding: 16px;
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
}

.folga-movimentacoes-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 12px;
    margin-bottom: 12px;
}

.folga-movimentacoes-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 900;
    color: #0f172a;
}

.folga-movimentacoes-header small {
    color: #64748b;
    font-weight: 700;
}

.table-compact th,
.table-compact td {
    padding: 10px 9px;
    font-size: 13px;
}

.folga-movimentacoes-empty {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    padding: 14px;
    border-radius: 12px;
    color: #64748b;
    font-weight: 700;
}

@media (max-width: 1180px) {
    .folga-resumo-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .folga-ajuste-saldo {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 850px) {
    .folga-search-form .form-row,
    .folga-ajuste-saldo form {
        grid-template-columns: 1fr;
    }

    .folga-resumo-title,
    .folga-movimentacoes-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .folga-resumo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .folga-resumo-grid {
        grid-template-columns: 1fr;
    }

    .folga-saldo-destaque strong {
        font-size: 22px;
    }
}

/** FIM - FOLGAS: CONSULTA, RESUMO E MOVIMENTAÇÕES */

/** INICIO - FOLGA PENDENTE NO CALENDÁRIO */

.calendar-folga-item.calendar-folga-pendente {
    background: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fde68a !important;
    border-left: 4px solid #f59e0b !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.12) !important;
}

.calendar-folga-item.calendar-folga-pendente small {
    color: #92400e !important;
}

.calendar-folga-item.calendar-folga-aprovada {
    background: #ecfdf5 !important;
    color: #065f46 !important;
    border: 1px solid #a7f3d0 !important;
    border-left: 4px solid #16a34a !important;
}

.calendar-status-pendente {
    margin-top: 5px !important;
    display: inline-flex !important;
    width: fit-content;
    background: #ffffff;
    color: #b45309 !important;
    border: 1px solid #fcd34d;
    border-radius: 999px;
    padding: 3px 7px;
    font-size: 9px !important;
    font-weight: 900 !important;
    letter-spacing: .02em;
}

.calendar-already-requested {
    background: #fffbeb !important;
    color: #92400e !important;
    border-color: #fde68a !important;
}

.calendar-legend-dot.pendente {
    background: #f59e0b;
}

/** FIM - FOLGA PENDENTE NO CALENDÁRIO */
/** INICIO - PLANO DE ACAO NO CALENDARIO DE FOLGAS */

.panel-plano-acao .flash-info {
    margin-bottom: 16px;
}

.plano-acao-form {
    margin-bottom: 8px;
}

.calendar-day.calendar-plano-acao-dia {
    background: linear-gradient(180deg, #fff7f7 0%, #ffffff 100%);
    border-color: #fecaca !important;
}

.calendar-planos-acao {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 5px 0;
}

.calendar-plano-acao-item {
    width: 100%;
    background: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #fecaca !important;
    border-left: 4px solid #dc2626 !important;
    border-radius: 10px;
    padding: 6px 7px;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.25;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.12);
}

.calendar-plano-acao-item strong,
.calendar-plano-acao-item small {
    display: block;
    color: #991b1b !important;
}

.calendar-plano-acao-item small {
    margin-top: 2px;
    font-size: 9px;
    font-weight: 800;
    opacity: 0.9;
}

.calendar-plano-acao-bloqueado {
    background: #fee2e2 !important;
    color: #991b1b !important;
    border-color: #fecaca !important;
    font-weight: 900 !important;
}

.calendar-legend-dot.plano-acao {
    background: #dc2626 !important;
    border-color: #991b1b !important;
}

@media (max-width: 768px) {
    .calendar-plano-acao-item {
        padding: 5px 4px;
        font-size: 8px;
        border-radius: 8px;
    }

    .calendar-plano-acao-item small {
        font-size: 7px;
    }
}

/** FIM - PLANO DE ACAO NO CALENDARIO DE FOLGAS */
/** =========================================================
 *  INÍCIO - AJUSTE COMPACTO E RESPONSIVO DO PLANO DE AÇÃO
 *  ========================================================= */

.panel-plano-acao {
    margin-bottom: 18px !important;
}

.panel-plano-acao .panel-header {
    padding: 14px 16px;
}

.panel-plano-acao .panel-header h2 {
    font-size: 20px;
    line-height: 1.2;
    margin: 0;
}

.panel-plano-acao .panel-body {
    padding: 14px;
}

/* Aviso superior mais compacto */
.panel-plano-acao .flash-info {
    margin-bottom: 12px;
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 10px;
    line-height: 1.45;
}

/* Formulário */
.panel-plano-acao .plano-acao-form {
    margin-bottom: 10px;
}

.panel-plano-acao .plano-acao-form .form-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 10px;
    align-items: end;
}

.panel-plano-acao .plano-acao-form .form-row:last-child {
    grid-template-columns: minmax(0, 1fr) 180px;
}

.panel-plano-acao .form-group {
    margin-bottom: 0;
}

.panel-plano-acao .form-group label {
    font-size: 12px;
    margin-bottom: 6px;
    font-weight: 700;
    color: #334155;
}

.panel-plano-acao .form-group input,
.panel-plano-acao .form-group select,
.panel-plano-acao .form-group textarea {
    height: 40px;
    min-height: 40px;
    padding: 0 12px;
    font-size: 13px;
    border-radius: 10px;
}

.panel-plano-acao .form-group textarea {
    min-height: 40px;
    height: 40px;
    padding-top: 10px;
    resize: vertical;
}

.panel-plano-acao .folga-search-button label {
    display: block;
    height: 18px;
}

.panel-plano-acao .folga-search-button .btn,
.panel-plano-acao .folga-search-button button {
    width: 100%;
    height: 40px;
    padding: 0 14px;
    font-size: 13px;
    border-radius: 10px;
}

/* Bloco da listagem */
.panel-plano-acao .folga-movimentacoes {
    margin-top: 14px !important;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.panel-plano-acao .folga-movimentacoes-header {
    padding: 12px 14px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.panel-plano-acao .folga-movimentacoes-header h3 {
    font-size: 16px;
    margin: 0;
    line-height: 1.2;
}

.panel-plano-acao .folga-movimentacoes-header small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #64748b;
}

/* Tabela compacta */
.panel-plano-acao .table-compact {
    width: 100%;
    border-collapse: collapse;
}

.panel-plano-acao .table-compact thead th {
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .02em;
    background: #f8fafc;
    color: #334155;
    border-bottom: 1px solid #e2e8f0;
}

.panel-plano-acao .table-compact tbody td {
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.4;
    vertical-align: middle;
    border-bottom: 1px solid #edf2f7;
}

.panel-plano-acao .table-compact tbody tr:hover {
    background: #fcfdff;
}

.panel-plano-acao .table-compact strong {
    font-size: 13px;
    line-height: 1.35;
}

.panel-plano-acao .table-compact small {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    color: #64748b;
}

/* Observação mais enxuta */
.panel-plano-acao .table-compact td:nth-child(5) {
    max-width: 280px;
    word-break: break-word;
}

/* Ações */
.panel-plano-acao .table-compact td:last-child {
    white-space: nowrap;
    width: 170px;
}

.panel-plano-acao .table-compact td:last-child form {
    display: inline-block;
    margin: 2px 4px 2px 0;
}

.panel-plano-acao .table-compact .btn {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
    border-radius: 9px;
}

/* Badge compacta */
.panel-plano-acao .badge {
    padding: 5px 10px;
    font-size: 11px;
    border-radius: 999px;
}

/* Estado vazio */
.panel-plano-acao .folga-movimentacoes-empty {
    padding: 16px 14px;
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

/* =========================================================
 *  RESPONSIVO
 *  ========================================================= */

@media (max-width: 1100px) {
    .panel-plano-acao .plano-acao-form .form-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .panel-plano-acao .plano-acao-form .form-row:last-child {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .panel-plano-acao .panel-header {
        padding: 12px 14px;
    }

    .panel-plano-acao .panel-header h2 {
        font-size: 18px;
    }

    .panel-plano-acao .panel-body {
        padding: 12px;
    }

    .panel-plano-acao .plano-acao-form .form-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .panel-plano-acao .plano-acao-form .form-row:last-child {
        grid-template-columns: 1fr;
    }

    .panel-plano-acao .form-group label {
        font-size: 12px;
    }

    .panel-plano-acao .form-group input,
    .panel-plano-acao .form-group select,
    .panel-plano-acao .form-group textarea {
        height: 42px;
        font-size: 14px;
    }

    .panel-plano-acao .folga-search-button .btn,
    .panel-plano-acao .folga-search-button button {
        height: 42px;
        font-size: 14px;
    }

    /* No celular a tabela vira bloco com rolagem suave */
    .panel-plano-acao .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .panel-plano-acao .table-compact {
        min-width: 760px;
    }
}

@media (max-width: 480px) {
    .panel-plano-acao .flash-info {
        font-size: 12px;
        padding: 9px 10px;
    }

    .panel-plano-acao .folga-movimentacoes-header h3 {
        font-size: 15px;
    }

    .panel-plano-acao .folga-movimentacoes-header small {
        font-size: 11px;
    }

    .panel-plano-acao .table-compact thead th,
    .panel-plano-acao .table-compact tbody td {
        padding: 9px 10px;
    }
}

/** =========================================================
 *  FIM - AJUSTE COMPACTO E RESPONSIVO DO PLANO DE AÇÃO
 *  ========================================================= */

/** INÍCIO - PLANO DE AÇÃO CENTRALIZADO NO CALENDÁRIO */

.calendar-planos-acao {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 22px auto 8px auto !important;
}

.calendar-plano-acao-item {
    text-align: center !important;
    justify-content: center !important;
    align-items: center !important;
    max-width: 120px !important;
    margin: 0 auto !important;
}

.calendar-plano-acao-item strong {
    display: block !important;
    text-align: center !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
}

.calendar-plano-acao-item small {
    display: none !important;
}

/* Remove qualquer aviso duplicado do Plano de Ação abaixo do calendário */
.calendar-plano-acao-bloqueado {
    display: none !important;
}

@media (max-width: 768px) {
    .calendar-planos-acao {
        margin: 14px auto 6px auto !important;
    }

    .calendar-plano-acao-item {
        max-width: 98px !important;
        padding: 5px 6px !important;
    }

    .calendar-plano-acao-item strong {
        font-size: 9px !important;
    }
}

/** FIM - PLANO DE AÇÃO CENTRALIZADO NO CALENDÁRIO */