/* General Styles */
body {
    font-family: 'Lato', sans-serif;
    /* background-color: #10141D; /* Very Dark Navy/Almost Black */ Removed for gradient */
    color: #E5E7EB; /* Light Grey */
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-color: #10141D; /* Fallback */
    background-image: radial-gradient(ellipse at center, #151A24 20%, #10141D 70%, #0B0E14 100%);
    background-attachment: fixed; /* Ensures gradient doesn't scroll with content */
}

header {
    background-color: #4A0E2E; /* Deep Burgundy */
    color: #FFFFFF;
    padding: 1.5em 0;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3); /* Adjusted shadow for dark theme */
}

header h1 {
    font-family: 'Lora', serif;
    margin: 0;
    font-size: 2.5em;
    font-weight: 700;
}

main {
    padding: 20px;
    max-width: 1200px;
    margin: 20px auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

@media (min-width: 992px) {
    main {
        grid-template-columns: 1fr 1fr; /* Two columns for larger screens */
    }
    #income-section, #debt-section, #subscription-section { 
        grid-column: span 1;
    }
    #summary-section {
        grid-column: span 2; /* Summary spans both columns or could be a third column */
    }
}

@media (min-width: 1200px) {
    main {
         grid-template-columns: repeat(3, 1fr); /* Try a 3-column layout explicitly */
    }
    #income-section, #debt-section, #subscription-section {
        grid-column: span 1;
    }
    #summary-section {
        grid-column: 1 / -1; /* Span all columns */
    }
}

/* Card style for sections */
.card {
    background-color: #1F2937; /* Dark Slate Grey/Blue */
    border-radius: 8px;
    padding: 25px;
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); Removed for new bevel effect */
    /* border: 1px solid #374151; Removed for new bevel effect */

    /* Bevel effect borders */
    border-top: 1px solid #2B3648; /* Lighter shade of card bg for top highlight */
    border-left: 1px solid #2B3648; /* Lighter shade of card bg for left highlight */
    border-bottom: 1px solid #17202D; /* Darker shade of card bg for bottom shadow */
    border-right: 1px solid #17202D; /* Darker shade of card bg for right shadow */

    /* Adjusted box-shadow for 3D effect */
    box-shadow: 
        3px 3px 6px 0px rgba(0, 0, 0, 0.25), /* Main shadow for "pop out" effect */
        -1px -1px 2px 0px rgba(43, 54, 72, 0.08); /* Subtle highlight on top-left using a lighter shade */
}

h2 {
    font-family: 'Lora', serif;
    color: #E5E7EB; /* Light Grey */
    margin-top: 0;
    border-bottom: 2px solid #A88B5F; /* Muted Gold */
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.8em;
}

h2 .icon {
    margin-right: 10px;
    /* Consider making icons a specific color if needed, e.g., the accent color */
}

h3 {
    font-family: 'Lora', serif;
    color: #D1D5DB; /* Lighter Grey for subheadings */
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.4em;
}

/* Forms */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: bold;
    color: #9CA3AF; /* Medium Grey */
}

input[type="text"],
input[type="number"],
input[type="date"],
select { 
    padding: 10px 14px;
    border: 1px solid #4B5563; /* Mid-Dark Grey Border */
    border-radius: 6px;
    font-size: 1em;
    background-color: #2D3748; /* Dark Input Background */
    color: #E5E7EB; /* Light text in inputs */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: inherit;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus { 
    border-color: #A88B5F; /* Muted Gold focus */
    box-shadow: 0 0 0 0.2rem rgba(168, 139, 95, 0.35);
    outline: none;
}

/* Style for ::placeholder */
input::placeholder {
    color: #6B7280; /* Lighter placeholder text for dark inputs */
    opacity: 1; /* Firefox */
}
input::-ms-input-placeholder { /* Edge */
    color: #6B7280;
}

/* Buttons */
.button {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.button.primary {
    background-color: #A88B5F; /* Muted Gold */
    color: #10141D; /* Dark text for contrast on gold */
}

.button.primary:hover {
    background-color: #B9976F; /* Slightly lighter gold on hover */
}

.button.primary:active {
    transform: translateY(1px);
}

.button.secondary { /* Not currently used, but styling for completeness */
    background-color: #374151; /* Dark Grey/Blue */
    color: #E5E7EB;
}

.button.secondary:hover {
    background-color: #4B5563;
}

.action-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3em;
    padding: 5px;
    margin-left: 8px;
    color: #9CA3AF; /* Medium Grey for icons */
}
.action-button:hover {
    color: #A88B5F; /* Muted Gold on hover */
}

/* Lists */
ul {
    list-style-type: none;
    padding: 0;
}

li {
    background-color: #2D3748; /* Slightly lighter than card, consistent with inputs */
    border: 1px solid #374151; /* Darker border */
    margin-bottom: 12px;
    padding: 15px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

li .item-details {
    flex-grow: 1;
    color: #D1D5DB; /* Light text for item details */
}
li .item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

li strong {
    color: #E5E7EB; /* Emphasized text within list items */
}

/* Summary Section */
#summary-section p {
    font-size: 1.1em;
    margin-bottom: 12px;
    color: #D1D5DB;
}
#summary-section strong {
    color: #E5E7EB;
    font-weight: 700;
}

.capacity-message {
    font-weight: bold;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    text-align: center;
    border-width: 1px;
    border-style: solid;
}

.capacity-ok {
    background-color: #064E3B; /* Dark Green Background */
    color: #A7F3D0; /* Light Green/Aqua Text */
    border-color: #047857; /* Slightly lighter green border */
}

.capacity-warning {
    background-color: #7F1D1D; /* Dark Red Background */
    color: #FECACA; /* Light Red/Pink text */
    border-color: #B91C1C; /* Slightly lighter red border */
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    background-color: #0B0E14; /* Even Darker than body, for separation */
    color: #9CA3AF; /* Medium Grey for footer text */
    font-size: 0.9em;
}

/* Alarm Toggles */
.alarm-toggle {
    font-size: 1.2em;
    cursor: pointer;
    margin-left: 5px;
    color: #A88B5F; /* Gold for alarm icons for visibility */
}
.alarm-toggle:hover {
    opacity: 0.8;
}

/* Specific styling for select dropdown arrow on dark backgrounds */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%239CA3AF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22/%3E%3C/svg%3E'); Removed custom arrow */
    /* background-repeat: no-repeat; Removed custom arrow */
    /* background-position: right 10px center; Removed custom arrow */
    /* background-size: 12px auto; Removed custom arrow */
    /* padding-right: 30px; Reset padding, browser default will handle arrow space */
}

/* For Firefox, a different approach may be needed if the above doesn't work well */
@-moz-document url-prefix() {
    /* select { color: #E5E7EB; } Add specific FF fixes if needed */
}