body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

header {
    background: #35424a;
    color: #ffffff;
    padding: 10px 0;
    text-align: center;
}

h1 {
    margin: 0;
}

.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
}

footer {
    background: #35424a;
    color: #ffffff;
    text-align: center;
    padding: 10px 0;
    position: relative;
    bottom: 0;
    width: 100%;
}

form {
    background: #ffffff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Report wide view for better handling of tables with many columns */
.report-wide-view {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

.report-wide-view .container {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Transition effect for smooth resizing */
main {
    transition: max-width 0.3s ease, width 0.3s ease, margin 0.3s ease, padding 0.3s ease;
}

#toggleViewBtn {
    white-space: nowrap;
}
/* Visual cues for draggable youth */
.draggable-youth {
    cursor: grab;
    transition: box-shadow 0.15s, background 0.15s;
}
.draggable-youth:active {
    cursor: grabbing;
}
.draggable-youth:hover, .draggable-youth.drag-over {
    background: #ffe082 !important;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.18);
}
/* Collapsible unit group sidebar indicator and header */
.unit-header {
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}
.unit-header:hover {
    background: #e9ecef;
}
.unit-header .chevron {
    display: inline-flex;
    align-items: center;
    width: 1.2em;
    height: 1.2em;
    transition: transform 0.2s;
    color: #888;
}
/* Group Assignment: Consistent card widths using CSS Grid */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    align-items: stretch;
}
.group-card {
    min-width: 0;
    max-width: 100%;
}

/* Unit color legend styling */
.unit-color-legend {
    max-width: 100%;
    background-color: #f8f9fa !important;
}

.unit-color-legend h6 {
    margin-bottom: 0.5rem;
    color: #495057;
    font-weight: 600;
}

/* ── Preference section cards & question dividers ── */
.pref-section-card .card-header {
    background-color: #f8f9fa;
}

.pref-question-divider {
    margin: 0.75rem 0;
    border-color: #dee2e6;
    opacity: 0.5;
}

/* ── Preference help text & label improvements ── */
.pref-form-label {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.pref-help-text {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    margin-top: 0;
}

.pref-help-text a {
    word-break: break-all;
}

.pref-help-content {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 767.98px) {
    .pref-help-content:not(.pref-help-expanded) {
        -webkit-line-clamp: 3;
    }
}

.pref-help-toggle {
    display: none;
    background: none;
    border: none;
    color: #0d6efd;
    padding: 0;
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: underline;
    margin-top: 0.15rem;
}

.pref-help-toggle:hover {
    color: #0a58ca;
}

/* Admin help text preview */
.pref-help-preview {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    min-height: 2.5rem;
    background: #f8f9fa;
    font-size: 0.875rem;
    color: #6c757d;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.pref-help-preview a {
    pointer-events: none;
    color: #0d6efd;
    text-decoration: underline;
}

/* OTP input styling */
.otp-input {
    font-size: 1.5rem;
    letter-spacing: 0.25em;
    font-family: monospace;
    max-width: 100%;
}

/* Disabled resend link */
.disabled-link {
    color: #6c757d !important;
    pointer-events: none;
    text-decoration: none;
}
