.alma-panel-wrapper {
    max-width: 1180px !important;
    width: 100%;
    margin: 10px auto !important;
    padding: 12px !important;
    box-sizing: border-box;
}

.alma-panel-wrapper h1 {
    margin-bottom: 4px;
    font-size: 26px;
    line-height: 1.15;
}

.alma-panel-wrapper .alma-app-subtitle {
    margin-bottom: 10px;
    color: #555;
}

.alma-app-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0 12px;
}

.alma-app-nav a {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f1f1f1;
    color: #222;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}

.alma-app-nav a.active {
    background: #007c89;
    color: #fff;
}

.alma-panel-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.alma-panel-card {
    background: #f8fafa;
    border: 1px solid #dfe8e8;
    border-radius: 10px;
    padding: 10px;
}

.alma-panel-card span {
    display: block;
    color: #555;
    margin-bottom: 4px;
    font-size: 13px;
}

.alma-panel-card strong {
    display: block;
    font-size: 21px;
}

.alma-panel-section {
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
}

.alma-panel-section h2 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 18px;
}

.alma-front-chart-row {
    display: grid;
    grid-template-columns: 180px 1fr 120px;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}

.alma-front-chart-label {
    font-weight: 700;
    font-size: 13px;
}

.alma-front-chart-bar-area {
    background: #f0f0f0;
    height: 16px;
    border-radius: 999px;
    overflow: hidden;
}

.alma-front-chart-bar {
    height: 16px;
    background: #007c89;
    border-radius: 999px;
}

.alma-front-chart-value {
    text-align: right;
    font-weight: 700;
    font-size: 13px;
}

.alma-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.alma-table-header h2 {
    margin: 0;
}

.alma-new-expense-small {
    display: inline-block;
    padding: 7px 10px;
    border-radius: 999px;
    background: #007c89;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.alma-new-expense-small:hover {
    background: #005f69;
    color: #fff;
}

.alma-new-expense-mobile {
    display: none;
}

.alma-panel-filters {
    display: grid;
    grid-template-columns: 1.3fr 1fr 0.8fr 0.8fr 0.55fr 0.55fr;
    gap: 7px;
    align-items: end;
    margin-bottom: 10px;
    padding: 8px;
    background: #f8fafa;
    border: 1px solid #e2e2e2;
    border-radius: 9px;
}

.alma-panel-wrapper .alma-form-field {
    margin-bottom: 0;
    min-width: 0;
}

.alma-panel-wrapper .alma-form-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 3px;
}

.alma-panel-wrapper .alma-form-field input,
.alma-panel-wrapper .alma-form-field select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 7px 8px;
    font-size: 13px;
    border-radius: 7px;
    border: 1px solid #ccc;
    background: #fff;
}

.alma-panel-wrapper .alma-form-field input[type="date"] {
    min-height: 37px;
    height: 37px;
    line-height: 37px;
    padding-top: 0;
    padding-bottom: 0;
    appearance: none;
    -webkit-appearance: none;
}

.alma-app-button-small {
    font-size: 13px;
    padding: 8px 9px;
    border-radius: 8px;
}

.alma-app-secondary-button {
    display: block;
    text-align: center;
    padding: 8px 9px;
    border-radius: 8px;
    background: #f1f1f1;
    color: #222;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
}

.alma-front-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.alma-front-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 650px;
}

.alma-front-table th,
.alma-front-table td {
    border-bottom: 1px solid #e5e5e5;
    padding: 6px 5px;
    text-align: left;
    font-size: 12.5px;
    vertical-align: top;
    line-height: 1.22;
}

.alma-front-table th {
    background: #f8fafa;
    font-weight: 700;
    white-space: nowrap;
}

.alma-front-table th a {
    color: #222;
    text-decoration: none;
}

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

.alma-col-title {
    min-width: 185px;
}

.alma-col-amount {
    width: 105px;
    white-space: nowrap;
    font-weight: 700;
}

.alma-col-date {
    width: 92px;
    white-space: nowrap;
}

.alma-col-category {
    min-width: 120px;
}

.alma-col-bank {
    min-width: 120px;
}

.alma-col-id {
    width: 58px;
    white-space: nowrap;
}

/* Status visual: Pendente */
.alma-front-table tr.alma-expense-pending td {
    background: #fff1f1;
    border-top: 1px solid #ffd2d2;
    border-bottom: 1px solid #ffd2d2;
}

.alma-front-table tr.alma-expense-pending td:first-child {
    border-left: 4px solid #d63638;
}

.alma-front-table tr.alma-expense-pending .alma-col-title::after {
    content: " Pendente";
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #ffdcdc;
    color: #9b1c1c;
    font-size: 11px;
    font-weight: 700;
}

/* Status visual: Precisa revisar */
.alma-front-table tr.alma-expense-needs-review td {
    background: #fff8e5;
    border-top: 1px solid #ffe2a8;
    border-bottom: 1px solid #ffe2a8;
}

