/* ============================================
   SOCIOGRAM - Stylesheet
   ============================================ */

.sg-container {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.sg-state.hidden {
    display: none;
}

.sg-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 32px 0 16px 0;
}

.sg-actions-row {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.sg-actions-row .btn-cancel,
.sg-actions-row .btn-primary,
.sg-actions-row .btn-danger,
.sg-actions-row .btn-secondary {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.sg-btn-large {
    padding: 18px 32px !important;
    font-size: 16px !important;
}

.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-cancel {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid #E8E8F0 !important;
}
.btn-cancel:hover { background: #ECECEC; }

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 1px solid var(--primary) !important;
}
.btn-secondary:hover { background: rgba(108, 99, 255, 0.05); }

.btn-danger {
    background: #FFE5E5;
    color: #D63031;
    border: 1px solid #FFCCCC !important;
}
.btn-danger:hover { background: #FFD0D0; }

.sg-empty-msg {
    color: var(--text-medium);
    font-style: italic;
    padding: 24px;
    text-align: center;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.sg-hint {
    font-size: 13px;
    color: var(--text-medium);
    margin-top: 6px;
}
.sg-hint a { color: var(--primary); font-weight: 600; }

/* ---------- WELCOME state ---------- */
.sg-past-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sg-past-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border: 1px solid #E8E8F0;
    border-radius: var(--radius-md);
    padding: 16px 20px;
    transition: var(--transition);
}

.sg-past-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.sg-past-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sg-past-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 12px;
}

.sg-past-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sg-past-text strong {
    font-size: 15px;
    color: var(--text-dark);
}

.sg-past-text small {
    font-size: 13px;
    color: var(--text-medium);
}

/* ---------- SETUP state ---------- */
.sg-card {
    background: white;
    border: 1px solid #E8E8F0;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.sg-card .form-group {
    margin-bottom: 24px;
}

.sg-card label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.sg-card input[type="text"],
.sg-card input[type="date"],
.sg-card select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #E8E8F0;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
}

.sg-card input:focus,
.sg-card select:focus {
    border-color: var(--primary);
    outline: none;
}

.sg-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .sg-form-row { grid-template-columns: 1fr; }
}

.sg-type-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 600px) {
    .sg-type-cards { grid-template-columns: 1fr; }
}

.sg-type-card {
    display: block;
    cursor: pointer;
    padding: 0;
    margin: 0;
    border: 2px solid #E8E8F0;
    border-radius: var(--radius-md);
    background: white;
    transition: var(--transition);
}

.sg-type-card:hover {
    border-color: var(--primary-light);
}

.sg-type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.sg-type-card:has(input:checked) {
    border-color: var(--primary);
    background: rgba(108, 99, 255, 0.06);
}

.sg-type-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    gap: 6px;
}

.sg-type-icon {
    font-size: 32px;
}

.sg-type-content strong {
    font-size: 15px;
    color: var(--text-dark);
}

.sg-type-content small {
    font-size: 12px;
    color: var(--text-medium);
}

/* ---------- ENTRY state ---------- */
.sg-entry-toolbar {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--bg-light);
    border: 1px solid #E8E8F0;
    border-radius: var(--radius-md);
    padding: 14px 20px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-sm);
}

.sg-entry-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sg-entry-info strong { font-size: 16px; color: var(--text-dark); }
.sg-entry-meta { font-size: 13px; color: var(--text-medium); }
.sg-entry-progress {
    font-size: 13px;
    color: var(--primary);
    font-weight: 700;
}

.sg-entry-actions {
    display: flex;
    gap: 8px;
}
.sg-entry-actions button {
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.sg-entry-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 16px;
}

@media (max-width: 600px) {
    .sg-entry-cards { grid-template-columns: 1fr; }
}

.sg-entry-card {
    background: white;
    border: 2px solid #E8E8F0;
    border-radius: var(--radius-lg);
    padding: 16px;
    transition: var(--transition);
}

.sg-entry-card.has-error {
    border-color: #FFB3B3;
    background: #FFFAFA;
}

.sg-entry-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.sg-entry-card-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.sg-entry-card-status {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    background: #E8E8F0;
    color: var(--text-medium);
}
.sg-entry-card-status[data-status="partial"] {
    background: #FFF3E0;
    color: #E65100;
}
.sg-entry-card-status[data-status="complete"] {
    background: #E8F5E9;
    color: #2E7D32;
}

.sg-entry-card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.sg-pick-col h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px 0;
}

