:root {
    /* Colors */
    --bg-color: #0b0f19;
    --sidebar-bg: rgba(11, 15, 25, 0.95);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #f97316;
    --primary-hover: #ea580c;
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.15);
    --danger: #f43f5e;
    --danger-bg: rgba(244, 63, 94, 0.15);
    --border: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(30, 41, 59, 0.4);

    /* Shadows & Glass */
    --shadow-sm: 0 2px 8px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(249, 115, 22, 0.15);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.6);
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-blur: blur(16px);

    /* Typography */
    --font-family: 'Space Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 10;
    overflow-y: auto; /* Garante que a barra de rolagem volte na vertical se for menor que os itens */
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.logo-icon {
    color: var(--primary);
    width: 32px;
    height: 32px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.1;
}

.brand-sub {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    border-radius: 0;
    transition: all 0.2s ease;
}

.nav-item i {
    width: 20px;
    height: 20px;
}

.nav-item:hover {
    background-color: rgba(249, 115, 22, 0.1);
    color: var(--primary);
    box-shadow: inset 2px 0 0 var(--primary);
}

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

.sidebar-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.user-role {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Main Content */
.main-content {
    flex: 1;
    min-width: 0; /* Impede a div pai de explodir para fora do viewport */
    padding: 2rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.month-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.month-selector h2 {
    font-size: 1.75rem;
    font-weight: 700;
    min-width: 200px;
    text-align: center;
}

.icon-btn {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.icon-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(234, 88, 12, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #f97316 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.2);
    letter-spacing: 0.3px;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.6);
}

/* Cards */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    backdrop-filter: var(--glass-blur);
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-header h3 {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-wrapper.success { background-color: var(--success-bg); color: var(--success); }
.icon-wrapper.danger { background-color: var(--danger-bg); color: var(--danger); }
.icon-wrapper.primary { background-color: #ffedd5; color: var(--primary); }

.card-value {
    font-family: var(--font-mono);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.success-text { color: var(--success); }
.danger-text { color: var(--danger); }

.card-footer {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Details Section */
.details-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.chart-container {
    height: 400px;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Essencial para permitir o Canvas diminuir em CSS Grids */
}

.canvas-wrapper {
    flex: 1;
    position: relative;
    width: 100%;
}

.transactions-container {
    display: flex;
    flex-direction: column;
    height: 400px;
}

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Custom Scrollbar */
.transaction-list::-webkit-scrollbar {
    width: 6px;
}
.transaction-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0;
}
.transaction-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 0;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255,255,255,0.03);
    border-radius: 0;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.transaction-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.transaction-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.t-icon {
    width: 36px;
    height: 36px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.t-icon.up { background: var(--success-bg); color: var(--success); }
.t-icon.down { background: var(--danger-bg); color: var(--danger); }

.t-details h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-main);
}

.t-details span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.t-amount {
    text-align: right;
}

.t-amount .value {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.1rem;
    display: block;
}

.t-amount .date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    gap: 1.25rem;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.empty-state i {
    width: 56px;
    height: 56px;
    color: #e2e8f0;
    stroke-width: 1.5;
}

.empty-state p {
    font-weight: 500;
    max-width: 200px;
    text-align: center;
}

/* Select Styling */
.select-clean {
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 0.25rem 0.5rem;
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text-main);
    background-color: rgba(30,41,59,0.5);
    outline: none;
    cursor: pointer;
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
}

.btn-text:hover {
    text-decoration: underline;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    width: 100%;
    max-width: 500px;
    background: #0f172a;
    transform: translateY(20px);
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 1.5rem;
}

.close-modal {
    background: none;
    box-shadow: none;
    border-color: transparent;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.row-group {
    flex-direction: row;
    gap: 1rem;
}

.half-width {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
    background: transparent;
    color: inherit;
}

.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
    background-color: transparent;
    color: inherit;
    appearance: none;
    -webkit-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%2364748b" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem; /* make room for arrow */
}

.form-group input:focus, 
.form-group select:focus {
    border-color: var(--primary);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-secondary {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #f1f5f9;
}

/* Radio Buttons Styling */
.type-toggle {
    flex-direction: row;
    gap: 1rem;
}

.radio-label {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.radio-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-label span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 0;
    font-weight: 500;
    transition: all 0.2s;
}

.income-radio input:checked ~ span {
    border-color: var(--success);
    background-color: var(--success-bg);
    color: var(--success);
}

.expense-radio input:checked ~ span {
    border-color: var(--danger);
    background-color: var(--danger-bg);
    color: var(--danger);
}

/* Actions in List */
.t-actions-amount {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.t-actions {
    display: flex;
    gap: 0.5rem;
}

.icon-btn-small {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
}

.icon-btn-small:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.icon-btn-small.danger-btn:hover {
    color: var(--danger);
    border-color: var(--danger);
}

.icon-btn-small i {
    width: 16px;
    height: 16px;
}

/* Responsive */
@media (max-width: 1024px) {
    .details-section {
        grid-template-columns: 1fr;
    }
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    #mobileMenuBtn {
        display: flex !important;
    }
    
    .hide-mobile {
        display: none !important;
    }

    .top-header {
        justify-content: space-between;
    }

    .month-selector {
        gap: 0.5rem;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        box-shadow: 0 0 0 100vw rgba(0,0,0,0);
    }
    
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 0 0 0 100vw rgba(0,0,0,0.5);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .month-selector h2 {
        font-size: 1.15rem;
        min-width: unset;
    }

    .row-group {
        flex-direction: column;
    }
    
    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .t-actions-amount {
        width: 100%;
        flex-direction: row-reverse;
        justify-content: space-between;
    }
    
    .t-amount {
        text-align: left;
    }

    .login-box {
        padding: 2rem 1.5rem;
    }
}



/* Specific view adjustments */
.list-content.animate-in {
    display: flex !important;
}

/* Status Badges for Agenda */
.status-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-confirmed {
    background-color: var(--success-bg);
    color: var(--success);
}

.status-completed {
    background-color: #e0f2fe;
    color: #0369a1;
}

/* Login Screen */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    overflow-y: auto;
    padding: 2rem 1rem;
}

@media (max-width: 768px), (max-height: 800px) {
    .login-overlay {
        align-items: flex-start;
    }
}

.login-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.login-box {
    width: 100%;
    max-width: 480px;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tagline {
    color: var(--text-muted);
    font-size: 1.05rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.center-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.avatar-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
}

.avatar-label img {
    width: 80px;
    height: 80px;
    border-radius: 0;
    object-fit: cover;
    border: 2px dashed var(--border);
    padding: 2px;
    transition: all 0.2s;
}

.avatar-label:hover img {
    border-color: var(--primary);
}

.w-100 {
    width: 100%;
}

/* Kanban Board */
.kanban-board {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    height: 100%;
    min-height: 500px;
}

.kanban-board::-webkit-scrollbar {
    height: 8px;
}
.kanban-board::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
.kanban-board::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.kanban-col {
    flex: 0 0 320px;
    background: rgba(30, 41, 59, 0.4);
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1rem;
    backdrop-filter: var(--glass-blur);
}

.kanban-col-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border);
}

.kanban-col-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.kanban-badge {
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    padding: 0.15rem 0.6rem;
    border-radius: 99px;
    font-weight: 700;
}

.kanban-cards {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    min-height: 150px;
    padding: 0.25rem;
}

.kanban-cards.drag-over {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.kanban-card {
    background: var(--bg-color);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    cursor: grab;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.kanban-card.dragging {
    opacity: 0.5;
}

.k-card-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
    color: var(--text-main);
}

.k-card-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.k-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.75rem;
}

/* --- ENHANCED RESPONSIVENESS --- */
@media (max-width: 1200px) {
    .main-content { padding: 1.5rem 2rem; }
    .summary-cards { gap: 1rem; }
}

/* --- CALENDAR GOOGLE-STYLE UI --- */
.calendar-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 500px;
}

