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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.header {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-content {
    flex: 1;
}

.header-content h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 5px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.tab-nav {
    display: flex;
    gap: 5px;
    background: #f7fafc;
    padding: 5px;
    border-radius: 10px;
}

.tab-link {
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-link:hover {
    background: #e2e8f0;
    color: #1a202c;
}

.tab-link.active {
    background: linear-gradient(135deg, #e84545 0%, #c72c2c 100%);
    color: white;
}

.header-content h1 i {
    color: #e84545;
    margin-right: 10px;
}

.subtitle {
    color: #718096;
    font-size: 16px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #e84545 0%, #c72c2c 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 69, 69, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

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

.btn-success {
    background: #48bb78;
    color: white;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-success:hover {
    background: #38a169;
}

.btn-info {
    background: #4299e1;
    color: white;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-info:hover {
    background: #3182ce;
}

.btn-danger {
    background: #f56565;
    color: white;
    padding: 8px 16px;
    font-size: 14px;
}

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

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-icon.blue {
    background: linear-gradient(135deg, #e84545 0%, #c72c2c 100%);
}

.stat-icon.green {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.stat-icon.orange {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
}

.stat-icon.purple {
    background: linear-gradient(135deg, #9f7aea 0%, #805ad5 100%);
}

.stat-content h3 {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 5px;
}

.stat-content p {
    color: #718096;
    font-size: 14px;
}

/* Filter Section */
.filter-section {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #e84545;
}

.filter-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    background: white;
    transition: border-color 0.3s ease;
    min-width: 200px;
}

.filter-select:focus {
    outline: none;
    border-color: #e84545;
}

/* Table */
.table-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    overflow: hidden;
}

.clients-table {
    width: 100%;
    border-collapse: collapse;
}

.clients-table thead {
    background: linear-gradient(135deg, #e84545 0%, #c72c2c 100%);
}

.clients-table th {
    padding: 18px;
    text-align: left;
    font-weight: 600;
    color: white;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clients-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.2s ease;
}

.clients-table tbody tr:hover {
    background: #f7fafc;
}

.clients-table td {
    padding: 18px;
    color: #4a5568;
}

.clients-table td:first-child {
    font-weight: 600;
    color: #1a202c;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    max-width: 120px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 5px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78 0%, #38a169 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 13px;
    color: #718096;
    margin-bottom: 3px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #c6f6d5;
    color: #22543d;
}

.badge-warning {
    background: #feebc8;
    color: #7c2d12;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #718096;
}

.empty-state i {
    font-size: 64px;
    color: #cbd5e0;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 24px;
    color: #4a5568;
    margin-bottom: 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.modal-large {
    max-width: 700px;
}

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

.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 24px;
    color: #1a202c;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #a0aec0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: #4a5568;
}

/* Form */
.form-group {
    padding: 0 30px;
    margin-top: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e84545;
}

.form-group textarea {
    resize: vertical;
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #718096;
    font-style: italic;
}

.modal-actions {
    padding: 25px 30px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    border-top: 1px solid #e2e8f0;
    margin-top: 20px;
}

/* Call Modal Specific */
.call-modal-body {
    padding: 30px;
}

.client-info {
    background: linear-gradient(135deg, #e84545 0%, #c72c2c 100%);
    padding: 25px;
    border-radius: 12px;
    color: white;
    margin-bottom: 25px;
}

.client-info h3 {
    font-size: 24px;
    margin-bottom: 5px;
}

.client-info p {
    opacity: 0.9;
    margin-bottom: 15px;
}

.call-progress {
    margin-top: 15px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.calls-list {
    margin-bottom: 20px;
}

.call-entry {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.call-entry:hover {
    border-color: #e84545;
    background: #edf2f7;
}

.call-entry.completed {
    background: #e6fffa;
    border-color: #38b2ac;
}

.call-entry.empty {
    background: white;
    border-style: dashed;
    opacity: 0.7;
}

.call-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.call-entry-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.call-entry-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #e84545 0%, #c72c2c 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.call-entry.completed .call-entry-number {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.call-entry.empty .call-entry-number {
    background: #cbd5e0;
}

.call-entry-info h4 {
    font-size: 16px;
    color: #1a202c;
    margin-bottom: 3px;
}

.call-entry-status {
    font-size: 13px;
    color: #718096;
}

.call-entry-status.completed {
    color: #38a169;
    font-weight: 600;
}

.call-entry-actions {
    display: flex;
    gap: 8px;
}

.call-entry-body {
    padding-left: 52px;
}

.call-entry-date {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #4a5568;
    font-size: 14px;
}

.call-entry-date i {
    color: #e84545;
}

.call-entry-notes {
    background: white;
    padding: 12px;
    border-radius: 6px;
    color: #4a5568;
    font-size: 14px;
    line-height: 1.6;
    border-left: 3px solid #e84545;
}

.call-entry.empty .call-entry-notes {
    background: transparent;
    border: none;
    color: #a0aec0;
    font-style: italic;
}

.add-call-btn {
    width: 100%;
    padding: 15px;
    border: 2px dashed #cbd5e0;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    color: #e84545;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.add-call-btn:hover {
    border-color: #e84545;
    background: #f7fafc;
}

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top-color: #e84545;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: stretch;
    }

    .header-content {
        text-align: center;
    }

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

    .filter-section {
        flex-direction: column;
    }

    .search-box,
    .filter-select {
        width: 100%;
    }

    .table-container {
        overflow-x: auto;
    }

    .clients-table {
        min-width: 800px;
    }

    .calls-grid {
        grid-template-columns: 1fr;
    }
}
