:root {
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --accent-color: #007bff;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --radius: 8px;
    --shadow: 0 2px 4px rgba(0,0,0,0.05);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    padding-top: 60px;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    margin-right: 2rem;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent-color);
}

.container {
    max-width: 98%;
    margin: 2rem auto;
    padding: 0 1rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

input:focus, textarea:focus {
    border-color: var(--accent-color);
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background-color: #0069d9;
}

.btn-outline {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.contacts-table {
    min-width: 1000px;
    table-layout: auto !important;
}

th, td {
    text-align: left;
    padding: 0.8rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    white-space: nowrap !important;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: var(--text-secondary);
}

.status-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-sent { background: #d4edda; color: #155724; }
.status-error { background: #f8d7da; color: #721c24; }

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .grid { grid-template-columns: 1fr; }
}

.placeholder-list {
    background: #f1f3f5;
    padding: 0.5rem;
    border-radius: 4px;
    margin-top: 0.5rem;
    font-family: monospace;
    font-size: 0.8rem;
}

.placeholder-item {
    display: inline-block;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 5px;
    cursor: pointer;
}

.progress-container {
    margin-top: 1rem;
    background: #e9ecef;
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
}

.progress-bar {
    background: var(--success-color);
    height: 100%;
    width: 0%;
    transition: width 0.3s;
}

.log-container {
    height: 200px;
    overflow-y: auto;
    background: #1e1e1e;
    color: #00ff00;
    padding: 1rem;
    font-family: monospace;
    font-size: 0.8rem;
    border-radius: 4px;
    margin-top: 1rem;
}
