

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #08080d;
    --bg-2: #0e0e15;
    --card: #12121a;
    --card-2: #171720;
    --border: #272733;
    --text: #f5f5f7;
    --muted: #9696a6;
    --purple: #8b5cf6;
    --purple-2: #a78bfa;
    --green: #22c55e;
    --red: #ef4444;
    --yellow: #f59e0b;
    --radius: 16px;
}

html,
body {
    min-height: 100%;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}


/* ==========================================
   LOGIN
========================================== */

.login-screen {
    position: relative;
    min-height: 100vh;
    width: 100%;

    background-image: url("./imagens/imagi.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    width: 100%;
    max-width: 430px;
    padding: 38px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(18, 18, 26, .95);
    box-shadow: 0 25px 80px rgba(0,0,0,.45);
}

.login-logo {
    width: 200px;
    height: 200px;
    margin: 0 auto 15px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.login-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.login-eyebrow,
.eyebrow {
    display: block;
    color: var(--purple-2);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.login-box h1 {
    margin-top: 8px;
    font-size: 30px;
}

.login-box > p {
    margin: 10px 0 28px;
    color: var(--muted);
    line-height: 1.6;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 17px;
}

.form-group label {
    color: #d8d8e0;
    font-size: 13px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    outline: none;
    border-radius: 10px;
    background: #0c0c12;
    color: var(--text);
    padding: 13px 14px;
    transition: .2s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(139,92,246,.1);
}

textarea {
    resize: vertical;
}

.password-box {
    position: relative;
}

.password-box input {
    padding-right: 85px;
}

.password-button {
    position: absolute;
    right: 8px;
    top: 7px;
    border: 0;
    background: transparent;
    color: var(--purple-2);
    padding: 7px;
    font-size: 12px;
}

.login-error {
    min-height: 20px;
    color: #f87171;
    font-size: 13px;
    margin-bottom: 10px;
}

.login-button {
    width: 100%;
}


/* ==========================================
   BOTÕES
========================================== */

.primary-button,
.secondary-button,
.danger-button,
.small-button,
.text-button {
    border: 0;
    border-radius: 10px;
    font-weight: 700;
    transition: .2s;
}

.primary-button {
    background: var(--purple);
    color: white;
    padding: 12px 18px;
}

.primary-button:hover {
    background: #7c3aed;
    transform: translateY(-1px);
}

.secondary-button {
    background: #20202a;
    color: white;
    border: 1px solid var(--border);
    padding: 11px 16px;
}

.secondary-button:hover {
    background: #292936;
}

.danger-button {
    background: rgba(239,68,68,.12);
    color: #f87171;
    border: 1px solid rgba(239,68,68,.25);
    padding: 11px 16px;
}

.danger-button:hover {
    background: rgba(239,68,68,.2);
}

.small-button {
    margin-top: 8px;
    padding: 7px 10px;
    background: #24242e;
    color: #ddd;
    font-size: 12px;
}

.text-button {
    background: transparent;
    color: var(--purple-2);
    padding: 5px;
}


/* ==========================================
   APP
========================================== */

.admin-app {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 250px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    background: #0b0b11;
    z-index: 50;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 12px;
    background: rgba(139,92,246,.16);
    font-size: 21px;
}

.sidebar-brand strong {
    display: block;
    font-size: 15px;
}

.sidebar-brand span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 20px 12px;
}

.menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #a5a5b3;
    padding: 13px 14px;
    text-align: left;
    font-weight: 600;
    transition: .2s;
}

.menu-item:hover {
    color: white;
    background: #15151d;
}

.menu-item.ativo {
    color: white;
    background: rgba(139,92,246,.15);
    box-shadow: inset 3px 0 var(--purple);
}

.menu-item > span:first-child {
    width: 20px;
    text-align: center;
}

.menu-badge {
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    border-radius: 20px;
    background: var(--purple);
    color: white;
    font-size: 10px;
}

.sidebar-bottom {
    margin-top: auto;
    padding: 14px;
    border-top: 1px solid var(--border);
}

.logout-button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #a5a5b3;
    padding: 12px;
    text-align: left;
}

.logout-button:hover {
    background: #181820;
    color: white;
}

.main-content {
    width: calc(100% - 250px);
    margin-left: 250px;
    min-height: 100vh;
}

.topbar {
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    border-bottom: 1px solid var(--border);
    background: rgba(8,8,13,.9);
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(12px);
}

.topbar h1 {
    font-size: 20px;
}

.topbar p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--purple);
    color: white;
    font-weight: 800;
}

.topbar-user strong,
.topbar-user span {
    display: block;
}

.topbar-user strong {
    font-size: 12px;
}

.topbar-user span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}


/* ==========================================
   PÁGINAS
========================================== */

.pagina {
    display: none;
    padding: 32px;
}

.pagina.ativa {
    display: block;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.page-heading h2 {
    margin-top: 6px;
    font-size: 26px;
}

.page-heading p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
}


