:root {
    --bg-page: #f4f7fb;
    --bg-admin: #f5f6fa;
    --card-radius: 22px;
    --border-soft: #e7eaf0;
    --text-muted-2: #6b7280
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #111827;
    overflow-x: hidden;
}

.form-label {
    font-weight: 600;
    margin-bottom: .45rem;
}

.form-control,
.form-select,
textarea.form-control {
    font-size: 16px;
    border-radius: 14px;
}

.form-control,
.form-select,
.btn {
    min-height: 48px;
}

textarea.form-control {
    min-height: 120px;
}

input[type="file"].form-control {
    padding-top: .7rem;
    padding-bottom: .7rem;
    line-height: 1.35;
}

.form-check-input {
    width: 1.15rem;
    height: 1.15rem;
}

.form-text {
    font-size: .9rem;
}

.form-section {
    scroll-margin-top: 1rem;
}

.form-actions-sticky {
    position: sticky;
    bottom: .75rem;
    z-index: 20;
    padding: .85rem;
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
}

.form-actions-sticky .btn {
    font-weight: 600;
}

.bg-page {
    background: radial-gradient(circle at top left, rgba(37, 99, 235, .12), transparent 26%), linear-gradient(180deg, #f7f9fc 0%, var(--bg-page) 100%)
}

.bg-admin {
    background: var(--bg-admin)
}

.auth-page {
    background: radial-gradient(circle at top, rgba(17, 24, 39, .08), transparent 30%), linear-gradient(180deg, #f9fafb 0%, #eef2f7 100%)
}

.card,
.hero-card,
.detail-section,
.print-document,
.auth-card {
    border-radius: var(--card-radius)
}

.hero-card {
    background: linear-gradient(135deg, #fff 0%, #f6f9ff 100%);
    border: 1px solid var(--border-soft);
    box-shadow: 0 10px 40px rgba(15, 23, 42, .06);
    padding: 2rem
}

.hero-card__content {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    align-items: center
}

.hero-card__aside {
    display: grid;
    gap: 1rem;
    min-width: 220px
}

.hero-stat {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: 1rem 1.25rem
}

.hero-stat span {
    display: block;
    color: var(--text-muted-2);
    font-size: .875rem
}

.hero-stat strong {
    display: block;
    font-size: 1.05rem;
    margin-top: .25rem
}

.form-section {
    padding: 1.5rem;
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    background: #fff;
    margin-bottom: 1.25rem
}

.section-header {
    margin-bottom: 1rem
}

.section-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: .25rem
}

.section-header p {
    margin-bottom: 0;
    color: var(--text-muted-2)
}

.field-error {
    color: #b42318;
    font-size: .875rem;
    margin-top: .35rem
}

.conditional-section.is-hidden {
    display: none
}

.dependent-card {
    background: #fbfcff;
    border-color: var(--border-soft) !important
}

.status-badge {
    padding: .5rem .7rem;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: .01em
}

.status-recebido {
    background: #eff6ff;
    color: #1d4ed8
}

.status-em_analise {
    background: #fff7ed;
    color: #c2410c
}

.status-pendente {
    background: #fef2f2;
    color: #b91c1c
}

.status-aprovado {
    background: #ecfdf3;
    color: #15803d
}

.status-enviado_contabilidade {
    background: #f5f3ff;
    color: #6d28d9
}

.status-demitido {
    background: #f3f4f6;
    color: #374151;
}

.status-cancelado {
    background: #fef2f2;
    color: #b91c1c;
}


.admin-action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
}

.admin-action-bar .btn {
    white-space: nowrap;
}

.detail-section {
    background: #fff;
    border: 1px solid var(--border-soft);
    padding: 1.5rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
    margin-bottom: 1.25rem
}

.detail-section h2 {
    font-size: 1.15rem;
    margin-bottom: 1rem;
    font-weight: 700
}

.detail-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr))
}

.detail-grid-single {
    grid-template-columns: 1fr
}

