﻿.cc-app {
    position: relative;
    display: flex;
    min-height: 720px;
    height: calc(100vh - 120px);
    background: #f4f5f7;
    border-radius: 8px;
    overflow: hidden;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    color: #1f2937;
}

.cc-sidebar {
    width: 220px;
    background: #1e1b2e;
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.cc-brand { padding: 20px 18px 16px; }
.cc-brand-title { font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
.cc-brand-sub { font-size: 0.85rem; opacity: 0.75; margin-top: 2px; }

.cc-nav { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px; }
.cc-nav-item {
    appearance: none; border: 0; background: transparent; color: #e5e7eb;
    text-align: left; padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 0.95rem;
}
.cc-nav-item:hover { background: rgba(255, 255, 255, 0.08); }
.cc-nav-item.active { background: #6d28d9; color: #fff; font-weight: 600; }

.cc-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cc-topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px 0; }
.cc-topbar-spacer { flex: 1; }

.cc-count-freeze {
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 14px;
    font-size: 0.88rem;
    line-height: 1.4;
}

.cc-count-freeze-soft {
    background: #fde8e8;
    color: #7f1d1d;
    border-left: 4px solid #dc2626;
}

.cc-count-freeze-hard {
    background: #fee2e2;
    color: #7f1d1d;
    border-left: 4px solid #b91c1c;
}

.cc-count-input {
    width: 88px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 0.9rem;
    background: #fff;
}

.cc-note-input {
    width: 100%;
    min-width: 120px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 0.9rem;
    background: #fff;
}

.cc-note-input:disabled,
.cc-count-input:disabled {
    background: #f9fafb;
    color: #6b7280;
}

.cc-btn-disabled,
.cc-btn:disabled {
    background: #e5e7eb !important;
    color: #9ca3af !important;
    cursor: not-allowed;
    border-color: #e5e7eb !important;
}

.cc-submit-count {
    margin-top: 16px;
}

.cc-submit-error {
    color: #b91c1c;
    font-size: 0.85rem;
    margin-top: 8px;
}

.cc-scan-box {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid #7c3aed;
    border-radius: 10px;
    padding: 12px 14px;
    background: #fff;
    margin-bottom: 14px;
}

.cc-scan-icon {
    width: 22px;
    height: 22px;
    color: #7c3aed;
    flex-shrink: 0;
}

.cc-scan-input {
    flex: 1;
    border: 0;
    outline: none;
    font-size: 1rem;
    background: transparent;
    min-width: 0;
}

.cc-scan-input::placeholder {
    color: #9ca3af;
}

.cc-scan-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.cc-scan-tag {
    appearance: none;
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 0.88rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    cursor: pointer;
}

.cc-scan-tag:hover {
    border-color: #7c3aed;
    color: #5b21b6;
}

.cc-scan-progress {
    color: #6b7280;
    font-size: 0.88rem;
    margin-bottom: 12px;
}

.cc-verified-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.cc-verified-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #dcfce7;
    color: #166534;
    font-size: 0.92rem;
}

.cc-verified-check {
    font-weight: 700;
    flex-shrink: 0;
}

.cc-verified-serial {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 600;
}

.cc-verified-label {
    color: #15803d;
    font-weight: 500;
}

.cc-disc-open {
    color: #b91c1c;
    font-weight: 700;
}

.cc-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.cc-status-pill-closed {
    background: #dcfce7;
    color: #166534;
}

.cc-resolved-section {
    margin-top: 8px;
}

.cc-resolved-section h2 {
    margin: 0 0 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #6b7280;
}

.cc-resolved-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    padding: 10px 14px;
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.9rem;
}

.cc-resolved-id {
    color: #9ca3af;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cc-resolved-action {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    background: #16a34a;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
}

.cc-resolved-by {
    color: #374151;
}

.cc-resolved-reason {
    color: #6b7280;
}

.cc-review-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.cc-review-header h1 {
    margin: 0;
    text-align: center;
    font-size: 1.45rem;
    font-weight: 700;
    color: #111827;
}