/* ==========================================
   PAINEL
========================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 18px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
}

.stat-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(139,92,246,.15);
    color: var(--purple-2);
    font-size: 20px;
}

.stat-icon.green {
    background: rgba(34,197,94,.12);
    color: var(--green);
}

.stat-icon.red {
    background: rgba(239,68,68,.12);
    color: var(--red);
}

.stat-icon.purple {
    background: rgba(139,92,246,.15);
    color: var(--purple-2);
}

.stat-card span,
.stat-card strong {
    display: block;
}

.stat-card span {
    color: var(--muted);
    font-size: 11px;
}

.stat-card strong {
    margin-top: 5px;
    font-size: 25px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.panel {
    margin-bottom: 18px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 18px;
}

.panel-header h3 {
    margin-top: 5px;
    font-size: 16px;
}

.dashboard-category {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border-bottom: 1px solid #20202a;
}

.dashboard-category:last-child {
    border-bottom: 0;
}

.dashboard-category > span {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(139,92,246,.12);
}

.dashboard-category strong,
.dashboard-category small {
    display: block;
}

.dashboard-category strong {
    font-size: 13px;
}

.dashboard-category small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.dashboard-category b {
    margin-left: auto;
    color: var(--purple-2);
}

.mini-notice {
    display: flex;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid #20202a;
}

.mini-notice:last-child {
    border-bottom: 0;
}

.mini-notice > span {
    font-size: 18px;
}

.mini-notice strong,
.mini-notice small {
    display: block;
}

.mini-notice strong {
    font-size: 12px;
}

.mini-notice small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.quick-actions button {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--card-2);
    color: white;
    padding: 17px;
    text-align: left;
    transition: .2s;
}

.quick-actions button:hover {
    border-color: var(--purple);
    transform: translateY(-2px);
}

.quick-actions button > span {
    font-size: 20px;
}

.quick-actions strong {
    font-size: 12px;
}

.quick-actions small {
    color: var(--muted);
    font-size: 10px;
}


/* ==========================================
   CATEGORIAS
========================================== */

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 18px;
}

.category-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    color: white;
    padding: 22px;
    text-align: left;
    transition: .2s;
}

.category-card:hover {
    border-color: var(--purple);
    transform: translateY(-2px);
}

.category-ball {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: rgba(139,92,246,.14);
    font-size: 23px;
}

.category-card strong,
.category-card span {
    display: block;
}

.category-card strong {
    font-size: 15px;
}

.category-card span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
}

.category-card b {
    margin-left: auto;
    color: var(--purple-2);
}

.category-result {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    padding: 20px;
}

.category-students {
    display: flex;
    flex-direction: column;
}

.category-student {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.category-student:last-child {
    border-bottom: 0;
}

.category-student > div:nth-child(2) {
    flex: 1;
}

.category-student strong,
.category-student span {
    display: block;
}

.category-student strong {
    font-size: 13px;
}

.category-student span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}


/* ==========================================
   ALUNOS
========================================== */

.filters {
    display: grid;
    grid-template-columns: 1fr 200px 160px;
    gap: 10px;
    margin-bottom: 18px;
}

.search-box {
    position: relative;
}

.search-box > span {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}

.search-box input {
    padding-left: 40px;
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 130px;
    gap: 15px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
}

.list-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 130px;
    align-items: center;
    gap: 15px;
    padding: 15px 14px;
    border-bottom: 1px solid #20202a;
    font-size: 12px;
}

.list-row:last-child {
    border-bottom: 0;
}

.student-cell {
    display: flex;
    align-items: center;
    gap: 11px;
}

.student-cell strong,
.student-cell span {
    display: block;
}

.student-cell strong {
    font-size: 12px;
}

.student-cell span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
}

.student-avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 50%;
    background: #22222c;
    font-size: 18px;
}

.student-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
}

.status.ativo {
    background: rgba(34,197,94,.12);
    color: #4ade80;
}

.status.inativo {
    background: rgba(239,68,68,.12);
    color: #f87171;
}

.actions {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
}

.actions button {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #1a1a23;
    color: #ddd;
}

.actions button:hover {
    border-color: var(--purple);
    color: white;
}


/* ==========================================
   PERFIL
========================================== */

.profile-page {
    max-width: 1100px;
}

.profile-header {
    margin-bottom: 16px;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
}

.profile-photo {
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 20px;
    background: #22222c;
    font-size: 35px;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-main h2 {
    margin: 7px 0;
    font-size: 25px;
}

.category-tag {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 20px;
    background: rgba(139,92,246,.13);
    color: var(--purple-2);
    font-size: 11px;
    font-weight: 800;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.profile-info {
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--card);
}

.profile-info span,
.profile-info strong {
    display: block;
}

.profile-info span {
    color: var(--muted);
    font-size: 10px;
}

.profile-info strong {
    margin-top: 6px;
    font-size: 13px;
    word-break: break-word;
}

.profile-contact {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}


/* ==========================================
   AVISOS
========================================== */

.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.tab-button {
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--muted);
    padding: 12px 18px;
}

.tab-button.ativo {
    border-color: var(--purple);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.ativa {
    display: block;
}

.notice-card {
    display: grid;
    grid-template-columns: 110px 1fr 40px;
    gap: 18px;
    align-items: start;
    padding: 20px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
}

.notice-date strong,
.notice-date span {
    display: block;
}

.notice-date strong {
    color: var(--purple-2);
    font-size: 12px;
}

.notice-date span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
}

.notice-content h3 {
    font-size: 15px;
}

.notice-content p {
    margin-top: 7px;
    color: #bbb;
    font-size: 12px;
    line-height: 1.6;
}

.notice-content small {
    display: block;
    margin-top: 10px;
    color: var(--muted);
}

.delete-small {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(239,68,68,.2);
    border-radius: 8px;
    background: rgba(239,68,68,.08);
    color: #f87171;
}

.birthday-card {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--card);
}

.birthday-card strong,
.birthday-card span {
    display: block;
}

.birthday-card strong {
    font-size: 13px;
}

.birthday-card span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}


/* ==========================================
   APROVAÇÕES
========================================== */

.approval-card {
    padding: 22px;
    margin-bottom: 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
}

.approval-top {
    display: flex;
    align-items: center;
    gap: 13px;
}

.approval-avatar {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(139,92,246,.13);
    font-size: 21px;
}

.approval-top h3 {
    margin-top: 5px;
    font-size: 16px;
}

