* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f5f7fb;
    color: #111827;
}

/* =========================
   LOGIN
========================= */

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.15), transparent 35%),
        linear-gradient(135deg, #f8fafc, #eef2ff);
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: #ffffff;
    padding: 36px;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
    border: 1px solid #e5e7eb;
}

.login-card h1 {
    text-align: center;
    color: #1d4ed8;
    margin-bottom: 6px;
    font-size: 32px;
}

.login-card p {
    text-align: center;
    color: #6b7280;
    margin-bottom: 28px;
}

.login-card label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.login-card input {
    width: 100%;
    padding: 13px 14px;
    margin-bottom: 18px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    outline: none;
    background: #f9fafb;
    transition: 0.2s;
}

.login-card input:focus {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.login-card button {
    width: 100%;
    padding: 14px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.login-card button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.erro {
    background: #fee2e2;
    color: #991b1b;
    padding: 11px;
    border-radius: 12px;
    margin-bottom: 16px;
    text-align: center;
    font-size: 14px;
}

/* =========================
   LAYOUT
========================= */

.app-layout {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 280px;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 34px;
}

.logo-box {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}

.sidebar-header h2 {
    font-size: 20px;
    color: #111827;
}

.sidebar-header span {
    color: #6b7280;
    font-size: 13px;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #4b5563;
    text-decoration: none;
    padding: 13px 14px;
    border-radius: 14px;
    font-weight: 500;
    transition: 0.2s;
}

.menu a:hover {
    background: #f3f4f6;
    color: #1d4ed8;
}

.menu a.active {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 700;
}

/* ÍCONE DE PASTA */

.folder-icon {
    position: relative;
    width: 22px;
    height: 17px;
    display: inline-block;
    border: 1.8px solid #94a3b8;
    border-radius: 5px;
    background: transparent;
    opacity: 0.85;
    flex-shrink: 0;
}

.folder-icon::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 2px;
    width: 9px;
    height: 6px;
    border: 1.8px solid #94a3b8;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    background: transparent;
}

.menu a:hover .folder-icon,
.menu a:hover .folder-icon::before,
.menu a.active .folder-icon,
.menu a.active .folder-icon::before {
    border-color: #2563eb;
}

.main-content {
    flex: 1;
    padding: 28px;
    overflow-y: auto;
}

.topbar {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 22px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
    margin-bottom: 24px;
}

.topbar h1 {
    color: #111827;
    font-size: 28px;
    margin-bottom: 4px;
}

.topbar p {
    color: #6b7280;
}

.user-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    text-align: right;
}

.user-info strong {
    display: block;
    color: #111827;
    font-size: 15px;
}

.user-info span {
    color: #6b7280;
    font-size: 13px;
    text-transform: capitalize;
}

.btn-logout {
    text-decoration: none;
    background: #ef4444;
    color: #ffffff;
    padding: 11px 16px;
    border-radius: 14px;
    font-weight: 600;
    transition: 0.2s;
}

.btn-logout:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* =========================
   DASHBOARD
========================= */

.welcome-card {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    border-radius: 26px;
    padding: 32px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.22);
    margin-bottom: 24px;
}

.welcome-card h2 {
    font-size: 30px;
    margin: 12px 0 8px;
}

.welcome-card p {
    color: #dbeafe;
    max-width: 620px;
    line-height: 1.6;
}

.badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.welcome-icon {
    width: 96px;
    height: 96px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.stat-card span {
    display: block;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 5px;
}

.stat-card strong {
    font-size: 28px;
    color: #111827;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-icon.blue {
    background: #dbeafe;
}

.stat-icon.green {
    background: #dcfce7;
}

.stat-icon.yellow {
    background: #fef9c3;
}

.stat-icon.red {
    background: #fee2e2;
}

.actions-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 26px;
    padding: 26px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.section-title {
    margin-bottom: 22px;
}

.section-title h2 {
    color: #111827;
    margin-bottom: 5px;
}

.section-title p {
    color: #6b7280;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.action-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 24px;
    border-radius: 22px;
    transition: 0.2s;
}

.action-card:hover {
    background: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 18px;
}

.action-card h3 {
    color: #111827;
    margin-bottom: 8px;
}

.action-card p {
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 18px;
}

.action-card a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 700;
}

