/* Custom checkbox */
.custom-checkbox {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-card);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
}
.custom-checkbox:checked {
    background: var(--color-primary);
    border-color: var(--color-primary);
}
.custom-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid var(--color-text-inverse);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.custom-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(7,52,47,0.15);
}

/* Custom select */
.custom-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23888'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Score ring */
.score-ring {
    transform: rotate(-90deg);
}
.score-ring-bg { stroke: var(--color-sage-light); }
.score-ring-fill {
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease-out;
}

/* Dashed border for drop zone */
.drop-zone-border {
    border: 2px dashed var(--color-primary-mid);
}
.drop-zone-active {
    border: 2.5px dashed var(--color-primary);
}

/* Header button — ghost on dark background */
.header-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 32px; padding: 0 12px; white-space: nowrap;
    border-radius: var(--radius-md); font-weight: 500; font-size: var(--text-sm);
    color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.08); border: none;
    cursor: pointer; transition: all var(--transition-base);
}
.header-btn:hover { color: var(--color-text-inverse); background: rgba(255,255,255,0.15); }

/* Form controls */
.form-select {
    appearance: none; width: 100%;
    height: 44px; padding: 0 40px 0 16px;
    border-radius: var(--radius-md); border: 1px solid var(--color-border);
    background: var(--color-bg-card); color: var(--color-text-primary);
    font-size: var(--text-base); transition: all var(--transition-base);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23888'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
}
.form-select:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(7,52,47,0.08); outline: none; }

/* Score dots for section compliance (1-5 scale) */
.score-dot-0 { background-color: var(--color-status-gray-light); }    /* gray - N/A */
.score-dot-1 { background-color: var(--color-status-red); }           /* red - non-compliant */
.score-dot-2 { background-color: #f97316; }                           /* orange - major gaps */
.score-dot-3 { background-color: var(--color-status-amber); }         /* amber - partial */
.score-dot-4 { background-color: #5eead4; }                           /* teal light - mostly compliant */
.score-dot-5 { background-color: var(--color-primary); }              /* varaha teal - fully compliant */

/* Section tree */
.section-tree {
    scrollbar-width: thin;
    scrollbar-color: var(--color-sage-dark) transparent;
}
.section-tree::-webkit-scrollbar { width: 4px; }
.section-tree::-webkit-scrollbar-track { background: transparent; }
.section-tree::-webkit-scrollbar-thumb { background: var(--color-sage-dark); border-radius: 2px; }

/* Sidebar resize cursor override */
body.resizing-sidebar,
body.resizing-sidebar * {
    cursor: col-resize !important;
    user-select: none !important;
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
