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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 760px;
    margin: 40px auto;
    padding: 0 20px;
    color: #1a1a1a;
    background: #fafafa;
    line-height: 1.5;
}

h1 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 28px;
}

h2 {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    margin-bottom: 14px;
}

section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

textarea, input[type="text"], select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
    color: #111827;
    transition: border-color 0.15s, box-shadow 0.15s;
}

textarea:focus, input[type="text"]:focus, select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea { resize: vertical; }

.row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
}

.row select, .row input[type="text"] { flex: 1; }

button {
    padding: 9px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    background: #2563eb;
    color: #fff;
    white-space: nowrap;
    transition: background 0.15s;
}

button:hover { background: #1d4ed8; }
button:disabled { background: #9ca3af; cursor: not-allowed; }

#blast-btn {
    background: #dc2626;
    width: 100%;
    padding: 12px;
    font-weight: 600;
}
#blast-btn:hover { background: #b91c1c; }

#delete-template-btn, #delete-list-btn, #delete-campaign-btn {
    background: #f3f4f6;
    color: #374151;
}
#delete-template-btn:hover, #delete-list-btn:hover, #delete-campaign-btn:hover {
    background: #e5e7eb;
}

#import-btn {
    background: #059669;
}
#import-btn:hover { background: #047857; }

#confirm-box {
    margin-top: 12px;
    padding: 14px;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 6px;
}
#confirm-box .row { margin-top: 8px; }

#preview {
    padding: 11px 13px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #0c4a6e;
    min-height: 24px;
}

#results {
    margin-top: 16px;
    font-size: 0.85rem;
}

.result-ok, .result-fail {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    margin: 1px 0;
    font-family: "SF Mono", Monaco, Consolas, monospace;
    font-size: 0.8rem;
}
.result-ok { background: #dcfce7; color: #166534; }
.result-fail { background: #fee2e2; color: #991b1b; }
.result-skip { background: #fef3c7; color: #92400e; padding: 6px 10px; border-radius: 4px; margin-bottom: 8px; font-size: 0.9rem; }
.result-summary { font-weight: 700; margin-top: 10px; font-size: 0.95rem; }

.ghl-import {
    padding: 14px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    margin-bottom: 14px;
}

#ghl-pull-btn { background: #059669; }
#ghl-pull-btn:hover { background: #047857; }

#ghl-status, #import-status {
    font-size: 0.85rem;
    color: #4b5563;
    margin-top: 8px;
    min-height: 20px;
}

#campaign-name { font-weight: 600; }

.segment-info {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 6px;
    margin-bottom: 10px;
    font-family: "SF Mono", Monaco, Consolas, monospace;
}
.segment-info-warn {
    color: #c2410c;
    font-weight: 600;
}

.batch-pull {
    padding: 12px 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    margin-bottom: 14px;
}
#batch-pull-btn {
    background: #ca8a04;
}
#batch-pull-btn:hover {
    background: #a16207;
}
#batch-pull-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}
#batch-size {
    max-width: 120px;
    flex: 0 0 auto;
}
#batch-status {
    font-size: 0.85rem;
    color: #4b5563;
    margin-top: 8px;
    min-height: 20px;
}
