/* Minimal Professional Campaigns Page */

.campaigns-page {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Header Section */
.campaigns-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2.5rem;
}

.header-content h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.header-subtitle {
    font-size: 0.9375rem;
    color: #6B7280;
    margin: 0;
    font-weight: 400;
}

.btn-create {
    background: linear-gradient(135deg, #7B1FA2 0%, #9C27B0 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(123, 31, 162, 0.2);
}

.btn-create:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(123, 31, 162, 0.3);
}

.btn-icon {
    font-size: 1rem;
}

/* Track Results Section - Minimal */
.widget-track-results {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.widget-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6B7280;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0;
}

.widget-expand {
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    font-size: 1.125rem;
    padding: 0.25rem;
}

.track-results-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.select-wrapper-modern {
    flex: 1;
    max-width: 400px;
}

.campaign-select-modern {
    width: 100%;
    padding: 0.625rem 1rem;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 0.875rem;
    background: white;
    color: #111827;
    transition: all 0.2s;
}

.campaign-select-modern:focus {
    outline: none;
    border-color: #7B1FA2;
    box-shadow: 0 0 0 3px rgba(123, 31, 162, 0.1);
}

.btn-track-results {
    padding: 0.625rem 1.25rem;
    background: #7B1FA2;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-track-results:hover {
    background: #6A1B9A;
}

/* Section Headers */
.section-header-modern {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.section-header-modern h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.section-badge {
    background: #F3F4F6;
    color: #6B7280;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8125rem;
    font-weight: 500;
}

/* Campaign Cards - Minimal Design */
.campaigns-list {
    display: grid;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.campaign-item-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s;
}

.campaign-item-card:hover {
    border-color: #D1D5DB;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.campaign-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.campaign-item-info {
    flex: 1;
}

.campaign-item-name {
    font-size: 1.0625rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.625rem 0;
    letter-spacing: -0.01em;
}

.campaign-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8125rem;
    color: #6B7280;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* Status Badges - Clean */
.status-badge {
    padding: 0.375rem 0.875rem;
    border-radius: 16px;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
}

.status-active {
    background: #DCFCE7;
    color: #15803D;
}

.status-draft {
    background: #F3F4F6;
    color: #6B7280;
}

.status-scheduled {
    background: #DBEAFE;
    color: #1E40AF;
}

.status-sent {
    background: #E0E7FF;
    color: #4338CA;
}

/* Campaign Actions - Icon Buttons */
.campaign-item-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #F3F4F6;
}

.btn-campaign-action {
    padding: 0.5rem 1rem;
    border: 1px solid #E5E7EB;
    background: white;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #374151;
}

.btn-campaign-action:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
}

.btn-send {
    color: #7B1FA2;
    border-color: #7B1FA2;
}

.btn-send:hover {
    background: #F3E5F5;
}

.btn-delete {
    color: #DC2626;
    border-color: #FCA5A5;
    padding: 0.5rem;
    min-width: auto;
}

.btn-delete:hover {
    background: #FEF2F2;
}

.btn-delete .btn-text {
    display: none;
}

.btn-text {
    font-size: 0.8125rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.empty-state p {
    font-size: 0.9375rem;
    color: #6B7280;
    margin: 0 0 1.5rem 0;
}

/* Loading State */
.loading-spinner {
    text-align: center;
    padding: 4rem;
    font-size: 1rem;
    color: #6B7280;
}

/* Modals - Minimal & Professional */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-small {
    max-width: 450px;
}

.modal-medium {
    max-width: 550px;
}

.modal-large {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #F3F4F6;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    letter-spacing: -0.01em;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9CA3AF;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #F3F4F6;
    color: #374151;
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 1.25rem 2rem;
    border-top: 1px solid #F3F4F6;
    background: #F9FAFB;
}

.btn-secondary {
    padding: 0.625rem 1.25rem;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    color: #374151;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
}

.btn-primary {
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, #7B1FA2 0%, #9C27B0 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(123, 31, 162, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(123, 31, 162, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-danger {
    padding: 0.625rem 1.25rem;
    background: #DC2626;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: #B91C1C;
}

.btn-danger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Create Campaign Modal - improved formatting */
.campaign-create-modal {
    max-width: 560px;
    width: 95%;
}

.campaign-create-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #E5E7EB;
}