.approval-top span:last-child {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.approval-info {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.approval-info > div {
    padding: 12px;
    border-radius: 10px;
    background: #0d0d14;
}

.approval-info span,
.approval-info strong {
    display: block;
}

.approval-info span {
    color: var(--muted);
    font-size: 9px;
}

.approval-info strong {
    margin-top: 5px;
    font-size: 11px;
    word-break: break-word;
}

.approval-observation {
    margin-top: 12px;
    padding: 13px;
    border-radius: 10px;
    background: #0d0d14;
}

.approval-observation strong {
    font-size: 11px;
}

.approval-observation p {
    margin-top: 5px;
    color: #bbb;
    font-size: 11px;
    line-height: 1.5;
}

.approval-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 20px;
}


/* ==========================================
   LINK
========================================== */

.link-card {
    display: flex;
    gap: 22px;
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--card);
}

.link-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 16px;
    background: rgba(139,92,246,.13);
    font-size: 26px;
}

.link-card-content {
    width: 100%;
}

.link-card h3 {
    font-size: 18px;
}

.link-card p {
    max-width: 700px;
    margin: 8px 0 20px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.copy-area {
    display: flex;
    gap: 10px;
}

.copy-area input {
    flex: 1;
}


/* ==========================================
   CONFIGURAÇÕES
========================================== */

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.setting-info {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    background: #0d0d14;
}

.setting-info span,
.setting-info strong {
    display: block;
}

.setting-info span {
    color: var(--muted);
    font-size: 10px;
}

.setting-info strong {
    margin-top: 6px;
    font-size: 13px;
    word-break: break-all;
}

.danger-panel {
    border-color: rgba(239,68,68,.2);
}

.danger-panel p {
    color: var(--muted);
    margin-bottom: 15px;
    font-size: 12px;
    line-height: 1.6;
}


/* ==========================================
   MODAIS
========================================== */

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0,0,0,.72);
    backdrop-filter: blur(5px);
}

.modal.aberto {
    display: flex;
}

.modal-box {
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #111119;
    box-shadow: 0 25px 80px rgba(0,0,0,.5);
}

.large-modal {
    max-width: 850px;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 22px;
}

.modal-header h2 {
    margin-top: 5px;
    font-size: 20px;
}

.modal-close {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #1b1b24;
    color: white;
    font-size: 21px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 15px;
}

.form-group.full {
    grid-column: 1 / -1;
}

.photo-upload {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 22px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #0d0d14;
}

