/* Light Mode Design System - BackPay v2 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Sidebar Logo */
.sidebar-logo {
    display: inline-flex;
    text-decoration: none;
}

.sidebar-logo img {
    max-height: 28px;
    width: auto;
}

:root {
    /* Color Palette */
    --bg-body: #F8FAFC;
    /* Light Gray */
    --bg-card: #FFFFFF;
    /* Pure White */
    --bg-sidebar: #1E293B;
    /* Navy Blue */

    /* Text Colors */
    --text-main: #1E293B;
    /* Navy/Black */
    --text-muted: #64748B;
    /* Slate Gray */
    --text-light: #F1F5F9;
    /* White-ish (for sidebar) */

    /* Brand Colors */
    --primary: #10B981;
    /* Emerald Green */
    --primary-hover: #059669;
    --primary-light: #D1FAE5;
    /* Light Green for badges */

    --secondary: #E2E8F0;
    /* Slate 200 (Borders/Secondary buttons) */
    --secondary-hover: #CBD5E1;
    --secondary-text: #1E293B;

    /* Status Colors */
    --success: #22C55E;
    /* Green */
    --success-bg: #DCFCE7;
    --warning: #F59E0B;
    /* Amber */
    --warning-bg: #FEF3C7;
    --danger: #EF4444;
    /* Red */
    --danger-bg: #FEE2E2;
    --info: #3B82F6;
    /* Blue */
    --info-bg: #DBEAFE;

    /* Borders & Shadows */
    --border: 1px solid #E2E8F0;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    font-size: 15px;
    letter-spacing: -0.01em;
    overflow-x: hidden;
}

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

