:root {
    --primary: #2563eb; 
    --bg: #f8fafc; 
    --text: #1e293b; 
    --danger: #ef4444; 
    --success: #10b981; 
    --warning: #f59e0b;
    --border: #e2e8f0; 
    --input-border: #cbd5e1;
}

/* Base Styles */
body { 
    font-family: system-ui, -apple-system, sans-serif; 
    background: var(--bg); 
    color: var(--text); 
    max-width: 650px; 
    margin: 2rem auto; 
    padding: 0 1rem; 
    line-height: 1.5; 
}

.vis0 {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Breadcrumbs */
.breadcrumb {
    padding: 1rem 0;
    font-size: 0.9rem;
    color: #64748b;
    display: flex;
    gap: 8px;
    align-items: center;
}
.breadcrumb span { cursor: pointer; }
.breadcrumb span:hover { color: var(--primary); text-decoration: underline; }
.breadcrumb .separator { color: #cbd5e1; cursor: default; text-decoration: none; }
.breadcrumb .current { font-weight: 600; color: var(--text); cursor: default; }
.breadcrumb .current:hover { text-decoration: none; }

.view { 
    display: none; 
    background: white; 
    padding: 1.5rem; 
    border-radius: 12px; 
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1); 
}

.view.active { display: block; }
h1, h2, h3 { margin: 0; }

/* Button Framework */
button { 
    cursor: pointer; 
    padding: 10px 16px; 
    border: none; 
    border-radius: 8px; 
    font-weight: 600; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    transition: all 0.2s; 
    white-space: nowrap; 
    height: 42px; 
}

.btn-primary { background: var(--primary); color: white; }
.btn-secondary { background: #e2e8f0; color: var(--text); }
.btn-toggle { background: #cbd5e1; color: #475569; }
.btn-toggle.active { background: var(--warning); color: white; }

/* Icon Buttons */
.btn-icon { 
    padding: 8px; 
    border-radius: 50%; 
    width: 36px; 
    height: 36px; 
    flex-shrink: 0; 
    border: 2px solid transparent; 
    background: #f1f5f9; 
    color: #94a3b8; 
}

.btn-icon svg { width: 20px; height: 20px; pointer-events: none; }
.btn-easy.active { background: var(--success) !important; color: white !important; }
.btn-hard.active { background: var(--warning) !important; color: white !important; }
.btn-danger-icon { background: var(--danger); color: white; width: 32px; height: 32px; padding: 6px; }
.btn-ghost { background: transparent; color: #64748b; padding: 6px; border-radius: 8px; }
.btn-ghost:hover { background: #f1f5f9; }

/* Status & Micro Icons */
.status-icon-static { 
    width: 24px; 
    height: 24px; 
    border-radius: 50%; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    color: white; 
    margin-left: 4px; 
    vertical-align: middle; 
}

.status-icon-static svg { width: 14px; height: 14px; }

.micro-icon { 
    width: 14px; 
    height: 14px; 
    border-radius: 50%; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    color: white; 
    vertical-align: middle; 
    margin: 0 2px; 
}

.micro-icon svg { width: 10px; height: 10px; stroke-width: 5; }

/* Layout Helpers */
.header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; gap: 10px; }
.btn-group { display: flex; align-items: center; gap: 8px; }
.input-row { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 1.5rem; width: 100%; }
.form-group { margin-bottom: 0; flex: 1; }
label { font-weight: 600; color: #475569; display: block; margin-bottom: 4px; font-size: 0.9rem; }
input { width: 100%; padding: 10px; border: 1px solid var(--input-border); border-radius: 8px; box-sizing: border-box; font-size: 1rem; height: 42px; }

/* Component: Radio Lists */
.radio-list { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 1rem; margin-top: 0.5rem; }
.radio-item { display: flex; align-items: stretch; border-bottom: 1px solid var(--border); background: white; cursor: pointer; min-height: 56px; }
.radio-item:last-child { border-bottom: none; }
.radio-item:hover { background: #f8fafc; }
.radio-item label { flex-grow: 1; display: flex; align-items: center; gap: 12px; padding: 0 14px; cursor: pointer; margin: 0; font-weight: 500; }
.radio-item input[type="radio"] { width: 18px; height: 18px; flex-shrink: 0; margin: 0; }
.radio-item .btn-danger-icon { align-self: center; margin-right: 14px; }

/* Data Tables & Items */
table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
th, td { text-align: left; padding: 14px; border-bottom: 1px solid var(--border); }
.exercise-item { display: flex; justify-content: space-between; align-items: center; padding: 14px; border-bottom: 1px solid #eee; cursor: pointer; }
.exercise-info { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; flex-grow: 1; }
.weight-summary { color: #64748b; font-weight: normal; font-size: 0.9em; display: inline-flex; align-items: center; margin-left: 4px; }
.back-link { color: var(--primary); text-decoration: none; cursor: pointer; display: inline-block; margin-bottom: 1.5rem; font-weight: 600; }
.set-row { display: flex; justify-content: space-between; align-items: center; background: #f8fafc; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); margin-bottom: 8px; }
.prev-section { border-top: 2px solid var(--border); margin-top: 2.5rem; padding-top: 1rem; }
.footer-btns { display: flex; gap: 10px; margin-top: 2rem; }
.footer-btns button { flex: 1; height: 48px; }