@import url('https://fonts.googleapis.com/css2?family=Anuphan:wght@300;400;500;700&display=swap');

/* === General Styles === */
body {
    font-family: 'Anuphan', sans-serif;
    background-color: #FDF6F7;
    font-size: 16px;
    padding-top: 70px; /* For fixed-top navbar */
}

/* === Components === */

.card {
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    border: none;
}

.card-header {
    background-color: #E6A4B4;
    color: white;
    font-weight: 500;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.btn-primary {
    background-color: #E6A4B4;
    border-color: #E6A4B4;
}

.btn-primary:hover {
    background-color: #D990A2;
    border-color: #D990A2;
}

.btn-pastel-blue {
    background-color: #92C7CF;
    border-color: #92C7CF;
    color: white;
}

.btn-pastel-blue:hover {
    background-color: #80BCBD; /* A slightly darker shade */
    border-color: #80BCBD;
}

.navbar-custom {
    background-color: #F8E8EE;
}

.navbar-custom .navbar-brand i {
    color: #E6A4B4;
}

.navbar-custom .nav-link {
    color: #85646E;
}

.navbar-custom .nav-link.active, .navbar-custom .nav-link:hover {
    color: #E6A4B4;
}

.table-custom-header {
    background-color: #F8E8EE;
    color: #85646E;
}

.table-striped>tbody>tr:nth-of-type(odd)>* {
    background-color: #F8E8EE;
}

.table-hover>tbody>tr:hover>* {
    background-color: #F3D9E0;
}

.table {
    /* Use default text color */
}

.nav-tabs .nav-link.active, .nav-tabs .nav-link:hover {
    color: #85646E;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
}

.nav-tabs .nav-link {
    color: #85646E;
}

/* === Utility Classes === */

/* Text Colors */
.expense { 
    color: #F08A9A; /* Pastel Red/Pink */
    font-weight: 500;
}

.income { 
    color: #79B4A9; /* Pastel Teal/Green */
    font-weight: 500;
}

/* Icon Colors */
.icon-pink {
    color: #E6A4B4;
}

/* === Page Specific Styles === */

/* summary.php */
/* Override default balance colors to use Bootstrap variables for consistency */
.balance-positive {
    color: var(--bs-success); /* Bootstrap success color (green) */
}
.balance-negative {
    color: var(--bs-danger); /* Bootstrap danger color (red) */
}
/* Progress bar for expense summary */
.progress {
    height: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
}

.progress-bar.bg-pastel-blue {
    background-color: #92C7CF; /* Pastel Blue */
}


/* index.php */
.reminder-item {
    cursor: grab;
}
/* Styles for AJAX-loaded content in index.php */
.summary-header-text {
    font-size: 0.85em;
}

.summary-table {
    font-size: 0.9em;
}

/* Custom colors for the summary table */
.summary-table .income {
    color: #28a745; /* A darker, standard green */
}

.summary-table .expense {
    color: #dc3545; /* A standard, strong red */
}

/* === Media Queries for Responsiveness === */
@media (max-width: 767.98px) {
    body {
        font-size: 15px;
    }
    h1 {
        font-size: 1.8rem;
    }
    .responsive-table {
        font-size: 0.85rem; /* Reduce font size */
    }
    .responsive-table th, .responsive-table td {
        padding: 0.5rem 0.25rem; /* Reduce padding */
    }
    .responsive-table .col-desc {
        max-width: 100px; /* Adjust description column width */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .responsive-table .col-date {
        display: none; /* Hide date column on mobile */
    }
}

/* === index.php specific styles === */

/* Custom tab colors for transaction modal */
#type-tabs .nav-link.expense-tab.active,
#type-tabs .nav-link.expense-tab:hover {
    background-color: #dc3545; /* Bootstrap Danger */
    color: white;
}
#type-tabs .nav-link.income-tab.active,
#type-tabs .nav-link.income-tab:hover {
    background-color: #198754; /* Bootstrap Success */
    color: white;
}
.bg-premium-gold {
    background: linear-gradient(145deg, #e7c35f, #b8860b); /* Gold gradient */
    color: white;
    border: 1px solid #c89c0c;
    box-shadow: 0 0 12px rgba(218, 165, 32, 0.6); /* Gold glow effect */
}
.bg-pastel-green {
    background: linear-gradient(145deg, #a0d1c7, #84b9af); /* Lighter Pastel Green gradient */
    color: white;
    border: 1px solid #84b9af;
    box-shadow: 0 0 12px rgba(160, 209, 199, 0.6); /* Lighter Pastel Green glow effect */
}
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    border-radius: 30px; /* Pill shape */
    padding: 0.8rem 1.2rem;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
    z-index: 1040;
}
.fab .vr {
    height: 20px;
    align-self: center;
}
.category-btn {
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 5px 12px;
}

/* === profile.php specific styles === */
.border-golden { border-color: #B8860B !important; }
.text-golden { color: #B8860B !important; }
.btn-outline-golden { color: #B8860B; border-color: #B8860B; }
.btn-outline-golden:hover { color: #fff; background-color: #B8860B; border-color: #B8860B; }

.border-silver { border-color: #8a95a5 !important; }
.text-silver { color: #5c677d !important; }
.btn-outline-silver { color: #5c677d; border-color: #8a95a5; }
.btn-outline-silver:hover { color: #fff; background-color: #5c677d; border-color: #5c677d; }

/* === login.php specific styles === */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
}
.app-features h1 {
    color: var(--bs-primary);
}
.app-features .list-unstyled li {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}
.app-features .list-unstyled i {
    color: var(--bs-pink);
    font-size: 1.5rem;
    width: 35px;
}

/* === report.php specific styles === */
.category-btn {
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 5px 12px;
    background-color: #343a40;
    color: #f8f9fa;
}

/* === index.php specific styles === */
#summary-card {
    cursor: pointer;
}

/* === achievements.php specific styles === */
.achievement-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: 1px solid #e9ecef;
    background-color: #f8f9fa; /* Light gray for locked */
    opacity: 0.7;
}
.achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08) !important;
}

.achievement-card.unlocked {
    opacity: 1;
    border-color: #ffc107;
    background: linear-gradient(145deg, #ffffff, #fffbeb);
}

.icon-container {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    position: relative;
}

.achievement-card.unlocked .achievement-icon {
    color: #ffc107;
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
}
.achievement-card.unlocked .icon-container {
    background-color: #fff3cd;
}

.achievement-icon {
    font-size: 3rem;
    color: #adb5bd; /* Muted gray for locked icon */
}

/* === self_development_stats.php specific styles === */
.bg-light-success {
    background-color: #e7f4e8 !important;
}
.bg-light-info {
    background-color: #e6f6f8 !important;
}
.bg-light-warning {
    background-color: #fff8e6 !important;
}
.bg-light-danger {
    background-color: #fbe9eb !important;
}

/* === index.php FAB button positioning === */
.fab {
    left: 50%;
    transform: translateX(-50%);
}

/* === Animation === */
@keyframes flash-success {
  0% { background-color: #d1e7dd; } /* Bootstrap's success-subtle color */
  100% { background-color: transparent; }
}

.flash-update {
  animation: flash-success 1.5s ease-out;
}
