/* Desktop workspace forms. Product colors come from the existing action tokens;
   widths, close controls, checkboxes and actions keep their existing components. */
.modal-card.workspace-form-dialog{
    box-sizing:border-box;
    display:flex;
    flex-direction:column;
    gap:20px;
    max-height:min(90dvh,780px);
    padding:24px;
    overflow:hidden;
    background:#fff;
    color:#172033;
    font-size:15px;
    font-weight:400;
}
:is(.workspace-form-dialog,.workspace-form-surface) [hidden],
.workspace-form-menu[hidden]{display:none!important}
.workspace-form-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    flex:none;
    min-width:0;
}
.workspace-form-header > div{min-width:0}
.workspace-form-dialog .workspace-form-title{
    margin:0;
    font-size:22px;
    font-weight:600;
    line-height:1.35;
    color:inherit;
}
.workspace-form-description{
    margin:6px 0 0;
    color:#64748b;
    font-size:13px;
    font-weight:400;
    line-height:1.6;
}
.workspace-form-description button{
    display:inline;
    min-height:0;
    margin:0;
    padding:0;
    border:0;
    background:transparent;
    color:var(--ui-action-primary);
    font:inherit;
    font-weight:500;
    text-decoration:underline;
    text-underline-offset:3px;
    white-space:nowrap;
    cursor:pointer;
}
.workspace-form-body{
    display:grid;
    gap:16px;
    min-height:0;
    overflow:auto;
    overscroll-behavior:contain;
}
.workspace-form-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:16px;
    align-items:start;
    min-width:0;
}
.workspace-form-field{
    display:grid;
    align-content:start;
    gap:8px;
    min-width:0;
}
.workspace-form-field--wide{grid-column:1 / -1}
.workspace-form-label,
.workspace-form-field > span{
    display:flex;
    align-items:center;
    gap:7px;
    min-height:20px;
    color:#334155;
    font-size:14px;
    font-weight:500;
    line-height:20px;
}
.workspace-form-label [data-lucide],
.workspace-form-field > span > :is(svg,[data-lucide]){width:17px;height:17px;flex:none;color:#8294ad;stroke-width:2.25}
:is(.workspace-form-dialog,.workspace-form-surface) .workspace-form-input,
:is(body.personal-web,body[data-field-icon-theme="group"]) select:not([multiple]):is(:not([size]),[size="1"]){
    box-sizing:border-box;
    width:100%;
    min-width:0;
    height:44px;
    min-height:44px;
    padding:0 12px 0 var(--workspace-input-start-padding,12px);
    border:1px solid var(--ui-border-default);
    border-radius:10px;
    background:#fff;
    color:#172033;
    font-family:inherit;
    font-size:15px;
    font-weight:400;
    line-height:normal;
    box-shadow:none;
}
.workspace-form-input::placeholder{color:#94a3b8;font-weight:400}
:is(.workspace-form-dialog,.workspace-form-surface) textarea.workspace-form-input{
    height:auto;
    min-height:88px;
    padding:12px;
    resize:vertical;
    line-height:1.6;
}
:is(.workspace-form-dialog,.workspace-form-surface) .workspace-form-input:focus,
:is(body.personal-web,body[data-field-icon-theme="group"]) select:focus,
.workspace-input-group:focus-within{outline:none}
:is(.workspace-form-dialog,.workspace-form-surface) .workspace-form-input:disabled,
:is(body.personal-web,body[data-field-icon-theme="group"]) select:disabled{color:#64748b;cursor:not-allowed;opacity:.6}
.workspace-input-group{
    display:flex;
    align-items:center;
    box-sizing:border-box;
    min-width:0;
    height:44px;
    border:1px solid var(--ui-border-default);
    border-radius:10px;
    background:#fff;
}
.workspace-input-group > .workspace-form-input{
    flex:1 1 0;
    width:0;
    height:100%;
    min-height:0;
    border:0;
    border-radius:inherit;
    background:transparent;
    outline:none;
}
.workspace-input-group--choice-only{border:0;background:transparent}
.workspace-form-parts{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
    align-items:center;
    gap:8px;
    min-width:0;
}
.workspace-form-parts .workspace-form-input{text-align:center;text-align-last:center;padding:0 8px}
.workspace-form-parts > span{color:#64748b;font-size:14px;font-weight:400}
.workspace-form-check{
    display:flex;
    align-items:center;
    gap:8px;
    min-height:24px;
    margin:0;
    color:#334155;
    font-size:14px;
    font-weight:500;
    line-height:20px;
    cursor:pointer;
}
.workspace-form-check--field{min-height:44px;margin-top:28px}
.workspace-form-status,
[data-workspace-form-status]{
    margin:0;
    min-height:0;
    color:#64748b;
    font-size:13px;
    font-weight:400;
    line-height:1.5;
    text-align:left;
}
.workspace-form-status.is-error,
[data-workspace-form-status="error"],
[data-workspace-form-status].is-error{color:#dc2626}
[data-workspace-form-status]:empty{display:none}
.workspace-form-actions{flex:none}

/* Name/sex is one 44px control. These are choices, not action buttons. */
.student-gender-toggle{
    display:inline-flex;
    align-items:center;
    flex:none;
    gap:2px;
    margin:0 4px 0 0;
    padding:2px;
    border:1px solid var(--ui-border-default);
    border-radius:999px;
    background:#fff;
    justify-self:start;
    width:max-content;
}
.student-gender-option{
    position:relative;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:28px;
    height:28px;
    padding:0;
    border:0;
    border-radius:999px;
    background:transparent;
    color:#64748b;
    font-size:13px;
    font-weight:500;
    line-height:1;
    cursor:pointer;
}
.student-gender-option:is(.is-active,:has(input:checked)){color:#fff;font-weight:600}
.student-gender-option.is-male:is(.is-active,:has(input:checked)){background:#3971d3}
.student-gender-option.is-female:is(.is-active,:has(input:checked)){background:#e11d48}
.student-gender-option input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.student-gender-option:is(:disabled,:has(input:disabled)){opacity:.5;cursor:not-allowed}
.workspace-form-choices{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
    align-items:center;
    box-sizing:border-box;
    min-height:44px;
    padding:2px;
    border:1px solid var(--ui-border-default);
    border-radius:10px;
    background:#fff;
}
.workspace-form-choice{
    min-width:0;
    min-height:38px;
    padding:0 8px;
    border:0;
    border-radius:7px;
    background:transparent;
    color:#334155;
    font:inherit;
    font-size:14px;
    font-weight:500;
    cursor:pointer;
}
.workspace-form-choice:hover{background:#f8fafc}
.workspace-form-choice:disabled{opacity:.5;cursor:not-allowed}
.workspace-form-choices > span{color:#94a3b8;font-size:14px;font-weight:400}

/* Expand choices within the scrollable body so they cannot cover the footer or
   be clipped by the dialog. Both products use the same tag picker structure. */
.workspace-form-tag,
.workspace-form-picker{display:grid;gap:8px;min-width:0}
.workspace-form-tag-value{
    justify-self:start;
    box-sizing:border-box;
    max-width:100%;
    min-height:24px;
    padding:2px 7px;
    border:1px solid var(--ui-border-default);
    border-radius:5px;
    background:#fff;
    color:#52627a;
    font:inherit;
    font-size:12px;
    font-weight:500;
    line-height:1.5;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    cursor:pointer;
}
.workspace-form-tag-value strong{font:inherit}
.workspace-form-menu{
    display:grid;
    gap:6px;
    align-content:start;
    box-sizing:border-box;
    width:100%;
    max-height:196px;
    padding:4px;
    overflow:auto;
    border:1px solid var(--ui-border-default);
    border-radius:10px;
    background:#fff;
}
.workspace-form-option{
    display:block;
    width:100%;
    min-height:32px;
    padding:6px 9px;
    border:0;
    border-radius:6px;
    background:transparent;
    color:#334155;
    font:inherit;
    font-size:13px;
    font-weight:400;
    line-height:1.5;
    text-align:left;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    cursor:pointer;
}
.workspace-form-option:hover,
.workspace-form-option[aria-selected="true"]{
    background:var(--ui-secondary-focus-fill);
    color:var(--ui-action-primary);
}
.workspace-form-option[aria-selected="true"]{font-weight:500}

/* Optional preset switch in the nested tag editor. */
.workspace-form-save-preset{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0;color:#64748b;font-size:13px;font-weight:400;line-height:1.5;cursor:pointer}
.workspace-form-save-preset input{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.workspace-form-switch{position:relative;flex:none;width:32px;height:20px;border-radius:999px;background:#cbd5e1;transition:background .16s ease}
.workspace-form-switch::after{content:"";position:absolute;top:3px;left:3px;width:14px;height:14px;border-radius:50%;background:#fff;transition:transform .16s ease}
.workspace-form-save-preset input:checked + .workspace-form-switch{background:var(--ui-action-primary)}
.workspace-form-save-preset input:checked + .workspace-form-switch::after{transform:translateX(12px)}