.photo-preview {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 15px;
    background: #22222c;
    font-size: 25px;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-upload strong {
    font-size: 12px;
}

.photo-upload p {
    margin: 4px 0;
    color: var(--muted);
    font-size: 10px;
}

.photo-upload input {
    padding: 5px;
    border: 0;
    background: transparent;
    font-size: 11px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    padding-top: 10px;
}


/* ==========================================
   VAZIO
========================================== */

.empty-state {
    padding: 45px 20px;
    text-align: center;
    color: var(--muted);
}

.empty-state > div {
    margin-bottom: 10px;
    font-size: 28px;
}

.empty-state h3 {
    color: #ddd;
    font-size: 14px;
}

.empty-state p {
    margin-top: 6px;
    font-size: 11px;
}

.empty-state.small {
    padding: 25px;
    font-size: 11px;
}


/* ==========================================
   RESPONSIVO
========================================== */

@media (max-width: 1100px) {

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .approval-info {
        grid-template-columns: repeat(2, 1fr);
    }

    .profile-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 850px) {

    .sidebar {
        width: 215px;
    }

    .main-content {
        width: calc(100% - 215px);
        margin-left: 215px;
    }

    .pagina {
        padding: 22px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .filters {
        grid-template-columns: 1fr;
    }

    .table-header {
        display: none;
    }

    .list-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .actions {
        justify-content: flex-start;
    }

}

@media (max-width: 650px) {

    .admin-app {
        display: block;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }

    .sidebar-menu {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .sidebar-bottom {
        display: none;
    }

    .main-content {
        width: 100%;
        margin-left: 0;
    }

    .topbar {
        padding: 0 18px;
    }

    .topbar-user {
        display: none;
    }

    .pagina {
        padding: 18px;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .profile-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .notice-card {
        grid-template-columns: 1fr 40px;
    }

    .notice-date {
        grid-column: 1 / -1;
    }

    .approval-info {
        grid-template-columns: 1fr;
    }

    .approval-actions {
        flex-direction: column;
    }

    .copy-area {
        flex-direction: column;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full {
        grid-column: auto;
    }

    .login-box {
        padding: 25px;
    }

}

/* ============================================================
   MODAL FINANCEIRO
============================================================ */

.modal-financeiro {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    z-index: 9999;
}

.modal-financeiro.hidden {
    display: none;
}


.modal-financeiro-conteudo {
    width: 100%;
    max-width: 650px;
    max-height: 90vh;

    overflow-y: auto;

    background: var(--card, #12121a);

    border: 1px solid var(--border, #272733);

    border-radius: 18px;

    padding: 25px;

    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}


/* CABEÇALHO */

.modal-financeiro-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    margin-bottom: 25px;
}

.modal-financeiro-header h2 {
    color: var(--text, #fff);
    font-size: 22px;
    margin-bottom: 5px;
}

.modal-financeiro-header p {
    color: #8f8f9d;
    font-size: 14px;
}


.btn-fechar-modal {
    width: 38px;
    height: 38px;

    border: none;
    border-radius: 10px;

    background: #20202b;
    color: #fff;

    font-size: 25px;

    cursor: pointer;
}

.btn-fechar-modal:hover {
    background: #2b2b38;
}


/* CAMPOS */

.campo-financeiro {
    margin-bottom: 18px;
}

.campo-financeiro label {
    display: block;

    margin-bottom: 8px;

    color: #e8e8ed;

    font-size: 14px;

    font-weight: 600;
}


.campo-financeiro input,
.campo-financeiro select,
.campo-financeiro textarea {
    width: 100%;

    border: 1px solid var(--border, #272733);

    border-radius: 10px;

    background: #0d0d14;

    color: #fff;

    padding: 12px 14px;

    font-size: 14px;

    outline: none;

    font-family: inherit;
}

.campo-financeiro input:focus,
.campo-financeiro select:focus,
.campo-financeiro textarea:focus {
    border-color: #5555ff;
}


.campo-financeiro textarea {
    resize: vertical;
}


.campo-financeiro small {
    display: block;

    margin-top: 6px;

    color: #777784;

    font-size: 12px;
}


/* TIPO */

.financeiro-tipo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}


.tipo-option {
    margin: 0 !important;

    cursor: pointer;
}


.tipo-option input {
    display: none;
}


.tipo-option span {
    display: block;

    text-align: center;

    padding: 14px;

    border-radius: 10px;

    background: #0d0d14;

    border: 1px solid var(--border, #272733);

    color: #aaa;

    cursor: pointer;
}


.tipo-option input:checked + span {
    border-color: #4caf78;
    color: #fff;
    background: rgba(76, 175, 120, 0.12);
}


/* AÇÕES */

.modal-financeiro-acoes {
    display: flex;
    justify-content: flex-end;

    gap: 12px;

    margin-top: 25px;
}


.modal-financeiro-acoes button {
    border: none;

    border-radius: 10px;

    padding: 12px 20px;

    font-weight: 600;

    cursor: pointer;
}


.btn-cancelar {
    background: #252530;
    color: #ddd;
}


.btn-salvar-financeiro {
    background: #4caf78;
    color: white;
}


.btn-salvar-financeiro:hover {
    filter: brightness(1.1);
}



.categoria-financeiro-modal {
    position: fixed;

    inset: 0;

    background: rgba(0,0,0,.75);

    backdrop-filter: blur(8px);

    z-index: 9998;

    display: flex;

    justify-content: center;

    align-items: center;

    padding: 20px;
}


.categoria-financeiro-modal.hidden {
    display: none;
}


.categoria-financeiro-box {
    width: 100%;

    max-width: 700px;

    max-height: 85vh;

    overflow-y: auto;

    background: var(--card, #12121a);

    border: 1px solid var(--border, #272733);

    border-radius: 18px;

    padding: 25px;
}


.categoria-financeiro-header {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 20px;
}


.categoria-financeiro-header h2 {
    color: #fff;
    margin-bottom: 5px;
}


.categoria-financeiro-header strong {
    color: #4caf78;

    font-size: 18px;
}




@media (max-width: 650px) {

    .modal-financeiro-conteudo {
        padding: 18px;
    }

    .financeiro-tipo {
        grid-template-columns: 1fr;
    }

    .modal-financeiro-acoes {
        flex-direction: column;
    }

    .modal-financeiro-acoes button {
        width: 100%;
    }

} 


#pagina-financeiro {
    width: 100%;
    padding: 30px;
    color: var(--text, #f5f5f7);
}



.financeiro-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.financeiro-header h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
    color: #ffffff;
}

.financeiro-header p {
    margin-top: 6px;
    color: #9292a3;
    font-size: 14px;
}



.btn-primary {
    border: 0;
    outline: none;
    cursor: pointer;

    padding: 13px 20px;
    border-radius: 10px;

    background: #ffffff;
    color: #09090d;

    font-size: 14px;
    font-weight: 700;

    transition:
        transform 0.2s ease,
        opacity 0.2s ease,
        box-shadow 0.2s ease;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.btn-primary:active {
    transform: scale(0.98);
}



.financeiro-resumo {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.financeiro-card {
    background: #12121a;
    border: 1px solid #272733;
    border-radius: 14px;

    padding: 20px;

    min-height: 110px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    transition:
        border-color 0.2s ease,
        transform 0.2s ease;
}

.financeiro-card:hover {
    border-color: #3a3a48;
    transform: translateY(-2px);
}

.financeiro-card span {
    color: #9292a3;
    font-size: 13px;
    margin-bottom: 9px;
}

.financeiro-card strong {
    font-size: 25px;
    font-weight: 800;
    color: #ffffff;
}

 
.financeiro-filtros {
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr);
    gap: 12px;

    margin-bottom: 22px;
}

.financeiro-filtros input,
.financeiro-filtros select {
    width: 100%;
    height: 44px;

    padding: 0 13px;

    background: #12121a;
    border: 1px solid #292936;
    border-radius: 9px;

    color: #f5f5f7;
    outline: none;

    font-size: 13px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.financeiro-filtros input::placeholder {
    color: #686875;
}

.financeiro-filtros input:focus,
.financeiro-filtros select:focus {
    border-color: #555565;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}

.financeiro-filtros select option {
    background: #12121a;
    color: #ffffff;
}



.financeiro-categorias {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;

    margin-bottom: 22px;
}

.financeiro-categorias button {
    border: 1px solid #292936;
    background: #12121a;
    color: #cfcfd8;

    padding: 10px 15px;

    border-radius: 9px;

    cursor: pointer;

    font-size: 13px;
    font-weight: 600;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.financeiro-categorias button:hover {
    background: #1b1b25;
    border-color: #454553;
    color: #ffffff;
    transform: translateY(-1px);
}

.financeiro-categorias button:active {
    transform: scale(0.97);
}

/* ============================================================
   LISTA DE LANÇAMENTOS
============================================================ */

.lista-financeiro {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ============================================================
   LANÇAMENTO
============================================================ */

.financeiro-lancamento {
    display: grid;

    grid-template-columns:
        minmax(250px, 1fr)
        150px
        150px
        auto;

    align-items: center;

    gap: 18px;

    padding: 16px 18px;

    background: #12121a;
    border: 1px solid #272733;

    border-radius: 12px;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.financeiro-lancamento:hover {
    background: #15151e;
    border-color: #373744;
    transform: translateY(-1px);
}

/* ============================================================
   INFORMAÇÕES DO LANÇAMENTO
============================================================ */

.financeiro-lancamento-info {
    display: flex;
    align-items: center;
    gap: 13px;

    min-width: 0;
}

.financeiro-lancamento-info > div:last-child {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 4px;
}

.financeiro-lancamento-info strong {
    color: #ffffff;

    font-size: 14px;
    font-weight: 700;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.financeiro-lancamento-info span {
    color: #898995;
    font-size: 12px;
}

.financeiro-lancamento-info small {
    color: #6f6f7d;
    font-size: 11px;
}

/* ============================================================
   ÍCONE
============================================================ */

.financeiro-lancamento-icon {
    width: 40px;
    height: 40px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #1c1c26;

    font-size: 19px;
    font-weight: 800;
}

/* ============================================================
   DATA
============================================================ */

.financeiro-lancamento-data {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
}

.financeiro-lancamento-data > span:first-child {
    color: #a2a2ae;
    font-size: 12px;
}

/* ============================================================
   STATUS
============================================================ */

.status {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: fit-content;

    padding: 5px 9px;

    border-radius: 999px;

    font-size: 10px;
    font-weight: 700;

    text-transform: capitalize;

    background: #22222c;
    color: #bdbdc7;
}

.status.pago {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
}

.status.pendente {
    background: rgba(250, 204, 21, 0.12);
    color: #facc15;
}

.status.atrasado {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}

/* ============================================================
   VALOR
============================================================ */

.financeiro-lancamento-valor {
    text-align: right;

    font-size: 15px;
    font-weight: 800;

    white-space: nowrap;
}

.financeiro-entrada {
    color: #4ade80 !important;
}

.financeiro-saida {
    color: #f87171 !important;
}

/* ============================================================
   AÇÕES
============================================================ */

.financeiro-lancamento-acoes {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.financeiro-lancamento-acoes button {
    border: 1px solid #2b2b37;

    background: #191922;
    color: #bdbdc7;

    border-radius: 8px;

    padding: 8px 10px;

    cursor: pointer;

    font-size: 11px;
    font-weight: 600;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.financeiro-lancamento-acoes button:hover {
    background: #22222c;
    color: #ffffff;
    border-color: #41414e;
}

/* ============================================================
   LOADING / VAZIO
============================================================ */

.loading,
.empty-state {
    width: 100%;

    padding: 50px 20px;

    text-align: center;

    background: #12121a;
    border: 1px solid #272733;

    border-radius: 14px;

    color: #8d8d9a;
}

.empty-state > div {
    font-size: 30px;
    margin-bottom: 10px;
}

.empty-state h3 {
    color: #ffffff;
    font-size: 16px;
    margin-bottom: 6px;
}

.empty-state p {
    color: #777784;
    font-size: 13px;
}

/* ============================================================
   MODAL NOVO LANÇAMENTO
============================================================ */

.modal-financeiro {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0, 0, 0, 0.72);

    backdrop-filter: blur(7px);
}

/* IMPORTANTE
   O JS usa .hidden para esconder o modal
*/

.modal-financeiro.hidden {
    display: none !important;
}

/* ============================================================
   CONTEÚDO DO MODAL
============================================================ */

.modal-financeiro-conteudo {
    width: 100%;
    max-width: 620px;

    max-height: 90vh;

    overflow-y: auto;

    background: #101017;

    border: 1px solid #2b2b36;

    border-radius: 18px;

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.55);

    animation: abrirModalFinanceiro 0.2s ease;
}

@keyframes abrirModalFinanceiro {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================================
   HEADER MODAL
============================================================ */

.modal-financeiro-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 22px 24px;

    border-bottom: 1px solid #292934;
}

.modal-financeiro-header h2 {
    margin: 0;

    color: #ffffff;

    font-size: 21px;
    font-weight: 800;
}

.modal-financeiro-header p {
    margin-top: 5px;

    color: #858592;

    font-size: 12px;
}

/* ============================================================
   BOTÃO FECHAR
============================================================ */

.btn-fechar-modal {
    width: 36px;
    height: 36px;

    flex-shrink: 0;

    border: 1px solid #30303b;

    background: #191922;

    color: #a9a9b4;

    border-radius: 9px;

    cursor: pointer;

    font-size: 23px;
    line-height: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.btn-fechar-modal:hover {
    background: #24242e;
    color: #ffffff;
    border-color: #444450;
}

/* ============================================================
   FORMULÁRIO
============================================================ */

#formFinanceiro {
    padding: 24px;
}

/* ============================================================
   CAMPOS
============================================================ */

.campo-financeiro {
    margin-bottom: 17px;
}

.campo-financeiro label {
    display: block;

    margin-bottom: 7px;

    color: #d9d9e1;

    font-size: 12px;
    font-weight: 700;
}

.campo-financeiro input,
.campo-financeiro select,
.campo-financeiro textarea {
    width: 100%;

    background: #171720;

    border: 1px solid #30303c;

    color: #f5f5f7;

    border-radius: 9px;

    outline: none;

    font-family: inherit;

    font-size: 13px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.campo-financeiro input,
.campo-financeiro select {
    height: 44px;

    padding: 0 13px;
}

.campo-financeiro textarea {
    min-height: 90px;

    resize: vertical;

    padding: 12px 13px;
}

.campo-financeiro input::placeholder,
.campo-financeiro textarea::placeholder {
    color: #676773;
}

.campo-financeiro input:focus,
.campo-financeiro select:focus,
.campo-financeiro textarea:focus {
    border-color: #626272;

    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.04);
}

.campo-financeiro select option {
    background: #171720;
    color: #ffffff;
}

.campo-financeiro small {
    display: block;

    margin-top: 6px;

    color: #70707d;

    font-size: 11px;
}

/* ============================================================
   TIPO — ENTRADA / SAÍDA
============================================================ */

.financeiro-tipo {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 10px;
}

.tipo-option {
    position: relative;

    margin: 0 !important;
    cursor: pointer;
}

.tipo-option input {
    position: absolute;

    opacity: 0;

    pointer-events: none;
}

.tipo-option span {
    min-height: 48px;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 10px 15px;

    background: #171720;

    border: 1px solid #30303c;

    border-radius: 10px;

    color: #aaaab5;

    font-size: 13px;
    font-weight: 700;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.tipo-option:hover span {
    border-color: #4a4a57;
    color: #ffffff;
}

/* ENTRADA SELECIONADA */

.tipo-option input[value="entrada"]:checked + span {
    background: rgba(34, 197, 94, 0.10);

    border-color: rgba(34, 197, 94, 0.5);

    color: #4ade80;
}

/* SAÍDA SELECIONADA */

.tipo-option input[value="saida"]:checked + span {
    background: rgba(239, 68, 68, 0.10);

    border-color: rgba(239, 68, 68, 0.5);

    color: #f87171;
}

/* ============================================================
   BOTÕES DO MODAL
============================================================ */

.modal-financeiro-acoes {
    display: flex;

    justify-content: flex-end;

    gap: 10px;

    margin-top: 24px;

    padding-top: 20px;

    border-top: 1px solid #292934;
}

.btn-cancelar,
.btn-salvar-financeiro {
    height: 42px;

    padding: 0 18px;

    border-radius: 9px;

    cursor: pointer;

    font-size: 13px;
    font-weight: 700;

    transition:
        transform 0.2s ease,
        opacity 0.2s ease,
        background 0.2s ease;
}

.btn-cancelar {
    border: 1px solid #30303c;

    background: #191922;

    color: #b6b6c1;
}

.btn-cancelar:hover {
    background: #22222c;
    color: #ffffff;
}

.btn-salvar-financeiro {
    border: 0;

    background: #ffffff;

    color: #09090d;
}

.btn-salvar-financeiro:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-cancelar:active,
.btn-salvar-financeiro:active {
    transform: scale(0.98);
}

/* ============================================================
   MODAL DE CATEGORIA
============================================================ */

.categoria-financeiro-modal {
    position: fixed;

    inset: 0;

    z-index: 9998;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0, 0, 0, 0.72);

    backdrop-filter: blur(7px);
}

.categoria-financeiro-modal.hidden {
    display: none !important;
}

.categoria-financeiro-box {
    width: 100%;

    max-width: 760px;

    max-height: 85vh;

    overflow-y: auto;

    background: #101017;

    border: 1px solid #2b2b36;

    border-radius: 18px;

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.55);
}

/* ============================================================
   HEADER CATEGORIA
============================================================ */

.categoria-financeiro-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    padding: 22px 24px;

    border-bottom: 1px solid #292934;
}

.categoria-financeiro-header h2 {
    margin: 0;

    color: #ffffff;

    font-size: 20px;
    font-weight: 800;
}

.categoria-financeiro-header strong {
    display: block;

    margin-top: 5px;

    color: #4ade80;

    font-size: 15px;
}

/* ============================================================
   LISTA DENTRO DA CATEGORIA
============================================================ */

#listaCategoriaFinanceira {
    padding: 20px;
}

#listaCategoriaFinanceira .financeiro-lancamento {
    margin-bottom: 9px;
}

/* ============================================================
   SCROLL DOS MODAIS
============================================================ */

.modal-financeiro-conteudo::-webkit-scrollbar,
.categoria-financeiro-box::-webkit-scrollbar {
    width: 7px;
}

.modal-financeiro-conteudo::-webkit-scrollbar-track,
.categoria-financeiro-box::-webkit-scrollbar-track {
    background: transparent;
}

.modal-financeiro-conteudo::-webkit-scrollbar-thumb,
.categoria-financeiro-box::-webkit-scrollbar-thumb {
    background: #33333f;
    border-radius: 10px;
}

/* ============================================================
   RESPONSIVO — TABLET
============================================================ */

@media (max-width: 1100px) {

    .financeiro-resumo {
        grid-template-columns: repeat(2, 1fr);
    }

    .financeiro-filtros {
        grid-template-columns: repeat(2, 1fr);
    }

    .financeiro-filtros input {
        grid-column: span 2;
    }

    .financeiro-lancamento {
        grid-template-columns:
            1fr
            auto
            auto;
    }

    .financeiro-lancamento-info {
        grid-column: 1 / -1;
    }

    .financeiro-lancamento-data {
        grid-column: 1;
    }

    .financeiro-lancamento-valor {
        grid-column: 2;
    }

    .financeiro-lancamento-acoes {
        grid-column: 3;
    }
}

/* ============================================================
   RESPONSIVO — CELULAR
============================================================ */

@media (max-width: 700px) {

    #pagina-financeiro {
        padding: 18px;
    }

    .financeiro-header {
        flex-direction: column;
        align-items: stretch;
    }

    .financeiro-header h1 {
        font-size: 25px;
    }

    .financeiro-header .btn-primary {
        width: 100%;
    }

    .financeiro-resumo {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .financeiro-card {
        min-height: 95px;
        padding: 15px;
    }

    .financeiro-card strong {
        font-size: 19px;
    }

    .financeiro-filtros {
        grid-template-columns: 1fr;
    }

    .financeiro-filtros input {
        grid-column: auto;
    }

    .financeiro-categorias {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .financeiro-categorias button {
        width: 100%;
    }

    .financeiro-lancamento {
        display: flex;

        flex-direction: column;

        align-items: stretch;

        gap: 13px;
    }

    .financeiro-lancamento-info {
        width: 100%;
    }

    .financeiro-lancamento-data {
        width: 100%;

        flex-direction: row;

        align-items: center;
        justify-content: space-between;
    }

    .financeiro-lancamento-valor {
        text-align: left;

        font-size: 16px;
    }

    .financeiro-lancamento-acoes {
        width: 100%;

        justify-content: stretch;
    }

    .financeiro-lancamento-acoes button {
        flex: 1;
    }

    .modal-financeiro {
        padding: 10px;
    }

    .modal-financeiro-conteudo {
        max-height: 94vh;

        border-radius: 14px;
    }

    .modal-financeiro-header {
        padding: 18px;
    }

    #formFinanceiro {
        padding: 18px;
    }

    .financeiro-tipo {
        grid-template-columns: 1fr;
    }

    .modal-financeiro-acoes {
        flex-direction: column-reverse;
    }

    .btn-cancelar,
    .btn-salvar-financeiro {
        width: 100%;
    }

    .categoria-financeiro-modal {
        padding: 10px;
    }

    .categoria-financeiro-box {
        max-height: 94vh;
        border-radius: 14px;
    }

    .categoria-financeiro-header {
        padding: 18px;
    }

    #listaCategoriaFinanceira {
        padding: 12px;
    }
}

/* ============================================================
   CELULAR PEQUENO
============================================================ */

@media (max-width: 420px) {

    .financeiro-resumo {
        grid-template-columns: 1fr;
    }

    .financeiro-categorias {
        grid-template-columns: 1fr;
    }

    .modal-financeiro-header h2 {
        font-size: 18px;
    }
}
/* ============================================================
   FINANCEIRO — AJUSTES FINAIS
============================================================ */

#pagina-financeiro {
    width: 100%;
    padding: 30px;
    color: var(--text);
}

/* Cabeçalho */

.financeiro-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.financeiro-header h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
    color: #fff;
}

.financeiro-header p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 14px;
}

/* Botão Novo Lançamento */

#btnNovoPagamento {
    border: 0;
    border-radius: 10px;
    padding: 13px 20px;
    background: #fff;
    color: #09090d;
    font-weight: 700;
    cursor: pointer;
    transition: .2s;
}

#btnNovoPagamento:hover {
    transform: translateY(-1px);
    opacity: .9;
}

/* ============================================================
   CARDS DE RESUMO
============================================================ */

.financeiro-resumo {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.financeiro-card {
    min-height: 110px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card);
}

.financeiro-card span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 9px;
}

.financeiro-card strong {
    display: block;
    color: #fff;
    font-size: 25px;
    font-weight: 800;
}

/* Valores */

#financeiroEntradas {
    color: #4ade80;
}

#financeiroSaidas {
    color: #f87171;
}

#financeiroSaldo {
    color: #fff;
}

#financeiroPendente {
    color: #facc15;
}

/* ============================================================
   FILTROS
============================================================ */

.financeiro-filtros {
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 22px;
}

.financeiro-filtros input,
.financeiro-filtros select {
    width: 100%;
    height: 44px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--card);
    color: #fff;
    outline: none;
}

