/*
  @file dashboard.styles.css
  @description Responsive dashboard styles for admin panel. Ensures dashboard cards fill the width on mobile. Strictly functional, A2-compliant, with file-level documentation as per quality_standards.md.
  @author Staytuned
  @created 2025-04-25
  @modifies Mobile view: dashboard cards now fill width, duplicate grid-template-columns removed, lint/format compliant.
  @example
    // On mobile, dashboard cards fill the width of the screen
*/

.dashboard-root {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 4fr;
    min-height: 100vh;
    background: #fef8f6;
    container-type: inline-size;
}

.nav-drawer {
    background: #fff6f3;
    padding: 2rem 1rem 1rem 1.5rem;
    border-radius: 1.5rem;
    margin: 1rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-width: 200px;
    max-width: 260px;
    height: calc(100vh - 2rem);
    box-sizing: border-box;
}

.nav-header {
    margin-bottom: 2rem;
}
.nav-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #c44d00;
    display: block;
}
.nav-subtitle {
    font-size: 1rem;
    color: #2d1a00;
    font-weight: 600;
    margin-top: 0.1em;
}
.nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.8em;
    padding: 0.9em 1.2em;
    border-radius: 2em;
    font-size: 1.08em;
    color: #2d1a00;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}
.nav-item.active, .nav-item:hover {
    background: #ffbfa3;
    color: #2d1a00;
}
.nav-icon {
    width: 1.5em;
    height: 1.5em;
    color: #c44d00;
}

.dashboard-main {
    padding: 2.5rem 2rem 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    container-type: inline-size;
}

.dashboard-welcome {
    background: #fff6f3;
    border-radius: 2rem;
    padding: 2rem 2.5rem 1.5rem 2.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
.dashboard-welcome-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.dashboard-welcome-header h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #2d1a00;
}
.dashboard-welcome-actions {
    display: flex;
    gap: 1rem;
}
.dashboard-btn {
    font-size: 1rem;
    border-radius: 2em;
    padding: 0.7em 1.6em;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.dashboard-btn.primary {
    background: #c44d00;
    color: #fff;
}
.dashboard-btn.secondary {
    background: #fff;
    color: #c44d00;
    border: 1.5px solid #c44d00;
}
.dashboard-btn.secondary:hover {
    background: #ffe3d1;
}
.dashboard-btn.primary:hover {
    background: #a03b00;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    container-type: inline-size;
}
.dashboard-card {
    background: #fff6f3;
    border-radius: 1.5rem;
    padding: 1.5rem 1.5rem 1.2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    min-width: 0;
}
.dashboard-card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d1a00;
    margin-bottom: 0.5rem;
}
.dashboard-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}
.dashboard-card-item {
    background: #ffe3d1;
    border-radius: 1em;
    padding: 0.8em 1em;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3em;
    font-size: 1em;
    font-weight: 500;
    color: #2d1a00;
    min-width: 0;
}
.dashboard-card-value {
    background: #ffd6c0;
    border-radius: 1em;
    padding: 0.2em 1.2em;
    font-size: 1.1em;
    font-weight: 600;
    color: #c44d00;
    margin-top: 0.2em;
}
.icon {
    font-size: 1.2em;
    margin-bottom: 0.1em;
}

.dashboard-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
.dashboard-actions h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #2d1a00;
    margin-bottom: 1.2rem;
}
.dashboard-action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    container-type: inline-size;
}
.dashboard-action-card {
    background: #fff;
    border-radius: 1.2rem;
    padding: 1.5rem 1.2rem 1.2rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    align-items: flex-start;
    box-shadow: 0 2px 8px 0 #f7e2d6;
}
.dashboard-action-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d1a00;
}
.dashboard-action-card p {
    font-size: 0.98rem;
    color: #6b4b2c;
    margin-bottom: 0.7em;
}

/* Responsive styles using container queries */
@container (max-width: 900px) {
    .dashboard-root {
        grid-template-columns: 1fr;
    }
    .nav-drawer {
        flex-direction: row;
        min-width: 0;
        max-width: 100vw;
        width: 100vw;
        height: auto;
        margin: 0;
        border-radius: 0 0 2rem 2rem;
        padding: 1rem 0.5rem 0.5rem 0.5rem;
        gap: 1rem;
    }
    .dashboard-main {
        padding: 1.2rem 0.5rem 0.5rem 0.5rem;
    }
    .dashboard-cards {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    .dashboard-card {
        width: 100%;
        box-sizing: border-box;
    }
    .dashboard-card-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-action-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
}

@container (max-width: 600px) {
    .dashboard-welcome {
        padding: 1.2rem 0.7rem 1rem 0.7rem;
        border-radius: 1.2rem;
    }
    .dashboard-welcome-header h1 {
        font-size: 1.3rem;
    }
    .dashboard-actions h2 {
        font-size: 1.2rem;
    }
    .dashboard-card {
        padding: 1rem 0.7rem 0.7rem 0.7rem;
        border-radius: 1rem;
        width: 100%;
        box-sizing: border-box;
    }
    .dashboard-card-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-action-card {
        padding: 1rem 0.7rem 0.7rem 0.7rem;
        border-radius: 0.8rem;
    }
}

/* Mobile nav bar for bottom */
@media (max-width: 600px) {
    .nav-drawer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100vw;
        height: auto;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        border-radius: 1.5rem 1.5rem 0 0;
        z-index: 100;
        box-shadow: 0 -2px 12px #f7e2d6;
        padding: 0.5rem 0.2rem;
        margin: 0;
    }
    .nav-header {
        display: none;
    }
    .nav-list {
        flex-direction: row;
        gap: 0.2rem;
        width: 100vw;
        justify-content: space-around;
    }
    .nav-item {
        flex-direction: column;
        gap: 0.2em;
        font-size: 0.95em;
        padding: 0.5em 0.2em;
        border-radius: 1em;
        min-width: 0;
        width: 100%;
        justify-content: center;
        align-items: center;
    }
    .nav-icon {
        width: 1.2em;
        height: 1.2em;
    }
}
