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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #0f1117;
    color: #e1e4e8;
    min-height: 100vh;
    padding: 2rem;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #fff;
}

.controls {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.form-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.form-row:last-child {
    margin-bottom: 0;
}

input[type="text"] {
    flex: 1;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #e1e4e8;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
}

input[type="text"]:focus {
    border-color: #58a6ff;
}

input[type="text"]::placeholder {
    color: #6e7681;
}

button {
    background: #238636;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

button:hover {
    background: #2ea043;
}

button:disabled {
    background: #21262d;
    color: #6e7681;
    cursor: not-allowed;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: #6e7681;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card.applied .stat-value { color: #3fb950; }
.stat-card.skipped .stat-value { color: #d29922; }
.stat-card.errors .stat-value { color: #f85149; }
.stat-card.total .stat-value { color: #58a6ff; }

.sms-panel {
    background: #161b22;
    border: 1px solid #da8b45;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.log-panel {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    overflow: hidden;
}

.log-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #30363d;
    font-size: 0.8rem;
    font-weight: 600;
    color: #6e7681;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6e7681;
}

.status-dot.running {
    background: #3fb950;
    animation: pulse 1.5s ease-in-out infinite;
}

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

.log-body {
    height: 400px;
    overflow-y: auto;
    padding: 0.5rem 0;
    font-family: "SF Mono", "Fira Code", monospace;
    font-size: 0.8rem;
    line-height: 1.6;
}

.log-entry {
    padding: 0.15rem 1rem;
}

.log-entry:hover {
    background: #1c2129;
}

.log-time {
    color: #6e7681;
    margin-right: 0.75rem;
}

.log-entry.ok .log-msg { color: #3fb950; }
.log-entry.skip .log-msg { color: #d29922; }
.log-entry.error .log-msg { color: #f85149; }
.log-entry.info .log-msg { color: #8b949e; }

@media (max-width: 600px) {
    body { padding: 1rem; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .form-row { flex-direction: column; }
}