.main-content {
    flex: 1;
    padding: 2rem;
    margin-left: 260px;
    /* Sidebar width */
    max-width: 1200px;
    margin-right: auto;
    transition: all 0.3s ease;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: var(--border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-primary {
    color: var(--primary) !important;
}

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

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

.text-warning {
    color: var(--warning) !important;
}

.text-info {
    color: var(--info) !important;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

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

.btn-secondary {
    background-color: #FFFFFF;
    color: var(--secondary-text);
    border: 1px solid var(--secondary);
}

.btn-secondary:hover {
    background-color: #F8FAFC;
    border-color: #CBD5E1;
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-success:hover {
    background-color: #16a34a;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Inputs */
.form-control {
    width: 100%;
    padding: 10px 14px;
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.1);
}

/* Sidebar (Dark Mode) */
.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    color: var(--text-light);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand i {
    color: var(--primary);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #94A3B8;
    /* Slate 400 */
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.2s;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary);
    border-left-color: var(--primary);
}

/* Mobile Bottom Nav */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #FFFFFF;
    border-top: 1px solid #E2E8F0;
    justify-content: space-around;
    padding: 10px;
    z-index: 999;
}

.mobile-nav-item {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    gap: 4px;
}

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

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    padding: 12px 16px;
    border-bottom: 1px solid #E2E8F0;
    background: #F8FAFC;
}

.table td {
    padding: 16px;
    border-bottom: 1px solid #E2E8F0;
    vertical-align: middle;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background-color: #F8FAFC;
}

/* Badges */
.badge {
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

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

.status-pending {
    background: var(--info-bg);
    color: var(--info);
}

.status-partial {
    background: var(--warning-bg);
    color: #D97706;
}

.status-overdue {
    background: var(--danger-bg);
    color: var(--danger);
}

.status-canceled {
    background: #F1F5F9;
    color: #64748B;
}

/* Utilities */
.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

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

.gap-2 {
    gap: 8px;
}

.gap-4 {
    gap: 16px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-4 {
    margin-bottom: 16px;
}

.text-center {
    text-align: center;
}

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



/* Cycle Toggle */
.cycle-toggle {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.cycle-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 99px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.cycle-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.cycle-btn:hover:not(.active) {
    background: #F1F5F9;
}

.flex-column {
    flex-direction: column;
}

.justify-center {
    justify-content: center;
}

.w-100 {
    width: 100%;
}

.text-sm {
    font-size: 0.875rem;
}

.p-4 {
    padding: 1.5rem !important;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

.animate-up {
    animation: fadeIn 0.3s ease-out forwards;
}

/* ============================================
   DESKTOP ENHANCEMENTS (>768px)
   ============================================ */
@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
}

/* ============================================
   TABLET (max-width: 1024px)
   ============================================ */
@media (max-width: 1024px) {
    .main-content {
        max-width: 100%;
        padding: 1.5rem;
    }
}

/* ============================================
   MOBILE (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 1rem 0.75rem 5rem 0.75rem;
        max-width: 100%;
    }

    .mobile-nav {
        display: flex;
    }

    .desktop-only {
        display: none !important;
    }

    /* Typography */
    h1 {
        font-size: 1.4rem;
    }

    h2 {
        font-size: 1.15rem;
    }

    h3 {
        font-size: 1rem;
    }

    /* Cards */
    .card {
        padding: 16px;
        border-radius: 10px;
        margin-bottom: 12px;
    }

    /* Page header rows: title + action button */
    .d-flex.justify-between.align-center.mb-4 {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px;
    }

    .d-flex.justify-between.align-center.mb-4>.btn,
    .d-flex.justify-between.align-center.mb-4>a.btn {
        width: 100%;
        justify-content: center;
    }

    /* Dashboard stat cards: 2-column grid */
    .d-flex.gap-4.mb-4 {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 10px !important;
    }

    .d-flex.gap-4.mb-4>.card {
        min-width: 0 !important;
        flex: unset !important;
    }

    .d-flex.gap-4.mb-4>.card h2 {
        font-size: 1.3rem !important;
    }

    /* Chart & debtors section: stack vertically */
    .d-flex.gap-4.mb-4>.card[style*="flex: 2"],
    .d-flex.gap-4.mb-4>.card[style*="flex:2"] {
        grid-column: 1 / -1;
    }

    /* Tables: responsive card view */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table th {
        font-size: 0.75rem;
        padding: 8px 10px;
        white-space: nowrap;
    }

    .table td {
        padding: 10px;
        font-size: 0.85rem;
    }

    /* Forms: stack side-by-side fields */
    .d-flex.gap-4.mb-4[style*="flex-wrap"],
    .d-flex.gap-4.mb-3,
    .d-flex.gap-4 {
        flex-direction: column;
    }

    .d-flex.gap-4>div[style*="flex:1"],
    .d-flex.gap-4>div[style*="flex: 1"],
    .d-flex.gap-4>div[style*="flex:2"],
    .d-flex.gap-4>div[style*="flex: 2"] {
        min-width: 0 !important;
        flex: unset !important;
        width: 100%;
    }

    /* Search form: stack filter inputs */
    form.d-flex.gap-2.mb-4 {
        flex-direction: column;
    }

    form.d-flex.gap-2.mb-4>div,
    form.d-flex.gap-2.mb-4>button {
        min-width: 0 !important;
        width: 100%;
    }

    /* Settings page: single column */
    .d-flex.gap-4.fade-in {
        flex-direction: column;
    }

    .d-flex.gap-4.fade-in>div[style*="min-width: 400px"] {
        min-width: 0 !important;
    }

    .d-flex.gap-4.fade-in>div[style*="min-width: 300px"] {
        min-width: 0 !important;
    }

    /* Buttons: full width on mobile */
    .btn-lg,
    .btn[style*="width: 100%"] {
        font-size: 0.95rem;
    }

    /* Action buttons in tables: smaller */
    .d-flex.gap-2 .btn-sm {
        padding: 4px 6px !important;
    }

    /* Badge adjustments */
    .badge {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    /* Hide non-essential table columns */
    .table .hide-mobile {
        display: none;
    }

    /* Auth pages */
    .auth-card {
        margin: 0 auto;
    }

    /* Upgrade overlay */
    .upgrade-overlay {
        width: 90%;
        padding: 20px;
    }
}

/* ============================================
   VERY SMALL SCREENS (max-width: 400px)
   ============================================ */
@media (max-width: 400px) {
    .main-content {
        padding: 0.75rem 0.5rem 5rem 0.5rem;
    }

    h1 {
        font-size: 1.2rem;
    }

    h2 {
        font-size: 1.05rem;
    }

    .card {
        padding: 12px;
    }

    /* Dashboard: single column */
    .d-flex.gap-4.mb-4 {
        grid-template-columns: 1fr !important;
    }

    /* Table text even smaller */
    .table td,
    .table th {
        font-size: 0.75rem;
        padding: 8px 6px;
    }
}

/* Subscription & Limits */
.blur-content {
    filter: blur(5px);
    pointer-events: none;
    user-select: none;
}

.upgrade-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    width: 80%;
    max-width: 400px;
}

.usage-stats {
    background: rgba(0, 0, 0, 0.2);
}

/* =========================================
   Pricing Page Redesign (SaaS Professional)
   ========================================= */

/* Background Override for Pricing Page */
.page-pricing {
    background-color: #F8FAFC !important;
}

/* Page Header */
.pricing-header h1 {
    font-size: 32px;
    font-weight: 800;
    color: #1E293B;
    letter-spacing: -0.03em;
}

.pricing-header p {
    font-size: 16px;
    color: #64748B;
    margin-top: 8px;
}

/* Cycle Toggle Container */
.cycle-toggle-container {
    background: #F1F5F9;
    border-radius: 9999px;
    padding: 4px;
    display: inline-flex;
    gap: 0;
    margin: 32px auto 40px auto;
    position: relative;
    max-width: 440px;
    width: 100%;
}

/* Cycle Button */
.cycle-btn-new {
    background: transparent;
    border: none;
    color: #64748B;
    padding: 12px 24px;
    border-radius: 9999px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.cycle-btn-new:hover:not(.active) {
    color: #1E293B;
}

/* Active State */
.cycle-btn-new.active {
    background: #10B981;
    color: white;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Discount Badge inside Button */
.cycle-badge {
    background: #ECFDF5;
    color: #059669;
    font-size: 11px;
    font-weight: 700;
    border-radius: 9999px;
    padding: 2px 8px;
    margin-left: 6px;
    display: inline-block;
    line-height: 1.4;
}

/* Active Button Badge Override */
.cycle-btn-new.active .cycle-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Pricing Cards Layout */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: flex-start;
    max-width: 1100px;
    margin: 0 auto;
}

/* Base Card */
.pricing-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Featured Card (Essencial) */
.pricing-card.featured {
    border: 2px solid #10B981;
    box-shadow: 0 4px 24px rgba(16, 185, 129, 0.15);
    transform: scale(1.03);
    z-index: 10;
}

/* Popular Badge */
.badge-popular {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: #10B981;
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 9999px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
}

/* Card Header content */
.pricing-plan-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.text-navy {
    color: #1E293B;
}

.text-green {
    color: #10B981;
}

.text-purple {
    color: #7C3AED;
}

/* Price Section */
.pricing-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 4px;
}

.price-value {
    font-size: 48px;
    font-weight: 800;
    color: #1E293B;
    letter-spacing: -0.04em;
    line-height: 1;
}

.price-period {
    font-size: 16px;
    font-weight: 400;
    color: #94A3B8;
}

.price-strike {
    width: 100%;
    text-align: center;
    font-size: 14px;
    color: #94A3B8;
    text-decoration: line-through;
    margin-bottom: 4px;
    height: 20px;
    /* Preserve space */
}

/* Details Section */
.pricing-details {
    min-height: 40px;
    text-align: center;
    margin-bottom: 24px;
}

.details-billed {
    font-size: 13px;
    color: #94A3B8;
}

.details-savings {
    font-size: 13px;
    color: #10B981;
    font-weight: 600;
    margin-top: 2px;
}

/* Description */
.pricing-desc {
    font-size: 14px;
    color: #64748B;
    text-align: center;
    margin-bottom: 24px;
    min-height: 42px;
}

/* Divider */
.pricing-divider {
    border-top: 1px solid #F1F5F9;
    margin: 0 0 24px 0;
}

/* Features List */
.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    flex: 1;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    margin-bottom: 12px;
    color: #1E293B;
    font-weight: 500;
}

.pricing-features li.disabled {
    color: #94A3B8;
    font-weight: 400;
}

.icon-check {
    color: #10B981;
}

.icon-x {
    color: #CBD5E1;
}

/* Action Buttons */
.btn-pricing {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
}

.btn-pricing-free {
    background: #F1F5F9;
    color: #64748B;
    cursor: default;
}

.btn-pricing-essential {
    background: #10B981;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2);
}

.btn-pricing-essential:hover {
    background: #059669;
    transform: translateY(-1px);
}

.btn-pricing-professional {
    background: #FFFFFF;
    border: 2px solid #7C3AED;
    color: #7C3AED;
}

.btn-pricing-professional:hover {
    background: #7C3AED;
    color: white;
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 900px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .pricing-card.featured {
        transform: scale(1);
        order: -1;
        /* Essencial first on mobile */
    }

    .cycle-toggle-container {
        flex-direction: row;
        /* Keep row even on mobile if possible, or wrap */
        padding: 4px;
    }

    .cycle-btn-new {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* =========================================
   DASHBOARD REDESIGN
   ========================================= */

/* Animations */
@keyframes dashFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dashBarGrow {
    from {
        width: 0;
    }

    to {
        width: var(--fill-width);
    }
}

.dash-fade-in {
    opacity: 0;
    animation: dashFadeIn 0.5s ease-out forwards;
}

/* Plan Usage Banner */
.dash-plan-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 13px;
    flex-wrap: wrap;
}

.dash-plan-blue {
    background: #EFF6FF;
    color: #3B82F6;
}

.dash-plan-yellow {
    background: #FEF3C7;
    color: #D97706;
}

.dash-plan-red {
    background: #FEF2F2;
    color: #EF4444;
}

.dash-plan-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dash-plan-icon {
    font-size: 16px;
}

.dash-plan-label {
    font-weight: 500;
}

.dash-plan-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dash-plan-bar-track {
    width: 120px;
    height: 6px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.dash-plan-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: currentColor;
    transition: width 0.8s ease;
}

.dash-plan-pct {
    font-weight: 700;
    font-size: 12px;
}

.dash-plan-upgrade-btn {
    background: transparent;
    border: 1px solid currentColor;
    color: inherit;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}

.dash-plan-upgrade-btn:hover {
    opacity: 0.8;
}

/* Dashboard Header */
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.dash-greeting {
    font-size: 28px;
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 2px;
    letter-spacing: -0.02em;
}

.dash-subtitle {
    font-size: 14px;
    color: #64748B;
    margin: 0;
}

.dash-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dash-date {
    font-size: 13px;
    color: #94A3B8;
    font-weight: 500;
}

.dash-novo-fiado-btn {
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
}

/* Metric Cards Grid */
.dash-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.dash-metric-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.25s, transform 0.25s;
    position: relative;
}

.dash-metric-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Overdue alert card */
.dash-card-alert {
    background: #FEF2F2;
    border-left: 3px solid #EF4444;
}

.dash-metric-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.dash-metric-label {
    font-size: 13px;
    font-weight: 500;
    color: #64748B;
}

/* Icon Badges */
.dash-icon-badge {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.dash-icon-blue {
    background: #DBEAFE;
}

.dash-icon-green {
    background: #DCFCE7;
}

.dash-icon-red {
    background: #FEE2E2;
}

.dash-icon-yellow {
    background: #FEF3C7;
}

.dash-metric-value {
    font-size: 28px;
    font-weight: 700;
    color: #1E293B;
    line-height: 1.2;
    margin-bottom: 4px;
}

.dash-metric-sub {
    font-size: 12px;
    color: #64748B;
    line-height: 1.5;
}

/* Month comparison badge */
.dash-month-diff {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    margin-left: 4px;
}

.dash-diff-up {
    color: #22C55E;
}

.dash-diff-down {
    color: #EF4444;
}

/* Recovery Progress Bar */
.dash-recovery-bar {
    height: 6px;
    background: #E2E8F0;
    border-radius: 3px;
    margin: 8px 0 6px;
    overflow: hidden;
}

.dash-recovery-fill {
    height: 100%;
    width: 0;
    border-radius: 3px;
    background: var(--fill-color, #22C55E);
    transition: width 0.3s;
}

.dash-recovery-fill.dash-animate {
    animation: dashBarGrow 1s ease-out forwards;
}

/* Middle Row: Chart + Actions */
.dash-middle {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 16px;
    margin-bottom: 24px;
}

.dash-chart-card,
.dash-actions-card,
.dash-debtors-card,
.dash-activities-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.dash-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.dash-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1E293B;
    margin: 0;
}

.dash-section-sub {
    font-size: 12px;
    color: #94A3B8;
    margin: 2px 0 0 0;
}

.dash-chart-wrap {
    height: 250px;
    position: relative;
}

/* Actions Column */
.dash-actions-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dash-action-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.dash-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    width: 100%;
    text-align: left;
}

.dash-action-primary {
    background: #10B981;
    color: white;
}

.dash-action-primary:hover {
    background: #059669;
}

.dash-action-outline {
    background: #FFFFFF;
    color: #1E293B;
    border: 1px solid #E2E8F0;
}

.dash-action-outline:hover {
    background: #F8FAFC;
    border-color: #CBD5E1;
}

/* Debtors List */
.dash-debtors-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 12px;
}

.dash-debtor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #F1F5F9;
}

