/* ==============================================================================
   FILE 10: css/components.css
   Cards, Buttons, Inputs, Modals, and Navigation
   ============================================================================== */

/* --- Cards --- */
.card {
    background-color: var(--surface);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-bottom: 20px;
}

.net-worth-card {
    text-align: center;
    background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%);
    color: white;
}

.net-worth-card .subtitle {
    font-size: 0.85rem;
    opacity: 0.8;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.net-worth-card h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.liquidity-breakdown {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 15px;
}

.liquidity-item {
    display: flex;
    flex-direction: column;
}

.liquidity-item .label {
    font-size: 0.75rem;
    opacity: 0.8;
}

.liquidity-item .value {
    font-size: 1rem;
    font-weight: 600;
}

/* --- Buttons & FAB --- */
.btn-primary {
    width: 100%;
    padding: 14px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:active {
    background-color: var(--primary-dark);
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
}

.fab {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 20px);
    right: 20px;
    width: 56px;
    height: 56px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 900;
    transition: transform 0.2s;
}

.fab:active {
    transform: scale(0.95);
}

/* --- Forms & Inputs --- */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background-color: var(--surface);
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

/* --- Modal Overlay --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Slides up from bottom on mobile */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: var(--surface);
    width: 100%;
    max-width: 500px;
    border-radius: 20px 20px 0 0;
    padding: 25px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1);
}

.modal-overlay.open .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* --- Bottom Navigation --- */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--bottom-nav-height);
    background-color: var(--surface);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 800;
}

.nav-item {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    cursor: pointer;
    width: 100%;
}

.nav-item span.material-icons {
    margin-bottom: 4px;
}

.nav-item span:last-child {
    font-size: 0.75rem;
    font-weight: 500;
}

.nav-item.active {
    color: var(--primary);
}