.campaign-create-modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.campaign-create-modal-body {
    padding: 1.5rem 1.5rem 1.25rem;
    max-height: calc(90vh - 130px);
    overflow-y: auto;
}

.campaign-create-modal-actions {
    padding: 1rem 1.5rem;
    gap: 0.75rem;
}

/* Form Styles in Modals */
.campaign-form-modern {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.campaign-form-section {
    padding: 1.25rem 0;
    border-bottom: 1px solid #F3F4F6;
}

.campaign-form-section:first-child {
    padding-top: 0;
}

.campaign-form-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.campaign-form-section-settings {
    padding-bottom: 0.5rem;
}

.form-section-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section-icon {
    color: #9CA3AF;
    font-size: 0.9rem;
}

.form-section .required {
    color: #DC2626;
    font-weight: 500;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.form-control {
    padding: 0.625rem 0.875rem;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #111827;
    transition: all 0.2s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #7B1FA2;
    box-shadow: 0 0 0 3px rgba(123, 31, 162, 0.1);
}

textarea.form-control,
.form-control-textarea {
    resize: vertical;
    min-height: 100px;
    padding: 0.75rem 1rem;
    line-height: 1.5;
}

.form-row-dates {
    gap: 1rem;
}

.form-row-dates .form-group {
    min-width: 0;
}

.form-hint-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-hint {
    font-size: 0.8125rem;
    color: #6B7280;
}

.char-count {
    font-size: 0.8125rem;
    color: #9CA3AF;
    font-weight: 500;
}

/* Message preview styling */
.message-preview {
    margin-top: 0.75rem;
    padding: 0.875rem 1rem;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 0.875rem;
}

.preview-label {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 0.5rem;
}

.preview-content {
    font-size: 0.875rem;
    color: #495057;
    line-height: 1.4;
    white-space: pre-wrap;
}

.preview-content a {
    color: #007bff !important;
    text-decoration: underline !important;
}

.preview-content a:hover {
    color: #0056b3 !important;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Settings checkbox card - clearer Active Campaign option */
.settings-checkbox-card {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 1rem 1.25rem;
}

.settings-checkbox-card .checkbox-label-modern {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    cursor: pointer;
}

.settings-checkbox-card .checkbox-text {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111827;
}

.checkbox-label-modern {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    cursor: pointer;
}

.checkbox-label-modern input[type="checkbox"],
.checkbox-input {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    accent-color: #7B1FA2;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.settings-checkbox-card .checkbox-label-modern {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
}

.settings-checkbox-card .checkbox-label-modern .checkbox-text {
    flex: 1;
    margin-top: 0.15rem;
}

.settings-checkbox-card .checkbox-hint {
    width: 100%;
    margin-left: 1.75rem;
    margin-top: 0.15rem;
}

.checkbox-label-modern span {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.checkbox-hint {
    font-size: 0.8125rem;
    color: #6B7280;
    line-height: 1.4;
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
}

.alert-error {
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    color: #991B1B;
}

.alert-warning {
    background: #FFFBEB;
    border: 1px solid #FCD34D;
    color: #92400E;
}

.alert-success {
    background: #F0FDF4;
    border: 1px solid #86EFAC;
    color: #166534;
}

.text-warning {
    color: #DC2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Campaign Send Confirmation */
.campaign-send-confirmation {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.confirmation-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.confirmation-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.detail-row {
    display: flex;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.detail-label {
    color: #6B7280;
    min-width: 120px;
}

.detail-value {
    color: #111827;
}

.message-preview {
    background: #F9FAFB;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid #E5E7EB;
    font-size: 0.875rem;
    color: #374151;
    white-space: pre-wrap;
    flex: 1;
}

/* Results Modal */
.results-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.result-metric {
    background: #F9FAFB;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #E5E7EB;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #7B1FA2;
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 0.8125rem;
    color: #6B7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.results-details h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 1rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .campaigns-page {
        padding: 1rem;
    }

    .campaigns-header {
        flex-direction: column;
        gap: 1rem;
    }

    .campaign-item-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .campaign-item-actions {
        flex-wrap: wrap;
    }
}
