:root {
    --sidebar-width: 240px;
    --topbar-height: 56px;
    --primary: #1a56db;
    --primary-hover: #1545b5;
    --bg-sidebar: #1e293b;
    --bg-main: #f1f5f9;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-sidebar: #cbd5e1;
    --border: #e2e8f0;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #d97706;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-main);
}

.app-container {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    color: var(--text-sidebar);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h3 {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.sidebar-nav {
    list-style: none;
    padding: 8px 0;
}

.sidebar-nav li {
    margin: 2px 0;
}

.sidebar-nav .nav-link {
    display: block;
    padding: 10px 20px;
    color: var(--text-sidebar);
    text-decoration: none;
    transition: background 0.15s;
    font-size: 14px;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    height: var(--topbar-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
}

.topbar-left span {
    font-weight: 600;
    font-size: 16px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info {
    color: var(--text-secondary);
    font-size: 13px;
}

.content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
}

h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    margin-top: 24px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header h1 {
    margin-bottom: 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
}

.card h3 {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.stat {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: #f8fafc;
}

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-draft {
    background: #e2e8f0;
    color: #475569;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-confirmed {
    background: #dcfce7;
    color: #166534;
}

.badge-complete {
    background: #dbeafe;
    color: var(--primary);
}

.badge-active {
    background: #dcfce7;
    color: var(--success);
}

.badge-completed {
    background: #dbeafe;
    color: var(--primary);
}

.clickable-table tbody tr:hover {
    background: #f0f4ff;
    transition: background 0.15s;
}

.clickable-table tbody tr.selected-row {
    background: #dbeafe;
    border-left: 3px solid var(--primary);
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 12px 0;
    font-size: 14px;
}

.positions-needed {
    font-size: 12px;
    color: #b45309;
}

.needs-badge {
    color: #b45309;
    font-weight: 600;
}

.assessment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.assessment-header h1 {
    margin: 0 12px 0 0;
    display: inline;
}

.assessment-header > div:first-child {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.assessment-header-actions {
    display: flex;
    gap: 8px;
}

.assessment-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.detail-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
}

.detail-card h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}

.detail-label {
    color: #64748b;
    font-weight: 500;
}

.detail-value {
    color: #1e293b;
    text-align: right;
}

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

.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--bg-main);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-full {
    width: 100%;
    padding: 10px;
}

.btn-logout {
    background: transparent;
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    color: var(--text-secondary);
}

.btn-logout:hover {
    background: #f8fafc;
}

.btn-login {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.form-container {
    max-width: 640px;
}

.form-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 13px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-primary);
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.form-control.inline {
    width: auto;
    min-width: 200px;
}

.form-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: end;
    flex-wrap: wrap;
}

.filter-bar .filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-bar .filter-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
}

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.alert-danger {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--bg-main);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-card h1 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 4px;
}

.login-card h2 {
    text-align: center;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 24px;
    margin-top: 0;
}

.login-hint {
    margin-top: 16px;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
}

.validation-message {
    color: var(--danger);
    font-size: 12px;
    margin-top: 4px;
}

.controls-page {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.controls-top-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.assessment-selector {
    min-width: 260px;
}

.assessment-selector select {
    font-size: 13px;
    padding: 6px 10px;
}

.assessment-context-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #eef3ff;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    flex-wrap: wrap;
}

.assessment-context-name {
    font-weight: 600;
    color: var(--primary);
}

.assessment-context-role {
    color: var(--text-secondary);
}

.badge-group {
    background: var(--primary);
    color: #fff;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.badge-readonly {
    background: #dc3545;
    color: #fff;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.controls-search {
    flex: 1;
    min-width: 200px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.families-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 18px;
}

.bar-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 600;
    margin-right: 12px;
}

.families-bar .btn-sm {
    font-size: 0.78rem;
    padding: 4px 12px;
    border-radius: 999px;
}

.controls-body {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px;
    flex: 1;
    min-height: 0;
}

.groupings-panel {
    border-right: 1px solid #eee;
    padding-right: 8px;
}

.groupings-panel h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

