/* Custom styles for Personal Finance Manager */
body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px 10px 0 0 !important;
}

.btn {
    border-radius: 5px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover:not([data-bs-toggle="modal"]) {
    transform: translateY(-2px);
}

.form-control, .form-select {
    border-radius: 5px;
    border: 1px solid #dee2e6;
    padding: 10px 15px;
    transition: border-color 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.table {
    border-radius: 10px;
    overflow: hidden;
}

.table th {
    background-color: #f8f9fa;
    border-top: none;
    font-weight: 600;
    color: #495057;
}

.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85em;
}

.alert {
    border-radius: 10px;
    border: none;
}

.text-primary {
    color: #667eea !important;
}

.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: white;
}

.dropdown-menu {
    border-radius: 10px;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.pagination .page-link {
    border-radius: 5px;
    margin: 0 2px;
    border: 1px solid #dee2e6;
    color: #667eea;
}

.pagination .page-link:hover {
    background-color: #667eea;
    color: white;
}

.pagination .page-item.active .page-link {
    background-color: #667eea;
    border-color: #667eea;
}

/* Dashboard specific styles */
.dashboard-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.dashboard-card h4 {
    font-weight: bold;
    margin-bottom: 5px;
}

.dashboard-card p {
    margin-bottom: 0;
    opacity: 0.9;
}

/* Dashboard card amount styling */
.card h2 {
    word-break: break-all;
    overflow-wrap: break-word;
    line-height: 1.2;
    font-size: 1.5rem;
}

/* Responsive dashboard cards */
@media (max-width: 1200px) {
    .card h2 {
        font-size: 1.3rem;
    }
}

@media (max-width: 992px) {
    .card h2 {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .card h2 {
        font-size: 1.1rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .card-body {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .card h2 {
        font-size: 1rem;
    }
    
    .card h6 {
        font-size: 0.9rem;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* News Ticker Styles */
.news-ticker-container {
    background: linear-gradient(90deg, #dc3545 0%, #fd7e14 50%, #ffc107 100%);
    height: 60px;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
}

.news-ticker-content {
    display: inline-flex;
    align-items: center;
    height: 100%;
    animation: scroll-left 60s linear infinite;
    padding-left: 100%;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    margin-right: 50px;
    color: white;
    font-weight: 500;
    white-space: nowrap;
}

.ticker-label {
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 4px;
    margin-right: 10px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.urgent-label {
    background: rgba(220, 53, 69, 0.8);
    animation: pulse 2s infinite;
}

.upcoming-label {
    background: rgba(255, 193, 7, 0.8);
}

.ticker-text {
    font-size: 0.95rem;
}

.ticker-item .amount {
    font-weight: bold;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 5px;
}

@keyframes scroll-left {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Pause animation on hover */
.news-ticker-container:hover .news-ticker-content {
    animation-play-state: paused;
}

/* Responsive ticker */
@media (max-width: 768px) {
    .news-ticker-container {
        height: 50px;
    }
    
    .ticker-text {
        font-size: 0.85rem;
    }
    
    .ticker-label {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
}

@media (max-width: 576px) {
    .news-ticker-container {
        height: 45px;
    }
    
    .ticker-text {
        font-size: 0.8rem;
    }
    
    .ticker-item {
        margin-right: 30px;
    }
}

/* Success/Error message styles */
.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-info {
    background-color: #cce7ff;
    border-color: #b8daff;
    color: #004085;
}

/* Custom financial summary styles */
.financial-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease;
}

.financial-card:hover {
    transform: translateY(-5px);
}

.financial-card h3 {
    font-weight: bold;
    margin-bottom: 10px;
}

.financial-card p {
    margin-bottom: 0;
    opacity: 0.9;
}