:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #eff6ff;

    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;

    --bg: #f7f9fc;
    --surface: #ffffff;
    --border: #e5e7eb;

    --text: #172033;
    --text-soft: #667085;
    --text-light: #98a2b3;

    --radius: 18px;
    --radius-small: 12px;

    --shadow: 0 8px 30px rgba(15, 23, 42, .06);
    --content: 1180px;
}

/* RESET */

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

/* CONTAINER */

.finzelo-container {
    width: min(calc(100% - 32px), var(--content));
    margin: 0 auto;
}

/* HEADER */

.finzelo-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

.finzelo-header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.finzelo-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 800;
}

.finzelo-brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    font-size: 18px;
    font-weight: 900;
}

/* MAIN */

.finzelo-main {
    padding: 28px 0 110px;
}

.finzelo-page-header {
    margin-bottom: 24px;
}

.finzelo-page-title {
    margin: 0;
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.15;
    font-weight: 800;
}

.finzelo-page-subtitle {
    margin: 8px 0 0;
    color: var(--text-soft);
    font-size: 16px;
    line-height: 1.5;
}

/* GRID */

.finzelo-grid {
    display: grid;
    gap: 18px;
}

.finzelo-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.finzelo-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* CARDS */

.finzelo-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}

.finzelo-card-title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 700;
}

.finzelo-card-label {
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 600;
}

/* VALORES */

.finzelo-value {
    margin-top: 8px;
    font-size: clamp(28px, 5vw, 42px);
    line-height: 1.1;
    font-weight: 850;
    letter-spacing: -1px;
}

.finzelo-value-small {
    font-size: 26px;
}

.finzelo-positive {
    color: var(--success);
}

.finzelo-negative {
    color: var(--danger);
}

.finzelo-warning {
    color: var(--warning);
}

/* BUTTONS */

.finzelo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.finzelo-btn {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: var(--radius-small);
    padding: 12px 18px;
    font-weight: 750;
    transition: .15s ease;
}

.finzelo-btn:active {
    transform: scale(.98);
}

.finzelo-btn-primary {
    background: var(--primary);
    color: #fff;
}

.finzelo-btn-primary:hover {
    background: var(--primary-dark);
}

.finzelo-btn-secondary {
    background: var(--primary-soft);
    color: var(--primary);
}

.finzelo-btn-neutral {
    background: #f2f4f7;
    color: var(--text);
}

.finzelo-btn-danger {
    background: #fef2f2;
    color: var(--danger);
}

.finzelo-btn-block {
    width: 100%;
}

/* FORMS */

.finzelo-form {
    display: grid;
    gap: 18px;
}

.finzelo-field {
    display: grid;
    gap: 8px;
}

.finzelo-field label {
    font-size: 15px;
    font-weight: 700;
}

.finzelo-input,
.finzelo-select,
.finzelo-textarea {
    width: 100%;
    min-height: 52px;
    border: 1px solid #d0d5dd;
    border-radius: var(--radius-small);
    background: #fff;
    color: var(--text);
    padding: 12px 14px;
    outline: none;
}

.finzelo-textarea {
    min-height: 110px;
    resize: vertical;
}

.finzelo-input:focus,
.finzelo-select:focus,
.finzelo-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
}

/* LISTAS */

.finzelo-list {
    display: grid;
    gap: 10px;
}

.finzelo-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 66px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.finzelo-list-item:last-child {
    border-bottom: 0;
}

.finzelo-list-main {
    min-width: 0;
}

.finzelo-list-title {
    font-weight: 750;
}

.finzelo-list-description {
    margin-top: 4px;
    color: var(--text-soft);
    font-size: 14px;
}

/* BADGES */

.finzelo-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 750;
    background: #f2f4f7;
}

.finzelo-badge-success {
    background: #ecfdf3;
    color: #067647;
}

.finzelo-badge-warning {
    background: #fffaeb;
    color: #b54708;
}

.finzelo-badge-danger {
    background: #fef3f2;
    color: #b42318;
}

/* FEEDBACK */

.finzelo-empty {
    padding: 34px 20px;
    text-align: center;
    color: var(--text-soft);
}

.finzelo-feedback {
    padding: 14px 16px;
    border-radius: var(--radius-small);
    font-size: 14px;
    font-weight: 650;
}

.finzelo-feedback-error {
    background: #fef3f2;
    color: #b42318;
}

.finzelo-feedback-success {
    background: #ecfdf3;
    color: #067647;
}

/* NAVEGAÇÃO INFERIOR */

.finzelo-bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 14px;
    z-index: 60;
    transform: translateX(-50%);
    width: min(calc(100% - 24px), 620px);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 8px;
    background: rgba(255, 255, 255, .97);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .16);
    backdrop-filter: blur(16px);
}

.finzelo-nav-item {
    min-height: 54px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 15px;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 700;
}

.finzelo-nav-item strong {
    font-size: 20px;
    line-height: 1;
}

.finzelo-nav-item.active {
    background: var(--primary-soft);
    color: var(--primary);
}

/* RESPONSIVO */

@media (max-width: 760px) {
    .finzelo-container {
        width: min(calc(100% - 24px), var(--content));
    }

    .finzelo-header-inner {
        min-height: 64px;
    }

    .finzelo-main {
        padding-top: 20px;
    }

    .finzelo-grid-2,
    .finzelo-grid-3 {
        grid-template-columns: 1fr;
    }

    .finzelo-card {
        padding: 18px;
    }

    .finzelo-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .finzelo-btn {
        min-height: 54px;
    }
}

@media (max-width: 430px) {
    .finzelo-actions {
        grid-template-columns: 1fr;
    }

    .finzelo-bottom-nav {
        bottom: 8px;
    }
}
