/**
 * ORGANIZAP - Sistema de Gestão Financeira
 * Arquivo CSS Principal
 * Autor: OrganizaP Team
 * Versão: 2.0
 */

/* ============================================
   VARIÁVEIS CSS
   ============================================ */
:root {
    /* Cores Principais */
    --primary: #01CEF9;
    --primary-dark: #00A8D1;
    --primary-light: #33D8FB;
    --secondary: #6C757D;
    --success: #4CAF50;
    --danger: #F44336;
    --warning: #FFC107;
    --info: #2196F3;
    --light: #F8F9FA;
    --dark: #212529;
    
    /* Cores de Texto */
    --text-primary: #212529;
    --text-secondary: #6C757D;
    --text-muted: #9E9E9E;
    --text-white: #FFFFFF;
    
    /* Cores de Fundo */
    --bg-body: #F5F7FA;
    --bg-white: #FFFFFF;
    --bg-light: #F8F9FA;
    --bg-dark: #1A1D23;
    
    /* Sidebar */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --sidebar-bg: #1A1D23;
    --sidebar-text: #B4B7BD;
    --sidebar-hover: #252932;
    --sidebar-active: var(--primary);
    
    /* Topbar */
    --topbar-height: 70px;
    --topbar-bg: #FFFFFF;
    --topbar-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    
    /* Bordas */
    --border-radius: 8px;
    --border-radius-sm: 4px;
    --border-radius-lg: 12px;
    --border-color: #E0E0E0;
    
    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
    
    /* Transições */
    --transition: all 0.3s ease;
    
    /* Fontes */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-base: 14px;
    --font-size-sm: 12px;
    --font-size-lg: 16px;
    --font-size-xl: 18px;
}

/* ============================================
   RESET E BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-body);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   LAYOUT PRINCIPAL COM SIDEBAR
   ============================================ */
body.has-sidebar {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    overflow-y: auto;
    overflow-x: hidden;
    transition: var(--transition);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    color: var(--text-white);
}

.logo i {
    color: var(--primary);
    font-size: 28px;
}

.logo strong {
    color: var(--primary);
}

.sidebar-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--sidebar-text);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
}

.sidebar-user {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.user-avatar {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--primary);
    object-fit: cover;
}

.premium-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 12px;
    border: 2px solid var(--sidebar-bg);
}

.user-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 4px;
}

.user-email {
    font-size: 12px;
    color: var(--sidebar-text);
    margin-bottom: 8px;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-premium {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: var(--text-white);
}

.badge-free {
    background: rgba(255, 255, 255, 0.1);
    color: var(--sidebar-text);
}

/* Menu */
.sidebar-menu {
    flex: 1;
    padding: 20px 0;
}

.menu-list {
    list-style: none;
}

.menu-item {
    margin-bottom: 4px;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--sidebar-text);
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.menu-link:hover {
    background: var(--sidebar-hover);
    color: var(--text-white);
}

.menu-item.active .menu-link {
    background: var(--sidebar-hover);
    color: var(--primary);
    border-left-color: var(--primary);
}

.menu-link i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 12px 20px;
}

.premium-item .menu-link {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 165, 0, 0.1));
    color: #FFD700;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 12px;
    color: var(--sidebar-text);
}

/* Main Wrapper */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

/* Topbar */
.topbar {
    position: sticky;
    top: 0;
    height: var(--topbar-height);
    background: var(--topbar-bg);
    box-shadow: var(--topbar-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 999;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Profile Selector */
.profile-selector {
    position: relative;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.profile-btn:hover {
    background: var(--primary);
    color: var(--text-white);
    border-color: var(--primary);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    display: none;
    z-index: 1000;
}

.profile-dropdown.show {
    display: block;
}

.profile-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    transition: var(--transition);
}

.profile-option:hover {
    background: var(--bg-light);
}

.profile-option.active {
    background: var(--primary);
    color: var(--text-white);
}

/* Notifications */
.notification-btn {
    position: relative;
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    transition: var(--transition);
}

.notification-btn:hover {
    color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger);
    color: var(--text-white);
    font-size: 10px;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    transition: var(--transition);
}

.user-menu-btn:hover {
    opacity: 0.8;
}

.user-menu-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    object-fit: cover;
}

