/* Base Styles */
:root {
    --primary-color: #b43232;
    --secondary-color: #B22222;
    --accent-color: #f14444;
    --danger-color: #f72585;
    --success-color: #4cc9f0;
    --warning-color: #f8961e;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --border-radius: 4px;
    --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}


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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f7fa; 

}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

button, .btn {
    cursor: pointer;
    transition: var(--transition);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background-color: white;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}
    .navbar img {
    max-height: 37px;
    padding: 0px;
    margin: 0px;
}
  

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links .btn-primary {
    padding-left: 10px;
    padding-right: 10px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    border: none;
    font-weight: 500;
}

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

.learnmore {
    margin-top: 5px;
}

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

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

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

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

.btn-danger:hover {
    opacity: 0.9;
}

/* button for yearly or monthly income selection */
.btn-group-toggle .btn {
    cursor: pointer;
}

.btn-group-toggle .btn.active {
    background-color: #c9aeae;
    color: white;
}

.btn-group-toggle .btn:not(.active) {
    background-color: white;
    color: #c9aeae;
}

/* Homepage Specific Styles */
.hero-section {
   /* background-color: #4361ee; */
    color: #000;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.hero-content {
    max-width: 600px;
    z-index: 2;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-content .lead {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.hero-image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero-image img {
    max-width: 100%;
    height: auto;
    display: block;
}

.features-section {
    padding-bottom: 4rem;
    /* background-color: #f8f9fa; */
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;   
}

.feature-card svg {
    float: left;
    margin-right: 10px;
    height: 96%;
    display: flex;
    background: #000000;
    padding: 5px;
    border-radius: 5px;
    margin-bottom: 15px;
    margin-top: 10px;
}

svg {
    fill: #fff;
}

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

.feature-icon {
    font-size: 2.5rem;
    /* margin-bottom: 1rem; */
    border: solid #000;
    width: 80px;
    margin: auto;
    border-radius: 50%;
    padding: 5px;
    background: #000;
}

.feature-card h3 {
    font-size: 1.55rem;
    margin-bottom: 1rem;
}

.testimonials-section {
    padding: 4rem 0;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-top: 4px solid #4361ee;
}

.testimonial-content {
    font-style: italic;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.testimonial-author {
    font-weight: bold;
    color: #4361ee;
}

.cta-section {
    background-color: #f5f7fa;
    color: #000;
    padding: 4rem 0;
    text-align: center;
    border-radius: 10px;
    border: solid 1px #e1e2e3;
    }

.cta-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .hero-section .container {
        flex-direction: column;
        text-align: center;
    }
    
    .cta-buttons {
        justify-content: center;
    }
    
    .hero-image {
        margin-top: 2rem;
    }
}

/* Cards */
.card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-header .mt-2 a {
    font-size: 13px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1rem;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.table th, .table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.table th {
    font-weight: 600;
    background-color: #f8f9fa;
}

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

.table-responsive {
    overflow-x: auto;
}

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

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

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Calendar Dropdown  */
.calendar-cell {
    position: relative;
}

.calendar-dropdown {
    display: inline-block;
    position: relative;
}

.calendar-button {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.calendar-button:hover {
    background: #e9ecef;
}

.calendar-menu {
    display: none;
    position: relative;
    right: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border: 1px solid #ddd;
    border-radius: 4px;
    z-index: 100;
    margin-top: 1px;
}

.calendar-dropdown:hover .calendar-menu,
.calendar-dropdown:focus-within .calendar-menu {
    display: block;
}

.calendar-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    text-decoration: none;
    color: #333;
}

.calendar-option:hover {
    background: #f8f9fa;
}

.option-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    font-weight: bold;
}

.google-option .option-icon {
    background: #4285F4;
    color: white;
    border-radius: 4px;
}

.outlook-option .option-icon {
    background: #0072C6;
    color: white;
    border-radius: 4px;
}

.apple-option .option-icon {
    background: #000;
    color: white;
    border-radius: 4px;
}

.default-option .option-icon {
    background: #6c757d;
    color: white;
    border-radius: 4px;
}

.calendar-divider {
    height: 1px;
    background: #eee;
    margin: 5px 0;
}

/* Dashboard */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    text-align: center;
}

.stat-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.stat-card p {
    color: var(--gray-color);
}

/* pie chart and new cards */

.stat-card-success {
    border-left: 4px solid var(--success-color);
}

.stat-card-danger {
    border-left: 4px solid var(--danger-color);
}

.stat-card-warning {
    border-left: 4px solid var(--warning-color);
}

/* Chart responsive sizing - chartjs pie chart */
.chart-container {
    min-height: 300px;
}

@media (max-width: 768px) {
    .chart-container {
        height: 300px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

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

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .nav-links a {
        padding: 0.5rem;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    header {
    position: relative; 
}
}

/* Bar Chart - category spending */

.bar-chart {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.bar-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.bar-label {
    display: flex;
    justify-content: space-between;
    width: 200px;
    margin-right: 1rem;
}

.bar-label .percentage {
    font-weight: bold;
    min-width: 50px;
    text-align: right;
}

.bar-label .category {
    margin-left: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bar-container {
    flex-grow: 1;
    height: 30px;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.bar {
    height: 100%;
    transition: width 0.5s ease;
    position: relative;
}

.bar::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: rgba(255,255,255,0.5);
}

@media (max-width: 768px) {
    .bar-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .bar-label {
        width: 100%;
        margin-bottom: 0.5rem;
        margin-right: 0;
    }
    
    .bar-container {
        width: 100%;
    }
}

/* Quick Add Page  */
.quickadd-filters {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.quickadd .row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}
.subscription-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(0,0,0,0.1);
}
.subscription-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1);
}
.subscription-card .form-check-input {
  /*  position: absolute; */
    top: 1rem;
    right: 1rem;
    width: 1.25rem;
    height: 1.25rem;
    float: right;
}

.subscription-card .form-check-label {
    display: block;
    padding-right: 1.5rem;
}

.fixed-bottom {
   /* position: fixed; */
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1030;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    background: #ffe947;
    padding: 10px;
}
}

#selectedCount {
    font-weight: 500;
    color: #4361ee;
}


