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

:root {
    --bg: #fafafa;
    --card: #fff;
    --border: #e0e0e0;
    --text: #111;
    --muted: #666;
    --accent: #000;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    padding: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

h1 { font-size: 1.3rem; font-weight: 700; margin-bottom: 1.5rem; }
h2 { font-size: 1rem; font-weight: 600; margin-bottom: .75rem; }

a { color: var(--accent); }

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.tabs {
    display: flex;
    gap: .5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tab {
    padding: .5rem 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    font-size: .85rem;
    text-decoration: none;
    color: var(--text);
    transition: background .15s;
}

.tab:hover, .tab.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    margin-bottom: .25rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .03em;
}

input[type="text"],
input[type="email"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: .5rem .6rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: .9rem;
    margin-bottom: .75rem;
    background: #fff;
}

textarea { min-height: 120px; resize: vertical; }

.btn {
    display: inline-block;
    padding: .55rem 1.2rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: .85rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s;
    text-decoration: none;
}

.btn:hover { opacity: .8; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn--outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}
.btn--outline:hover { background: var(--accent); color: #fff; }
.btn--sm { padding: .35rem .8rem; font-size: .8rem; }

.badge {
    display: inline-block;
    padding: .15rem .5rem;
    border-radius: 3px;
    font-size: .75rem;
    font-weight: 600;
}
.badge--pending { background: #f0f0f0; color: #666; }
.badge--sent { background: #e8f5e9; color: #2e7d32; }
.badge--failed { background: #fce4ec; color: #c62828; }

.test-banner {
    background: #fff3e0;
    border: 1px solid #ffb74d;
    color: #e65100;
    padding: .5rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: .85rem;
    font-weight: 600;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}
th, td {
    text-align: left;
    padding: .45rem .6rem;
    border-bottom: 1px solid var(--border);
}
th {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--muted);
    font-weight: 600;
}

.progress-wrap {
    background: #eee;
    border-radius: 4px;
    height: 6px;
    margin: .75rem 0;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width .3s;
}

.stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-num { font-size: 1.5rem; font-weight: 700; }
.stat-label { font-size: .7rem; color: var(--muted); text-transform: uppercase; }

.msg {
    padding: .5rem .75rem;
    border-radius: 4px;
    margin-bottom: .75rem;
    font-size: .85rem;
}
.msg--ok { background: #e8f5e9; color: #2e7d32; }
.msg--err { background: #fce4ec; color: #c62828; }

.flex-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

.table-wrap { overflow-x: auto; }

@media (max-width: 600px) {
    body { padding: 1rem; }
    .stats { gap: 1rem; }
}
