:root {
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --text-primary: #000000;
    --text-secondary: #666666;
    --accent-primary: #000000;
    --border-color: #000000;
    --hover-bg: #f5f5f5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    font-size: 20px; /* Base font size increased for elderly accessibility */
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 2rem 1rem;
    display: flex;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 700px;
}

header {
    text-align: left;
    margin-bottom: 2rem;
    border-bottom: 2px solid #000;
    padding-bottom: 1rem;
}

header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Dropdown styling */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #fff;
    min-width: 250px;
    box-shadow: 8px 8px 0px #000;
    border: 2px solid #000;
    z-index: 1000;
    border-radius: 8px;
    margin-top: 10px;
}

.dropdown-content a {
    color: #000;
    padding: 1rem;
    text-decoration: none;
    display: block;
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 1px solid #eee;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: #f5f5f5;
}

.show {
    display: block;
}

.btn-icon {
    padding: 0.5rem !important;
    font-size: 1.5rem !important;
}

.btn-logout {
    padding: 0.5rem 1rem !important;
    font-size: 1rem !important;
    background: transparent !important;
    border-color: #eee !important;
    color: #888 !important;
}

.summary-cards {
    margin-bottom: 2rem;
}

.card {
    border: 2px solid #000;
    border-radius: 8px;
    padding: 1.5rem;
    transition: background 0.2s ease;
}

.main-balance {
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-balance h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.balance-amount {
    font-size: 2.5rem;
    font-weight: 700;
}

.status-indicator {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border: 1px solid #000;
    border-radius: 2px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.mini-card {
    padding: 0.75rem;
    text-align: center;
}

.mini-card span {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.5rem;
}

.mini-card div {
    font-size: 1.4rem;
    font-weight: 700;
}

.actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.btn {
    padding: 1.2rem 1.5rem;
    border-radius: 8px;
    border: 2px solid #000;
    background: #fff;
    color: #000;
    font-weight: 700;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s;
}

/* Transaction List Redesign */
#transactionList tr.time-row td {
    border-bottom: none;
    padding-bottom: 0.1rem;
    padding-top: 1rem;
    font-size: 0.7rem;
    color: #888;
    background: #fdfdfd;
}

#transactionList tr.main-row td {
    padding-top: 0.2rem;
    padding-bottom: 1rem;
    background: #fdfdfd;
}

#transactionList tr.main-row {
    border-bottom: 2px solid #000;
}

.action-btns {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.type-tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 700;
    margin-left: 0.5rem;
    padding: 1px 4px;
    border: 1px solid #000;
    border-radius: 2px;
}

.btn-expense {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

.btn-primary {
    background: #000;
    color: #fff;
}

.history h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 2px solid #000;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
}

td {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
}

tr:hover { background: #fafafa; }

.amount-pos { font-weight: 600; color: #2563eb; }
.amount-neg { font-weight: 600; color: #dc2626; }

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem 0;
    font-style: italic;
    font-size: 0.9rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(2px);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    border: 3px solid #000; /* Slightly thicker border for better visibility */
    padding: 2.5rem; /* More space inside */
    border-radius: 12px;
    width: 95%;
    max-width: 500px; /* Increased from 350px to accommodate larger text */
    box-shadow: 12px 12px 0px #000;
}

.modal-content h2 { 
    margin-bottom: 1.5rem; 
    font-size: 1.25rem; 
    border-bottom: 1px solid #000;
    padding-bottom: 0.5rem;
}

.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-size: 0.75rem; font-weight: 600; margin-bottom: 0.5rem; text-transform: uppercase; }
.form-group input {
    width: 100%;
    border: 1px solid #000;
    padding: 0.7rem;
    border-radius: 4px;
    outline: none;
    font-size: 1rem;
}
.form-group input:focus { 
    box-shadow: inset 0 0 0 1px #000;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap; /* Allow buttons to wrap if they are too wide */
    gap: 1rem;
    margin-top: 2rem;
}

@media (max-width: 600px) {
    .card-grid { grid-template-columns: repeat(2, 1fr); }
}