/* =========================
   ADMIN USUÁRIOS
========================= */

.alerts {
    margin-bottom: 20px;
}

.alert {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 14px;
}

.alert.sucesso {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert.erro {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.admin-grid {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 24px;
    align-items: flex-start;
}

.admin-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 26px;
    padding: 26px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group label {
    display: block;
    color: #374151;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 7px;
}

.form-group input,
.form-group select,
.permission-row select {
    width: 100%;
    height: 46px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 0 14px;
    background: #f9fafb;
    color: #111827;
    outline: none;
    transition: 0.2s;
}

.form-group input:disabled {
    color: #6b7280;
    background: #f3f4f6;
}

.form-group input:focus,
.form-group select:focus,
.permission-row select:focus {
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.permissions-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 18px;
}

.permissions-box h3 {
    color: #111827;
    margin-bottom: 5px;
}

.permissions-box p {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.permission-row {
    display: grid;
    grid-template-columns: 1fr 170px;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid #e5e7eb;
}

.permission-row strong {
    display: block;
    color: #111827;
}

.permission-row span {
    color: #6b7280;
    font-size: 13px;
}

.btn-primary {
    height: 48px;
    border: none;
    border-radius: 14px;
    background: #2563eb;
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.users-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.user-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 18px;
}

.user-card-top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.user-card h3 {
    color: #111827;
    margin-bottom: 4px;
}

.user-card p {
    color: #6b7280;
    font-size: 14px;
}

.badges-user {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.perfil-badge,
.status-badge {
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.perfil-badge.admin {
    background: #dbeafe;
    color: #1d4ed8;
}

.perfil-badge.usuario {
    background: #f3f4f6;
    color: #374151;
}

.status-badge.ativo {
    background: #dcfce7;
    color: #166534;
}

.status-badge.inativo {
    background: #fee2e2;
    color: #991b1b;
}

.user-permissions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.permission-pill {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.permission-pill.visualizacao {
    background: #e0f2fe;
    color: #075985;
}

.permission-pill.atendimento {
    background: #fef9c3;
    color: #854d0e;
}

.permission-pill.gestor {
    background: #dcfce7;
    color: #166534;
}

.permission-pill.sem-acesso {
    background: #fee2e2;
    color: #991b1b;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.btn-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dbeafe;
    color: #1d4ed8;
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 800;
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s;
}

.btn-edit:hover {
    background: #bfdbfe;
}

.btn-danger {
    border: none;
    background: #fee2e2;
    color: #991b1b;
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s;
}

.btn-danger:hover {
    background: #fecaca;
}

.btn-warning {
    border: none;
    background: #fef3c7;
    color: #92400e;
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s;
}

.btn-warning:hover {
    background: #fde68a;
}

.btn-success {
    border: none;
    background: #dcfce7;
    color: #166534;
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s;
}

.btn-success:hover {
    background: #bbf7d0;
}

.edit-card {
    max-width: 920px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 6px;
}

.btn-secondary {
    height: 48px;
    padding: 0 18px;
    border-radius: 14px;
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    transition: 0.2s;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* =========================
   RESPONSIVO
========================= */

@media (max-width: 1100px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 800px) {
    .app-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .topbar,
    .welcome-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .user-area {
        width: 100%;
        justify-content: space-between;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .permission-row {
        grid-template-columns: 1fr;
    }

    .form-grid-2 {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-secondary,
    .form-actions .btn-primary {
        width: 100%;
    }

    .user-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-edit,
    .btn-danger,
    .btn-warning,
    .btn-success {
        width: 100%;
        text-align: center;
    }

    .badges-user {
        justify-content: flex-start;
    }
}
/* =========================
   FINANCEIRO / FAP
========================= */

.finance-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 12px;
    border-radius: 20px;
    margin-bottom: 24px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.finance-tabs a {
    text-decoration: none;
    color: #4b5563;
    background: #f9fafb;
    padding: 10px 14px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 14px;
    transition: 0.2s;
}

.finance-tabs a:hover,
.finance-tabs a.active {
    background: #2563eb;
    color: #ffffff;
}

.finance-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-bottom: 28px;
}

.finance-card,
.form-page-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 26px;
    padding: 26px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.small-strong {
    font-size: 18px !important;
    text-transform: capitalize;
}

.mini-chart {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.chart-row {
    display: grid;
    grid-template-columns: 160px 1fr 40px;
    gap: 12px;
    align-items: center;
}

.chart-row span {
    color: #374151;
    font-size: 14px;
    text-transform: capitalize;
}

.chart-row strong {
    color: #111827;
}

.chart-bar {
    height: 12px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.chart-bar div {
    height: 100%;
    background: #2563eb;
    border-radius: 999px;
}

.empty-text {
    color: #6b7280;
    font-size: 14px;
}

.form-title-block {
    margin-bottom: 28px;
}

.form-title-block h2 {
    font-size: 26px;
    color: #111827;
    margin-bottom: 8px;
}

.form-title-block p {
    color: #6b7280;
}

.fap-form {
    max-width: 760px;
}

.form-section {
    margin-bottom: 36px;
}

.form-section h3 {
    color: #111827;
    margin-bottom: 18px;
}

.form-group span {
    color: #ef4444;
}

.form-group small {
    display: block;
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.form-group textarea {
    width: 100%;
    min-height: 120px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 14px;
    background: #f9fafb;
    color: #111827;
    outline: none;
    resize: vertical;
    font-family: inherit;
    transition: 0.2s;
}

.form-group textarea:focus {
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.radio-list {
    display: flex;
    flex-direction: column;
    gap: 11px;
    margin-top: 10px;
}

.radio-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    font-weight: 500;
}

.radio-list input {
    width: 16px;
    height: 16px;
}

.upload-box {
    border: 1.5px dashed #cbd5e1;
    border-radius: 16px;
    padding: 24px;
    background: #f9fafb;
    text-align: center;
}

.upload-box input {
    border: none;
    background: transparent;
    padding: 0;
    height: auto;
}

.upload-box p {
    color: #6b7280;
    margin-top: 10px;
    font-size: 13px;
}

.ticket-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ticket-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 18px;
    text-decoration: none;
    transition: 0.2s;
}

.ticket-card:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.ticket-card h3 {
    color: #111827;
    margin-bottom: 6px;
}

.ticket-card p {
    color: #6b7280;
    margin-bottom: 4px;
}

.ticket-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 180px;
}

.ticket-meta strong {
    color: #111827;
}

.ticket-meta small {
    color: #6b7280;
}

.status-chip {
    display: inline-flex;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    text-transform: capitalize;
}

.status-chip.aberto {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-chip.em_atendimento {
    background: #fef9c3;
    color: #854d0e;
}

.status-chip.aprovado {
    background: #dcfce7;
    color: #166534;
}

.status-chip.rejeitado {
    background: #fee2e2;
    color: #991b1b;
}

.status-chip.concluido {
    background: #e0e7ff;
    color: #3730a3;
}

.status-chip.cancelado {
    background: #f3f4f6;
    color: #374151;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.filter-row a {
    text-decoration: none;
    color: #374151;
    background: #f3f4f6;
    padding: 9px 13px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
}

.filter-row a.active,
.filter-row a:hover {
    background: #2563eb;
    color: #ffffff;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 24px;
    align-items: flex-start;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.detail-header h2 {
    color: #111827;
    margin-bottom: 6px;
}

.detail-header p {
    color: #6b7280;
}

.detail-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 24px;
}

.detail-list div {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px;
    color: #374151;
}

.detail-list strong {
    display: block;
    color: #111827;
    margin-bottom: 4px;
}

.detail-text {
    margin-top: 22px;
}

.detail-text h3 {
    color: #111827;
    margin-bottom: 8px;
}

.detail-text p {
    color: #4b5563;
    line-height: 1.6;
}

.attachment-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.attachment-list a {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
    background: #eff6ff;
    padding: 10px 12px;
    border-radius: 12px;
}

.history-title {
    margin-top: 28px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 14px;
}

.comment-card strong {
    display: block;
    color: #111827;
}

.comment-card span,
.comment-card small {
    display: block;
    color: #6b7280;
    font-size: 12px;
    margin-top: 3px;
}

.comment-card p {
    color: #374151;
    margin-top: 10px;
    line-height: 1.5;
}

@media (max-width: 1100px) {
    .finance-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 800px) {
    .ticket-card {
        flex-direction: column;
    }

    .ticket-meta {
        align-items: flex-start;
    }

    .chart-row {
        grid-template-columns: 1fr;
    }
}
.financeiro-stats-compact {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1100px) {
    .financeiro-stats-compact {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 800px) {
    .financeiro-stats-compact {
        grid-template-columns: 1fr;
    }
}
.submenu {
    margin: -2px 0 10px 34px;
    padding-left: 14px;
    border-left: 1px solid #dbeafe;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.submenu a {
    padding: 9px 12px !important;
    font-size: 14px;
    border-radius: 12px;
    color: #64748b !important;
    background: transparent;
}

.submenu a:hover {
    background: #f3f4f6;
    color: #2563eb !important;
}

.submenu a.active {
    background: #eff6ff;
    color: #2563eb !important;
    font-weight: 800;
}

.form-type-badge {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 8px;
}
/* =========================
   SUBMENU FINANCEIRO FIXO
========================= */

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.submenu {
    margin: -2px 0 12px 34px;
    padding-left: 14px;
    border-left: 1px solid #dbeafe;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.submenu a {
    padding: 9px 12px !important;
    font-size: 14px;
    border-radius: 12px;
    color: #64748b !important;
    background: transparent;
}

.submenu a:hover {
    background: #f3f4f6;
    color: #2563eb !important;
}

.submenu a.active {
    background: #eff6ff;
    color: #2563eb !important;
    font-weight: 800;
}

.form-type-badge {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 8px;
}
/* =========================
   SOLICITAÇÕES FINANCEIRAS
========================= */

.request-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.request-shortcut-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-radius: 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    transition: 0.2s;
}

.request-shortcut-card:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.request-shortcut-card h3 {
    color: #111827;
    margin-bottom: 4px;
}

.request-shortcut-card p {
    color: #6b7280;
    font-size: 14px;
}

.empty-state {
    background: #f9fafb;
    border: 1px dashed #cbd5e1;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
}

.empty-state h3 {
    color: #111827;
    margin-bottom: 8px;
}

.empty-state p {
    color: #6b7280;
    margin-bottom: 18px;
}

.empty-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-primary-link {
    height: 48px;
    padding: 0 18px;
    border-radius: 14px;
    background: #2563eb;
    color: #ffffff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    transition: 0.2s;
}

.btn-primary-link:hover {
    background: #1d4ed8;
}

@media (max-width: 800px) {
    .request-summary-grid {
        grid-template-columns: 1fr;
    }
}
/* =========================
   ATENDIMENTO FINANCEIRO
========================= */

.filter-wrapper {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 24px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 18px;
}

.filter-wrapper strong {
    display: block;
    color: #111827;
    margin-bottom: 10px;
}

@media (max-width: 800px) {
    .filter-wrapper {
        padding: 14px;
    }
}
/* =========================
   FPL
========================= */

.form-group-small {
    max-width: 360px;
}
.request-summary-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1100px) {
    .request-summary-grid-3 {
        grid-template-columns: 1fr;
    }
}
/* =========================
   RESPONSIVIDADE GERAL - PORTALPQF
========================= */

@media (max-width: 900px) {
    body {
        background: #f5f7fb;
    }

    .app-layout {
        flex-direction: column;
        min-height: 100vh;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        min-height: auto;
        padding: 18px;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        overflow: visible;
    }

    .sidebar-header {
        margin-bottom: 18px;
    }

    .sidebar-header h2 {
        font-size: 18px;
    }

    .sidebar-header span {
        font-size: 12px;
    }

    .logo-box {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        font-size: 14px;
    }

    .menu {
        gap: 6px;
    }

    .menu a {
        padding: 11px 12px;
        font-size: 14px;
        border-radius: 12px;
    }

    .submenu {
        margin: 4px 0 10px 18px;
        padding-left: 12px;
        gap: 5px;
    }

    .submenu a {
        padding: 9px 10px !important;
        font-size: 13px;
    }

    .main-content {
        padding: 18px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 18px;
        border-radius: 18px;
    }

    .topbar h1 {
        font-size: 24px;
    }

    .topbar p {
        font-size: 14px;
    }

    .user-area {
        width: 100%;
        justify-content: space-between;
    }

    .user-info {
        text-align: left;
    }

    .btn-logout {
        padding: 10px 14px;
        border-radius: 12px;
        font-size: 14px;
    }

    .stats-grid,
    .financeiro-stats-compact {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .stat-card {
        padding: 16px;
        border-radius: 18px;
    }

    .stat-card strong {
        font-size: 24px;
    }

    .finance-grid,
    .detail-grid,
    .admin-grid,
    .cards,
    .request-summary-grid,
    .request-summary-grid-3 {
        grid-template-columns: 1fr;
    }

    .finance-card,
    .form-page-card,
    .admin-card,
    .actions-section {
        padding: 18px;
        border-radius: 20px;
    }

    .form-title-block h2 {
        font-size: 22px;
    }

    .form-title-block p {
        font-size: 14px;
        line-height: 1.5;
    }

    .fap-form {
        max-width: 100%;
    }

    .form-section {
        margin-bottom: 30px;
    }

    .form-section h3 {
        font-size: 18px;
        margin-bottom: 16px;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea,
    .permission-row select {
        font-size: 15px;
        min-height: 46px;
    }

    .form-group textarea {
        min-height: 110px;
    }

    .radio-list {
        gap: 12px;
    }

    .radio-list label {
        align-items: flex-start;
        line-height: 1.4;
        font-size: 14px;
    }

    .radio-list input {
        margin-top: 2px;
        flex-shrink: 0;
    }

    .upload-box {
        padding: 18px;
    }

    .form-actions {
        flex-direction: column;
        gap: 10px;
    }

    .form-actions .btn-primary,
    .form-actions .btn-secondary,
    .btn-primary,
    .btn-secondary,
    .btn-primary-link {
        width: 100%;
        justify-content: center;
    }

    .ticket-card {
        flex-direction: column;
        gap: 14px;
        padding: 16px;
        border-radius: 18px;
    }

    .ticket-card h3 {
        font-size: 17px;
        line-height: 1.3;
    }

    .ticket-card p {
        font-size: 14px;
    }

    .ticket-meta {
        align-items: flex-start;
        min-width: auto;
        width: 100%;
    }

    .detail-header {
        flex-direction: column;
        gap: 12px;
    }

    .detail-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .detail-list div {
        padding: 12px;
    }

    .chart-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .chart-bar {
        width: 100%;
    }

    .filter-wrapper {
        padding: 14px;
    }

    .filter-row {
        gap: 8px;
    }

    .filter-row a {
        font-size: 12px;
        padding: 8px 11px;
    }

    .request-shortcut-card {
        padding: 16px;
        align-items: flex-start;
    }

    .empty-state {
        padding: 22px;
    }

    .empty-actions {
        flex-direction: column;
    }

    .empty-actions a {
        width: 100%;
    }
}

/* Celulares menores */
@media (max-width: 480px) {
    .main-content {
        padding: 14px;
    }

    .sidebar {
        padding: 14px;
    }

    .topbar {
        padding: 16px;
    }

    .topbar h1 {
        font-size: 22px;
    }

    .finance-card,
    .form-page-card,
    .admin-card,
    .actions-section {
        padding: 16px;
        border-radius: 18px;
    }

    .form-title-block h2 {
        font-size: 20px;
    }

    .stat-icon {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        font-size: 18px;
    }

    .stat-card {
        gap: 12px;
    }

    .stat-card strong {
        font-size: 22px;
    }

    .card-icon {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        font-size: 20px;
    }

    .user-area {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .btn-logout {
        width: 100%;
        text-align: center;
    }

    .menu a {
        font-size: 13px;
    }

    .submenu a {
        font-size: 13px;
    }
}
/* =========================
   MARKETING - FDM
========================= */

.marketing-form .form-section {
    margin-bottom: 42px;
}

.marketing-form .form-section h3 {
    margin-bottom: 24px;
}

.marketing-question {
    margin-bottom: 30px;
}

.marketing-question label {
    margin-bottom: 8px;
}

.marketing-question small {
    margin-bottom: 14px;
    line-height: 1.55;
}

.marketing-radio-list {
    gap: 14px;
    margin-top: 12px;
}

.marketing-radio-list label {
    padding: 2px 0;
    line-height: 1.45;
}

.marketing-form textarea {
    min-height: 150px;
}
/* =========================
   MARKETING - PRIORIDADE
========================= */

.priority-chip {
    display: inline-flex;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.priority-chip.alta {
    background: #fee2e2;
    color: #991b1b;
}

.priority-chip.media {
    background: #fef9c3;
    color: #854d0e;
}

.priority-chip.baixa {
    background: #dcfce7;
    color: #166534;
}
/* =========================
   CENTRAL DE RELACIONAMENTO - FOS
========================= */

.relacionamento-form .form-section {
    margin-bottom: 42px;
}

.relacionamento-form .form-section h3 {
    margin-bottom: 24px;
}

.relacionamento-question {
    margin-bottom: 30px;
}

.relacionamento-question label {
    margin-bottom: 8px;
}

.relacionamento-question small {
    margin-bottom: 14px;
    line-height: 1.55;
}

.relacionamento-radio-list {
    gap: 14px;
    margin-top: 12px;
}

.relacionamento-radio-list label {
    padding: 2px 0;
    line-height: 1.45;
}

.relacionamento-form textarea {
    min-height: 150px;
}
/* =========================
   CENTRAL - DEPARTAMENTO
========================= */

.department-chip {
    display: inline-flex;
    padding: 7px 11px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
}
/* =========================
   COMPRAS - FSC
========================= */

.compras-form .form-section {
    margin-bottom: 42px;
}

.compras-form .form-section h3 {
    margin-bottom: 24px;
}

.compras-question {
    margin-bottom: 30px;
}

.compras-question label {
    margin-bottom: 8px;
}

.compras-question small {
    margin-bottom: 14px;
    line-height: 1.55;
}

.compras-radio-list {
    gap: 14px;
    margin-top: 12px;
}

.compras-radio-list label {
    padding: 2px 0;
    line-height: 1.45;
}

.compras-form textarea {
    min-height: 150px;
}
/* =========================
   FINANCEIRO - PADRÃO DOS FORMULÁRIOS
========================= */

.financeiro-form .form-section {
    margin-bottom: 42px;
}

.financeiro-form .form-section h3 {
    margin-bottom: 24px;
}

.financeiro-form .form-group {
    margin-bottom: 30px;
}

.financeiro-form .form-group label {
    margin-bottom: 8px;
}

.financeiro-form .form-group small {
    margin-bottom: 14px;
    line-height: 1.55;
}

.financeiro-form .radio-list {
    gap: 14px;
    margin-top: 12px;
}

.financeiro-form .radio-list label {
    padding: 2px 0;
    line-height: 1.45;
}

.financeiro-form textarea {
    min-height: 150px;
}

.financeiro-form input,
.financeiro-form textarea,
.financeiro-form select {
    margin-top: 6px;
}
/* =========================
   JAVASCRIPT - MELHORIAS GERAIS
========================= */

.file-preview-list {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.file-preview-list strong {
    color: #111827;
    font-size: 14px;
}

.file-preview-list span {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    padding: 8px 12px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
    word-break: break-word;
}

.btn-loading {
    opacity: 0.75;
    cursor: not-allowed;
}
/* =========================
   PADRÃO DOS BOTÕES DOS FORMULÁRIOS
========================= */

.form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
    padding-top: 8px;
    position: static !important;
    bottom: auto !important;
    right: auto !important;
}

.form-actions .btn-primary,
.form-actions .btn-secondary {
    min-width: 96px;
}
/* =========================
   DASHBOARD INICIAL
========================= */

.dashboard-hero {
    margin-top: 26px;
    margin-bottom: 26px;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: #ffffff;
    border-radius: 26px;
    padding: 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.22);
}

.dashboard-hero h2 {
    color: #ffffff;
    font-size: 30px;
    margin: 18px 0 10px;
}

.dashboard-hero p {
    color: #ffffff;
    opacity: 0.95;
}

.dashboard-hero .badge {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.dashboard-hero .hero-icon {
    width: 96px;
    height: 96px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    flex-shrink: 0;
}

@media (max-width: 800px) {
    .dashboard-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 22px;
        padding: 26px;
    }

    .dashboard-hero .hero-icon {
        width: 76px;
        height: 76px;
        font-size: 34px;
    }
}