:root {
    --bg: #edf0f4;
    --panel: #ffffff;
    --panel-soft: #f4f7fb;
    --primary: #1d2d3d;
    --primary-strong: #152535;
    --sidebar: #1f2d3b;
    --sidebar-soft: #203041;
    --text: #1f2732;
    --muted: #77849a;
    --border: rgba(38, 50, 65, 0.12);
    --success: #1fa56b;
    --error: #d94b4b;
    --yellow: #f7b21e;
    --blue: #14a7d4;
    --green: #31b26d;
    --orange: #f1882d;
    --shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
}

body {
    min-height: 100vh;
}

.app-body {
    background: var(--bg);
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #eff4fa, #dfeaf6);
}

.login-box {
    width: min(420px, 92vw);
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 32px 28px;
}

.login-header {
    text-align: center;
    margin-bottom: 22px;
}

.login-header h1 {
    margin: 0;
    color: var(--primary);
    letter-spacing: 0.08em;
}

.login-logo {
    display: block;
    width: min(250px, 78%);
    height: auto;
    margin: 0 auto 14px;
    filter: drop-shadow(0 3px 10px rgba(29, 45, 61, 0.08));
}

.login-header p {
    margin: 8px 0 0;
    color: var(--muted);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-form label,
.field label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 600;
    color: var(--text);
}

input, select, button {
    font: inherit;
}

input, select, textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 11px 12px;
    background: #fff;
    color: var(--text);
}

button {
    border: none;
    border-radius: 8px;
    padding: 11px 16px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

button:hover {
    background: var(--primary-strong);
}

.login-meta {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    color: var(--muted);
    gap: 4px;
}

.sidebar {
    width: 220px;
    background: linear-gradient(180deg, #1f2d3b 0%, #172533 100%);
    color: #ffffff;
    padding: 14px 12px 18px;
    box-shadow: inset -1px 0 0 rgba(255,255,255,0.06), 8px 0 24px rgba(15, 23, 42, 0.08);
    flex-shrink: 0;
    transition: width 0.22s ease, padding 0.22s ease;
}

.sidebar.is-collapsed {
    width: 82px;
    padding-left: 10px;
    padding-right: 10px;
}

.brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 4px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 18px;
}

.brand {
    min-width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.brand-logo {
    display: block;
    width: 100%;
    max-width: 140px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.08));
}

.sidebar.is-collapsed .brand-logo {
    display: none;
}

.sidebar-toggle {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    transition: 0.2s ease;
    padding: 0;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,0.08);
}

.hamburger-menu {
    display: none;
}

.hamburger-menu {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 8px;
    padding: 0;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-direction: column;
    flex-shrink: 0;
}

.hamburger-menu span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.hamburger-menu:hover {
    background: #f5f7fa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mobile-overlay {
    display: none;
}

.sidebar-toggle span {
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.94rem;
    font-weight: 600;
    transition: 0.2s ease, transform 0.2s ease;
    overflow: hidden;
}

.nav-link:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
    transform: translateX(1px);
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(20,167,212,0.22), rgba(255,255,255,0.06));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.nav-link svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.nav-link .nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    object-fit: contain;
    filter: brightness(0) invert(1);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 3px;
    padding: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link span {
    white-space: nowrap;
    transition: opacity 0.18s ease, width 0.18s ease;
}

.sidebar.is-collapsed .nav-link {
    justify-content: center;
    padding-left: 8px;
    padding-right: 8px;
}

.sidebar.is-collapsed .nav-link span {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.nav-link.danger {
    margin-top: 10px;
    color: #ffb7b7;
}

.nav-link.danger:hover {
    background: rgba(255, 107, 107, 0.12);
    color: #fff1f1;
}

.main-area,
.main-content {
    flex: 1;
    background: var(--bg);
    padding: 20px 24px 24px;
    min-width: 0;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    margin-bottom: 18px;
    background: #f5f7fa;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.topbar-title {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--primary);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 12px;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
}

.user-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2bb673;
    box-shadow: 0 0 0 3px rgba(43, 182, 115, 0.18);
}

.badge {
    background: #edf7f0;
    color: var(--success);
    font-size: 0.72rem;
    padding: 5px 8px;
    border-radius: 999px;
    font-weight: 700;
}

