:root {
    --sidebar-width: 260px;
    --bottom-nav-height: 64px;
    --primary-dark: #0a58ca;
}

body.app-body {
    background: #f4f6f9;
    min-height: 100vh;
}

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #0d6efd 0%, #0a58ca 100%);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
}

.sidebar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,.2);
}

.sidebar-nav .nav-link {
    color: rgba(255,255,255,.85);
    padding: .75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
    border-left: 3px solid transparent;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background: rgba(255,255,255,.12);
    color: #fff;
    border-left-color: #fff;
}

.app-content {
    flex: 1;
    margin-left: 0;
    padding-bottom: calc(var(--bottom-nav-height) + 1rem);
}

@media (min-width: 992px) {
    .app-content {
        margin-left: var(--sidebar-width);
        padding-bottom: 0;
    }
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 900;
}

.kpi-card {
    border: 0;
    border-radius: .75rem;
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
    transition: transform .15s;
}

.kpi-card:hover {
    transform: translateY(-2px);
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: #fff;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1100;
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #6c757d;
    font-size: .7rem;
    gap: .15rem;
}

.bottom-nav a i {
    font-size: 1.25rem;
}

.bottom-nav a:hover,
.bottom-nav a.active {
    color: #0d6efd;
}

.table-responsive-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.login-body {
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 1rem;
}

.login-card {
    background: #fff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 1rem 3rem rgba(0,0,0,.2);
}

.status-badge-pending { background: #ffc107; color: #000; }
.status-badge-paid { background: #198754; color: #fff; }
.status-badge-overdue { background: #dc3545; color: #fff; }
.status-badge-cleared { background: #198754; color: #fff; }
.status-badge-bounced { background: #dc3545; color: #fff; }

.chart-container {
    position: relative;
    height: 280px;
}

@media (max-width: 576px) {
    .kpi-value { font-size: 1.15rem; }
}