.groupings-buttons {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.groupings-buttons .btn-sm {
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 6px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 6px;
}

.workspace {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: auto;
}


.group-badge {
    font-size: 0.65rem;
    background: #22c55e;
    color: white;
    padding: 1px 6px;
    border-radius: 999px;
    font-weight: 600;
    margin-left: auto;
}

.group-assigned.btn-secondary {
    border-color: #22c55e;
}

.controls-strip, .objective-strip {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.chip {
    border: 1px solid #ddd;
    padding: 6px 10px;
    border-radius: 999px;
    background: white;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s;
}

.chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.chip.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.control-workspace {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.workspace-header h4 {
    margin: 8px 0 2px;
    font-size: 18px;
}

.workspace-header .muted {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 4px;
}

.workspace-content {
    overflow: auto;
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-block {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 12px;
    background: #fff;
}

.card-block h5 {
    font-size: 15px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.card-block label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    display: block;
}

.card-block .form-select,
.card-block .form-control {
    margin-top: 4px;
    margin-bottom: 4px;
}

.card-block details {
    margin-top: 8px;
}

.card-block details summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary);
    padding: 4px 0;
}

.objective-text-block {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.save-row {
    position: sticky;
    bottom: 0;
    padding: 10px 0;
    background: white;
    border-top: 1px solid #eee;
}

.save-row button:disabled {
    background-color: #ccc;
    border-color: #ccc;
    color: #888;
    cursor: not-allowed;
    opacity: 0.65;
}

.field-disabled {
    background-color: #f0f0f0 !important;
    color: #999 !important;
    cursor: not-allowed;
}

.empty-state {
    color: var(--text-secondary);
    font-size: 13px;
    padding: 16px 0;
}

.mt-2 {
    margin-top: 8px;
}

.form-select {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--text-primary);
}

.toast-message {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    animation: fadeIn 0.2s;
}

.toast-success {
    background: #dcfce7;
    color: var(--success);
    border: 1px solid #bbf7d0;
}

.toast-error {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn-sm {
    padding: 4px 12px;
    font-size: 13px;
}

.score-display {
    display: flex;
    align-items: baseline;
    gap: 4px;
    background: var(--bg-card);
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 8px 16px;
    white-space: nowrap;
}

.score-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.score-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--success);
}

.score-value.score-deducted {
    color: var(--danger);
}

.score-separator {
    font-size: 18px;
    color: var(--text-secondary);
}

.score-total {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
}

.requirement-score-badge {
    display: inline-block;
    background: #eff6ff;
    color: var(--primary);
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 13px;
    margin-top: 4px;
}

.requirement-description {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-primary);
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 4px;
}

.chip-met {
    border-color: var(--success) !important;
    background: #dcfce7 !important;
    color: var(--success) !important;
}

.chip-notmet {
    border-color: var(--danger) !important;
    background: #fef2f2 !important;
    color: var(--danger) !important;
}

.chip.active.chip-met {
    background: var(--success) !important;
    color: #fff !important;
}

.chip.active.chip-notmet {
    background: var(--danger) !important;
    color: #fff !important;
}

.objective-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.objective-header-row h5 {
    margin: 0;
}

.status-buttons {
    display: flex;
    gap: 6px;
}

.btn-status {
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #ddd;
    background: #fff;
    transition: all 0.15s;
}

.btn-met {
    color: var(--success);
    border-color: #bbf7d0;
}

.btn-met:hover {
    background: #dcfce7;
}

.btn-met-active {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}

.btn-notmet {
    color: var(--danger);
    border-color: #fecaca;
}

.btn-notmet:hover {
    background: #fef2f2;
}