.calendar-header-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: minmax(100px, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    flex: 1;
}

.calendar-day {
    background: var(--bg-color);
    padding: 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    cursor: pointer;
    transition: background-color 0.2s;
    min-height: 100px;
}

.calendar-day:hover, .calendar-day.drag-over {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--primary);
}

.calendar-day.other-month {
    background: rgba(30, 41, 59, 0.2);
    color: var(--text-muted);
}

.calendar-day.today {
    background: rgba(14, 165, 233, 0.05);
}

.calendar-day.today .day-number {
    background: var(--primary);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.day-number {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    padding-left: 0.25rem;
    pointer-events: none;
}

.cal-event-pill {
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    cursor: pointer;
    transition: filter 0.2s;
}

.cal-event-pill:hover {
    filter: brightness(1.1);
}

/* Status variants for pills */
.cal-event-pill.completed { background: #10b981; }
.cal-event-pill.pending { background: #f59e0b; }
.cal-event-pill.canceled { background: #ef4444; }

@media (max-width: 900px) {
    .summary-cards { grid-template-columns: repeat(2, 1fr); }
    .details-section { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .app-container { flex-direction: column; }
    
    .sidebar { 
        width: 100%; 
        height: auto; 
        position: relative; 
        padding: 1rem; 
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    
    .nav-menu { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
    .nav-item { padding: 0.5rem 1rem; border-radius: 8px; }
    .logo { justify-content: center; margin-bottom: 1rem; }
    .sidebar-footer { display: none; }
    
    .main-content { padding: 1.5rem 1rem; width: 100%; }
    
    .month-selector h2 { font-size: 1.25rem; min-width: auto; margin: 0 0.5rem; }
    .card-value { font-size: 1.8rem; }
    
    .transaction-item { flex-direction: column; align-items: stretch; gap: 0.75rem; }
    .t-actions-amount { flex-direction: row !important; justify-content: space-between; width: 100%; }
    .t-amount { text-align: left !important; }
    
    .login-box { width: 90% !important; margin: 1rem auto; padding: 1.5rem !important; }
    .modal { width: 95% !important; margin: 1rem; max-height: 90vh; overflow-y: auto; }
}

@media (max-width: 480px) {
    .summary-cards { grid-template-columns: 1fr; }
    .main-content { padding: 1rem 0.75rem !important; }
    .top-header { flex-wrap: wrap; gap: 1rem; }
    .btn-primary { padding: 0.75rem 1rem; font-size: 0.85rem; width: 100%; justify-content: center; }
    .card-value { font-size: 1.5rem; }
    .t-actions-amount { flex-direction: column !important; align-items: flex-start; gap: 1rem; }
}
/* Botão de Suporte WhatsApp */
.whatsapp-support {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.whatsapp-support:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 30px rgba(14, 165, 233, 0.5);
    background: #0284c7; /* Darker primary */
}

.whatsapp-support i {
    animation: pulse-help 2s infinite;
}

@keyframes pulse-help {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@media (max-width: 768px) {
    .whatsapp-support {
        bottom: 1.5rem;
        right: 1.5rem;
        padding: 0.8rem;
    }
    .whatsapp-support span {
        display: none;
    }
}

/* Modais Específicos e Responsividade: Contrato */
.contract-modal-wrapper {
    max-width: 800px;
    padding: 2rem;
    width: 90%;
}

.contract-paper {
    background: white; 
    color: black; 
    padding: 3rem; 
    margin-top: 1.5rem; 
    font-family: serif; 
    line-height: 1.6;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    min-height: auto;
    border-radius: 4px;
}

.form-actions-contract {
    margin-top: 2rem; 
    display: flex; 
    justify-content: flex-end; 
}

@media (max-width: 600px) {
    .contract-modal-wrapper {
        padding: 1rem;
        width: 100% !important;
        margin: 0;
    }
    .contract-paper {
        padding: 1.5rem 1rem;
    }
}

/* Modo de Impressão Direto via JS */
@media print {
    body * { visibility: hidden; }
    #contractEditor, #contractEditor * { visibility: visible; }
    #contractEditor { position: absolute; left: 0; top: 0; width: 100%; margin: 0; padding: 0 !important; box-shadow: none; border: none; }
    .modal-overlay, .modal { background: none; box-shadow: none; overflow: visible; display: block; }
    .form-actions-contract, #btnCloseContractModal, .modal-header { display: none !important; }
}

/* Trend Badges */
.trend-positive {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}
.trend-negative {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}
.trend-neutral {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
}
