:root {
    --qs-textarea-max-height: 140px;
}

textarea:not([data-fixed-height="true"]) {
    min-height: 56px;
    max-height: var(--qs-textarea-max-height);
    resize: vertical;
    overflow-y: auto;
}

.qs-input-sm { min-height: 32px !important; padding: 6px 8px !important; font-size: 12px !important; }
.qs-input-md { min-height: 38px !important; padding: 8px 10px !important; font-size: 13px !important; }

.qs-textarea-auto,
.qs-textarea-clinical,
.qs-textarea-large {
    width: 100% !important;
    height: auto;
    resize: vertical !important;
    overflow-y: auto;
    line-height: 1.4;
    padding: 8px 10px;
    max-height: var(--qs-textarea-max-height) !important;
}

.qs-textarea-auto { min-height: 56px !important; }
.qs-textarea-clinical { min-height: 56px !important; }
.qs-textarea-large { min-height: 56px !important; }
.qs-textarea-auto.qs-scrollable,
.qs-textarea-clinical.qs-scrollable,
.qs-textarea-large.qs-scrollable { overflow-y: auto; }

.qs-textarea-shell { position: relative; display: grid; gap: 4px; width: 100%; }
.qs-textarea-tools { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 18px; }
.qs-textarea-count { margin-left: auto; color: var(--qs-muted, #627875); font-size: 10px; font-weight: 700; text-align: right; }
.qs-textarea-expand {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border: 1px solid var(--qs-border, #d6e5df);
    border-radius: 6px;
    background: rgba(255,255,255,.92);
    color: var(--qs-primary, #168576);
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}
.qs-textarea-expand:hover { background: #e6f7f2; }

.qs-textarea-modal {
    border: 0;
    border-radius: var(--qs-radius, 10px);
    width: min(1080px, 94vw);
    max-width: 94vw;
    padding: 0;
    box-shadow: 0 24px 80px rgba(14, 42, 42, .26);
}
.qs-textarea-modal::backdrop { background: rgba(14, 42, 42, .38); }
.qs-textarea-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--qs-primary, #168576);
    color: #fff;
    font-weight: 800;
}
.qs-textarea-modal-body { padding: 14px; background: var(--qs-card-bg, #fff); }
.qs-textarea-modal textarea {
    min-height: 62vh !important;
    max-height: 72vh !important;
    resize: vertical !important;
    overflow-y: auto !important;
}

.qs-container-compact { width: 100%; max-width: 1440px; margin-inline: auto; }
.qs-grid-responsive { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 1500px) { .qs-grid-responsive { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .qs-grid-responsive { grid-template-columns: 1fr; } }
