/* Admidio-inspired Color Palette & Styling */
:root {
    --primary-color: #5c7f1a; /* Admidio dark green */
    --primary-light: #79a229; /* Admidio primary green */
    --accent-color: #e67e22;  /* Complementary accent */
    --bg-color: #f4f6f8;      /* Light grey background */
    --surface-color: #FFFFFF;
    --text-main: #333333;
    --text-muted: #777777;
    --border-color: #dddddd;
    --success: #79a229;
    --danger: #cc0000;
    
    --nav-height: 60px;
    --header-height: 56px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    overflow: hidden; /* Prevent body scroll, handle inside main */
}

/* App Shell */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100dvh; /* Mobile viewport height */
    width: 100%;
}

/* Header */
.top-bar {
    height: var(--header-height);
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand h1 {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.icon-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 8px;
}

/* Main Content Area */
#main-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    padding-bottom: calc(16px + var(--nav-height)); /* padding for scrolling above nav */
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 10;
    box-shadow: 0 -1px 3px rgba(0,0,0,0.05);
}

.nav-item {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.75rem;
    width: 100%;
    height: 100%;
    cursor: pointer;
    transition: color 0.2s;
}

.nav-item i {
    font-size: 1.2rem;
}

.nav-item.active {
    color: var(--primary-light);
}

/* --- View Components --- */

.view-section {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-title {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 12px;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 4px;
    display: inline-block;
}

/* Cards */
.card {
    background: var(--surface-color);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

/* Dashboard Specific */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    text-align: center;
    padding: 16px 8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Lists (Members, Events) */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.list-item:last-child {
    border-bottom: none;
}

.item-main {
    display: flex;
    flex-direction: column;
}

.item-title {
    font-weight: 500;
    color: var(--text-main);
}

.item-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.success { background-color: #C6F6D5; color: #22543D; }
.badge.neutral { background-color: #E2E8F0; color: #4A5568; }
.badge.warning { background-color: #FEEBC8; color: #7B341E; }

/* Buttons */
.btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: var(--primary-light);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    margin-top: 16px;
}
.btn:active {
    background-color: var(--primary-color);
}