.financeiro-filtros input:focus,
.financeiro-filtros select:focus {
    border-color: var(--purple);
}

/* ============================================================
   CATEGORIAS
============================================================ */

.financeiro-categorias {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 22px;
}

.financeiro-categorias button {
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--card);
    color: #ccc;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.financeiro-categorias button:hover {
    background: #1b1b25;
    border-color: var(--purple);
    color: #fff;
}

/* ============================================================
   LISTA
============================================================ */

#listaFinanceiro {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ============================================================
   LANÇAMENTO
============================================================ */

.financeiro-lancamento {
    display: grid;
    grid-template-columns: minmax(250px, 1fr) 150px 150px auto;
    align-items: center;
    gap: 18px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
}

.financeiro-lancamento:hover {
    background: #15151e;
    border-color: #373744;
}

.financeiro-lancamento-info {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.financeiro-lancamento-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #1c1c26;
    font-size: 19px;
}

.financeiro-lancamento-info strong {
    display: block;
    color: #fff;
    font-size: 14px;
}

.financeiro-lancamento-info span {
    display: block;
    margin-top: 4px;
    color: #898995;
    font-size: 12px;
}

.financeiro-lancamento-info small {
    display: block;
    margin-top: 3px;
    color: #6f6f7d;
    font-size: 11px;
}