.user-menu-name {
    font-weight: 600;
    color: var(--text-primary);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    display: none;
    z-index: 1000;
}

.user-dropdown.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--bg-light);
}

.dropdown-item.text-danger {
    color: var(--danger);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px;
}

/* Footer */
.footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding: 20px 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.footer-right {
    display: flex;
    gap: 16px;
    align-items: center;
}

.footer-link {
    color: var(--text-secondary);
    font-size: 13px;
}

.footer-link:hover {
    color: var(--primary);
}

.footer-divider {
    color: var(--border-color);
}

/* ============================================
   PÁGINAS PÚBLICAS (Login/Register)
   ============================================ */
.public-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.public-header {
    padding: 20px 40px;
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
}

.logo-public {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-public i {
    color: var(--primary);
    font-size: 32px;
}

.logo-public strong {
    color: var(--primary);
}

.public-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.public-footer {
    padding: 20px;
    text-align: center;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 13px;
}

/* Auth Container */
.auth-container {
    display: flex;
    width: 100%;
    max-width: none;
    background: var(--bg-white);
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    min-height: 100vh;
}

.auth-box {
    flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
}

.auth-logo {
    text-align: center;
    margin-bottom: 40px;
}

.auth-logo i {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 16px;
}

.auth-logo h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.auth-description {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    font-family: var(--font-family);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(1, 206, 249, 0.1);
}

.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-check-label {
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
}

.forgot-link {
    font-size: 14px;
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(1, 206, 249, 0.3);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-link {
    color: var(--primary);
    font-weight: 600;
}

.auth-features {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 12px;
}

.feature-item i {
    font-size: 24px;
    color: var(--primary);
}

/* Auth Image */
.auth-image {
    flex: 1;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.auth-image-overlay {
    color: var(--text-white);
}

.auth-image-overlay h2 {
    font-size: 32px;
    margin-bottom: 16px;
}

.auth-image-overlay p {
    font-size: 16px;
    margin-bottom: 32px;
    opacity: 0.9;
}

.auth-benefits {
    list-style: none;
}

.auth-benefits li {
    display: flex;
    align-items: start;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 14px;
}

.auth-benefits i {
    font-size: 20px;
    margin-top: 2px;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    align-items: start;
    gap: 12px;
}

.alert-success {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #81C784;
}

.alert-error {
    background: #FFEBEE;
    color: #C62828;
    border: 1px solid #E57373;
}

.alert-warning {
    background: #FFF3E0;
    color: #E65100;
    border: 1px solid #FFB74D;
}

.alert-info {
    background: #E3F2FD;
    color: #1565C0;
    border: 1px solid #64B5F6;
}

.alert-dismissible {
    position: relative;
    padding-right: 50px;
}

.alert-close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.5;
    transition: var(--transition);
}

.alert-close:hover {
    opacity: 1;
}

.alert-icon {
    font-size: 20px;
}

.alert-content {
    flex: 1;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
    color: var(--text-white);
}

.loading-spinner i {
    font-size: 48px;
    margin-bottom: 16px;
}

.loading-spinner p {
    font-size: 16px;
}

/* ============================================
   RESPONSIVO
   ============================================ */
@media (max-width: 1024px) {
    .auth-image {
        display: flex !important;
        min-height: 400px;
    }
    
    .auth-container {
        max-width: 100%;
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .topbar {
        padding: 0 20px;
    }
    
    .page-title {
        font-size: 18px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .auth-box {
        padding: 40px 30px;
    }
    
    .auth-features {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .user-menu-name {
        display: none;
    }
    
    .topbar-right {
        gap: 12px;
    }
    
    .profile-selector {
        display: none;
    }
}

/* ============================================
   COMPONENTES ADICIONAIS
   ============================================ */

/* Cards */
.card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 24px;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-body {
    padding: 0;
}

.card-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-white);
    flex-shrink: 0;
}

.stat-icon.income {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
}

.stat-icon.expense {
    background: linear-gradient(135deg, #F44336, #E57373);
}

.stat-icon.balance {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.stat-icon.goal {
    background: linear-gradient(135deg, #9C27B0, #BA68C8);
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.stat-change {
    font-size: 12px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--danger);
}

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 24px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
}

.table thead {
    background: var(--bg-light);
}

.table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: var(--bg-light);
}

/* Action Buttons */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-secondary {
    background: var(--secondary);
    color: var(--text-white);
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: var(--success);
    color: var(--text-white);
}

.btn-success:hover {
    background: #45a049;
}

.btn-danger {
    background: var(--danger);
    color: var(--text-white);
}

.btn-danger:hover {
    background: #da190b;
}

.btn-warning {
    background: var(--warning);
    color: var(--text-white);
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.btn-group {
    display: inline-flex;
    gap: 8px;
}

/* Badges */
.badge-sm {
    padding: 2px 8px;
    font-size: 10px;
}

.badge-success {
    background: var(--success);
    color: var(--text-white);
}

.badge-danger {
    background: var(--danger);
    color: var(--text-white);
}

.badge-warning {
    background: var(--warning);
    color: var(--text-white);
}

.badge-info {
    background: var(--info);
    color: var(--text-white);
}

.badge-secondary {
    background: var(--secondary);
    color: var(--text-white);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Charts Container */
.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 24px;
}

.chart-wrapper {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-state p {
    margin-bottom: 24px;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 24px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--primary);
    color: var(--text-white);
    border-color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    color: var(--text-white);
    border-color: var(--primary);
}

/* Progress Bar */
.progress {
    height: 12px;
    background: var(--bg-light);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 20px;
    transition: width 0.6s ease;
}

.progress-bar.success {
    background: linear-gradient(90deg, var(--success), #66BB6A);
}

.progress-bar.warning {
    background: linear-gradient(90deg, var(--warning), #FFD54F);
}

.progress-bar.danger {
    background: linear-gradient(90deg, var(--danger), #E57373);
}

/* Filters */
.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    font-family: var(--font-family);
    background: var(--bg-white);
    cursor: pointer;
    transition: var(--transition);
}

.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(1, 206, 249, 0.1);
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 24px;
}

.tab {
    padding: 12px 24px;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.tab:hover {
    color: var(--primary);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Color Picker */
.color-picker {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* Icon Picker */
.icon-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.icon-option {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 20px;
}

.icon-option:hover {
    background: var(--bg-light);
    border-color: var(--primary);
}

.icon-option.selected {
    background: var(--primary);
    color: var(--text-white);
    border-color: var(--primary);
}

/* Transaction Item */
.transaction-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.transaction-item:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.transaction-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-white);
}

.transaction-info {
    flex: 1;
}

.transaction-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.transaction-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.transaction-amount {
    font-size: 18px;
    font-weight: 700;
}

.transaction-amount.income {
    color: var(--success);
}

.transaction-amount.expense {
    color: var(--danger);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-up {
    animation: slideUp 0.3s ease;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.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-secondary {
    color: var(--text-secondary) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.fw-bold {
    font-weight: 700;
}

.fw-semibold {
    font-weight: 600;
}

.fw-normal {
    font-weight: 400;
}

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px !important; }
.mb-2 { margin-bottom: 16px !important; }
.mb-3 { margin-bottom: 24px !important; }
.mb-4 { margin-bottom: 32px !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 24px !important; }
.mt-4 { margin-top: 32px !important; }

.d-flex { display: flex !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-none { display: none !important; }

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.rounded { border-radius: var(--border-radius); }
.rounded-circle { border-radius: 50%; }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Print Styles */
@media print {
    .sidebar,
    .topbar,
    .footer,
    .btn,
    .alert,
    .no-print {
        display: none !important;
    }
    
    .main-wrapper {
        margin-left: 0 !important;
    }
    
    .main-content {
        padding: 0 !important;
    }
}