* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #111;
    color: #fff;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 28px;
}

input, select, button {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    font-size: 16px;
    border-radius: 10px;
    border: none;
}

input, select {
    background: #1e1e1e;
    color: #fff;
    border: 1px solid #333;
}

button {
    background: #00c853;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
}

button:hover {
    opacity: 0.95;
}

.filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
}

.top-bar button {
    width: auto;
    min-width: 110px;
    padding: 12px 16px;
}

.result-item {
    padding: 14px;
    margin-top: 10px;
    background: #1c1c1c;
    border: 1px solid #2c2c2c;
    border-radius: 12px;
    cursor: pointer;
}

.result-item:hover {
    background: #252525;
}

.name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 6px;
}

.meta {
    font-size: 14px;
    color: #c7c7c7;
    margin-top: 4px;
}

.tag {
    display: inline-block;
    margin-top: 8px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
}

.standard_person {
    background: #00c853;
    color: #fff;
}

.estate_or_trust {
    background: #ffd600;
    color: #111;
}

.business {
    background: #2979ff;
    color: #fff;
}

/* 🔥 NEW: CLEAN LEADS TOOLBAR LAYOUT */
#leadsToolbar {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

#leadControlRow {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#leadActionRow {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

#bulkActionBar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: center;
}

#bulkSelectedCount {
    grid-column: span 2;
}

/* make buttons tighter + consistent */
#leadActionRow button,
#bulkActionBar button {
    margin-top: 0;
}

/* better alignment on larger screens */
@media (min-width: 600px) {
    #leadActionRow {
        grid-template-columns: repeat(4, 1fr);
    }

    #bulkActionBar {
        grid-template-columns: auto auto auto;
    }

    #bulkSelectedCount {
        grid-column: span 1;
    }
}

.record-card {
    background: #1c1c1c;
    border: 1px solid #2c2c2c;
    border-radius: 14px;
    padding: 18px;
}

.record-card h2 {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: 24px;
}

.record-line {
    margin-bottom: 10px;
    line-height: 1.4;
}

.record-label {
    font-weight: bold;
    color: #fff;
}

.action-row {
    margin-top: 20px;
}

.status-message {
    margin-top: 14px;
    color: #c7c7c7;
    font-size: 14px;
    text-align: center;
}

.empty-message,
.error-message,
.loading-message {
    margin-top: 14px;
    padding: 14px;
    background: #1c1c1c;
    border: 1px solid #2c2c2c;
    border-radius: 12px;
    text-align: center;
    color: #ddd;
}

@media (max-width: 600px) {
    .container {
        padding: 12px;
    }

    h1 {
        font-size: 24px;
    }

    input, select, button {
        font-size: 16px;
        padding: 14px;
    }

    .name {
        font-size: 17px;
    }

    .record-card h2 {
        font-size: 21px;
    }
}