/* Data */

.financeiro-lancamento-data {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.financeiro-lancamento-data > span:first-child {
    color: #a2a2ae;
    font-size: 12px;
}

/* Valor */

.financeiro-lancamento-valor {
    text-align: right;
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
}

.financeiro-entrada {
    color: #4ade80 !important;
}

.financeiro-saida {
    color: #f87171 !important;
}

/* ============================================================
   STATUS
============================================================ */

.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
}

.status.pago {
    background: rgba(34,197,94,.12);
    color: #4ade80;
}

.status.pendente {
    background: rgba(250,204,21,.12);
    color: #facc15;
}

.status.atrasado {
    background: rgba(239,68,68,.12);
    color: #f87171;
}

/* ============================================================
   AÇÕES
============================================================ */

.financeiro-lancamento-acoes {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
}

.financeiro-lancamento-acoes button {
    border: 1px solid #2b2b37;
    border-radius: 8px;
    background: #191922;
    color: #bdbdc7;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 11px;
}

.financeiro-lancamento-acoes button:hover {
    background: #22222c;
    color: #fff;
    border-color: #41414e;
}

/* ============================================================
   RESULTADO DA CATEGORIA
============================================================ */

#financeiroCategoriaResultado {
    margin-top: 20px;
}

#financeiroCategoriaTitulo {
    color: #fff;
}

