k/* Customer Manager Styles */

.customer-manager-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

/* Customers Sidebar */
.customers-sidebar {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: calc(100vh - 280px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-header h3 {
    margin: 0 0 1rem 0;
    color: #1f2937;
}

.search-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
}

.search-input:focus {
    outline: none;
    border-color: #1E40AF;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.customers-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.customer-item {
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.customer-item:hover {
    background: #f3f4f6;
}

.customer-item.active {
    background: #dbeafe;
    border-color: #1E40AF;
}

.customer-item-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.customer-item-info {
    font-size: 0.875rem;
    color: #6b7280;
}

.customer-item-stats {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.customer-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #6b7280;
}

/* Customer Details Section */
.customer-details {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-height: calc(100vh - 280px);
}

.no-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: calc(100vh - 280px);
    color: #6b7280;
}

.no-selection-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.no-selection h3 {
    color: #374151;
    margin-bottom: 0.5rem;
}

/* Customer Details Content */
.customer-details-content {
    padding: 2rem;
}

/* Customer Tabs */
.customer-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
    margin: 2rem 0 0 0;
}

.customer-tabs .tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s;
    margin-bottom: -2px;
}

.customer-tabs .tab-btn:hover {
    color: #1E40AF;
    background: #f9fafb;
}

.customer-tabs .tab-btn.active {
    color: #1E40AF;
    border-bottom-color: #1E40AF;
}

.customer-tab-content {
    display: none;
}

.customer-tab-content.active {
    display: block;
}

.customer-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 2rem;
}

.customer-title h2 {
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.customer-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.customer-actions {
    display: flex;
    gap: 0.75rem;
}

/* Documents Section */
.documents-section {
    margin-top: 2rem;
}

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

.section-header h3 {
    color: #1f2937;
    margin: 0;
}

.documents-grid {
    display: grid;
    gap: 1rem;
}

.document-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: all 0.2s;
}

.document-card:hover {
    background: #f3f4f6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.document-icon {
    font-size: 2rem;
}

.document-info {
    flex: 1;
}

.document-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.document-meta {
    font-size: 0.875rem;
    color: #6b7280;
    display: flex;
    gap: 1rem;
}

.document-actions {
    display: flex;
    gap: 0.5rem;
}

.document-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-quote {
    background: #dbeafe;
    color: #1e40af;
}

.badge-order {
    background: #d1fae5;
    color: #065f46;
}

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

.badge-manual {
    background: #e0e7ff;
    color: #3730a3;
}

.badge-other {
    background: #f3f4f6;
    color: #374151;
}

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

.empty-documents-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Stats Cards */
.customer-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card-small {
    padding: 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-align: center;
}

.stat-card-small .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1E40AF;
    margin-bottom: 0.25rem;
}

.stat-card-small .stat-label {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Badge Styles for unread content */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #ef4444;
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 6px;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

/* Responsive - Only stack on very small screens (tablets and below) */
@media (max-width: 768px) {
    .customer-manager-layout {
        grid-template-columns: 1fr;
    }

    .customers-sidebar {
        height: auto;
        max-height: 300px;
    }

    .customer-meta {
        grid-template-columns: 1fr;
    }

    .customer-stats {
        grid-template-columns: 1fr;
    }
}
