:root {
    --bg: #0b1623;
    --bg-soft: #102338;
    --panel: #14293f;
    --panel-soft: #1a3550;
    --line: rgba(146, 192, 240, 0.22);
    --line-strong: rgba(146, 192, 240, 0.4);
    --text: #eff7ff;
    --muted: #9eb7ce;
    --accent: #2d9eff;
    --accent-strong: #1f7bc9;
    --success: #29c282;
    --danger: #ff6b6b;
    --warning: #ffbf5a;
    --radius-lg: 18px;
    --radius-md: 14px;
    --shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Outfit", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 5% 0%, rgba(45, 158, 255, 0.18), transparent 30%),
        radial-gradient(circle at 90% 4%, rgba(96, 188, 255, 0.13), transparent 30%),
        linear-gradient(180deg, #091321, #0c1726 48%, #0b1623);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.admin-wrap {
    max-width: 1380px;
    width: calc(100% - 2rem);
    margin: 0 auto;
    padding: 1.5rem 0 2rem;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-brand {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.admin-brand strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.35rem;
}

.admin-brand span {
    color: var(--muted);
}

.admin-actions {
    display: flex;
    gap: 0.65rem;
    align-items: center;
}

.badge-user {
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(45, 158, 255, 0.16);
    border: 1px solid rgba(45, 158, 255, 0.38);
    color: #cae8ff;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 0.95rem;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #60bcff);
}

.btn-secondary {
    color: var(--text);
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.04);
}

.btn-danger {
    color: #ffd8d8;
    border-color: rgba(255, 107, 107, 0.5);
    background: rgba(255, 107, 107, 0.12);
}

.panel {
    background: linear-gradient(180deg, var(--panel), #112438);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.filter-panel {
    padding: 1rem;
    display: grid;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr 240px auto;
    gap: 0.75rem;
}

.input,
.select,
.textarea {
    width: 100%;
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    padding: 0.6rem 0.75rem;
}

.textarea {
    min-height: 74px;
    resize: vertical;
}

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

.stat-card {
    padding: 0.9rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.stat-card small {
    display: block;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.stat-card strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.6rem;
}

.table-panel {
    padding: 0.9rem;
}

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

.leads-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1050px;
}

.leads-table th,
.leads-table td {
    padding: 0.7rem;
    border-bottom: 1px solid rgba(146, 192, 240, 0.14);
    vertical-align: top;
}

.leads-table th {
    text-align: left;
    font-family: "Space Grotesk", sans-serif;
    color: #c9e8ff;
    font-size: 0.84rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cell-muted {
    color: var(--muted);
    font-size: 0.88rem;
}

.wa-link {
    color: #9bd0ff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.lead-actions {
    display: grid;
    gap: 0.55rem;
    min-width: 260px;
}

.feedback {
    padding: 0.72rem 0.88rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.feedback-success {
    background: rgba(41, 194, 130, 0.15);
    border: 1px solid rgba(41, 194, 130, 0.5);
    color: #c8ffe8;
}

.feedback-error {
    background: rgba(255, 107, 107, 0.14);
    border: 1px solid rgba(255, 107, 107, 0.5);
    color: #ffd7d7;
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.login-card {
    width: min(440px, 100%);
    padding: 1.2rem;
}

.login-card h1 {
    margin: 0.35rem 0 0.9rem;
    font-size: 2rem;
    font-family: "Space Grotesk", sans-serif;
}

.form-field {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.form-field span {
    color: var(--muted);
    font-size: 0.92rem;
}

.empty {
    padding: 1.2rem;
    border: 1px dashed var(--line-strong);
    border-radius: 12px;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 980px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }
}

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