.detail-grid span {
    display: block;
    color: var(--text-muted-2);
    font-size: .83rem;
    margin-bottom: .2rem
}

.detail-grid strong {
    display: block;
    font-size: .96rem;
    line-height: 1.5
}

.print-body {
    background: #fff;
    color: #111827
}

.print-document {
    max-width: 1024px;
    margin: 0 auto;
    padding: 2rem
}

.print-header {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    border-bottom: 2px solid #dbe2ea;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem
}

.print-header h1 {
    font-size: 1.85rem;
    margin-bottom: .35rem
}

.print-header p,
.print-meta span {
    color: var(--text-muted-2);
    display: block
}

.print-section {
    margin-bottom: 1.5rem;
    page-break-inside: avoid
}

.print-section h2 {
    font-size: 1.1rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: .5rem;
    margin-bottom: .85rem
}

.print-grid {
    display: grid;
    gap: .75rem 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr))
}

.print-card {
    border: 1px solid #dbe2ea;
    border-radius: 14px;
    padding: .85rem 1rem;
    margin-bottom: .75rem
}

.print-list {
    padding-left: 1rem
}

.auth-card {
    width: min(100%, 460px)
}


@media (min-width:992px) {
    .admin-action-bar {
        flex-wrap: nowrap;
        justify-content: flex-end;
    }
}

@media (max-width:991px) {

    .hero-card__content,
    .print-header {
        flex-direction: column;
        align-items: flex-start
    }

    .hero-card__aside {
        width: 100%;
        min-width: unset;
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }
}