/* newsletter Subscription */
.card-body.newsletter {
  padding: 1.5rem;
}

.feature-list.newsletter {
  list-style: none;
  padding: 0;
}
.feature-list.newsletter li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #ddd;
}
.newsletter {
  max-width: 700px;
  margin: auto;
}
.button-group.newsletter {
  text-align: center;
  padding: 10px;
}
.newsletter .btn {
  width: 45%;
  margin-bottom: 5px;
}
.newsletter h1 {
  text-align: center;
  font-size: 25px;
}
p.intro {
  text-align: center;
}

.newsletter p {
    margin-top: 10px;
    margin-bottom: 20px;
    font-size: 17px;
}
/* Public subscription page */
.list-group-item {
  padding: 1rem 1.5rem;
  border-left: none;
  border-right: none;
}
.list-group-item:nth-child(odd) {
  background-color: rgba(180, 50, 50, 0.05);
}



/*** Footer ***/

.site-footer {
    background-color: rgb(245, 245, 247);
    color: #000;
    padding-top: 5px;
    font-size: 0.9rem;
    margin-top: 20px;
    box-shadow: 2px 2px 2px 2px gray;    
}

.footer-top {
    padding-bottom: 30px;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px
}

.footer-column h3 {    
    color: #000;
    font-size: 1.1rem;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-column p {
    line-height: 1.6;
    margin-bottom: 15px;
}

.footer-links,
.social-links {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #000;
}

.footer-links li,
.social-links li {
    margin-bottom: 8px;
}

.footer-links a,
.social-links a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover,
.social-links a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.footer-copyright {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 15px 0;
    text-align: center;
    font-size: 0.85rem;
}

.footer-legal {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 10px 0;
}

.footer-legal ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-legal a {
    color: #000;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s;
}

.footer-legal a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-legal ul {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}