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

body {
    font-family: 'Circular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f7f7f7;
    color: #222;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

header {
    text-align: center;
    margin-bottom: 48px;
}

h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    color: #00447C;
}

.subtitle {
    font-size: 18px;
    color: #717171;
    max-width: 600px;
    margin: 0 auto;
}

.upload-area {
    background: white;
    border: 2px dashed #ddd;
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 16px;
}

.upload-area:hover {
    border-color: #00447C;
    background: #f0f7ff;
}

.upload-area.dragover {
    border-color: #00447C;
    background: #f0f7ff;
    transform: scale(1.02);
}

.upload-area.uploading {
    cursor: default;
    pointer-events: none;
}

.upload-area.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.upload-text {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #222;
}

.upload-subtext {
    color: #717171;
    font-size: 14px;
}

input[type="file"] {
    display: none;
}

.progress-container {
    display: none;
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
}

.progress-container.active {
    display: block;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #ebebeb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, #00447C 0%, #0066B3 50%, #00447C 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: #717171;
}

.date-selector {
    display: none;
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 40px;
}

.date-selector.active {
    display: block;
}

.date-selector-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #222;
}

.date-input-wrapper {
    display: flex;
    gap: 16px;
    align-items: center;
}

.date-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    color: #222;
    transition: border-color 0.2s ease;
}

.date-input:focus {
    outline: none;
    border-color: #00447C;
}

.btn-apply-date {
    background: linear-gradient(to right, #00447C 0%, #0066B3 50%, #00447C 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-apply-date:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 12px rgba(0, 68, 124, 0.3);
}

.participant-info {
    background: white;
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
    display: none;
    align-items: center;
    justify-content: space-between;
}

.participant-info.active {
    display: flex;
}

.participant-label {
    font-size: 14px;
    color: #717171;
    margin-bottom: 4px;
}

.participant-id {
    font-size: 18px;
    font-weight: 600;
    color: #00447C;
}

.chats-container {
    display: none;
}

.chats-container.active {
    display: block;
}

.chats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid #ebebeb;
}

.chats-count {
    font-size: 24px;
    font-weight: 600;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.chat-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.chat-card:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.chat-card.selected {
    border: 2px solid #00447C;
}

.chat-card.error {
    border: 2px solid #D32F2F;
}

.card-main {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.card-content {
    flex: 1;
    min-width: 0;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 13px;
    color: #717171;
}

.card-date {
    font-weight: 500;
}

.card-date::after {
    content: '•';
    margin-left: 12px;
}

.checkbox-wrapper {
    flex-shrink: 0;
}

.custom-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid #b0b0b0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-card.selected .custom-checkbox {
    background: #00447C;
    border-color: #00447C;
}

.custom-checkbox::after {
    content: '✓';
    color: white;
    font-size: 16px;
    font-weight: bold;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.chat-card.selected .custom-checkbox::after {
    opacity: 1;
    transform: scale(1);
}

.feedback-section {
    display: none;
    padding: 20px 24px;
    background: #f7f7f7;
    border-top: 1px solid #ebebeb;
    animation: slideDown 0.3s ease;
}

.feedback-section.active {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feedback-title {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    margin-bottom: 12px;
}

.feedback-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    color: #222;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.feedback-textarea:focus {
    outline: none;
    border-color: #00447C;
}

.feedback-textarea.error {
    border-color: #D32F2F;
}

.feedback-textarea::placeholder {
    color: #b0b0b0;
}

.error-message {
    display: none;
    color: #D32F2F;
    font-size: 12px;
    margin-top: 8px;
    font-weight: 500;
}

.error-message.active {
    display: block;
}

.submit-section {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
    display: none;
    justify-content: space-between;
    align-items: center;
}

.submit-section.active {
    display: flex;
}

.selection-info {
    font-size: 16px;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(to right, #00447C 0%, #0066B3 50%, #00447C 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 12px rgba(0, 68, 124, 0.3);
}

.btn-primary:disabled {
    background: #ebebeb;
    color: #b0b0b0;
    cursor: not-allowed;
    transform: none;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

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

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

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

.modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #ebebeb;
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
    color: #00447C;
    margin-bottom: 8px;
}

.modal-subtitle {
    font-size: 14px;
    color: #717171;
}

.modal-body {
    padding: 24px;
}

.input-group {
    margin-bottom: 20px;
}

.input-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
}

.input-field {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    color: #222;
    transition: border-color 0.2s ease;
}

.input-field:focus {
    outline: none;
    border-color: #00447C;
}

.modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-secondary {
    background: white;
    color: #222;
    border: 1px solid #ddd;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    border-color: #222;
}

.upload-progress {
    display: none;
}

.upload-progress.active {
    display: block;
}

.upload-steps {
    margin-top: 24px;
}

.upload-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #ebebeb;
}

.upload-step:last-child {
    border-bottom: none;
}

.step-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    background: #ebebeb;
    color: #717171;
    flex-shrink: 0;
}

.step-icon.active {
    background: #F58025;
    color: white;
}

.step-icon.complete {
    background: #00A896;
    color: white;
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 14px;
    font-weight: 600;
    color: #222;
}

.step-description {
    font-size: 13px;
    color: #717171;
    margin-top: 2px;
}

.success-message {
    text-align: center;
    padding: 40px 24px;
}

.success-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.success-title {
    font-size: 24px;
    font-weight: 700;
    color: #00447C;
    margin-bottom: 8px;
}

.success-text {
    font-size: 16px;
    color: #717171;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #ebebeb;
    border-top-color: #00447C;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

.loading-text {
    font-size: 16px;
    color: #717171;
}