@media (max-width:767px) {

    .container.py-5 {
        padding-top: 1rem !important;
        padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
    }

    .hero-card,
    .form-section,
    .detail-section,
    .print-document {
        padding: 1rem;
        border-radius: 18px
    }

    .hero-card__content {
        gap: 1.25rem;
    }

    .hero-card .display-6 {
        font-size: 1.6rem;
    }

    .hero-card .lead {
        font-size: 1rem;
    }

    .section-header h2 {
        font-size: 1.05rem;
    }

    .detail-grid,
    .print-grid,
    .hero-card__aside {
        grid-template-columns: 1fr
    }

    .form-control,
    .form-select,
    .btn {
        min-height: 50px;
    }

    .upload-preview {
        min-height: auto;
        padding: .75rem;
    }

    .upload-preview__image,
    .attachment-thumb img {
        height: 150px;
    }

    .form-alert {
        border-radius: 16px;
    }

    .form-actions-sticky {
        bottom: max(.5rem, env(safe-area-inset-bottom));
        padding: .75rem;
        border-radius: 16px;
    }

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

@media print {
    body {
        background: #fff !important
    }

    .print-document {
        padding: 0
    }

    .btn,
    nav {
        display: none !important
    }
}

.upload-preview {
    margin-top: .75rem;
    border: 1px dashed #d7deea;
    border-radius: 18px;
    background: #f8fbff;
    padding: .85rem;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    transition: .2s ease;
}

.upload-preview.is-empty {
    background: #fbfcfe;
}

.upload-preview__media {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: #e9eef7;
    border: 1px solid #e3e8f2;
}

.upload-preview__image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.upload-preview__meta {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.upload-preview__filename {
    font-weight: 600;
    color: #111827;
    word-break: break-word;
}

.upload-preview__size {
    color: #374151;
    font-size: .88rem;
    font-weight: 500;
}

.upload-preview__hint {
    color: #6b7280;
    font-size: .88rem;
}

.attachment-thumb {
    width: 100%;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    background: #f8fafc;
    margin-bottom: .75rem;
}

.attachment-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.form-alert {
    border-radius: 18px;
}

.alert.form-alert.alert-danger {
    border: 1px solid #f1c0c7;
}

.alert.form-alert.alert-warning {
    border: 1px solid #f6d98c;
}

.alert.form-alert.alert-info {
    border: 1px solid #9ec5fe;
}

.form-tips--limits {
    display: grid;
    gap: .45rem;
    padding: .95rem 1rem;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    background: #f8fafc;
    color: #334155;
}

.form-tips--limits strong {
    color: #0f172a;
}

.form-alert__list {
    padding-left: 1.15rem;
}

.form-alert__list li + li {
    margin-top: .35rem;
}

.form-control.is-invalid,
.form-select.is-invalid,
.form-check-input.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 .18rem rgba(220, 53, 69, .12);
}


.print-document--legal {
    max-width: 900px;
    color: #111827;
    font-size: 14px;
    line-height: 1.55;
}

.print-document--legal p {
    margin: 0 0 .28rem;
}

.print-legal-title {
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.print-legal-paragraph {
    text-align: justify;
    margin-bottom: .9rem !important;
}

.print-legal-section-title {
    margin: 1rem 0 .5rem;
    font-weight: 700;
    text-transform: uppercase;
}

.print-legal-box {
    border: 1px solid #dbe2ea;
    padding: .7rem .85rem;
    border-radius: 10px;
    margin-bottom: .75rem;
}

.print-legal-declaration {
    margin-top: 1rem !important;
}

.print-legal-signature {
    margin-top: 1.5rem;
    text-align: center;
}


.update-modal {
    border: 0;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .18);
}

.update-modal .modal-header,
.update-modal .modal-footer {
    background: #fff;
}

.update-modal .modal-body {
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.update-modal__eyebrow {
    display: inline-block;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #2563eb;
    margin-bottom: .35rem;
}

.update-modal__block {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 18px;
    padding: 1rem 1.15rem;
}

.update-modal__list {
    padding-left: 1.1rem;
}

.update-modal__list li + li {
    margin-top: .8rem;
}


.mobile-wizard-header,
.mobile-wizard-nav {
    display: none;
}

@keyframes wizardFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 991.98px) {
    .mobile-wizard-enabled .form-section {
        display: none;
    }

    .mobile-wizard-enabled .form-section.is-active {
        display: block;
        animation: wizardFadeIn .18s ease-out;
    }

    .mobile-wizard-enabled .mobile-wizard-header {
        display: block;
        position: sticky;
        top: .5rem;
        z-index: 25;
        margin-bottom: 1rem;
        padding: 1rem;
        border: 1px solid var(--border-soft);
        border-radius: 18px;
        background: rgba(255, 255, 255, .96);
        backdrop-filter: blur(10px);
        box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
    }

    .mobile-wizard-header__meta {
        display: grid;
        gap: .2rem;
    }

    .mobile-wizard-counter {
        color: var(--text-muted-2);
        font-size: .85rem;
        font-weight: 600;
    }

    .mobile-wizard-title {
        font-size: 1rem;
        line-height: 1.35;
    }

    .mobile-wizard-progress {
        margin-top: .75rem;
        width: 100%;
        height: .5rem;
        overflow: hidden;
        border-radius: 999px;
        background: #e5e7eb;
    }

    .mobile-wizard-progress__fill {
        display: block;
        height: 100%;
        width: 0;
        border-radius: inherit;
        background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
        transition: width .2s ease;
    }

    .mobile-wizard-enabled .mobile-wizard-nav {
        display: flex;
        position: sticky;
        bottom: .75rem;
        z-index: 21;
        gap: .75rem;
        margin-top: 1rem;
        padding: .85rem;
        border: 1px solid var(--border-soft);
        border-radius: 18px;
        background: rgba(255, 255, 255, .94);
        backdrop-filter: blur(10px);
        box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
    }

    .mobile-wizard-nav .btn {
        flex: 1;
    }

    .mobile-wizard-prev:disabled {
        opacity: .45;
    }

    .mobile-wizard-enabled .wizard-final-actions {
        display: none !important;
    }

    .mobile-wizard-enabled .wizard-final-actions.is-active {
        display: flex !important;
    }
}

