/* Modern Professional Email Service - Clean Design */
:root {
    --primary-color: #1e293b;
    --secondary-color: #334155;
    --accent-color: #0ea5e9;
    --accent-hover: #0284c7;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-50);
    min-height: 100vh;
    color: var(--gray-900);
    line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--gray-900) !important;
    font-weight: 700;
    font-size: 1.5rem;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    box-shadow: var(--shadow-md);
}

.brand-icon i {
    font-size: 1.1rem;
    color: white;
}

.brand-accent {
    color: var(--accent-color);
}

.nav-status {
    display: flex;
    align-items: center;
    background: rgba(5, 150, 105, 0.1);
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success-color);
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

.status-text {
    color: var(--success-color);
    font-size: 0.875rem;
    font-weight: 500;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Simple Header */
.simple-header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 2rem 0;
}

.header-content {
    text-align: center;
}

.header-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.header-subtitle {
    font-size: 1rem;
    color: var(--gray-600);
    margin: 0;
}

/* Main Panel */
.main-panel {
    padding: 2rem 0;
}

.panel-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}



/* Form Styles */
.email-form {
    padding: 2.5rem;
}

.form-section {
    background: var(--gray-50);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--gray-200);
    height: 100%;
}

.section-title {
    color: var(--gray-900);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: var(--accent-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    color: var(--gray-700);
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.875rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    z-index: 2;
    font-size: 0.875rem;
}

.form-control {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    padding: 12px 12px 12px 40px;
    color: var(--gray-900);
    font-size: 0.875rem;
    transition: all 0.2s ease;
    width: 100%;
}

.form-control:focus {
    background: white;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: var(--gray-400);
}

.template-selector {
    position: relative;
}

.form-select {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    padding: 12px 40px 12px 12px;
    color: var(--gray-900);
    appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
    outline: none;
}

.select-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
}

/* Code Editor */
.code-editor-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.code-editor {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 200px;
    padding: 16px !important;
    background: var(--gray-900) !important;
    color: #e5e7eb !important;
    border: 2px solid var(--gray-300) !important;
}

.code-editor:focus {
    border-color: var(--accent-color) !important;
}

.editor-toolbar {
    position: absolute;
    top: 8px;
    right: 8px;
}

.btn-editor {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-editor:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
    border: 2px dashed var(--gray-300);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    background: white;
}

.file-upload-wrapper:hover {
    border-color: var(--accent-color);
    background: rgba(14, 165, 233, 0.02);
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-upload-text {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.file-upload-text i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

/* Buttons */
.action-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.btn {
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-preview {
    background: white;
    color: var(--gray-700);
    border: 2px solid var(--gray-300);
}

.btn-preview:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-launch {
    background: var(--accent-color);
    color: white;
    border: 2px solid var(--accent-color);
}

.btn-launch:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline-info {
    background: white;
    color: #0ea5e9;
    border: 2px solid #0ea5e9;
}

.btn-outline-info:hover {
    background: #0ea5e9;
    color: white;
    border-color: #0ea5e9;
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Progress Section */
.progress-section {
    padding: 2rem 0;
}

.progress-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    text-align: center;
}

.progress-header h3 {
    color: var(--gray-900);
    margin-bottom: 2rem;
    font-weight: 600;
}

.progress-body {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
}

.progress-ring {
    position: relative;
}

.progress-svg {
    transform: rotate(-90deg);
}

.progress-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.progress-info {
    text-align: left;
}

.progress-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.progress-details {
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* Results Section */
.results-section {
    padding: 2rem 0;
}

.results-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}

.results-header h3 {
    color: var(--gray-900);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 600;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-number.text-success { color: var(--success-color); }
.stat-number.text-danger { color: var(--danger-color); }
.stat-number.text-primary { color: var(--accent-color); }

.stat-label {
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Modal */
.modal-content {
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.modal-title {
    color: var(--gray-900);
    font-weight: 600;
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .progress-body {
        flex-direction: column;
        gap: 2rem;
    }
    
    .form-section {
        padding: 1.5rem;
    }
    
    .email-form {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .action-section .d-flex {
        flex-direction: column;
        gap: 1rem;
    }
} 