.btn-notmet-active {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.status-hint {
    font-size: 12px;
    margin-top: 4px;
    padding: 4px 0;
}

.status-met-text {
    color: var(--success);
    font-weight: 500;
}

.status-notmet-text {
    color: var(--danger);
    font-weight: 500;
}

.special-considerations {
    border-left: 3px solid #f59e0b;
}

.special-considerations h5 {
    color: #b45309;
}

.special-considerations p {
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 4px;
}

.discussion-text {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0;
    max-height: 300px;
    overflow-y: auto;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-panel, .delete-dialog {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 24px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.delete-dialog h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #dc2626;
}

.delete-dialog .form-group {
    margin-bottom: 16px;
}

.delete-dialog .form-actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

.modal-panel h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.modal-panel p {
    margin-bottom: 16px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.badge-role {
    display: inline-block;
    background: #dbeafe;
    color: #1e40af;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 4px;
}

.guest-banner {
    background: #fef3c7;
    color: #92400e;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 12px;
    border: 1px solid #fde68a;
}

.form-hint {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 16px;
}

.team-table {
    margin-bottom: 16px;
}

.team-table select {
    min-width: 160px;
}

.team-add-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.team-add-row select {
    flex: 1;
}

.user-search-container {
    flex: 1;
    position: relative;
}

.user-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.user-search-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
}

.user-search-item:hover {
    background: #e0edff;
}

.user-search-item:last-child {
    border-bottom: none;
}

.btn-outline-replace {
    background: transparent;
    border: 1px solid #6366f1;
    color: #6366f1;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
}

.btn-outline-replace:hover {
    background: #6366f1;
    color: white;
}

.btn-inbrief {
    background: #059669;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-inbrief:hover {
    background: #047857;
    color: white;
}

.btn-exsum {
    background: #7c3aed;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-exsum:hover {
    background: #6d28d9;
    color: white;
}

.btn-car {
    background: #dc2626;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-car:hover {
    background: #b91c1c;
    color: white;
}

.btn-finalize {
    background: #374151;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-finalize:hover {
    background: #1f2937;
    color: white;
}

.badge-finalized {
    background: #374151;
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.btn-close-alert {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: inherit;
    padding: 0 4px;
}

.stats-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 16px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    min-width: 120px;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: #64748b;
}

.form-select-sm {
    padding: 4px 8px;
    font-size: 13px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
}

.form-select {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
}

.btn-success {
    background-color: #059669;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.btn-success:hover {
    background-color: #047857;
}

.badge-info {
    background-color: #2563eb;
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.assessment-controls-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.assessment-controls-title {
    font-weight: 600;
    font-size: 16px;
    color: #1e293b;
}

.lock-settings {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lock-toggle-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

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

.toggle-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.toggle-description {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    min-width: 44px;
    height: 24px;
    margin-top: 2px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #cbd5e1;
    border-radius: 24px;
    transition: 0.2s;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.progress-dashboard {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.progress-stat-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.progress-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    flex: 1;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 600;
    margin-top: 4px;
}

.stat-met {
    color: #16a34a;
}

.stat-notmet {
    color: #dc2626;
}

.stat-remaining {
    color: #6b7280;
}

.percent-red {
    color: #dc2626;
}

.percent-orange {
    color: #ea580c;
}

.percent-blue {
    color: #2563eb;
}

.percent-green {
    color: #16a34a;
}

.progress-bar-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.progress-bar-track {
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.4s ease;
    min-width: 0;
}

.progress-bar-fill.percent-red {
    background-color: #dc2626;
}

.progress-bar-fill.percent-orange {
    background-color: #ea580c;
}

.progress-bar-fill.percent-blue {
    background-color: #2563eb;
}

.progress-bar-fill.percent-green {
    background-color: #16a34a;
}

.progress-bar-text {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

.checklist-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-top: 8px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
}

.checklist-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.checklist-display {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.checklist-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    background: #fee2e2;
    color: #991b1b;
}

.checklist-badge::before {
    content: "\2717";
    font-weight: 700;
}

.checklist-badge.checked {
    background: #dcfce7;
    color: #166534;
}

.checklist-badge.checked::before {
    content: "\2713";
}

.btn-outline-observation {
    background: transparent;
    color: #6366f1;
    border: 1px solid #6366f1;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    margin-right: 8px;
    transition: all 0.15s;
}

.btn-outline-observation:hover {
    background: #6366f1;
    color: white;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.observation-modal {
    background: white;
    border-radius: 12px;
    width: 560px;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header-bar h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 22px;
    color: #6b7280;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.btn-close-modal:hover {
    color: #111;
}

.modal-body-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid #e5e7eb;
}

.observation-context {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.observation-save-msg {
    font-size: 13px;
    margin-right: auto;
}

.observation-history {
    margin-top: 16px;
    border-top: 1px solid #e5e7eb;
    padding-top: 12px;
}

.observation-history h6 {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 8px;
}

.observation-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.observation-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

.observation-author {
    font-weight: 600;
    color: #374151;
}

.observation-date {
    color: #9ca3af;
}

.observation-text {
    font-size: 13px;
    color: #374151;
    white-space: pre-wrap;
}

.observation-count-badge {
    display: inline-block;
    background: #6366f1;
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
}

.observation-unread-banner {
    background: #eef2ff;
    color: #4338ca;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.observation-feed {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.observation-feed-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 14px;
}

.observation-feed-item.observation-unread {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.observation-feed-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.observation-link {
    display: flex;
    gap: 4px;
    text-decoration: none;
}

.observation-link:hover .badge {
    opacity: 0.8;
}

.observation-feed-author {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

.observation-feed-date {
    font-size: 12px;
    color: #9ca3af;
    margin-left: auto;
}

.observation-feed-text {
    font-size: 13px;
    color: #374151;
    white-space: pre-wrap;
}

.unsaved-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    padding: 8px 14px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #92400e;
    font-weight: 500;
}

.unsaved-banner .btn {
    font-size: 12px;
    padding: 4px 12px;
}

.unsaved-dialog {
    background: white;
    border-radius: 12px;
    width: 440px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.unsaved-dialog .modal-body-content p {
    margin: 0;
    font-size: 14px;
    color: #374151;
}

.btn-danger {
    background-color: #ef4444;
    border-color: #ef4444;
    color: white;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-danger:hover {
    background-color: #dc2626;
    border-color: #dc2626;
}

.chip-skipped {
    background: #fef3c7 !important;
    color: #92400e !important;
    border-color: #f59e0b !important;
}

.chip-sm {
    font-size: 11px !important;
    padding: 2px 8px !important;
    min-width: auto !important;
}

.btn-not-assessed {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.btn-not-assessed:hover {
    background: #fde68a;
    border-color: #d97706;
}

.not-assessed-icon {
    font-size: 14px;
}

.not-assessed-modal {
    background: white;
    border-radius: 12px;
    width: 560px;
    max-width: 90vw;
    max-height: 80vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.not-assessed-body {
    overflow-y: auto;
    max-height: 50vh;
}

.not-assessed-summary {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 12px 0;
}

.not-assessed-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.not-assessed-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.15s;
}

.not-assessed-item:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.not-assessed-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.not-assessed-family {
    font-size: 12px;
    color: #9ca3af;
}

.not-assessed-count {
    font-size: 12px;
    color: #f59e0b;
    font-weight: 600;
    margin-left: auto;
}

.not-assessed-objectives {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.btn-docs {
    margin-top: 16px;
    width: 100%;
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-docs:hover {
    background: #e0e7ff;
    border-color: #a5b4fc;
}

.btn-interviews {
    margin-top: 8px;
    width: 100%;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-interviews:hover {
    background: #fde68a;
    border-color: #f59e0b;
}

.interview-add-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.interview-add-row .form-control {
    flex: 1;
}

.interview-date-input {
    max-width: 160px !important;
}

.interview-date-badge {
    font-size: 11px;
    color: #92400e;
    background: #fef3c7;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    white-space: nowrap;
}

.interview-check.checked {
    background: #fef3c7 !important;
    border-color: #f59e0b !important;
    color: #92400e !important;
}

.docs-modal {
    background: white;
    border-radius: 12px;
    width: 520px;
    max-width: 90vw;
    max-height: 80vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.docs-modal-hint {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 12px 0;
}

.docs-add-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.docs-add-row .form-control {
    flex: 1;
}

.docs-list {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 300px;
    overflow-y: auto;
}

.docs-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f9fafb;
}

.docs-item-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: #1f2937;
}

.docs-item-date {
    font-size: 11px;
    color: #9ca3af;
    white-space: nowrap;
}

.btn-remove-doc {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.btn-remove-doc:hover {
    color: #dc2626;
}

.assessed-documents-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 6px;
}

.assessed-docs-label {
    font-size: 12px;
    font-weight: 600;
    color: #4338ca;
    margin-right: 4px;
}

.assessed-doc-tag {
    display: inline-block;
    font-size: 11px;
    padding: 3px 10px;
    background: white;
    border: 1px solid #c7d2fe;
    border-radius: 12px;
    color: #4338ca;
    font-weight: 500;
}

.assessed-doc-check {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    padding: 3px 10px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    color: #6b7280;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.assessed-doc-check.checked {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4338ca;
}

.assessed-doc-check input[type="checkbox"] {
    margin: 0;
    accent-color: #4338ca;
}

.privacy-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.privacy-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.privacy-label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

.privacy-toggle input[type="checkbox"] {
    display: none;
}

.privacy-slider {
    width: 36px;
    height: 20px;
    background: #d1d5db;
    border-radius: 10px;
    position: relative;
    transition: background 0.2s;
}

.privacy-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

.privacy-toggle input:checked + .privacy-slider {
    background: #f59e0b;
}

.privacy-toggle input:checked + .privacy-slider::after {
    transform: translateX(16px);
}

.btn-commit {
    background: #059669;
    color: white;
    border: none;
    font-weight: 600;
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-commit:hover {
    background: #047857;
}

.btn-reactivate {
    background: transparent;
    color: #92400e;
    border: 1px solid #fbbf24;
    font-weight: 600;
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.privacy-members-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #92400e;
}

.privacy-members-icon {
    font-size: 13px;
}

.privacy-members-indicator.privacy-none {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #6b7280;
}

.lead-view-banner {
    background: #eff6ff;
    border: 1px solid #93c5fd;
    border-radius: 6px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #1e40af;
    margin-bottom: 10px;
}

.lead-view-icon {
    font-size: 16px;
}

.btn-reactivate:hover {
    background: #fef3c7;
}

.badge-committed {
    background: #059669 !important;
    color: white !important;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.badge-privacy {
    background: #f59e0b !important;
    color: white !important;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.badge-draft {
    background: #9ca3af !important;
    color: white !important;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.committed-date-hint {
    font-size: 10px;
    color: #6b7280;
    margin-left: 4px;
}

.privacy-banner {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.privacy-banner-icon {
    font-size: 16px;
}

.committed-banner {
    background: #d1fae5;
    border: 1px solid #059669;
    color: #065f46;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.committed-banner-icon {
    font-size: 16px;
}

.commit-modal {
    background: white;
    border-radius: 12px;
    width: 480px;
    max-width: 90vw;
}

.commit-header {
    background: #059669;
    color: white;
}

.commit-header .btn-close-modal {
    color: white;
}

.reactivate-header {
    background: #f59e0b;
    color: white;
}

.reactivate-header .btn-close-modal {
    color: white;
}

.commit-warning {
    color: #92400e;
    background: #fef3c7;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    border: 1px solid #fcd34d;
}

.stats-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 16px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    min-width: 120px;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: #64748b;
}

.badge-open {
    background: #fef2f2;
    color: #ef4444;
}

.badge-inprogress {
    background: #fffbeb;
    color: #f59e0b;
}

.badge-resolved {
    background: #eff6ff;
    color: #3b82f6;
}

.badge-closed {
    background: #f0fdf4;
    color: #22c55e;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 8px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #b91c1c;
}

.review-gate-section {
    margin-top: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.review-status-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.review-locked-icon {
    font-size: 0.85rem;
    color: #059669;
    font-weight: 600;
}

.badge-review-submitted {
    background: #dbeafe;
    color: #2563eb;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-review-accepted {
    background: #dcfce7;
    color: #16a34a;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-review-correction {
    background: #fef2f2;
    color: #dc2626;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.review-comments-box {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    padding: 10px 12px;
    margin-top: 8px;
}

.review-comments-box p {
    margin: 4px 0 8px 0;
    color: #991b1b;
}

.review-actions-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
    flex-wrap: wrap;
}

.review-return-group {
    display: flex;
    gap: 6px;
    align-items: center;
}

.btn-review-submit {
    background: #2563eb;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
}

.btn-review-submit:hover {
    background: #1d4ed8;
}

.btn-accept {
    background: #16a34a;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
}

.btn-accept:hover {
    background: #15803d;
}

.btn-return {
    background: #dc2626;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
}

.btn-return:hover {
    background: #b91c1c;
}

.review-message {
    margin-top: 8px;
    font-size: 0.85rem;
}

.text-success {
    color: #16a34a;
}

.text-danger {
    color: #dc2626;
}

.filter-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
}

.clickable-table tbody tr:hover {
    background: #f1f5f9;
    cursor: pointer;
}