.alma-front-table tr.alma-expense-needs-review td:first-child {
    border-left: 4px solid #dba617;
}

.alma-front-table tr.alma-expense-needs-review .alma-col-title::after {
    content: " Revisar";
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #ffe9b8;
    color: #7a5200;
    font-size: 11px;
    font-weight: 700;
}

/* Status visual: Cancelado */
.alma-front-table tr.alma-expense-cancelled td {
    background: #f3f3f3;
    color: #777;
    text-decoration: line-through;
}

.alma-front-table tr.alma-expense-cancelled td:first-child {
    border-left: 4px solid #999;
}

.alma-front-table tr.alma-expense-cancelled .alma-col-title::after {
    content: " Cancelado";
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #e0e0e0;
    color: #555;
    font-size: 11px;
    font-weight: 700;
}

@media (max-width: 980px) {
    .alma-panel-filters {
        grid-template-columns: 1fr 1fr;
    }

    .alma-search-field {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .alma-panel-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 auto !important;
        padding: 6px !important;
        border-radius: 0 !important;
        border-left: 0 !important;
        border-right: 0 !important;
        box-shadow: none !important;
    }

    .alma-panel-wrapper h1 {
        font-size: 21px;
        margin-bottom: 2px;
    }

    .alma-panel-wrapper .alma-app-subtitle {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .alma-app-nav {
        gap: 6px;
        margin: 7px 0 9px;
    }

    .alma-app-nav a {
        flex: 1 1 auto;
        text-align: center;
        padding: 8px 8px;
        border-radius: 8px;
        font-size: 13px;
    }

    .alma-panel-cards {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        margin-bottom: 8px;
    }

    .alma-panel-card {
        padding: 8px;
        border-radius: 8px;
    }

    .alma-panel-card span {
        font-size: 12px;
        margin-bottom: 2px;
    }

    .alma-panel-card strong {
        font-size: 17px;
    }

    .alma-panel-section {
        padding: 8px;
        margin-bottom: 8px;
        border-radius: 8px;
    }

    .alma-panel-section h2 {
        font-size: 16px;
        margin-bottom: 7px;
    }

    .alma-front-chart-row {
        grid-template-columns: 1fr;
        gap: 3px;
        margin-bottom: 8px;
    }

    .alma-front-chart-label,
    .alma-front-chart-value {
        font-size: 12.5px;
    }

    .alma-front-chart-value {
        text-align: left;
    }

    .alma-front-chart-bar-area,
    .alma-front-chart-bar {
        height: 13px;
    }

    .alma-table-header {
        align-items: stretch;
        flex-direction: column;
        gap: 6px;
    }

    .alma-new-expense-desktop {
        display: none;
    }

    .alma-new-expense-mobile {
        display: block;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
        border-radius: 8px;
        margin: 0 0 8px;
    }

    .alma-panel-filters {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        padding: 6px;
        margin-bottom: 8px;
    }

    .alma-search-field {
        grid-column: 1 / -1;
    }

    .alma-panel-wrapper .alma-form-field label {
        font-size: 11.5px;
    }

    .alma-panel-wrapper .alma-form-field input,
    .alma-panel-wrapper .alma-form-field select {
        font-size: 13px;
        padding: 7px;
    }

    .alma-panel-wrapper .alma-form-field input[type="date"] {
        min-height: 36px;
        height: 36px;
        line-height: 36px;
        padding-top: 0;
        padding-bottom: 0;
    }

    .alma-app-button-small,
    .alma-app-secondary-button {
        font-size: 13px;
        padding: 8px 7px;
    }

    .alma-front-table {
        min-width: 620px;
    }

    .alma-front-table th,
    .alma-front-table td {
        padding: 5px 4px;
        font-size: 12px;
    }

    .alma-col-title {
        min-width: 165px;
    }

    .alma-col-amount {
        width: 95px;
    }

    .alma-col-date {
        width: 82px;
    }

    .alma-col-category {
        min-width: 105px;
    }

    .alma-col-bank {
        min-width: 100px;
    }

    .alma-col-id {
        width: 50px;
    }
}

@media (max-width: 420px) {
    .alma-panel-wrapper {
        padding: 4px !important;
    }

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

    .alma-panel-filters {
        grid-template-columns: 1fr;
    }

    .alma-front-table {
        min-width: 580px;
    }

    .alma-front-table th,
    .alma-front-table td {
        font-size: 11.5px;
    }

    .alma-col-title {
        min-width: 140px;
    }

    .alma-col-amount {
        width: 88px;
    }

    .alma-col-date {
        width: 80px;
    }

    .alma-col-category {
        min-width: 95px;
    }

    .alma-col-bank {
        min-width: 90px;
    }

    .alma-col-id {
        width: 48px;
    }
}