/* Persephone — brand colors derived from the pomegranate / gold / night logo */
:root {
    --persephone-gold:        #d4af37;
    --persephone-gold-bright: #f1c95a;
    --persephone-gold-dim:    #8a7325;
    --persephone-pomegranate: #a8232b;
    --persephone-wine:        #6b1820;
    --persephone-night:       #11100c;
    --persephone-ink:         #1a1812;
}

/* Override Bootstrap primary with Persephone wine so default .btn-primary,
   .bg-primary, .text-primary, links etc. pick up the brand tone. */
[data-bs-theme="dark"] {
    --bs-primary:      #a8232b;
    --bs-primary-rgb:  168, 35, 43;
    --bs-link-color:   var(--persephone-gold);
    --bs-link-color-rgb: 212, 175, 55;
    --bs-link-hover-color: var(--persephone-gold-bright);
    --bs-link-hover-color-rgb: 241, 201, 90;
}

/* Buttons */
.btn-primary {
    --bs-btn-bg: var(--persephone-pomegranate);
    --bs-btn-border-color: var(--persephone-pomegranate);
    --bs-btn-hover-bg: #c12a33;
    --bs-btn-hover-border-color: #c12a33;
    --bs-btn-active-bg: var(--persephone-wine);
    --bs-btn-active-border-color: var(--persephone-wine);
    --bs-btn-disabled-bg: var(--persephone-wine);
    --bs-btn-disabled-border-color: var(--persephone-wine);
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
}
.btn-outline-primary {
    --bs-btn-color: var(--persephone-gold);
    --bs-btn-border-color: var(--persephone-gold-dim);
    --bs-btn-hover-bg: var(--persephone-pomegranate);
    --bs-btn-hover-border-color: var(--persephone-pomegranate);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--persephone-wine);
    --bs-btn-active-border-color: var(--persephone-wine);
    --bs-btn-active-color: #fff;
}

/* Links */
a { color: var(--persephone-gold); }
a:hover { color: var(--persephone-gold-bright); }
.navbar a, .dropdown-menu a, .btn a, .alert a, .card-header a { color: inherit; }

/* bg-primary utility */
.bg-primary { background-color: var(--persephone-pomegranate) !important; }
.text-primary { color: var(--persephone-pomegranate) !important; }

/* Navbar: deep ink with a gold underline */
.persephone-navbar {
    background: linear-gradient(180deg, var(--persephone-night) 0%, var(--persephone-ink) 100%) !important;
    border-bottom: 2px solid var(--persephone-gold);
}
.persephone-navbar .nav-link {
    color: rgba(244, 232, 200, 0.78);
}
.persephone-navbar .nav-link:hover,
.persephone-navbar .nav-link.active {
    color: var(--persephone-gold-bright);
}
.persephone-navbar .navbar-brand {
    color: var(--persephone-gold);
}
.persephone-logo {
    height: 38px;
    width: 38px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid var(--persephone-gold-dim);
    box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
}
.persephone-wordmark {
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--persephone-gold);
}

.text-persephone-gold { color: var(--persephone-gold) !important; }
.text-persephone-wine { color: var(--persephone-pomegranate) !important; }

/* Auth pages — atmospheric backdrop, hero logo */
.persephone-auth {
    background:
        radial-gradient(ellipse at 50% 30%, rgba(168,35,43,0.18) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 80%, rgba(212,175,55,0.10) 0%, transparent 60%),
        var(--persephone-night);
}
.persephone-hero-logo {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--persephone-gold);
    box-shadow:
        0 0 0 4px rgba(212,175,55,0.15),
        0 8px 32px rgba(0,0,0,0.6);
}

/* Custom styling for the personal finance application */

/* Card hover effect */
.account-card:hover, 
.dashboard-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s ease-in-out;
}

/* Custom styling for negative amounts */
.negative-amount {
    color: var(--bs-danger);
}

/* Custom styling for positive amounts */
.positive-amount {
    color: var(--bs-success);
}

/* Improved transaction table */
.transaction-table tbody tr {
    cursor: pointer;
}

.transaction-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: auto;
        min-height: 300px;
    }
}

/* Custom dashboard card stats */
.stat-card {
    transition: transform 0.3s ease;
}

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

.stat-icon {
    font-size: 2rem;
    opacity: 0.7;
}

/* Import section styling */
.import-instructions {
    background-color: rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--bs-primary);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

/* Category badges */
.category-badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

/* Improved form controls */
.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Card header with action buttons */
.card-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Reports page */
.filter-section {
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

/* Charts container */
.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

/* Budget table inputs — compact number fields */
.budget-table input.budget-input {
    padding: 2px 4px;
    font-size: 0.8rem;
    min-width: 60px;
    max-width: 80px;
    border-radius: 3px;
}

.budget-table td, .budget-table th {
    vertical-align: middle;
}

/* Highlight budget input on focus */
.budget-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.45);
    border-color: #0d6efd;
}