.content-panel {
    background: rgba(255,255,255,0.5);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 18px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 18px;
}

.stat-card {
    min-height: 180px;
    border-radius: 10px;
    color: #fff;
    padding: 18px 18px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: inset 0 -18px 24px rgba(0,0,0,0.04);
}

.stat-card.blue {
    background: linear-gradient(135deg, #2ab7e2, #08a3d7);
}

.stat-card.green {
    background: linear-gradient(135deg, #38c97b, #1ca761);
}

.stat-card.yellow {
    background: linear-gradient(135deg, #f7b12e, #f09c2d);
}

.stat-card.orange {
    background: linear-gradient(135deg, #f59a2f, #eb7e16);
}

.stat-figure {
    font-size: 2.05rem;
    line-height: 1;
    font-weight: 700;
    margin-bottom: 12px;
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-meta {
    font-size: 0.75rem;
    opacity: 0.96;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 22px;
}

.report-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.filter-form,
.report-actions {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-form .field {
    min-width: min(350px, 100%);
}

.filter-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 700;
    color: var(--primary);
}

.filter-actions {
    display: flex;
    align-items: end;
}

.btn-download {
    background: linear-gradient(135deg, #1e7dc2, #155a8a);
}

.btn-download:hover {
    background: linear-gradient(135deg, #155a8a, #0f4d76);
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.card {
    background: linear-gradient(135deg, #ffffff, #f5f8fd);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card span {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.card strong {
    font-size: 2rem;
    line-height: 1;
    color: var(--primary);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    align-items: end;
}

.actions {
    display: flex;
    align-items: flex-end;
}

.table-wrap {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1200px;
}

thead th {
    background: var(--panel-soft);
    color: var(--primary);
    text-align: left;
    padding: 14px 12px;
    font-size: 0.83rem;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

tbody td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

tbody tr:hover {
    background: #fafcff;
}

.alert {
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-weight: 600;
}

.alert-success {
    background: #eafaf3;
    border: 1px solid #afe0c1;
    color: var(--success);
}

.alert-error {
    background: #fff0f0;
    border: 1px solid #f0b1ae;
    color: var(--error);
}

.btn-delete {
    background: var(--error);
    padding: 8px 10px;
}

.btn-delete:hover {
    background: #8c1d17;
}

.btn-edit {
    background: var(--primary);
    padding: 8px 10px;
}

.btn-edit:hover {
    background: var(--primary-strong);
}

.fleet-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fleet-actions form {
    margin: 0;
}

.btn-pay {
    background: var(--success);
    padding: 8px 10px;
}

.btn-pay:hover {
    background: #127a4e;
}

.btn-secondary {
    background: #e5edf6;
    color: var(--primary);
    padding: 8px 12px;
}

.btn-secondary:hover {
    background: #d9e5f3;
}

.actions-cell {
    min-width: 170px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 999;
}

.modal-backdrop.hidden {
    display: none;
}

.modal-card {
    width: min(920px, 96vw);
    max-height: 90vh;
    overflow: auto;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 24px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.modal-header h3 {
    margin: 0;
    color: var(--primary);
    font-size: 1.4rem;
}

.modal-close {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f1f5f9;
    color: var(--primary);
    font-size: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.modal-grid {
    margin-bottom: 18px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}

.payment-box {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.payment-box h4,
.payment-history-box h4 {
    margin: 0 0 14px;
    color: var(--primary);
    font-size: 1.1rem;
}

.payment-history-box {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.payment-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-history-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--text);
    font-size: 0.9rem;
}

.payment-history-empty {
    list-style: none;
    padding: 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px dashed var(--border);
    color: var(--muted);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
}

.status-success {
    background: #eafaf3;
    color: #1f8a5f;
    border-color: #bfe7d1;
}

.status-warning {
    background: #fff7e7;
    color: #a86a00;
    border-color: #f0d38a;
}

.status-danger {
    background: #fff0f0;
    color: #c63e3e;
    border-color: #f1b3b3;
}

.status-neutral {
    background: #eef2f7;
    color: #51657d;
    border-color: #dfe6ef;
}

.dias-label {
    display: inline-block;
    white-space: nowrap;
    font-weight: 700;
    font-size: 0.86rem;
}

.dias-ok {
    color: #1f8a5f;
}

.dias-today {
    color: #a86a00;
}

.dias-overdue {
    color: #c63e3e;
}

.dias-neutral {
    color: #51657d;
    font-weight: 500;
}

.auto-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #eef6fb;
    border: 1px solid #c5dce8;
    color: #1a7ba1;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.field-hint {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 500;
}

.field input[readonly] {
    background: #f4f7fb;
    color: #51657d;
    cursor: default;
}

.calendar-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
    margin-top: 16px;
}

.csv-import-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.csv-import-form input[type="file"] {
    width: auto;
    padding: 8px;
}

@media (max-width: 900px) {
    .app-shell {
        flex-direction: row;
    }

    .sidebar {
        width: 80px;
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 1000;
        overflow-y: auto;
        min-height: auto;
    }

    .sidebar.is-collapsed {
        width: 80px;
    }

    .main-area {
        padding: 18px;
        margin-left: 80px;
        width: calc(100% - 80px);
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }
}



/* ===== LOGIN PROFISSIONAL ===== */

.login-body-pro {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: url('https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTAk8UhMnqIJTOby8wlQeWZQ_irzkaCVGIlIDnk3VebFMC_ZakOZ-5E8yg&s=10');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container-pro {
    display: flex;
    min-height: 100vh;
    background: transparent;
    align-items: center;
    justify-content: center;
    padding: 20px;
    width: 100%;
}

/* Painel de Branding */
.login-branding-pro {
    display: none;
    flex: 1;
    background: linear-gradient(135deg, #0f172a 0%, #1a2332 100%);
    color: #ffffff;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

.login-branding-pro::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle at 50% 50%, rgba(20, 167, 212, 0.08), transparent);
    border-radius: 50%;
    pointer-events: none;
}

.login-branding-pro::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle at 50% 50%, rgba(20, 167, 212, 0.05), transparent);
    border-radius: 50%;
    pointer-events: none;
}

.branding-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 380px;
}

.branding-logo-wrapper {
    margin-bottom: 40px;
}

.branding-logo-pro {
    width: 100%;
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.branding-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
    color: #ffffff;
}

.branding-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
}



.branding-footer {
    margin-top: 80px;
}

.branding-footer p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

/* Painel do Formulário */
.login-form-pro {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    width: 100%;
    max-width: 410px;
}

.login-card {
    width: 100%;
    max-width: 410px;
    background: #ffffff;
    border-radius: 16px;
    padding: 24px 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.login-form-header {
    margin-bottom: 35px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.login-form-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a2332;
    margin: 0;
    letter-spacing: -0.3px;
}

.login-form-header p {
    font-size: 0.9rem;
    color: #6b7684;
    margin: 0;
    font-weight: 400;
}

.login-form-header::before {
    content: '';
    display: block;
    width: 80px;
    height: 80px;
    background: url('https://i.postimg.cc/NLhGm54y/b9efcb08-2d60-4e43-8e82-3b76272d88de-removebg-preview.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Alerta */
.alert-pro {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 13px 15px;
    border-radius: 6px;
    margin-bottom: 24px;
    font-weight: 500;
    font-size: 0.9rem;
}

.alert-error-pro {
    background: #fef1f1;
    color: #c63e3e;
    border: 1px solid #e8b4b1;
}

/* Formulário */
.form-pro {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group-pro {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label-pro {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a2332;
    cursor: text;
}

.form-input-pro {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid #d1d8e0;
    border-radius: 8px;
    background: #f8f9fa;
    color: #1a2332;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    outline: none;
}

.form-input-pro::placeholder {
    color: #9ca3af;
}

.form-input-pro:hover {
    border-color: #c0c8d4;
    background: #ffffff;
}

.form-input-pro:focus {
    border-color: #1a7ba1;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(26, 123, 161, 0.1);
}

/* Botão Login */
.btn-login-pro {
    width: 100%;
    padding: 14px 20px;
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.5px;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-login-pro:hover {
    background: #2a2a2a;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
}

.btn-login-pro:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

/* Meta Informações */
.login-meta-pro {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.meta-item {
    font-size: 0.8rem;
    color: #6b7684;
}

.meta-item strong {
    color: #1a2332;
    font-weight: 700;
}

/* Responsivo - Tablet */
@media (max-width: 768px) {
    .login-container-pro {
        padding: 20px;
    }

    .login-card {
        padding: 24px 30px;
        max-width: 410px;
    }

    .login-form-header {
        margin-bottom: 28px;
    }

    .login-form-header h2 {
        font-size: 1.2rem;
    }

    .login-form-header p {
        font-size: 0.85rem;
    }
}

/* Responsivo - Mobile */
@media (max-width: 480px) {
    .login-container-pro {
        padding: 15px;
    }

    .login-card {
        padding: 30px 22px;
        max-width: 100%;
        border-radius: 12px;
    }

    .login-form-header {
        margin-bottom: 25px;
        gap: 12px;
    }

    .login-form-header h2 {
        font-size: 1.1rem;
    }

    .login-form-header p {
        font-size: 0.8rem;
    }

    .login-form-header::before {
        width: 70px;
        height: 70px;
    }

    .form-pro {
        gap: 16px;
    }

    .form-input-pro {
        padding: 11px 12px;
        font-size: 0.85rem;
    }

    .form-label-pro {
        font-size: 0.8rem;
    }

    .btn-login-pro {
        padding: 12px 18px;
        font-size: 0.85rem;
        margin-top: 6px;
    }

    .login-meta-pro {
        margin-top: 20px;
        padding-top: 16px;
    }

    .meta-item {
        font-size: 0.75rem;
    }
}

/* ===== RESPONSIVO - ADMIN MOBILE ===== */
@media (max-width: 768px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        width: 280px;
        height: 100vh;
        z-index: 1001;
        background: linear-gradient(180deg, #1f2d3b 0%, #172533 100%);
        transition: left 0.3s ease;
        overflow-y: auto;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
    }

    .sidebar.mobile-open {
        left: 0;
    }

    .sidebar.is-collapsed {
        width: 280px;
    }

    .brand-row {
        padding: 12px 14px 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .brand-logo {
        display: block;
        max-width: 140px;
    }

    .sidebar-toggle {
        display: flex !important;
    }

    /* Ocultar sidebar-toggle em mobile */
    .brand-row .sidebar-toggle {
        display: none !important;
    }

    .sidebar nav {
        flex-direction: column;
        gap: 8px;
        padding: 16px 12px;
    }

    .nav-link {
        padding: 12px 14px;
        font-size: 0.9rem;
        justify-content: flex-start;
    }

    .nav-link span {
        opacity: 1 !important;
        width: auto !important;
        overflow: visible !important;
    }

    .nav-link svg {
        width: 20px;
        height: 20px;
    }

    .main-area {
        margin-left: 0;
        width: 100%;
        padding: 14px 12px;
    }

    .hamburger-menu {
        display: flex !important;
        width: 40px;
        height: 40px;
        border: 1px solid var(--border);
        background: #fff;
        border-radius: 8px;
        padding: 0;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        gap: 4px;
        flex-direction: column;
        flex-shrink: 0;
        order: -1;
        margin-right: 8px;
    }

    .hamburger-menu span {
        display: block;
        width: 18px;
        height: 2px;
        background: var(--primary);
        border-radius: 1px;
        transition: all 0.3s ease;
    }

    .hamburger-menu:hover {
        background: #f5f7fa;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .mobile-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0);
        z-index: 1000;
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
        display: block !important;
    }

    .mobile-overlay.mobile-open {
        background: rgba(0, 0, 0, 0.5);
        opacity: 1;
        pointer-events: auto;
    }

    .topbar {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        padding: 12px 14px;
        gap: 8px;
        margin-bottom: 14px;
    }

    .hamburger-menu {
        flex-shrink: 0;
        margin-right: 4px;
    }

    .topbar > div {
        flex: 1;
        min-width: 0;
    }

    .topbar > div h2 {
        margin: 0;
        font-size: 1rem;
        color: var(--primary);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .topbar-title {
        text-align: left;
        font-size: 0.95rem;
    }

    .topbar-user {
        flex-shrink: 0;
        width: auto;
        justify-content: flex-end;
        font-size: 0.75rem;
        padding: 4px 8px;
        gap: 4px;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .content-panel {
        padding: 12px;
        margin-bottom: 14px;
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        min-height: 130px;
        padding: 12px 12px 10px;
        border-radius: 8px;
    }

    .stat-figure {
        font-size: 1.6rem;
        margin-bottom: 6px;
    }

    .stat-label {
        font-size: 0.75rem;
        margin-bottom: 4px;
        font-weight: 600;
    }

    .stat-meta {
        font-size: 0.65rem;
        opacity: 0.9;
    }

    .panel {
        padding: 16px 12px;
        margin-bottom: 16px;
        border-radius: 10px;
    }

    .panel h3 {
        font-size: 1.1rem;
        margin-bottom: 14px;
    }

    .report-panel {
        flex-direction: column;
        gap: 12px;
    }

    .filter-form,
    .report-actions {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .filter-form .field {
        min-width: 100%;
    }

    .filter-form label {
        gap: 6px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .form-grid input,
    .form-grid select,
    .form-grid textarea {
        width: 100%;
    }

    .cards {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 16px;
    }

    .card {
        padding: 14px 16px;
        gap: 6px;
    }

    .card strong {
        font-size: 1.6rem;
    }

    .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 100%;
        font-size: 0.85rem;
    }

    thead th {
        padding: 10px 8px;
        font-size: 0.75rem;
        white-space: nowrap;
    }

    tbody td {
        padding: 10px 8px;
        font-size: 0.85rem;
    }

    .actions-cell {
        min-width: 140px;
    }

    .btn-edit,
    .btn-delete,
    .btn-pay {
        padding: 6px 8px;
        font-size: 0.75rem;
    }

    .modal-card {
        padding: 18px 16px;
    }

    .modal-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 14px;
        gap: 10px;
    }

    .modal-header h3 {
        font-size: 1.2rem;
    }

    .modal-close {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
        position: absolute;
        top: 12px;
        right: 12px;
    }

    .modal-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    button {
        font-size: 0.9rem;
        padding: 10px 14px;
    }

    input,
    select,
    textarea {
        font-size: 16px;
        padding: 11px 12px;
    }

    label {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .sidebar {
        left: -280px;
        width: 280px;
    }

    .brand-row {
        padding: 10px 12px 14px;
    }

    .sidebar nav {
        gap: 6px;
        padding: 14px 10px;
    }

    .nav-link {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .nav-link svg {
        width: 18px;
        height: 18px;
    }

    .hamburger-menu {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    .hamburger-menu span {
        width: 14px;
        height: 2px;
    }

    .main-area {
        padding: 8px 8px;
    }

    .topbar {
        display: grid;
        grid-template-columns: 36px 1fr;
        gap: 8px;
        padding: 8px 8px;
        margin-bottom: 12px;
        border-radius: 6px;
        min-height: 36px;
    }

    .hamburger-menu {
        grid-column: 1;
        grid-row: 1;
    }

    .topbar > div {
        grid-column: 2;
        grid-row: 1;
    }

    .topbar > div h2 {
        margin: 0;
        font-size: 0.9rem;
        color: var(--primary);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.2;
    }

    .topbar-title {
        font-size: 0.9rem;
    }

    .topbar-user {
        grid-column: 1 / -1;
        grid-row: 2;
        font-size: 0.7rem;
        padding: 4px 0;
        gap: 4px;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sidebar-toggle {
        display: none !important;
    }

    .user-dot {
        width: 6px;
        height: 6px;
        flex-shrink: 0;
    }

    .badge {
        font-size: 0.6rem;
        padding: 2px 4px;
        flex-shrink: 0;
    }

    .content-panel {
        padding: 8px;
        margin-bottom: 10px;
        border-radius: 8px;
    }

    .stat-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .stat-card {
        min-height: 100px;
        padding: 10px 8px 6px;
        border-radius: 6px;
    }

    .stat-figure {
        font-size: 1.4rem;
        margin-bottom: 4px;
        font-weight: 800;
    }

    .stat-label {
        font-size: 0.7rem;
        margin-bottom: 2px;
        font-weight: 600;
        line-height: 1.2;
    }

    .stat-meta {
        font-size: 0.6rem;
        opacity: 0.85;
        line-height: 1.1;
    }

    .panel {
        padding: 12px 8px;
        margin-bottom: 12px;
        border-radius: 8px;
    }

    .panel h3 {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    input,
    select,
    textarea {
        font-size: 16px;
        padding: 9px 10px;
        margin-bottom: 8px;
    }

    label {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }

    button {
        font-size: 0.85rem;
        padding: 8px 12px;
    }

    table {
        font-size: 0.75rem;
    }

    thead th {
        padding: 6px 4px;
        font-size: 0.65rem;
    }

    tbody td {
        padding: 6px 4px;
        font-size: 0.75rem;
    }

    .actions-cell {
        min-width: 80px;
    }

    .btn-edit,
    .btn-delete,
    .btn-pay,
    .btn-secondary {
        padding: 4px 6px;
        font-size: 0.65rem;
    }

    .panel {
        padding: 14px 10px;
        margin-bottom: 12px;
        border-radius: 8px;
    }

    .panel h3 {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .filter-form,
    .report-actions {
        gap: 8px;
    }

    .form-grid {
        gap: 10px;
    }

    .cards {
        gap: 10px;
        margin-bottom: 12px;
    }

    .card {
        padding: 12px 14px;
        gap: 6px;
        border-radius: 8px;
    }

    .card span {
        font-size: 0.75rem;
    }

    .card strong {
        font-size: 1.4rem;
    }

    table {
        font-size: 0.8rem;
    }

    thead th {
        padding: 8px 6px;
        font-size: 0.7rem;
    }

    tbody td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }

    .actions-cell {
        min-width: 100px;
    }

    .btn-edit,
    .btn-delete,
    .btn-pay,
    .btn-secondary {
        padding: 5px 6px;
        font-size: 0.7rem;
    }

    .modal-backdrop {
        padding: 16px 10px;
    }

    .modal-card {
        padding: 16px 14px;
        border-radius: 10px;
    }

    .modal-header h3 {
        font-size: 1.1rem;
    }

    .modal-grid {
        gap: 10px;
    }

    button {
        font-size: 0.85rem;
        padding: 9px 12px;
    }

    input,
    select,
    textarea {
        font-size: 16px;
        padding: 10px 11px;
    }

    label {
        font-size: 0.8rem;
    }

    .alert {
        padding: 10px 12px;
        font-size: 0.85rem;
        margin-bottom: 12px;
    }
}

@media (max-width: 360px) {
    .sidebar {
        left: -260px;
        width: 260px;
    }

    .sidebar nav {
        gap: 4px;
        padding: 12px 8px;
    }

    .nav-link {
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    .nav-link svg {
        width: 16px;
        height: 16px;
    }

    .main-area {
        padding: 6px 6px;
    }

    .topbar {
        grid-template-columns: 32px 1fr;
        gap: 6px;
        padding: 6px 6px;
        margin-bottom: 10px;
    }

    .hamburger-menu {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    .hamburger-menu span {
        width: 12px;
        height: 1.5px;
    }

    .topbar > div h2 {
        font-size: 0.85rem;
    }

    .topbar-user {
        font-size: 0.65rem;
        padding: 2px 0;
        gap: 3px;
    }

    .badge {
        font-size: 0.55rem;
        padding: 1px 3px;
    }

    .user-dot {
        width: 5px;
        height: 5px;
    }

    .content-panel {
        padding: 6px;
        margin-bottom: 8px;
    }

    .stat-grid {
        gap: 6px;
    }

    .stat-card {
        min-height: 90px;
        padding: 8px 6px 4px;
        border-radius: 6px;
    }

    .stat-figure {
        font-size: 1.2rem;
        margin-bottom: 3px;
    }

    .stat-label {
        font-size: 0.65rem;
        margin-bottom: 2px;
    }

    .stat-meta {
        font-size: 0.55rem;
    }

    .panel {
        padding: 10px 6px;
        margin-bottom: 10px;
    }

    .panel h3 {
        font-size: 0.95rem;
    }

    input,
    select,
    textarea {
        font-size: 16px;
        padding: 8px 8px;
        margin-bottom: 6px;
    }

    label {
        font-size: 0.75rem;
    }

    button {
        font-size: 0.8rem;
        padding: 7px 10px;
    }
}
