/* Trak Layout Styles - Matching MAUI TrakStyles */

:root {
    /* Colors from TrakStyles.xaml */
    --trak-color-blue: #0275FD;
    --trak-color-light-blue: #A5CCD1;
    --trak-color-dark-blue: #0A2463;
    --trak-color-green: #329F5B;
    --trak-color-red: Red;
    --trak-color-dark-red: DarkRed;
    --trak-color-orange: #F26419;
    --trak-color-gray: #A9A9A9;
    --trak-color-dark-gray: #A9AABC;
    --trak-color-light-gray: #E2E3E9;
    --trak-color-ghost-white: #E8E9F3;
    --trak-color-white: White;
    --trak-color-black: Black;
    --trak-color-highlight: #FFFFBF;

    /* Layout colors */
    --trak-header-bg: #0275FD;
    --trak-header-text: White;
    --trak-menu-bar-bg: Black;
    --trak-menu-bar-text: White;
    --trak-default-bg: #E8E9F3;

    /* Dimensions */
    --trak-border-radius: 5px;
    --trak-card-border-radius: 10px;
    --trak-base-font-size: 14px;
    --trak-header-height: 45px;
    --trak-menu-bar-height: 75px;
}

/* Main Page Card Grid */
.main-page-content {
    padding: 20px;
    height: 100%;
}

.main-page-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
    height: calc(100% - 40px);
    max-height: 600px;
}

/* Main Page Cards */
.main-card {
    background-color: var(--trak-color-white);
    border: 2px solid var(--trak-color-blue);
    border-radius: var(--trak-card-border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.main-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.main-card:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.main-card-image {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
    margin-bottom: 10px;
    flex: 1;
}

.main-card-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--trak-color-blue);
    text-align: center;
    margin-bottom: 8px;
}

.main-card-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.main-card-stat {
    font-size: 12px;
    text-align: center;
}

.stat-past-due {
    color: var(--trak-color-red);
}

.stat-past-due-count {
    font-weight: bold;
    color: var(--trak-color-red);
}

.stat-due-today {
    color: var(--trak-color-black);
}

.stat-due-today-count {
    font-weight: bold;
    color: var(--trak-color-black);
}

/* Responsive design */
@media (max-width: 600px) {
    .main-page-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
        max-height: none;
    }

    .main-card {
        min-height: 150px;
    }

    .main-card-image {
        max-height: 80px;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .main-page-grid {
        max-height: 500px;
    }

    .main-card-image {
        max-height: 100px;
    }
}
