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

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

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

header h1 {
    font-size: 36px;
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    font-size: 16px;
    opacity: 0.95;
}

nav {
    display: flex;
    background: #f8f9fa;
    border-bottom: 3px solid #e9ecef;
}

nav a {
    flex: 1;
    padding: 18px;
    text-align: center;
    text-decoration: none;
    color: #495057;
    font-weight: 600;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

nav a:hover {
    background: #e9ecef;
    border-bottom-color: #667eea;
}

nav a.active {
    background: white;
    color: #667eea;
    border-bottom-color: #667eea;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding: 35px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 35px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s;
}

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

.stat-card h3 {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.stat-number {
    font-size: 52px;
    font-weight: bold;
    margin: 15px 0;
}

.stat-card a {
    color: white;
    text-decoration: none;
    border-bottom: 2px solid white;
    padding-bottom: 3px;
    font-size: 14px;
    font-weight: 500;
}

.form-card, .table-card, .info-box, .recent-campaigns {
    margin: 30px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
}

.form-card h2, .table-card h2, .recent-campaigns h2 {
    margin-bottom: 25px;
    color: #333;
    font-size: 24px;
    font-weight: 700;
}

label {
    display: block;
    margin-top: 18px;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 14px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    font-family: inherit;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
    font-family: 'Courier New', monospace;
    resize: vertical;
    min-height: 150px;
}

.btn-primary, .btn-secondary, .btn-danger, .btn-small {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    margin-right: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

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

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
    margin-right: 8px;
    background: #667eea;
    color: white;
}

.btn-small:hover {
    background: #5568d3;
}

.button-group {
    margin-top: 25px;
    display: flex;
    gap: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

table th {
    background: #667eea;
    color: white;
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table td {
    padding: 16px;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
}

table tr:hover {
    background: #f8f9fa;
}

table tr:last-child td {
    border-bottom: none;
}

.status-active {
    background: #28a745;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-inactive {
    background: #6c757d;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-draft {
    background: #ffc107;
    color: #333;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-sending {
    background: #17a2b8;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    animation: pulse 2s infinite;
}

.status-sent {
    background: #28a745;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-paused {
    background: #fd7e14;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.alert {
    padding: 18px;
    margin: 20px 30px;
    background: #d4edda;
    border-left: 5px solid #28a745;
    color: #155724;
    border-radius: 8px;
    font-weight: 500;
}

.info-box {
    background: #e7f3ff;
    border-left: 5px solid #667eea;
    padding: 25px;
}

.info-box h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 18px;
}

.info-box ol {
    margin-left: 25px;
    margin-top: 15px;
}

.info-box li {
    margin: 10px 0;
    line-height: 1.6;
}

.badge {
    background: #667eea;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    text-decoration: none;
    margin-right: 8px;
    display: inline-block;
    font-weight: 600;
}

.badge:hover {
    background: #5568d3;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.two-column-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.actions {
    white-space: nowrap;
}

.filter-groups {
    margin: 18px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
}

pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 15px 0;
}

code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.progress-bar {
    width: 100%;
    height: 35px;
    background: #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    width: 0%;
    transition: width 0.3s;
    text-align: center;
    color: white;
    line-height: 35px;
    font-weight: 600;
    font-size: 14px;
}

.log {
    max-height: 500px;
    overflow-y: auto;
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    margin-top: 25px;
    border: 1px solid #ddd;
}

.log div {
    padding: 8px;
    border-bottom: 1px solid #ddd;
    font-size: 13px;
}

.log .success {
    color: #28a745;
    font-weight: 600;
}

.log .error {
    color: #dc3545;
    font-weight: 600;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .two-column,
    .two-column-inline {
        grid-template-columns: 1fr;
    }
    
    nav {
        flex-direction: column;
    }
}
