/* MailStack Custom Styles */

:root {
    --ms-primary: #2563eb;
    --ms-primary-dark: #1d4ed8;
    --ms-primary-light: #3b82f6;
    --ms-success: #10b981;
    --ms-success-dark: #059669;
    --ms-danger: #ef4444;
    --ms-danger-dark: #dc2626;
    --ms-warning: #f59e0b;
    --ms-warning-dark: #d97706;
    --ms-info: #06b6d4;
    --ms-pending: #6b7280;
    --ms-replied: #eab308;
    --ms-replied-dark: #ca8a04;
    --ms-bg-light: #f8fafc;
    --ms-bg-dark: #1e293b;
    --ms-text-dark: #1e293b;
    --ms-text-muted: #64748b;
    --ms-border: #e2e8f0;
}

/* Typography */
html, body {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--ms-text-dark);
    background-color: var(--ms-bg-light);
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

/* Navbar */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-brand svg {
    height: 32px;
    width: auto;
    margin-right: 8px;
}

.navbar {
    background-color: white !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn-primary {
    background-color: var(--ms-primary);
    border-color: var(--ms-primary);
}

.btn-primary:hover {
    background-color: var(--ms-primary-dark);
    border-color: var(--ms-primary-dark);
}

.btn-success {
    background-color: var(--ms-success);
    border-color: var(--ms-success);
}

.btn-success:hover {
    background-color: var(--ms-success-dark);
    border-color: var(--ms-success-dark);
}

.btn-outline-primary {
    color: var(--ms-primary);
    border-color: var(--ms-primary);
}

.btn-outline-primary:hover {
    background-color: var(--ms-primary);
    border-color: var(--ms-primary);
}

/* Cards */
.card {
    border: 1px solid var(--ms-border);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid var(--ms-border);
    font-weight: 600;
}

/* Stats Cards */
.stat-card {
    border-radius: 16px;
    padding: 1.5rem;
    color: white;
}

.stat-card.primary {
    background: linear-gradient(135deg, var(--ms-primary) 0%, var(--ms-primary-dark) 100%);
}

.stat-card.success {
    background: linear-gradient(135deg, var(--ms-success) 0%, var(--ms-success-dark) 100%);
}

.stat-card.warning {
    background: linear-gradient(135deg, var(--ms-warning) 0%, var(--ms-warning-dark) 100%);
}

.stat-card.danger {
    background: linear-gradient(135deg, var(--ms-danger) 0%, var(--ms-danger-dark) 100%);
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

.stat-card .stat-icon {
    font-size: 3rem;
    opacity: 0.3;
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

/* Status Badges */
.badge-pending {
    background-color: var(--ms-pending);
    color: white;
}

.badge-sent {
    background-color: var(--ms-primary);
    color: white;
}

.badge-delivered {
    background-color: var(--ms-success);
    color: white;
}

.badge-bounced {
    background-color: var(--ms-danger);
    color: white;
}

.badge-replied {
    background-color: var(--ms-replied);
    color: var(--ms-text-dark);
}

.badge-complained {
    background-color: var(--ms-danger);
    color: white;
}

/* Project Cards */
.project-card {
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.project-card .project-stats {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.project-card .project-stat {
    font-size: 0.75rem;
    color: var(--ms-text-muted);
}

.project-card .project-stat strong {
    display: block;
    font-size: 1.25rem;
    color: var(--ms-text-dark);
}

/* Tables */
.table {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
}

.table thead th {
    background-color: var(--ms-bg-light);
    border-bottom: 2px solid var(--ms-border);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ms-text-muted);
}

.table tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.05);
}

/* Tabs */
.nav-tabs {
    border-bottom: 2px solid var(--ms-border);
}

.nav-tabs .nav-link {
    border: none;
    color: var(--ms-text-muted);
    font-weight: 500;
    padding: 1rem 1.5rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    color: var(--ms-primary);
}

.nav-tabs .nav-link.active {
    color: var(--ms-primary);
    background-color: transparent;
    border-bottom: 2px solid var(--ms-primary);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--ms-border);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.625rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--ms-primary);
    border: 2px solid white;
}

.timeline-item.incoming::before {
    background-color: var(--ms-success);
}

.timeline-item.outgoing::before {
    background-color: var(--ms-primary);
}

.timeline-item .timeline-content {
    background-color: white;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--ms-border);
}

.timeline-item .timeline-date {
    font-size: 0.75rem;
    color: var(--ms-text-muted);
    margin-bottom: 0.5rem;
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: var(--ms-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-label {
    font-weight: 500;
    color: var(--ms-text-dark);
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
}

/* Landing Page */
.hero-section {
    background: linear-gradient(135deg, var(--ms-primary) 0%, var(--ms-primary-dark) 100%);
    color: white;
    padding: 6rem 0;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
}

.hero-section .lead {
    font-size: 1.25rem;
    opacity: 0.9;
}

.feature-card {
    text-align: center;
    padding: 2rem;
}

.feature-card .feature-icon {
    width: 64px;
    height: 64px;
    background-color: rgba(37, 99, 235, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--ms-primary);
    font-size: 1.5rem;
}

.feature-card h5 {
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--ms-text-muted);
    font-size: 0.875rem;
}

.step-card {
    text-align: center;
    padding: 2rem;
}

.step-card .step-number {
    width: 48px;
    height: 48px;
    background-color: var(--ms-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

/* Footer */
.footer {
    background-color: var(--ms-bg-dark);
    color: white;
    padding: 3rem 0;
    flex-shrink: 0;
}

.footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.footer a:hover {
    color: white;
}

/* Progress bars */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: var(--ms-border);
}

.progress-bar {
    background-color: var(--ms-primary);
}

/* Bounce indicator */
.bounce-indicator {
    color: var(--ms-danger);
    margin-left: 0.5rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--ms-text-muted);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Sidebar */
.sidebar {
    background-color: white;
    border-right: 1px solid var(--ms-border);
    min-height: calc(100vh - 56px);
}

.sidebar .nav-link {
    color: var(--ms-text-dark);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.25rem;
}

.sidebar .nav-link:hover {
    background-color: var(--ms-bg-light);
}

.sidebar .nav-link.active {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--ms-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }

    .stat-card .stat-value {
        font-size: 2rem;
    }

    .sidebar {
        min-height: auto;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.3s ease;
}

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

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1100;
}

/* Placeholder styling */
.placeholder-hint {
    font-family: monospace;
    background-color: rgba(37, 99, 235, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--ms-primary);
}
