:root {
    --bg-workspace: #f8fafc;
    --bg-surface: #ffffff;
    --text-primary: #0f172a;
    --text-muted: #64748b;
    --accent: #4f46e5;
    --accent-hover: #4338ca;
    --accent-light: #e0e7ff;
    --border: #e2e8f0;
    --radius: 16px;
    --shadow-premium: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background-color: #0b0f19; color: var(--text-primary); }

.app-container {
    background-color: var(--bg-workspace);
    min-height: 100vh;
    max-width: 430px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: 80px; /* Space for bottom nav */
}

.app-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0; z-index: 100;
}

.brand-badge { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.brand-title { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }

.nav-pill { font-size: 12px; font-weight: 600; color: var(--accent); background: #f0fdf4; padding: 6px 14px; border-radius: 99px; text-decoration: none; }

.app-main { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.premium-card { background-color: var(--bg-surface); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-premium); padding: 20px; }
.card-title { font-size: 14px; font-weight: 700; margin-bottom: 14px; color: var(--text-primary); }

/* Bottom Bar Framework CSS Layout */
.bottom-nav {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 430px; background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px); border-top: 1px solid var(--border);
    display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 0 20px 0; z-index: 200;
}

.bottom-tab {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: transparent; border: none; color: var(--text-muted); cursor: pointer; gap: 4px;
}

.bottom-tab svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.5; transition: transform 0.2s; }
.bottom-tab span { font-size: 9px; font-weight: 700; letter-spacing: -0.01em; }
.bottom-tab.active-tab { color: var(--accent); }
.bottom-tab.active-tab svg { transform: translateY(-2px); }

/* Operational Utilities Configuration rules */
.form-group { margin-bottom: 12px; }
.form-label { display: block; font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; margin-bottom: 6px; }
.select-wrapper { position: relative; }
select, input[type="text"], input[type="number"] {
    width: 100%; background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 10px; padding: 10px 14px; font-size: 14px; outline: none; color: var(--text-primary);
}
select:focus, input:focus { border-color: var(--accent); background: #fff; }
.select-icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 14px; color: var(--text-muted); pointer-events: none; }

.btn-action {
    width: 100%; background: var(--accent); color: white; border: none; padding: 12px; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; transition: background 0.2s;
}
.btn-action:hover { background: var(--accent-hover); }

.view-panel { display: none; flex-direction: column; gap: 16px; }
.view-panel.active-panel { display: flex; }
.custom-scroll { max-height: 300px; overflow-y: auto; }
.custom-scroll::-webkit-scrollbar { width: 3px; }
.custom-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
