.app-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
}

.app-header {
    height: var(--header-height);
    background: var(--bg-header);
    color: var(--text-inverse);
    display: flex;
    align-items: center;
    padding: 0 var(--space-lg);
    font-size: var(--font-lg);
    font-weight: 600;
    flex-shrink: 0;
    z-index: 100;
}

.app-header .header-title {
    flex: 1;
}

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

.app-header .header-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    font-size: var(--font-lg);
    transition: background 0.2s;
}

.app-header .header-btn:active {
    background: rgba(255,255,255,0.15);
}

.app-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--space-lg);
    padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + var(--space-lg));
    -webkit-overflow-scrolling: touch;
}

.app-navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: var(--bg-nav);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    min-width: 56px;
    -webkit-tap-highlight-color: transparent;
}

.nav-item .nav-icon {
    font-size: 22px;
    line-height: 1;
    transition: transform 0.2s;
}

.nav-item .nav-label {
    font-size: var(--font-xs);
    color: var(--text-muted);
    transition: color 0.2s;
    white-space: nowrap;
}

.nav-item.active .nav-icon {
    transform: scale(1.1);
}

.nav-item.active .nav-label {
    color: var(--primary);
    font-weight: 600;
}

.page-title {
    font-size: var(--font-xl);
    font-weight: 700;
    margin-bottom: var(--space-lg);
}

.section-title {
    font-size: var(--font-md);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    margin-top: var(--space-xl);
}

.grid {
    display: grid;
    gap: var(--space-md);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.flex-1 { flex: 1; }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-sm { font-size: var(--font-sm); }
.text-xs { font-size: var(--font-xs); }
.text-lg { font-size: var(--font-lg); }
.text-xl { font-size: var(--font-xl); }
.text-2xl { font-size: var(--font-2xl); }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.w-full { width: 100%; }
