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

:root {
    /* Dark Krishna-inspired color palette */
    --bg-dark: #0a0e1a;
    --bg-card: #131824;
    --bg-card-hover: #1a2030;
    --bg-primary: #0a0e1a;
    --bg-secondary: #1a1f35;
    --primary-blue: #3b82f6;
    --light-blue: #60a5fa;
    --accent-yellow: #fbbf24;
    --accent-orange: #f97316;
    --text-light: #e2e8f0;
    --text-primary: #e5e7eb;
    --text-muted: #94a3b8;
    --border-color: #1e293b;
    --success-green: #10b981;
    --warning-yellow: #fbbf24;
    --danger-red: #ef4444;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --gradient-header: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}

/* Login Screen Styles */
.login-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding: 20px;
}

.login-container {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.login-header h1 {
    font-size: 1.8rem;
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.login-subtitle {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.login-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.password-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.password-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.login-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.login-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.error-message {
    color: #ef4444;
    font-size: 0.85rem;
    margin-bottom: 15px;
    min-height: 20px;
}

.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.login-footer .sloka-small {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-style: italic;
    margin: 0;
}

/* Main Application Styles */
body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: var(--gradient-header);
    color: white;
    padding: 30px 0;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: "🕉️";
    position: absolute;
    font-size: 200px;
    opacity: 0.05;
    right: -50px;
    top: -50px;
    transform: rotate(15deg);
}

.header-content {
    position: relative;
    z-index: 1;
}

.logo-section h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 300;
}

.sloka-container {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sloka {
    font-size: 0.95rem;
    font-style: italic;
    margin-bottom: 10px;
    line-height: 1.8;
}

.sloka-translation {
    font-size: 0.85rem;
    opacity: 0.9;
    line-height: 1.6;
    max-width: 650px;
    margin: 0 auto;
}

.reference {
    font-weight: 600;
    color: var(--accent-yellow);
}

/* Main Content */
.main-content {
    padding: 40px 0;
    min-height: calc(100vh - 400px);
}

/* Financial Summary */
.financial-summary {
    margin-bottom: 40px;
}

.financial-summary h2 {
    font-size: 1.8rem;
    color: var(--accent-yellow);
    margin-bottom: 20px;
}

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

.stat-card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background: var(--bg-card-hover);
    border-color: var(--primary-blue);
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    color: var(--accent-yellow);
    font-weight: 700;
}

.stat-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Monthly Index Table */
.monthly-index {
    margin-bottom: 40px;
}

.monthly-index h2 {
    font-size: 1.8rem;
    color: var(--accent-yellow);
    margin-bottom: 20px;
}

.table-container {
    overflow-x: auto;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.index-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.index-table thead tr {
    background: var(--primary-blue);
    color: white;
}

.index-table th,
.index-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.index-table th {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.index-table tbody tr {
    transition: background 0.2s ease;
}

.index-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.index-table td {
    font-size: 0.95rem;
}

.amount-cell {
    font-weight: 600;
    color: var(--accent-yellow);
}

.total-cell {
    font-weight: 700;
    color: var(--success-green);
    font-size: 1.05rem;
}

.current-month-row {
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid var(--primary-blue);
}

/* Pipeline Section */
.pipeline-section {
    margin-bottom: 40px;
}

.pipeline-section h2 {
    font-size: 1.8rem;
    color: var(--accent-yellow);
    margin-bottom: 20px;
}

.pipeline-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.legend-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

.legend-dot.received {
    background: #10b981;
}

.legend-dot.submitted {
    background: #8b5cf6;
}

.legend-dot.bills-gathered {
    background: #3b82f6;
}

.legend-dot.claim-raised {
    background: #f97316;
}

.legend-dot.not-started {
    background: #334155;
}

/* Monthly Accordion */
.monthly-accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.accordion-item {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-item.expanded {
    border-color: var(--primary-blue);
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.accordion-header:hover {
    background: var(--bg-card-hover);
}

.accordion-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.accordion-month-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-yellow);
}

.accordion-month-total {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
}

.accordion-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.accordion-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.accordion-status.received {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.accordion-status.received .status-dot {
    background: #10b981;
}

.accordion-status.claim-raised {
    background: rgba(249, 115, 22, 0.2);
    color: #fb923c;
}

.accordion-status.claim-raised .status-dot {
    background: #f97316;
}

.accordion-status.bills-gathered {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.accordion-status.bills-gathered .status-dot {
    background: #3b82f6;
}

.accordion-status.submitted {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.accordion-status.submitted .status-dot {
    background: #8b5cf6;
}

.accordion-status.not-started {
    background: rgba(51, 65, 85, 0.5);
    color: #94a3b8;
}

.accordion-status.not-started .status-dot {
    background: #334155;
}

.accordion-chevron {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.accordion-item.expanded .accordion-chevron {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-item.expanded .accordion-content {
    max-height: 1000px; /* Increased from 600px to fit all BACEs */
}

.accordion-body {
    padding: 0 25px 25px 25px;
}

.tracker-container {
    position: relative;
    padding: 30px 0;
}

.tracker-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--border-color);
    transform: translateY(-50%);
    z-index: 1;
}

.tracker-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--success-green), var(--primary-blue));
    transition: width 0.5s ease;
    border-radius: 2px;
}

.tracker-steps {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Ensure all items align at the top */
    z-index: 2;
}

.tracker-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 4px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    flex-shrink: 0; /* Prevent circle from shrinking */
}

.tracker-step.completed .step-circle {
    background: var(--success-green);
    border-color: var(--success-green);
}

.tracker-step.active .step-circle {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    animation: pulse 2s infinite;
}

.step-label {
    font-size: 0.85rem;
    text-align: center;
    color: var(--text-muted);
    max-width: 100px;
}

.tracker-step.completed .step-label,
.tracker-step.active .step-label {
    color: var(--text-light);
    font-weight: 600;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
}

.bace-statuses {
    margin-top: 25px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.bace-status-card {
    background: rgba(59, 130, 246, 0.05);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.bace-status-name {
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bace-status-info {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.bace-status-amount {
    font-weight: 600;
    color: var(--accent-yellow);
}

/* BACE Details */
.bace-details {
    margin-bottom: 40px;
}

.bace-details h2 {
    font-size: 1.8rem;
    color: var(--accent-yellow);
    margin-bottom: 20px;
}

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

.bace-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.bace-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-blue);
}

.bace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.bace-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.bace-icon {
    font-size: 2rem;
}

.bace-stats {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.bace-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 6px;
    font-size: 0.9rem;
}

.bace-stat-label {
    color: var(--text-muted);
}

.bace-stat-value {
    font-weight: 600;
    color: var(--accent-yellow);
}

.bace-months {
    margin-top: 15px;
}

.bace-months h4 {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.month-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.month-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid;
}

.month-badge.received {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: #34d399;
}

.month-badge.submitted {
    background: rgba(139, 92, 246, 0.2);
    border-color: #8b5cf6;
    color: #a78bfa;
}

.month-badge.bills-gathered {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    color: #60a5fa;
}

.month-badge.claim-raised {
    background: rgba(249, 115, 22, 0.2);
    border-color: #f97316;
    color: #fb923c;
}

.month-badge.not-started {
    background: rgba(51, 65, 85, 0.5);
    border-color: #475569;
    color: #94a3b8;
}

/* Footer */
.footer {
    background: var(--bg-card);
    color: var(--text-light);
    padding: 30px 0;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    text-align: center;
}

.footer-sloka {
    margin-bottom: 15px;
}

.sloka-small {
    font-size: 0.9rem;
    font-style: italic;
    opacity: 0.8;
    line-height: 1.6;
}

.footer-text {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 5px;
}

.footer-text a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-text a:hover {
    text-decoration: underline;
}

.footer-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo-section h1 {
        font-size: 1.5rem;
    }

    .sloka {
        font-size: 0.85rem;
    }

    .sloka-translation {
        font-size: 0.75rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-card {
        padding: 20px;
    }

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

    .stat-info h3 {
        font-size: 1.5rem;
    }

    .accordion-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .accordion-right {
        width: 100%;
        justify-content: space-between;
    }

    /* Keep tracker horizontal on mobile */
    .tracker-container {
        padding: 30px 0;
    }

    .tracker-steps {
        flex-direction: row; /* Keep horizontal */
        gap: 10px;
    }

    .tracker-line {
        width: 100%; /* Keep horizontal line */
        height: 4px;
        left: 0;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    .tracker-progress {
        width: auto;
        height: 100%;
    }

    .tracker-step {
        flex-direction: column; /* Keep vertical alignment of circle and label */
        justify-content: center;
        align-items: center;
        gap: 10px;
    }

    .step-circle {
        margin-bottom: 0;
        width: 35px; /* Slightly smaller on mobile */
        height: 35px;
        font-size: 1rem;
    }

    .step-label {
        text-align: center;
        font-size: 0.7rem; /* Smaller text */
        max-width: 80px;
    }

    .bace-statuses {
        grid-template-columns: 1fr;
    }

    .bace-grid {
        grid-template-columns: 1fr;
    }

    .table-container {
        padding: 10px;
    }

    .index-table th,
    .index-table td {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 15px;
    }

    .financial-summary h2,
    .monthly-index h2,
    .pipeline-section h2,
    .bace-details h2 {
        font-size: 1.5rem;
    }

    .pipeline-legend {
        flex-direction: column;
        gap: 10px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bace-card,
.accordion-item,
.stat-card {
    animation: fadeIn 0.5s ease;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}
