/* Custom styles to match the design */

/* Body and container */
body {
    background-color: #f8fafc;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.container {
    max-width: 1400px;
}

/* Header */
header h1 {
    color: #1e293b;
    font-weight: 700;
    letter-spacing: -0.02em;
}

header p {
    color: #64748b;
    font-size: 1rem;
}

/* Navigation Tabs */
.tab-btn {
    position: relative;
    transition: all 0.2s;
    color: #64748b;
    border-bottom: 2px solid transparent;
    padding-bottom: 0.75rem;
}

.tab-btn:hover {
    color: #1e293b;
}

.tab-btn.active {
    color: #10b981;
    border-bottom-color: #10b981;
    font-weight: 600;
}

/* Policy Boxes - Left Column */
#policy-overview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    padding-right: 0.5rem;
}

.policy-box {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    padding: 1rem;
    position: relative;
    transition: all 0.2s;
    min-height: 180px;
    display: flex;
    flex-direction: column;
}

.policy-box:last-child {
    grid-column: 1;
}

.policy-box:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
    transform: translateY(-2px);
}

.policy-box.blue {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #93c5fd;
}

.policy-box.orange {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-color: #fed7aa;
}

.policy-box-icon {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.policy-box h4 {
    color: #065f46;
    font-weight: 600;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
    margin-left: 3rem;
    font-size: 0.875rem;
}

.policy-box.blue h4 {
    color: #1e40af;
}

.policy-box.orange h4 {
    color: #9a3412;
}

.policy-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-top: auto;
}

.policy-box li {
    color: #047857;
    font-size: 0.8125rem;
    line-height: 1.6;
    padding: 0.25rem 0;
    font-weight: 500;
}

.policy-box.blue li {
    color: #1e3a8a;
}

.policy-box.orange li {
    color: #c2410c;
}

.policy-box p {
    color: #047857;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    margin-left: 3rem;
}

.policy-box.blue p {
    color: #1e3a8a;
}

.policy-box.orange p {
    color: #c2410c;
}

/* Card styling */
.bg-card {
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Input fields */
input[type="number"],
input[type="text"] {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    transition: all 0.2s;
    background: #ffffff;
    color: #1e293b;
}

input[type="number"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

input[readonly] {
    background-color: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
    background-color: #10b981;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* Buttons */
button {
    transition: all 0.2s;
}

#calculate-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-weight: 600;
    border: none;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

#calculate-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

#refresh-btn {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    font-size: 0.875rem;
}

#refresh-btn:hover {
    background: #e2e8f0;
}

#save-scenario-btn {
    background: white;
    color: #475569;
    border: 1px solid #e2e8f0;
    font-size: 0.875rem;
}

#save-scenario-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* Total Income Display */
#total-monthly,
#total-quarterly,
#total-annual {
    color: #10b981;
    font-weight: 700;
    font-size: 2rem;
    letter-spacing: -0.02em;
}

/* Income Details */
.border-b {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.75rem;
}

.font-semibold {
    color: #1e293b;
}

.text-muted-foreground {
    color: #64748b;
    font-size: 0.75rem;
}

/* Chart Container */
#income-chart {
    background: white;
    border-radius: 8px;
    padding: 1rem;
}

/* Section Headers */
h2 {
    color: #1e293b;
    font-weight: 700;
    letter-spacing: -0.01em;
}

h3 {
    color: #334155;
    font-weight: 600;
}

/* Labels */
label {
    color: #334155;
    font-weight: 500;
    font-size: 0.875rem;
}

/* Spacing adjustments */
.space-y-3 > * + * {
    margin-top: 0.75rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

.space-y-6 > * + * {
    margin-top: 1.5rem;
}

/* Grid gap */
.gap-6 {
    gap: 1.5rem;
}

/* Policy overview section */
#policy-overview h3 {
    color: #1e293b;
    font-size: 1.125rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Additional improvements */
.bg-card {
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.rounded-lg {
    border-radius: 12px;
}

/* Input placeholder */
input::placeholder {
    color: #94a3b8;
    opacity: 1;
}

/* Section spacing */
.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

/* Text colors */
.text-primary {
    color: #10b981 !important;
}

.text-muted-foreground {
    color: #64748b;
}

/* Border colors */
.border {
    border-color: #e2e8f0;
}

/* Chart area */
#income-chart {
    max-height: 400px;
}

/* Responsive grid */
@media (max-width: 1024px) {
    #policy-overview {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    #policy-overview {
        grid-template-columns: 1fr;
    }
}

/* Improve toggle alignment */
.flex.items-center.justify-between {
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.flex.items-center.justify-between:last-child {
    border-bottom: none;
}

/* Button improvements */
button {
    border-radius: 8px;
    font-weight: 500;
}

/* Card padding */
.p-6 {
    padding: 1.5rem;
}

/* Improve readability */
.text-sm {
    line-height: 1.5;
}

/* Number formatting */
input[type="number"] {
    font-variant-numeric: tabular-nums;
}

/* Focus states */
*:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

