:root {
    --primary-color: #00838f;
    --primary-light: #e0f7fa;
    --accent-red: #d32f2f;
    --accent-green: #2e7d32;
    --bg-color: #f4fbfb;
    --card-bg: #ffffff;
    --text-main: #333333;
    --nav-height: 65px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    padding-bottom: calc(var(--nav-height) + 20px);
}

.app-header {
    background: linear-gradient(135deg, #006064, #00838f);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header h1 {
    margin: 0;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.container {
    max-width: 900px;
    margin: 15px auto;
    padding: 0 15px;
}

.card-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    margin-bottom: 20px;
    display: none;
    border-top: 4px solid var(--primary-color);
}

.card-section.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 12px;
    margin-bottom: 15px;
}

.section-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.15rem;
}

.action-buttons-top {
    display: flex;
    gap: 8px;
}

.btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.btn:hover { opacity: 0.85; }

.btn-primary { background-color: var(--primary-color); color: white; }
.btn-success { background-color: var(--accent-green); color: white; }
.btn-danger { background-color: var(--accent-red); color: white; }
.btn-secondary { background-color: #e0e0e0; color: #333; }
.btn-refresh { background-color: #f1f1f1; border: 1px solid #ccc; color: #333; }

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 0 1px #eee;
}

.styled-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    padding: 12px 15px;
}

.styled-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
}

.styled-table tbody tr:nth-child(even) { background-color: #f9fbfb; }
.styled-table tbody tr:hover { background-color: var(--primary-light); }

.item-text.completed { text-decoration: line-through; color: #888; }
.badge-price { background-color: #e8f5e9; color: var(--accent-green); font-weight: bold; padding: 4px 8px; border-radius: 6px; }
.badge-debt { background-color: #ffebee; color: var(--accent-red); font-weight: bold; padding: 4px 8px; border-radius: 6px; }

/* Clickable Project Card / Group Title */
.project-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 5px solid var(--primary-color);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.project-info {
    cursor: pointer;
    flex-grow: 1;
}

.project-info h4 {
    margin: 0 0 5px 0;
    color: var(--primary-color);
    font-size: 1.05rem;
}

.project-info p {
    margin: 0;
    font-size: 0.8rem;
    color: #666;
}

.project-actions {
    display: flex;
    gap: 6px;
}

/* Mobile Bottom Navbar */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background-color: #ffffff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    border-top: 1px solid #eee;
}

.nav-item {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    height: 100%;
    color: #666;
    font-size: 0.7rem;
    font-weight: 600;
    transition: color 0.2s, background 0.2s;
}

.nav-item .nav-icon { font-size: 1.2rem; margin-bottom: 2px; }
.nav-item.active { color: var(--primary-color); background-color: var(--primary-light); }

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-sizing: border-box;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.modal-content h3 { margin-top: 0; color: var(--primary-color); font-size: 1.1rem; }
.form-control { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 6px; box-sizing: border-box; margin-bottom: 12px; font-family: inherit; }
.modal-buttons { display: flex; justify-content: flex-end; gap: 10px; }

.login-body { display: flex; align-items: center; justify-content: center; height: 100vh; background: linear-gradient(135deg, #006064, #00838f); margin: 0; }
.login-card { background: white; padding: 30px; border-radius: 14px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); width: 100%; max-width: 340px; text-align: center; }
.login-input { width: 100%; padding: 12px; font-size: 1.2rem; text-align: center; letter-spacing: 4px; border: 2px solid #ddd; border-radius: 8px; margin-bottom: 15px; outline: none; box-sizing: border-box; }
.error-msg { color: var(--accent-red); font-size: 0.8rem; margin-bottom: 15px; background-color: #ffebee; padding: 8px; border-radius: 6px; }