#financeiroCategoriaTotal {
    color: #4ade80;
}

#listaCategoriaFinanceira {
    padding: 20px 0;
}

/* ============================================================
   MODAL
============================================================ */

.modal-financeiro {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0,0,0,.72);
    backdrop-filter: blur(7px);
}

.modal-financeiro.hidden {
    display: none !important;
}

.modal-financeiro-conteudo {
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    overflow-y: auto;

    background: #101017;
    border: 1px solid #2b2b36;
    border-radius: 18px;

    box-shadow: 0 30px 80px rgba(0,0,0,.55);
}

.modal-financeiro-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 22px 24px;
    border-bottom: 1px solid #292934;
}

.modal-financeiro-header h2 {
    margin: 0;
    color: #fff;
    font-size: 21px;
}

.modal-financeiro-header p {
    margin-top: 5px;
    color: #858592;
    font-size: 12px;
}

.btn-fechar-modal {
    width: 36px;
    height: 36px;

    border: 1px solid #30303b;
    border-radius: 9px;

    background: #191922;
    color: #fff;

    cursor: pointer;
    font-size: 23px;
}

#formFinanceiro {
    padding: 24px;
}

.campo-financeiro {
    margin-bottom: 17px;
}

.campo-financeiro label {
    display: block;
    margin-bottom: 7px;
    color: #d9d9e1;
    font-size: 12px;
    font-weight: 700;
}

