/* =========================================================
   INDEX PAGE CSS
   Login + Main Menu
   ========================================================= */


/* =========================================================
   LOGIN CARD
   ========================================================= */

#loginPage {
    width: min(92%, 440px);

    max-width: 440px;

    margin: 55px auto 0;

    padding: 30px;

    background: #ffffff;

    border-radius: 26px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.10);

    box-sizing: border-box;
}


/* Login title */

#loginPage h2 {
    margin: 0 0 25px;

    text-align: center;

    font-size: 28px;

    font-weight: 700;
}


/* Login inputs */

#loginPage input {
    width: 100%;

    margin: 8px 0;

    padding: 14px 16px;

    border-radius: 14px;

    box-sizing: border-box;
}


/* Login button */

#loginPage > button {
    width: 100%;

    margin: 10px 0 0;

    padding: 14px;

    border-radius: 14px;

    background: var(--primary);

    font-size: 16px;

    font-weight: 600;
}


/* =========================================================
   MENU CONTAINER
   ========================================================= */

#menuPage.active {
    display: grid !important;
}

#menuPage {
    width: min(94%, 700px);

    max-width: 700px;

    margin: 35px auto;

    padding: 10px;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 16px;

    box-sizing: border-box;
}


/* =========================================================
   MENU TITLE
   ========================================================= */

#menuPage > h2 {
    grid-column: 1 / -1;

    margin: 5px 0 12px;

    text-align: center;

    font-size: 28px;

    font-weight: 700;
}


/* =========================================================
   MENU TILES
   ========================================================= */

#menuPage .menu-tile {
    width: 100%;

    min-width: 0;

    height: 153px;

    min-height: 153px !important;

    margin: 0;

    padding: 20px;

    box-sizing: border-box;

    border: none;

    border-radius: 26px;

    background: #ffffff;

    color: #111111;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 10px;

    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.08);

    font-size: 16px;

    font-weight: 600;

    cursor: pointer;

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}


/* Hover */

#menuPage .menu-tile:hover {
    opacity: 1;

    transform: translateY(-3px);

    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.12);
}


/* Press */

#menuPage .menu-tile:active {
    transform: scale(0.97);
}


/* =========================================================
   TILE ICON
   ========================================================= */

#menuPage .tile-icon {
    width: 62px;

    height: 62px;

    margin: 0;

    border-radius: 18px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #eef2ff;

    font-size: 32px;

    line-height: 1;
}


/* =========================================================
   TILE TITLE
   ========================================================= */

#menuPage .tile-title {
    margin: 0;

    font-size: 15px;

    font-weight: 600;

    text-align: center;

    line-height: 1.2;
}


/* =========================================================
   LOGOUT TILE
   ========================================================= */

#menuPage .logout-tile {
    grid-column: 1 / -1;

    width: 100%;

    height: 92px;

    min-height: 92px;

    margin: 0;

    padding: 15px;

    box-sizing: border-box;

    border: none;

    border-radius: 22px;

    background: #f3f3f3;

    color: #111111;

    display: flex;

    flex-direction: row;

    align-items: center;

    justify-content: center;

    gap: 12px;

    box-shadow: none;

    font-size: 16px;

    font-weight: 600;
}


/* Logout icon */

#menuPage .logout-tile .tile-icon {
    width: 38px;

    height: 38px;

    font-size: 21px;

    border-radius: 12px;
}


/* =========================================================
   NOTIFICATION BUTTON
   ========================================================= */

#menuPage #enableNotifications {
    grid-column: 1 / -1;

    width: 100%;

    margin: 0;
}


/* =========================================================
   DARK MODE
   ========================================================= */

html.dark #loginPage {
    background: var(--card);

    color: var(--text);

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.30);
}


html.dark #loginPage input {
    background: var(--card);

    color: var(--text);

    border-color: var(--border);
}


html.dark #menuPage .menu-tile {
    background: var(--card);

    color: var(--text);
}


html.dark #menuPage .tile-icon {
    background: #374151;
}


html.dark #menuPage .logout-tile {
    background: #30343b;

    color: var(--text);
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    /* Login */

    #loginPage {
        width: 92%;

        margin-top: 35px;

        padding: 25px;

        border-radius: 24px;
    }


    #loginPage h2 {
        font-size: 25px;
    }


    /* Menu */

    #menuPage {
        width: 96%;

        margin: 20px auto;

        padding: 6px;

        gap: 12px;
    }


    #menuPage > h2 {
        font-size: 25px;

        margin-bottom: 8px;
    }


    #menuPage .menu-tile {
        height: 125px;

        min-height: 125px;

        padding: 12px;

        border-radius: 22px;
    }


    #menuPage .tile-icon {
        width: 50px;

        height: 50px;

        font-size: 26px;

        border-radius: 15px;
    }


    #menuPage .tile-title {
        font-size: 13px;
    }


    #menuPage .logout-tile {
        height: 65px;

        min-height: 65px;

        border-radius: 18px;
    }
}


/* =========================================================
   VERY SMALL PHONES
   ========================================================= */

@media (max-width: 360px) {

    #menuPage {
        gap: 9px;

        padding: 5px;
    }


    #menuPage .menu-tile {
        height: 115px;

        min-height: 115px;
    }


    #menuPage .tile-icon {
        width: 44px;

        height: 44px;

        font-size: 23px;
    }


    #menuPage .tile-title {
        font-size: 12px;
    }
}

/* =========================================================
   CENTER LAST VISIBLE MENU TILE
   ========================================================= */
#menuPage .menu-tile.center-last {
    grid-column: 1 / -1 !important;
    justify-self: center !important;
    width: calc(50% - 8px) !important;
}