.sg-pick-pos h4 { color: #2E7D32; }
.sg-pick-neg h4 { color: #D63031; }

.sg-pick-col select,
.sg-pick-col .sg-pick-input {
    width: 100%;
    padding: 7px 9px;
    border: 1.5px solid #E8E8F0;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 6px;
    font-family: inherit;
    background: white;
}

.sg-pick-col select:focus,
.sg-pick-col .sg-pick-input:focus {
    border-color: var(--primary);
    outline: none;
}
.sg-pick-col .sg-pick-input { box-sizing: border-box; -webkit-appearance: none; }
.sg-pick-col .sg-pick-input::placeholder { color: #B6BAC6; }

.sg-pick-pos select,
.sg-pick-pos .sg-pick-input { border-left: 4px solid #C8E6C9; }
.sg-pick-neg select,
.sg-pick-neg .sg-pick-input { border-left: 4px solid #FFCDD2; }

/* Getypt maar (nog) geen bestaande leerlingnaam */
.sg-pick-col .sg-pick-input.sg-input-unknown {
    border-color: #E6A23C;
    background: #FFF9F0;
}

.sg-card-error {
    margin-top: 10px;
    padding: 8px 12px;
    background: #FFEBEE;
    color: #C62828;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

/* ---------- RESULTS state ---------- */
.sg-results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.sg-results-header h2 {
    margin: 0 0 4px 0;
    font-size: 22px;
    color: var(--text-dark);
}

.sg-results-meta {
    color: var(--text-medium);
    font-size: 14px;
    margin: 0;
}

.sg-results-actions {
    display: flex;
    gap: 8px;
}
.sg-results-actions button {
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.sg-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #E8E8F0;
    margin-bottom: 24px;
    overflow-x: auto;
}

.sg-tab {
    padding: 10px 18px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-medium);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-family: inherit;
    white-space: nowrap;
}

.sg-tab:hover {
    color: var(--text-dark);
}

.sg-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.sg-tab-content {
    display: none;
}
.sg-tab-content.active {
    display: block;
}

.sg-tab-intro {
    color: var(--text-medium);
    font-size: 14px;
    margin: 0 0 16px 0;
}

/* Overzicht tabel */
.sg-results-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.sg-results-table th,
.sg-results-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #E8E8F0;
}

.sg-results-table th {
    background: var(--bg-light);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sg-results-table td.num,
.sg-results-table th.num {
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.sg-results-table td.pos { color: #2E7D32; font-weight: 700; }
.sg-results-table td.neg { color: #D63031; font-weight: 700; }

.sg-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.sg-status-popular { background: #FFF9C4; color: #F57F17; }
.sg-status-liked { background: #E8F5E9; color: #2E7D32; }
.sg-status-neutral { background: #ECEFF1; color: #455A64; }
.sg-status-pressure { background: #FFF3E0; color: #E65100; }
.sg-status-avoided { background: #FFCDD2; color: #C62828; }
.sg-status-isolated { background: #FFD0D0; color: #B71C1C; }
.sg-status-invisible { background: #ECEFF1; color: #455A64; }

/* Pair grid (wederzijds, conflict) */
.sg-pair-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.sg-pair-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: white;
    border: 2px solid #E8E8F0;
    border-radius: var(--radius-md);
}

.sg-pair-card.positive { border-color: #C8E6C9; background: #F1F8E9; }
.sg-pair-card.negative { border-color: #FFCDD2; background: #FFF5F5; }

.sg-pair-icon { font-size: 22px; }

.sg-pair-names {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.sg-pair-names strong { color: var(--text-dark); font-size: 14px; }
.sg-pair-link { color: var(--text-medium); font-weight: 700; }

/* Attention list */
.sg-attention-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sg-attention-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #FFF8E1;
    border: 2px solid #FFE082;
    border-radius: var(--radius-md);
}

.sg-attn-icon {
    font-size: 22px;
}

.sg-attention-card strong {
    display: block;
    color: var(--text-dark);
    font-size: 14px;
}

.sg-attention-card small {
    display: block;
    color: var(--text-medium);
    font-size: 12px;
    margin-top: 2px;
}

.sg-attn-neg {
    color: #D63031;
    font-weight: 700;
}

/* form-error reused from style.css */

/* ---------- PLAATSING tab ---------- */
.sg-plaatsing-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.sg-plaatsing-toolbar .sg-tab-intro {
    flex: 1;
    margin: 0;
}

.sg-plaatsing-toolbar .btn-secondary {
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid var(--primary);
    background: white;
    color: var(--primary);
    font-family: inherit;
}
.sg-plaatsing-toolbar .btn-secondary:hover {
    background: rgba(108, 99, 255, 0.05);
}

/* Samenvattings-stats bovenaan */
.sg-pl-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .sg-pl-summary { grid-template-columns: repeat(2, 1fr); }
}

.sg-pl-stat {
    padding: 12px;
    border-radius: var(--radius-md);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sg-pl-stat strong { font-size: 22px; font-weight: 800; }
.sg-pl-stat span { font-size: 11px; font-weight: 600; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.5px; }

.sg-pl-stat-perfect    { background: #E8F5E9; color: #2E7D32; }
.sg-pl-stat-positive   { background: #F1F8E9; color: #558B2F; }
.sg-pl-stat-neutral    { background: #ECEFF1; color: #455A64; }
.sg-pl-stat-suboptimal { background: #FFF3E0; color: #E65100; }

/* Waarschuwing voor harde violations */
.sg-pl-warning {
    background: #FFF3E0;
    border: 2px solid #FFB74D;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 16px;
    color: #5D4037;
    font-size: 14px;
    line-height: 1.6;
}
.sg-pl-warning span { font-weight: 700; }

/* Duo's grid */
.sg-pl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.sg-pl-pair {
    display: flex;
    background: white;
    border: 2px solid #E8E8F0;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.sg-pl-pair:hover {
    box-shadow: var(--shadow-sm);
}

.sg-pl-pair-number {
    background: var(--bg-light);
    color: var(--text-medium);
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid #E8E8F0;
    flex-shrink: 0;
}

.sg-pl-pair-body {
    padding: 12px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sg-pl-pair-names {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.sg-pl-pair-names strong { color: var(--text-dark); }
.sg-pl-pair-link { color: var(--text-medium); }

.sg-pl-pair-meta {
    font-size: 12px;
}

.sg-pl-quality {
    color: var(--text-medium);
}

/* Quality variants */
.sg-pl-perfect    { border-color: #C8E6C9; background: linear-gradient(to right, #F1F8E9 0%, white 30%); }
.sg-pl-perfect .sg-pl-pair-number { background: #E8F5E9; color: #2E7D32; }
.sg-pl-perfect .sg-pl-quality { color: #2E7D32; font-weight: 600; }

.sg-pl-positive .sg-pl-pair-number { background: #F1F8E9; color: #558B2F; }
.sg-pl-positive .sg-pl-quality { color: #558B2F; }

.sg-pl-neutral .sg-pl-pair-number { background: #ECEFF1; color: #455A64; }

.sg-pl-suboptimal { border-color: #FFCC80; background: linear-gradient(to right, #FFF8E1 0%, white 30%); }
.sg-pl-suboptimal .sg-pl-pair-number { background: #FFF3E0; color: #E65100; }
.sg-pl-suboptimal .sg-pl-quality { color: #E65100; font-weight: 600; }

/* Leftover (solo) */
.sg-pl-leftover {
    margin-top: 24px;
    padding: 16px 20px;
    background: #FFF8E1;
    border: 2px dashed #FFD54F;
    border-radius: var(--radius-md);
}

.sg-pl-leftover h4 {
    margin: 0 0 10px 0;
    font-size: 15px;
    color: #6D4C41;
}

.sg-pl-leftover-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.sg-pl-leftover-name {
    background: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    border: 1px solid #FFD54F;
}

.sg-pl-leftover-hint {
    font-size: 12px;
    color: #6D4C41;
    margin: 0;
    font-style: italic;
}

/* ---------- Plaatsing: size selector + groepskaarten ---------- */
.sg-pl-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.sg-pl-size-selector {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 4px;
}

.sg-pl-size-selector span {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 8px;
}

.sg-size-btn {
    border: none;
    background: transparent;
    color: var(--text-dark);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.sg-size-btn:hover {
    background: white;
}

.sg-size-btn.active {
    background: var(--primary);
    color: white;
}

/* Groep-kaarten */
.sg-pl-group {
    background: white;
    border: 2px solid #E8E8F0;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: var(--transition);
}

.sg-pl-group:hover {
    box-shadow: var(--shadow-sm);
}

.sg-pl-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sg-pl-group-header strong {
    font-size: 15px;
    color: var(--text-dark);
}

.sg-pl-group-size {
    font-size: 11px;
    color: var(--text-medium);
    background: var(--bg-light);
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 700;
}

.sg-pl-group-members {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sg-pl-member {
    background: white;
    border: 1px solid #E8E8F0;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-dark);
    font-weight: 600;
}

.sg-pl-group-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--text-medium);
}

.sg-pl-quality { font-weight: 600; }

.sg-pl-bond {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}
.sg-pl-bond-pos { background: #E8F5E9; color: #2E7D32; }
.sg-pl-bond-neg { background: #FFE0B2; color: #E65100; }

.sg-pl-bonds-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px dashed #E8E8F0;
}

.sg-pl-bond-detail {
    font-size: 12px;
    color: var(--text-medium);
}

.sg-pl-bonds-neg .sg-pl-bond-detail {
    color: #E65100;
}

/* Group quality variants */
.sg-pl-great    { border-color: #A5D6A7; background: linear-gradient(to bottom, #F1F8E9 0%, white 60%); }
.sg-pl-good     { border-color: #C5E1A5; }
.sg-pl-neutral  { border-color: #E8E8F0; }
.sg-pl-mixed    { border-color: #FFB74D; background: linear-gradient(to bottom, #FFF8E1 0%, white 60%); }
.sg-pl-critical { border-color: #EF5350; background: linear-gradient(to bottom, #FFEBEE 0%, white 60%); }

.sg-pl-great .sg-pl-quality    { color: #2E7D32; }
.sg-pl-good .sg-pl-quality     { color: #558B2F; }
.sg-pl-mixed .sg-pl-quality    { color: #E65100; font-weight: 700; }
.sg-pl-critical .sg-pl-quality { color: #C62828; font-weight: 700; }

/* ---------- Werkbladen ---------- */
.sg-werkblad {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    background: var(--bg-light);
    border: 1px dashed #C9CEDB;
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 18px;
}

.sg-werkblad-text {
    flex: 1 1 260px;
}

.sg-werkblad-text strong {
    display: block;
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.sg-werkblad-text span {
    font-size: 13px;
    color: var(--text-medium);
    line-height: 1.5;
}

.sg-werkblad-btn {
    padding: 10px 18px;
    background: var(--bg-white);
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    font-family: inherit;
}

.sg-werkblad-btn:hover {
    background: var(--primary);
    color: #fff;
}

.sg-werkblad-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============= DIGITALE AFNAME (knop in setup) ============= */
.sg-digital {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #F3F2FF 0%, #FDEFF6 100%);
    border: 1px solid #E0DBFF;
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 18px;
}
.sg-digital-text { flex: 1 1 260px; }
.sg-digital-text strong {
    display: block;
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 4px;
}
.sg-digital-text span {
    font-size: 13px;
    color: var(--text-medium);
    line-height: 1.5;
}
.sg-digital-text em { font-style: normal; font-weight: 700; color: var(--primary); }
.sg-digital-btn {
    padding: 11px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.sg-digital-btn:hover { box-shadow: 0 8px 22px rgba(108, 99, 255, .35); }
.sg-digital-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============= LIVE STATE (digitale afname) ============= */
.sg-live-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 20px;
    margin-bottom: 22px;
}
@media (max-width: 760px) {
    .sg-live-grid { grid-template-columns: 1fr; }
}
.sg-live-steps {
    font-size: 14px;
    color: var(--text-medium);
    line-height: 1.9;
    margin: 6px 0 16px;
}
.sg-live-steps strong { color: var(--text-dark); }
.sg-live-code-wrap { margin-bottom: 14px; }
.sg-live-code-label {
    display: block;
    font-size: 13px;
    color: var(--text-medium);
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    line-height: 1.45;
}
.sg-live-qr { text-align: center; }
.sg-live-qr img { width: 150px; height: 150px; image-rendering: pixelated; }

.sg-live-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.sg-live-count {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary);
    background: #F1F0FA;
    border-radius: 999px;
    padding: 5px 14px;
    white-space: nowrap;
}
.sg-live-meta {
    font-size: 13px;
    color: var(--text-medium);
    margin: 4px 0 16px;
}
.sg-live-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.sg-live-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 13px 7px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
}
.sg-live-chip .sg-live-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
}
.sg-live-chip.is-done {
    background: #DCF5E2;
    color: #1E7B3A;
    border-color: #BCE8C8;
}
.sg-live-chip.is-done .sg-live-dot { background: #1E7B3A; color: #fff; }
.sg-live-chip.is-todo {
    background: var(--bg-light);
    color: var(--text-medium);
    border-color: #E3E1F2;
}
.sg-live-chip.is-todo .sg-live-dot { background: #C9CEDB; color: #fff; }

/* Lopende digitale sessie in het overzicht */
.sg-past-card.is-live { border-color: var(--primary); background: #FBFAFF; }
.sg-live-badge {
    display: inline-block;
    margin-left: 8px;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    background: #E74C3C;
    border-radius: 999px;
    padding: 2px 9px;
}

/* ============= PER LEERLING (terugkijken wat een kind invulde) ============= */
.sg-ps-table-wrap { overflow-x: auto; }
.sg-ps-table td { vertical-align: top; }
.sg-ps-table td:first-child { white-space: nowrap; }
.sg-ps-names { display: flex; flex-wrap: wrap; gap: 6px; }
.sg-ps-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 11px 4px 5px;
    border-radius: 999px;
    white-space: nowrap;
}
.sg-ps-chip-pos { background: #E7F6EA; color: #2E7D32; }
.sg-ps-chip-neg { background: #FDECEC; color: #C62828; }
.sg-ps-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}
.sg-ps-chip-pos .sg-ps-rank { background: #2E7D32; }
.sg-ps-chip-neg .sg-ps-rank { background: #C62828; }
.sg-ps-empty { color: #B6BAC6; font-size: 13px; }