.cc-review-header .cc-status-pill {
    justify-self: end;
}

.cc-link-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: #6d28d9;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-align: left;
}

.cc-link-btn:hover {
    text-decoration: underline;
}

.cc-review-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 10px 14px;
    margin-bottom: 16px;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #374151;
}

.cc-review-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px 16px;
    margin-bottom: 12px;
}

.cc-review-card-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.cc-badge-missing {
    background: #fee2e2;
    color: #991b1b;
}

.cc-review-assist {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
    background: #f3e8ff;
    border-radius: 8px;
    color: #5b21b6;
    font-size: 0.88rem;
}

.cc-assist-use {
    appearance: none;
    border: 1px solid #e9d5ff;
    background: #fff;
    color: #6d28d9;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.cc-assist-use:hover {
    background: #faf5ff;
}

.cc-justification {
    width: 100%;
    min-height: 88px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 0.9rem;
    resize: vertical;
}

.cc-review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.cc-review-actions .cc-btn:disabled,
.cc-review-actions .cc-btn-secondary:disabled {
    background: #e5e7eb !important;
    color: #9ca3af !important;
    border-color: #e5e7eb !important;
    cursor: not-allowed;
}
.cc-role-switcher { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.cc-role-label { font-size: 0.7rem; letter-spacing: 0.06em; color: #6b7280; font-weight: 600; }
.cc-role-select { border: 1px solid #d1d5db; border-radius: 6px; padding: 6px 10px; background: #fff; font-size: 0.9rem; }
.cc-content { flex: 1; overflow: auto; padding: 12px 20px 20px; }

.cc-page-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.cc-page-header h1 { margin: 0; font-size: 1.6rem; font-weight: 700; color: #111827; }

.cc-btn {
    appearance: none; border: 1px solid transparent; border-radius: 8px; padding: 8px 14px;
    font-size: 0.9rem; font-weight: 600; cursor: pointer; background: #7c3aed; color: #fff;
}
.cc-btn:hover { background: #6d28d9; }
.cc-btn-secondary { background: #fff; color: #374151; border-color: #d1d5db; }
.cc-btn-secondary:hover { background: #f9fafb; }
.cc-btn-sm { padding: 5px 10px; font-size: 0.82rem; }

.cc-table-wrap { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; overflow: auto; }
.cc-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.cc-table th {
    text-align: left; padding: 10px 12px; background: #f9fafb; color: #6b7280;
    font-weight: 600; border-bottom: 1px solid #e5e7eb; white-space: nowrap;
}
.cc-table td { padding: 10px 12px; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.cc-table tr:last-child td { border-bottom: 0; }
.cc-table tr.clickable { cursor: pointer; }
.cc-table tr.clickable:hover { background: #faf5ff; }

.cc-badge {
    display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px;
    font-size: 0.75rem; font-weight: 600; white-space: nowrap;
}
.cc-badge-serial { background: #f3e8ff; color: #6b21a8; }
.cc-badge-nonserial { background: #dbeafe; color: #1d4ed8; }
.cc-badge-abc-a { background: #fecaca; color: #991b1b; min-width: 1.4rem; justify-content: center; border-radius: 4px; }
.cc-badge-abc-b { background: #fef08a; color: #854d0e; min-width: 1.4rem; justify-content: center; border-radius: 4px; }
.cc-badge-abc-c { background: #e5e7eb; color: #374151; min-width: 1.4rem; justify-content: center; border-radius: 4px; }
.cc-badge-abc-u { background: #f3f4f6; color: #6b7280; min-width: 1.4rem; justify-content: center; border-radius: 4px; }

.cc-due-overdue { color: #b91c1c; background: #fee2e2; padding: 2px 8px; border-radius: 6px; font-weight: 600; }
.cc-due-soon { color: #b45309; background: #ffedd5; padding: 2px 8px; border-radius: 6px; font-weight: 600; }
.cc-due-ontrack { color: #047857; background: #d1fae5; padding: 2px 8px; border-radius: 6px; font-weight: 600; }
.cc-active { color: #047857; font-weight: 600; }
.cc-empty { color: #6b7280; padding: 12px 0; }

.cc-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 16px; }
.cc-card-title { font-size: 0.72rem; letter-spacing: 0.06em; color: #6b7280; font-weight: 700; margin: 0 0 10px; }

.cc-filters { display: flex; gap: 8px; margin-bottom: 14px; }
.cc-filter {
    appearance: none; border: 1px solid #d1d5db; background: #fff; color: #374151;
    border-radius: 8px; padding: 6px 12px; cursor: pointer; font-size: 0.88rem;
}
.cc-filter.active { background: #6d28d9; border-color: #6d28d9; color: #fff; font-weight: 600; }

.cc-assist {
    background: #1a1121;
    color: #f5f3ff;
    border-radius: 12px;
    padding: 16px 18px;
    margin-top: 16px;
}

.cc-assist-title {
    color: #d8b4fe;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.cc-assist-card {
    background: #251b2e;
    border-radius: 10px;
    padding: 14px 16px 16px;
}

.cc-assist-sub {
    color: #d8b4fe;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.cc-assist-message {
    color: #f3f4f6;
    font-size: 0.92rem;
    line-height: 1.45;
    margin-bottom: 14px;
}

.cc-assist-apply {
    appearance: none;
    border: 0;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    background: #8b29b3;
    color: #fff;
}

.cc-assist-apply:hover {
    background: #7a249e;
}

.cc-metric { font-size: 2rem; font-weight: 800; margin: 4px 0 8px; }
.cc-progress { height: 10px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.cc-progress > span { display: block; height: 100%; background: #7c3aed; }
.cc-progress-sm { height: 6px; margin-top: 6px; }

.cc-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
@media (max-width: 1100px) { .cc-grid-3 { grid-template-columns: 1fr; } }

.cc-row { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid #f3f4f6; font-size: 0.9rem; }
.cc-row:last-child { border-bottom: 0; }
.cc-muted { color: #6b7280; font-size: 0.85rem; }
.cc-danger { color: #b91c1c; font-weight: 700; }

.cc-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cc-field label { display: block; font-size: 0.8rem; color: #6b7280; margin-bottom: 4px; font-weight: 600; }
.cc-field input, .cc-field select, .cc-field textarea {
    width: 100%; border: 1px solid #d1d5db; border-radius: 6px; padding: 8px 10px; font-size: 0.9rem;
}
.cc-field textarea { min-height: 80px; }
.cc-actions { display: flex; gap: 8px; margin-top: 16px; }

.cc-scan-feedback { margin-top: 10px; padding: 10px 12px; border-radius: 8px; font-weight: 600; }
.cc-scan-match { background: #d1fae5; color: #065f46; }
.cc-scan-warn { background: #fef3c7; color: #92400e; }
.cc-scan-error { background: #fee2e2; color: #991b1b; }
.cc-modal-actions { display: flex; gap: 8px; margin-top: 8px; }
.cc-section { margin-bottom: 20px; }
.cc-section h2 { font-size: 1.1rem; margin: 0 0 8px; }

/* In-flow editor shell (avoids XAF clipping of position:fixed/absolute overlays). */
.cc-editor-shell {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 12px 8px 24px;
    background: rgba(30, 27, 46, 0.08);
    border-radius: 12px;
    min-height: 520px;
}

.cc-modal {
    width: min(440px, 100%);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
}

.cc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 8px;
}

.cc-modal-header h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #111827;
}

.cc-modal-close {
    appearance: none;
    border: 0;
    background: transparent;
    color: #6b7280;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.cc-modal-close:hover { color: #111827; }

.cc-modal-body {
    padding: 8px 18px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cc-modal-footer {
    padding: 8px 18px 18px;
}

.cc-btn-block {
    width: 100%;
    padding: 10px 14px;
}

.cc-field-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #374151;
    font-weight: 600;
    margin: 0;
}

.cc-field-checkbox input[type="checkbox"] {
    width: auto;
}
