/* ========================================
   Checkpoint Design System - Layouts
   ======================================== */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    line-height: 1.5;
}

/* ---------- App Layout ---------- */
#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
}

/* ---------- Responsive Projects Grid ---------- */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ---------- Header ---------- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-xl);
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.header-actions {
    display: flex;
    gap: var(--space-sm);
}

/* ---------- Main Content ---------- */
.main {
    flex: 1;
    padding: var(--space-lg);
    padding-bottom: calc(var(--space-xl) + 70px);
    overflow-y: auto;
}

/* ---------- Bottom Navbar ---------- */
.navbar {
    display: flex;
    justify-content: space-around;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: color var(--transition-fast);
    border-radius: var(--radius-md);
}

.nav-item:hover,
.nav-item.active {
    color: var(--accent-primary);
}

.nav-icon {
    font-size: 1.25rem;
}

/* ---------- Global Progress ---------- */
.global-progress {
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
}

.global-progress .progress-bar {
    height: 12px;
}

.global-progress-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

/* ---------- Section Header ---------- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.section-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

/* ---------- Utilities ---------- */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.mt-md {
    margin-top: var(--space-md);
}

.mb-md {
    margin-bottom: var(--space-md);
}