/* ===========================
   Mobile-first app layout
=========================== */

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width:768px) {
    html {
        font-size: 16px;
    }
}


body {
    margin-bottom: 64px;
    background: #f8f9fa;
}


/* ===========================
   Top bar
=========================== */

.app-topbar {
    height: 56px;
    background: #fff;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.app-title {
    font-weight: 600;
    font-size: 18px;
}


/* ===========================
   Content
=========================== */

.app-content {
    padding: 12px;
}


/* ===========================
   Bottom navigation
=========================== */

.app-bottomnav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 64px;
    background: #fff;
    border-top: 1px solid #eee;
    padding: 0 10px;
    display: flex;
    align-items: center;
    z-index: 1000;
}


    .app-bottomnav .nav-item {
        flex: 1;
        color: #333;
        text-decoration: none;
        font-size: 12px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 64px;
    }


.nav-icon {
    font-size: 20px;
    line-height: 1;
}


.nav-label {
    margin-top: 3px;
    font-size: 11px;
    opacity: .9;
}


/* ===========================
   Center Add button (Material style)
=========================== */

.nav-item-center {
    width: 84px;
    height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 0;
}

.nav-fab {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #1976d2;
    color: white;
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(25,118,210,.28);
    cursor: pointer;
    padding: 0;
    margin-top: -10px;
    transition: transform .15s ease, box-shadow .15s ease;
}

    .nav-fab:hover {
        box-shadow: 0 8px 20px rgba(25,118,210,.35);
    }

    .nav-fab:active {
        transform: scale(.94);
    }

.nav-item-center .nav-label {
    margin-top: 6px;
    font-size: 11px;
    opacity: .9;
}



/* ===========================
   FAB menu
=========================== */


.fab-menu {
    position: fixed;
    left: 50%;
    bottom: 75px;
    transform: translateX(-50%);
    display: none;
    flex-direction: column;
    gap: 8px;
    z-index: 1100;
}



.fab-menu-item {
    background: white;
    border-radius: 12px;
    padding: 12px 18px;
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
    color: #111;
    text-decoration: none;
    font-weight: 600;
    min-width: 220px;
    text-align: center;
}



    .fab-menu-item:hover {
        background: #f3f3f3;
    }



/* ===========================
   Cards
=========================== */


.contract-card,
.expense-card {
    background: white;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,.04);
    margin-bottom: 12px;
}



.contract-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}



.contract-meta {
    color: #666;
    font-size: 13px;
}



.contract-title {
    font-weight: 700;
    font-size: 16px;
    margin-top: 6px;
}



.expense-amount {
    font-weight: 700;
    font-size: 18px;
}


.expense-meta {
    color: #666;
    font-size: 13px;
}

.contract-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}


.contract-footer {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}


    .contract-footer span {
        color: #777;
        font-size: 12px;
    }


    .contract-footer b {
        display: block;
        font-size: 15px;
    }

.recent-action {
    display: block;
    background: white;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    color: #222;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,.05);
}



.recent-action-text {
    font-size: 14px;
    font-weight: 500;
}

/* ===========================
   Amount input
=========================== */


.amount-input {
    height: 64px;
    font-size: 28px;
    text-align: right;
    padding-right: 16px;
}



/* ===========================
   Toggle buttons
=========================== */


.toggle-more {
    display: block;
    width: 100%;
    margin: 8px auto 12px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #e6e6e6;
    background: white;
    font-weight: 600;
}



/* ===========================
   Desktop
=========================== */


@media (min-width:768px) {


    .app-content {
        padding: 20px 32px;
    }


    .fab-menu {
        right: 32px;
        left: auto;
        transform: none;
    }
}