.dash-debtor-item:last-child {
    border-bottom: none;
}

.dash-debtor-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dash-debtor-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.dash-debtor-info {
    display: flex;
    flex-direction: column;
}

.dash-debtor-name {
    font-size: 14px;
    font-weight: 500;
    color: #1E293B;
}

.dash-debtor-amount {
    font-size: 13px;
    font-weight: 600;
    color: #EF4444;
}

.dash-debtor-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dash-debtor-days {
    font-size: 12px;
    color: #94A3B8;
    white-space: nowrap;
}

.dash-cobrar-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #DCFCE7;
    color: #16a34a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s;
}

.dash-cobrar-btn:hover {
    background: #22C55E;
    color: white;
}

/* Empty State */
.dash-empty-state {
    text-align: center;
    color: #94A3B8;
    padding: 24px 16px;
    font-size: 14px;
}

/* Activities Card */
.dash-activity-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.dash-activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #F1F5F9;
}

.dash-activity-item:last-child {
    border-bottom: none;
}

.dash-activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.dash-activity-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.dash-activity-desc {
    font-size: 14px;
    color: #1E293B;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-activity-time {
    font-size: 12px;
    color: #94A3B8;
}

.dash-see-all {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 500;
    color: #3B82F6;
    text-decoration: none;
}

