body {
    background: #f5f7fb;
    font-family: "Roboto", Arial, sans-serif;
}

.app-shell {
    min-height: 100vh;
}

.app-content {
    padding-left: 292px;
}

.app-navbar {
    background: var(--app-navbar-bg, #10b77f);
}

.app-navbar .navbar-brand,
.app-navbar .navbar-text,
.app-navbar .nav-link {
    color: var(--app-navbar-color, #fff);
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus {
    color: var(--app-navbar-color, #fff);
    opacity: 0.82;
}

.app-navbar .navbar-toggler {
    border-color: color-mix(in srgb, var(--app-navbar-color, #fff) 45%, transparent);
}

.app-navbar .navbar-toggler-icon {
    filter: brightness(0) invert(1);
}

.navbar-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 268px;
    display: flex;
    flex-direction: column;
    background: var(--app-navbar-bg, #10b77f);
    color: var(--app-navbar-color, #fff);
    z-index: 1030;
    box-shadow: 2px 0 16px rgba(15, 23, 42, 0.12);
}

.app-sidebar a,
.app-sidebar button {
    color: var(--app-navbar-color, #fff);
}

.app-sidebar-brand {
    padding: 1rem 1rem 0.8rem;
    font-weight: 700;
    border-bottom: 1px solid color-mix(in srgb, var(--app-navbar-color, #fff) 22%, transparent);
}

.app-sidebar-brand a {
    color: var(--app-navbar-color, #fff);
}

.app-sidebar-user {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid color-mix(in srgb, var(--app-navbar-color, #fff) 18%, transparent);
}

.app-sidebar-user .small {
    opacity: 0.82;
}

.app-sidebar-user-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
    margin-top: 0.55rem;
}

.app-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
}

.app-menu-group + .app-menu-group {
    margin-top: 0.75rem;
}

.app-menu-title {
    width: 100%;
    border: 0;
    border-radius: 6px;
    padding: 0.65rem 0.75rem;
    text-align: left;
    font-weight: 700;
    background: color-mix(in srgb, var(--app-navbar-color, #fff) 16%, transparent);
}

.app-menu-title:hover,
.app-menu-title:focus {
    background: color-mix(in srgb, var(--app-navbar-color, #fff) 23%, transparent);
}

.app-menu-link {
    display: block;
    margin-top: 0.25rem;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    color: var(--app-navbar-color, #fff);
}

.app-menu-link:hover,
.app-menu-link:focus {
    color: var(--app-navbar-color, #fff);
    background: color-mix(in srgb, var(--app-navbar-color, #fff) 18%, transparent);
}

.app-menu-link-nested {
    margin-left: 1rem;
    padding-left: 0.9rem;
    border-left: 2px solid color-mix(in srgb, var(--app-navbar-color, #fff) 32%, transparent);
}

.app-sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid color-mix(in srgb, var(--app-navbar-color, #fff) 18%, transparent);
}

.login-logo {
    max-width: 120px;
    max-height: 120px;
    object-fit: contain;
}

.settings-logo-preview {
    max-width: 120px;
    max-height: 80px;
    object-fit: contain;
}

.table-calendar th,
.table-calendar td {
    vertical-align: middle;
    min-width: 44px;
    padding: 0.25rem;
    text-align: center;
    border: 1px solid #7f7f7f !important;
}

.table-calendar .militar-cell {
    min-width: 260px;
    max-width: 320px;
    text-align: right;
    font-weight: 600;
    position: sticky;
    left: 0;
    z-index: 2;
    background: #dbdbdb;
}

.table-calendar thead .militar-cell {
    z-index: 3;
}

.table-calendar .total-cell {
    min-width: 72px;
    font-weight: 600;
}

.table-calendar .cycle-cell {
    min-width: 160px;
}

.table-calendar .date-head {
    line-height: 1.1;
    font-weight: 500;
}

.table-calendar .date-head strong {
    display: block;
    font-size: 1rem;
}

.table-calendar .off-day {
    background: #c9c9c9 !important;
}

.table-calendar .workday {
    background: #dbdbdb;
}

.table-calendar tbody tr:nth-child(odd) .workday,
.table-calendar tbody tr:nth-child(odd) .militar-cell {
    background: #fff;
}

.table-calendar tbody tr:nth-child(even) .workday,
.table-calendar tbody tr:nth-child(even) .militar-cell {
    background: #dbdbdb;
}

.table-calendar tbody tr:nth-child(even) .off-day {
    background: #c9c9c9 !important;
}

.table-calendar tbody tr:nth-child(odd) .off-day {
    background: #c9c9c9 !important;
}

.scale-select {
    min-width: 52px;
    padding-left: 0.25rem;
    padding-right: 0.75rem;
    text-align: center;
    font-size: 0.8rem;
    background-size: 6px 6px;
    background-position: right 0.28rem center;
}

.scale-read-cell {
    min-height: 24px;
    font-weight: 600;
}

.modalidade-militares-list {
    max-height: 360px;
    overflow: auto;
}

.print-only {
    display: none;
}

.carga-table th,
.carga-table td {
    min-width: 105px;
    text-align: center;
    border: 1px solid #9b9b9b !important;
}

.carga-table .carga-militar {
    min-width: 220px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
}

.carga-table small {
    display: block;
    font-size: 0.72rem;
}

.carga-table .carga-quarter-head {
    background: #d6d6d6;
    color: #111;
}

.carga-table .carga-annual-head {
    background: #bfbfbf;
    color: #111;
}

.carga-ok {
    background: #d9ead3 !important;
    color: #1f4e1f !important;
}

.carga-low {
    background: #f4cccc !important;
    color: #7f1d1d !important;
}

.carga-high {
    background: #fff2cc !important;
    color: #7a5300 !important;
}

.carga-empty {
    background: #e9ecef !important;
    color: #6c757d !important;
}

.carga-no-entry {
    background: #f8f9fa !important;
    color: #495057 !important;
}

.carga-current {
    background: #dbeafe !important;
    color: #1e3a8a !important;
}

.carga-current-outline {
    box-shadow: inset 0 0 0 2px #3b82f6;
}

.signature-block {
    max-width: 360px;
    margin: 32px auto 12px;
}

.signature-line {
    border-top: 1px solid #111;
    margin-bottom: 6px;
}

/* O layout especifico do PDF da escala fica em public/assets/css/pdf.css */
@media print {
    body {
        background: #fff;
        font-size: 7px;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .no-print {
        display: none !important;
    }

    .print-only {
        display: block;
    }

    .container-fluid {
        max-width: 100%;
        width: 100%;
        padding: 0 !important;
    }

    main.container-fluid {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .table {
        font-size: 10px;
        line-height: 1.05;
        margin-bottom: 1.5mm;
    }

    .card {
        border: 0;
        border-radius: 0;
        margin-bottom: 1.5mm !important;
    }

    .card-header {
        padding: 1mm 0;
        font-size: 12px;
        border: 0;
        background: transparent !important;
    }

    .table-responsive,
    .pdf-scale-wrapper {
        overflow: visible !important;
    }

    .pdf-header {
        margin-bottom: 2mm !important;
    }

    .pdf-header h1 {
        font-size: 12px;
        line-height: 1.1;
        margin: 0 0 1mm;
    }

    .pdf-header div {
        font-size: 12px;
        line-height: 1.15;
    }

    .pdf-calendar {
        table-layout: fixed;
        width: 100%;
    }

    .pdf-calendar.table-calendar th,
    .pdf-calendar.table-calendar td {
        min-width: 0;
        width: 6.65mm;
        padding: 0.35mm 0.15mm;
        border-width: 0.35mm !important;
    }

    .table-calendar .militar-cell {
        position: static;
        min-width: 0;
        width: 41mm !important;
        max-width: 41mm;
        padding-right: 0.8mm;
        font-size: 5.5px;
        line-height: 1.05;
        overflow: hidden;
        text-overflow: clip;
    }

    .table-calendar .total-cell {
        min-width: 0;
        width: 10mm !important;
        font-size: 5.5px;
    }

    .pdf-calendar .date-head {
        font-size: 6px;
        line-height: 1;
    }

    .pdf-calendar .date-head strong,
    .table-calendar .date-head strong {
        font-size: 7px;
        line-height: 1;
    }

    .pdf-calendar .scale-read-cell,
    .scale-read-cell {
        min-height: 0;
        height: 2.7mm;
        line-height: 2.7mm;
        font-size: 7px;
    }

    .pdf-calendar tbody td,
    .pdf-calendar tbody th {
        height: 3.4mm;
    }

    .pdf-calendar thead th {
        height: 5mm;
    }

    .pdf-scale-wrapper + .card,
    .pdf-scale-wrapper ~ .card {
        page-break-inside: avoid;
    }

    .pdf-signature {
        max-width: 65mm;
        margin: 7mm auto 0;
        font-size: 12px;
    }

    .signature-line {
        margin-bottom: 1mm;
    }

    .pdf-signature .small {
        font-size: 12px;
    }

    .pdf-scale-wrapper ~ .card .table th,
    .pdf-scale-wrapper ~ .card .table td {
        padding: 0.6mm 1mm;
        font-size: 12px;
        line-height: 1.15;
    }

    .carga-table .carga-militar {
        position: static;
        min-width: 170px;
    }

    .carga-table th,
    .carga-table td {
        min-width: 78px;
        padding: 0.15rem;
    }

    .carga-table small {
        font-size: 0.55rem;
    }

    .scale-read-cell {
        min-height: auto;
    }

    @page {
        size: A4 landscape;
        margin: 5mm;
    }
}

@media (max-width: 991.98px) {
    .app-sidebar {
        position: static;
        width: 100%;
        min-height: auto;
    }

    .app-content {
        padding-left: 0;
    }

    .app-sidebar-nav {
        max-height: none;
    }
}
.desenvolvedor {font-size: 12px;}