.campo-financeiro input,
.campo-financeiro select,
.campo-financeiro textarea {
    width: 100%;
    border: 1px solid #30303c;
    border-radius: 9px;
    background: #171720;
    color: #fff;
    outline: none;
}

.campo-financeiro input,
.campo-financeiro select {
    height: 44px;
    padding: 0 13px;
}

.campo-financeiro textarea {
    min-height: 90px;
    padding: 12px 13px;
    resize: vertical;
}

/* ============================================================
   ENTRADA / SAÍDA
============================================================ */

.financeiro-tipo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.tipo-option {
    position: relative;
    cursor: pointer;
}

.tipo-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tipo-option span {
    min-height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 10px 15px;

    background: #171720;
    border: 1px solid #30303c;
    border-radius: 10px;

    color: #aaaab5;
    font-weight: 700;
}

.tipo-option input[value="entrada"]:checked + span {
    background: rgba(34,197,94,.10);
    border-color: rgba(34,197,94,.5);
    color: #4ade80;
}

.tipo-option input[value="saida"]:checked + span {
    background: rgba(239,68,68,.10);
    border-color: rgba(239,68,68,.5);
    color: #f87171;
}

/* ============================================================
   BOTÕES DO MODAL
============================================================ */

.modal-financeiro-acoes {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    margin-top: 24px;
    padding-top: 20px;

    border-top: 1px solid #292934;
}

.btn-cancelar,
.btn-salvar-financeiro {
    height: 42px;
    padding: 0 18px;

    border-radius: 9px;
    cursor: pointer;

    font-size: 13px;
    font-weight: 700;
}

.btn-cancelar {
    border: 1px solid #30303c;
    background: #191922;
    color: #b6b6c1;
}

.btn-salvar-financeiro {
    border: 0;
    background: #fff;
    color: #09090d;
}

/* ============================================================
   RESPONSIVO
============================================================ */

@media (max-width: 1100px) {

    .financeiro-resumo {
        grid-template-columns: repeat(2, 1fr);
    }

    .financeiro-filtros {
        grid-template-columns: repeat(2, 1fr);
    }

    .financeiro-filtros input {
        grid-column: span 2;
    }

    .financeiro-lancamento {
        grid-template-columns: 1fr auto auto;
    }

    .financeiro-lancamento-info {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {

    #pagina-financeiro {
        padding: 18px;
    }

    .financeiro-header {
        flex-direction: column;
        align-items: stretch;
    }

    #btnNovoPagamento {
        width: 100%;
    }

    .financeiro-resumo {
        grid-template-columns: 1fr 1fr;
    }

    .financeiro-filtros {
        grid-template-columns: 1fr;
    }

    .financeiro-filtros input {
        grid-column: auto;
    }

    .financeiro-lancamento {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .financeiro-lancamento-valor {
        text-align: left;
    }

    .financeiro-lancamento-acoes {
        justify-content: stretch;
    }

    .financeiro-lancamento-acoes button {
        flex: 1;
    }

    .modal-financeiro {
        padding: 10px;
    }

    .modal-financeiro-conteudo {
        max-height: 94vh;
    }

    #formFinanceiro {
        padding: 18px;
    }

    .financeiro-tipo {
        grid-template-columns: 1fr;
    }

    .modal-financeiro-acoes {
        flex-direction: column-reverse;
    }

    .btn-cancelar,
    .btn-salvar-financeiro {
        width: 100%;
    }
}

@media (max-width: 420px) {

    .financeiro-resumo {
        grid-template-columns: 1fr;
    }

    .modal-financeiro-header h2 {
        font-size: 18px;
    }
}