.dash-see-all:hover {
    text-decoration: underline;
}

/* Mobile FAB */
.dash-fab {
    display: none;
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: #10B981;
    color: white;
    border-radius: 16px;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
    z-index: 90;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.dash-fab:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* =========================================
   DASHBOARD RESPONSIVE
   ========================================= */

@media (max-width: 1024px) {
    .dash-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .dash-middle {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dash-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dash-header-right {
        width: 100%;
        justify-content: flex-end;
    }

    .dash-greeting {
        font-size: 24px;
    }

    .dash-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .dash-metric-card {
        padding: 16px;
    }

    .dash-metric-value {
        font-size: 22px;
    }

    .dash-icon-badge {
        width: 34px;
        height: 34px;
        font-size: 15px;
        border-radius: 10px;
    }

    .dash-middle {
        grid-template-columns: 1fr;
    }

    .dash-chart-wrap {
        height: 200px;
    }

    .dash-plan-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .dash-plan-right {
        width: 100%;
    }

    .dash-plan-bar-track {
        flex: 1;
    }

    .dash-fab {
        display: flex;
    }

    .dash-activity-desc {
        white-space: normal;
    }
}

@media (max-width: 480px) {
    .dash-metrics {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .dash-metric-card {
        padding: 14px 16px;
    }

    .dash-metric-value {
        font-size: 24px;
    }

    .dash-chart-card,
    .dash-actions-card,
    .dash-debtors-card,
    .dash-activities-card {
        padding: 16px;
    }
}