/**
 * Contacts Redesign Styles
 * Command Center, ContactForm, and enhanced table styles
 */

/* ============================================================
   Contacts Filter Chips & Search
   ============================================================ */

.contacts-filter-section {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(to bottom, #fafafa, #fff);
    border-bottom: 1px solid #e5e7eb;
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.filter-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.filter-hint {
    font-size: 0.75rem;
    color: #9ca3af;
}

.contacts-type-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.type-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1.5px solid transparent;
    background: #f3f4f6;
    color: #4b5563;
}

.type-chip:hover {
    background: #e5e7eb;
}

.type-chip.selected {
    border-color: currentColor;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.type-chip.chip-all { --chip-color: #374151; }
.type-chip.chip-all.selected { background: #374151; color: white; }
.type-chip.chip-partner { --chip-color: #7c3aed; }
.type-chip.chip-partner.selected { background: #7c3aed; color: white; }
.type-chip.chip-customer { --chip-color: #2563eb; }
.type-chip.chip-customer.selected { background: #2563eb; color: white; }
.type-chip.chip-vendor { --chip-color: #059669; }
.type-chip.chip-vendor.selected { background: #059669; color: white; }
.type-chip.chip-lead { --chip-color: #d97706; }
.type-chip.chip-lead.selected { background: #d97706; color: white; }

.type-chip .chip-icon {
    font-size: 1rem;
    line-height: 1;
}

.type-chip .chip-count {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    background: rgba(0,0,0,0.08);
    min-width: 1.25rem;
    text-align: center;
}

.type-chip.selected .chip-count {
    background: rgba(255,255,255,0.25);
}

/* Multi-select indicator */
.multi-select-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding: 0.625rem 1rem;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border: 1px solid #c7d2fe;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    color: #4338ca;
}

.multi-select-banner .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    background: #4f46e5;
    color: white;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.75rem;
}

.multi-select-banner .selected-types {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.multi-select-banner .type-tag {
    padding: 0.25rem 0.5rem;
    background: white;
    border-radius: 0.25rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.multi-select-banner .clear-btn {
    margin-left: auto;
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: 1px solid #a5b4fc;
    border-radius: 0.25rem;
    color: #4338ca;
    font-size: 0.75rem;
    cursor: pointer;
}

.multi-select-banner .clear-btn:hover {
    background: white;
}

/* Contact Type Badges in Table */
.contact-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.contact-type-pill.type-partner { background: #f3e8ff; color: #7c3aed; }
.contact-type-pill.type-customer { background: #dbeafe; color: #2563eb; }
.contact-type-pill.type-vendor { background: #d1fae5; color: #059669; }
.contact-type-pill.type-lead { background: #fef3c7; color: #d97706; }

/* Contact Avatar */
.contact-avatar-circle {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8125rem;
    color: white;
    flex-shrink: 0;
}

.contact-avatar-circle.avatar-partner { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.contact-avatar-circle.avatar-customer { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.contact-avatar-circle.avatar-vendor { background: linear-gradient(135deg, #10b981, #059669); }
.contact-avatar-circle.avatar-lead { background: linear-gradient(135deg, #f59e0b, #d97706); }

/* Search bar styling */
.contacts-search-wrapper {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

.contacts-search-wrapper input {
    flex: 1;
    padding: 0.625rem 1rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.contacts-search-wrapper input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.contacts-search-wrapper input::placeholder {
    color: #9ca3af;
}

/* ============================================================
   Command Center — Health Grid
   ============================================================ */

.contacts-command-center {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(to bottom, #f8fafc, #fff);
    border-bottom: 1px solid #e5e7eb;
}

.contacts-health-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 1024px) {
    .contacts-health-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .contacts-health-grid {
        grid-template-columns: 1fr;
    }
}

.contacts-health-card {
    background: #fff;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #d1d5db;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.contacts-health-card.border-blue   { border-left-color: #3b82f6; }
.contacts-health-card.border-green  { border-left-color: #10b981; }
.contacts-health-card.border-amber  { border-left-color: #f59e0b; }
.contacts-health-card.border-purple { border-left-color: #8b5cf6; }

.health-card-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.health-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.health-card-detail {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.health-card-detail.text-red {
    color: #dc2626;
    font-weight: 600;
}

.type-mini-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    font-size: 0.6875rem;
    font-weight: 600;
    margin-right: 0.5rem;
}

/* ============================================================
   Command Center — Action Center
   ============================================================ */

.contacts-action-center {
    margin-top: 1rem;
    background: linear-gradient(135deg, #fefce8, #fef9c3);
    border: 1px solid #fde68a;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
}

.action-center-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.action-center-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #92400e;
}

.action-center-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.375rem;
    background: #f59e0b;
    color: #fff;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
}

.action-center-items {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
}

.action-icon {
    font-size: 0.75rem;
    flex-shrink: 0;
}

.action-text strong {
    font-weight: 700;
}

/* ============================================================
   Contact Form — Steps & Role Cards
   ============================================================ */

.contact-form-container {
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.contact-form-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.step-indicator {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #9ca3af;
    background: transparent;
    transition: all 0.2s;
}

.step-indicator.active {
    color: #4f46e5;
    background: #eef2ff;
    font-weight: 600;
}

.step-indicator.completed {
    color: #059669;
    background: #ecfdf5;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.375rem;
    height: 1.375rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
    background: #e5e7eb;
    color: #6b7280;
}

.step-indicator.active .step-num {
    background: #4f46e5;
    color: #fff;
}

.step-indicator.completed .step-num {
    background: #059669;
    color: #fff;
}

.role-selection-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 1.5rem;
}

@media (max-width: 500px) {
    .role-selection-grid {
        grid-template-columns: 1fr;
    }
}

.role-card {
    position: relative;
    padding: 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    text-align: center;
}

.role-card:hover {
    border-color: var(--role-border, #6366f1);
    background: var(--role-bg, #eef2ff);
}

.role-card.selected {
    border-color: var(--role-border, #6366f1);
    background: var(--role-bg, #eef2ff);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--role-border, #6366f1) 20%, transparent);
}

.role-card-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.role-card-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--role-text, #374151);
}

.role-card-desc {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.role-card-check {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 1.375rem;
    height: 1.375rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: var(--role-border, #6366f1);
}

.role-card-check:empty {
    background: transparent;
}

/* Contact Form Sections */
.contact-form-section {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.contact-form-section:last-child {
    border-bottom: none;
}

.contact-form-section.role-section {
    margin: 0.75rem 1.5rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}

.contact-form-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

/* Form Layout */
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 500px) {
    .form-row-2, .form-row-3 {
        grid-template-columns: 1fr;
    }
}

.form-group {
    margin-bottom: 0.75rem;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.form-label.required::after {
    content: " *";
    color: #dc2626;
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1.5px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #111827;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border: 1.5px solid transparent;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-primary {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
}

.btn-primary:hover {
    background: #4338ca;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: #fff;
    color: #374151;
    border-color: #d1d5db;
}

.btn-secondary:hover {
    background: #f9fafb;
}

/* ============================================================
   Finance Tab — Summary Cards & Mini Tables
   ============================================================ */

.finance-tab-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

@media (max-width: 640px) {
    .finance-tab-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

.finance-summary-card {
    padding: 0.75rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    text-align: center;
}

.finance-summary-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
}

.finance-summary-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin-top: 0.125rem;
}

.finance-summary-value.text-blue { color: #2563eb; }
.finance-summary-value.text-amber { color: #d97706; }

.finance-mini-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.finance-mini-table thead th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.finance-mini-table tbody td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}

.mini-status-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: capitalize;
    background: #e5e7eb;
    color: #374151;
}

.mini-status-badge.status-paid { background: #d1fae5; color: #065f46; }
.mini-status-badge.status-sent { background: #dbeafe; color: #1e40af; }
.mini-status-badge.status-draft { background: #f3f4f6; color: #6b7280; }
.mini-status-badge.status-overdue { background: #fee2e2; color: #991b1b; }
.mini-status-badge.status-partial { background: #fef3c7; color: #92400e; }
.mini-status-badge.status-void { background: #f3f4f6; color: #9ca3af; text-decoration: line-through; }

/* ============================================================
   Partner Tabs — Visits & Leads
   ============================================================ */

.visits-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.visit-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.625rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
}

.visit-date {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    white-space: nowrap;
    min-width: 5rem;
}

.visit-sentiment {
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: capitalize;
}

.visit-notes {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.leads-summary-row {
    display: flex;
    gap: 1.5rem;
    font-size: 0.8125rem;
    color: #374151;
}

.leads-summary-row strong {
    color: #111827;
}

/* ============================================================
   Tag Input — Typeahead Pills
   ============================================================ */

.tag-input-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.5rem;
    border: 1.5px solid #d1d5db;
    border-radius: 0.375rem;
    background: #fff;
    min-height: 2.25rem;
    cursor: text;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.tag-input-wrapper:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.tag-input-wrapper input {
    flex: 1;
    min-width: 6rem;
    border: none;
    outline: none;
    font-size: 0.8125rem;
    padding: 0.125rem 0;
    background: transparent;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    background: #eef2ff;
    color: #4338ca;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.tag-pill .tag-remove {
    cursor: pointer;
    font-size: 0.625rem;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.15s;
    padding: 0 0.125rem;
}

.tag-pill .tag-remove:hover {
    opacity: 1;
}

.tag-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 12rem;
    overflow-y: auto;
    margin-top: 0.25rem;
}

.tag-suggestion-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: background 0.1s;
}

.tag-suggestion-item:hover,
.tag-suggestion-item.highlighted {
    background: #eef2ff;
    color: #4338ca;
}

/* ============================================================
   Entity Type Toggle — Individual / Business
   ============================================================ */

.entity-type-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.entity-type-toggle label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border: 1.5px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    color: #6b7280;
    text-align: center;
}

.entity-type-toggle label:hover {
    border-color: #a5b4fc;
    background: #fafaff;
}

.entity-type-toggle input[type="radio"] {
    display: none;
}

.entity-type-toggle input[type="radio"]:checked + span {
    /* handled via JS class */
}

.entity-type-toggle label.selected {
    border-color: #6366f1;
    background: #eef2ff;
    color: #4338ca;
    font-weight: 600;
}

/* ============================================================
   Vendor Type Group
   ============================================================ */

.vendor-type-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.vendor-type-group label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    border: 1.5px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    color: #6b7280;
}

.vendor-type-group label:hover {
    border-color: #6ee7b7;
    background: #f0fdf4;
}

.vendor-type-group label.selected {
    border-color: #10b981;
    background: #ecfdf5;
    color: #065f46;
    font-weight: 600;
}

.vendor-type-group input[type="radio"] {
    display: none;
}

/* ============================================================
   Documents Tab
   ============================================================ */

/* Toolbar */
.doc-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.doc-toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.doc-filter-select {
    font-size: 0.8125rem;
    padding: 0.375rem 0.625rem;
    min-width: 130px;
    color-scheme: light;
    background-color: #fff;
    color: #1f2937;
}

.doc-archived-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: #6b7280;
    cursor: pointer;
    white-space: nowrap;
}

.doc-archived-toggle input[type="checkbox"] {
    accent-color: #6366f1;
}

/* Compliance Bar */
.doc-compliance-bar {
    padding: 1rem;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 1px solid #a7f3d0;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
}

.doc-compliance-bar.has-issues {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-color: #fecaca;
}

.compliance-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.compliance-score {
    display: flex;
    align-items: baseline;
    gap: 0.375rem;
}

.compliance-score-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #065f46;
}

.doc-compliance-bar.has-issues .compliance-score-value {
    color: #991b1b;
}

.compliance-score-label {
    font-size: 0.8125rem;
    color: #6b7280;
}

.compliance-vendor-type {
    font-size: 0.8125rem;
    color: #6b7280;
}

.compliance-warning {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #92400e;
    background: #fffbeb;
    padding: 0.375rem 0.625rem;
    border-radius: 0.375rem;
    border: 1px solid #fde68a;
}

.compliance-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}

.compliance-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.625rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    background: white;
    border: 1px solid #e5e7eb;
    transition: all 0.15s;
}

.compliance-item.status-valid {
    border-color: #a7f3d0;
    background: #f0fdf4;
}

.compliance-item.status-warning {
    border-color: #fde68a;
    background: #fffbeb;
}

.compliance-item.status-missing {
    border-color: #fecaca;
    background: #fef2f2;
}

.compliance-item[onclick]:hover {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.compliance-item-icon {
    font-size: 1rem;
    flex-shrink: 0;
    width: 1.25rem;
    text-align: center;
}

.compliance-item.status-valid .compliance-item-icon { color: #059669; }
.compliance-item.status-warning .compliance-item-icon { color: #d97706; }
.compliance-item.status-missing .compliance-item-icon { color: #dc2626; }

.compliance-item-label {
    flex: 1;
    font-weight: 500;
}

.compliance-item-status {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    white-space: nowrap;
}

.compliance-item.status-valid .compliance-item-status { color: #059669; }
.compliance-item.status-warning .compliance-item-status { color: #d97706; }
.compliance-item.status-missing .compliance-item-status { color: #dc2626; }

/* Document Category Groups */
.doc-category-group {
    margin-bottom: 1rem;
}

.doc-category-header {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 0.375rem;
}

/* Document Card */
.doc-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.5rem;
    border-radius: 0.375rem;
    transition: background 0.15s;
}

.doc-card:hover {
    background: #f9fafb;
}

.doc-card.archived {
    opacity: 0.55;
}

.doc-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.doc-icon.mime-pdf { background: #fee2e2; color: #dc2626; }
.doc-icon.mime-image { background: #dbeafe; color: #2563eb; }
.doc-icon.mime-spreadsheet { background: #d1fae5; color: #059669; }
.doc-icon.mime-doc { background: #e0e7ff; color: #4f46e5; }
.doc-icon.mime-other { background: #f3f4f6; color: #6b7280; }

.doc-info {
    flex: 1;
    min-width: 0;
}

.doc-name {
    font-weight: 500;
    font-size: 0.875rem;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #9ca3af;
    flex-wrap: wrap;
}

.doc-type-label {
    color: #6b7280;
}

.doc-notes {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.doc-right {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
}

/* Status Badges */
.doc-status-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    white-space: nowrap;
}

.doc-status-valid { background: #d1fae5; color: #065f46; }
.doc-status-expiring_soon { background: #fef3c7; color: #92400e; }
.doc-status-expired { background: #fee2e2; color: #991b1b; }

.doc-archived-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    background: #f3f4f6;
    color: #6b7280;
}

/* Action Buttons */
.doc-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s;
}

.doc-card:hover .doc-actions {
    opacity: 1;
}

.doc-action-btn {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.25rem;
    border: 1px solid #e5e7eb;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: #6b7280;
    transition: all 0.15s;
}

.doc-action-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #374151;
}

.doc-action-btn.doc-action-danger:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

/* Upload Dropzone */
.doc-upload-dropzone {
    border: 2px dashed #d1d5db;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1rem;
}

.doc-upload-dropzone:hover,
.doc-upload-dropzone.dragover {
    border-color: #6366f1;
    background: #eef2ff;
}

.doc-upload-dropzone .dropzone-content p {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.doc-file-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.doc-single-notice {
    padding: 0.5rem 0.75rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    color: #92400e;
    margin-bottom: 0.75rem;
}

/* Empty State */
.doc-empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #6b7280;
}

.doc-empty-state p {
    margin: 0 0 1rem;
}

/* ============================================================
   Sentiment & Likelihood Options — Contact Form
   ============================================================ */

.sentiment-options-inline {
    display: flex;
    gap: 0.5rem;
}

.sentiment-opt {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0.5rem 0.25rem;
    border: 2px solid #d1d5db;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    text-align: center;
}

.sentiment-opt:hover {
    border-color: #9ca3af;
}

.sentiment-opt.selected {
    font-weight: 600;
}

.likelihood-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.likelihood-opt {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.likelihood-opt:hover {
    border-color: #9ca3af;
}

.likelihood-opt.selected {
    font-weight: 600;
}

/* Responsive */
@media (max-width: 640px) {
    .doc-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .doc-toolbar-left {
        flex-direction: column;
    }
    .compliance-items {
        grid-template-columns: 1fr;
    }
    .doc-actions {
        opacity: 1;
    }
}
