body {
    margin: 0;
    background: #0f172a;
    color: white;
    font-family: Arial, sans-serif;

    display: flex;
    justify-content: center;
    align-items: center;

    min-height: 100vh;
}

.card {
    width: 90%;
    max-width: 520px;

    background: #1e293b;

    padding: 30px;

    border-radius: 18px;

    box-shadow: 0 10px 30px rgba(0,0,0,.35);

    text-align: center;
}

h1 {
    margin-top: 0;
    margin-bottom: 10px;
}

h3 {
    margin-top: 25px;
    margin-bottom: 15px;
    color: #cbd5e1;
}

.version {
    color: #94a3b8;
    margin-bottom: 10px;
}

.status {
    color: #22c55e;
    font-weight: bold;
    margin-bottom: 20px;
}

hr {
    border: none;
    border-top: 1px solid #334155;
    margin: 25px 0;
}

.item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    background: #334155;

    padding: 14px 18px;

    border-radius: 12px;

    margin-bottom: 12px;

    font-size: 16px;
}

.item strong {
    font-size: 20px;
    color: #38bdf8;
}

.btn {
    display: block;

    margin-top: 12px;

    padding: 14px;

    background: #2563eb;

    color: white;

    text-decoration: none;

    border-radius: 10px;

    font-weight: bold;

    transition: .15s;
}

.btn:hover {
    background: #1d4ed8;
}

.btn:active {
    transform: scale(.98);
}

/* CRM pages */

.card-wide {
    max-width: 1100px;
}

.page-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-inline {
    display: inline-block;
    min-width: 140px;
}

.table-wrapper {
    overflow-x: auto;
    text-align: left;
}

.crm-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.crm-table th,
.crm-table td {
    padding: 12px;
    border-bottom: 1px solid #475569;
    vertical-align: top;
}

.crm-table th {
    color: #38bdf8;
    background: #334155;
}

.crm-table tr:hover {
    background: #293548;
}

.lead-status {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    background: #475569;
    font-weight: bold;
}

.lead-status-new {
    background: #1d4ed8;
}

.empty-state {
    padding: 30px;
    color: #94a3b8;
}

/* Login page */

.login-card {
    max-width: 420px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    margin-top: 24px;
}

.login-form label {
    color: #cbd5e1;
    font-weight: bold;
}

.login-form input {
    box-sizing: border-box;
    width: 100%;
    padding: 14px;
    border: 1px solid #475569;
    border-radius: 10px;
    background: #0f172a;
    color: white;
    font-size: 16px;
}

.login-form input:focus {
    outline: 2px solid #38bdf8;
    border-color: transparent;
}

.login-button {
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.login-error {
    margin-top: 18px;
    padding: 12px;
    border-radius: 10px;
    background: #7f1d1d;
    color: #fecaca;
}

.btn-secondary {
    background: #475569;
}

.btn-secondary:hover {
    background: #334155;
}

/* Lead status controls */

.status-form {
    display: flex;
    gap: 8px;
    align-items: center;
    min-width: 220px;
}

.status-select {
    flex: 1;
    padding: 9px;
    border: 1px solid #475569;
    border-radius: 8px;
    background: #0f172a;
    color: white;
}

.status-button {
    padding: 9px 12px;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.status-button:hover {
    background: #1d4ed8;
}

/* Lead detail page */

.lead-card {
    max-width: 680px;
}

.lead-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0;
    text-align: left;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #334155;
}

.detail-row span {
    color: #cbd5e1;
}

.detail-row strong {
    text-align: right;
    overflow-wrap: anywhere;
}

.table-link {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 8px;
    background: #2563eb;
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.table-link:hover {
    background: #1d4ed8;
}

/* Lead edit form */

.edit-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 24px 0;
    text-align: left;
}

.edit-form label {
    color: #cbd5e1;
    font-weight: bold;
}

.edit-form input,
.edit-form textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 13px;
    border: 1px solid #475569;
    border-radius: 10px;
    background: #0f172a;
    color: white;
    font-family: inherit;
    font-size: 16px;
}

.edit-form textarea {
    resize: vertical;
}

.edit-form input:focus,
.edit-form textarea:focus {
    outline: 2px solid #38bdf8;
    border-color: transparent;
}

.edit-button {
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.success-message {
    margin-top: 18px;
    padding: 12px;
    border-radius: 10px;
    background: #14532d;
    color: #bbf7d0;
}

/* Leads filters */

.filter-form {
    display: grid;
    grid-template-columns: 2fr 1fr auto auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}

.filter-input,
.filter-select {
    box-sizing: border-box;
    width: 100%;
    padding: 12px;
    border: 1px solid #475569;
    border-radius: 9px;
    background: #0f172a;
    color: white;
    font-size: 15px;
}

.filter-button,
.filter-reset {
    padding: 12px 15px;
    border: none;
    border-radius: 9px;
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
}

.filter-button {
    background: #2563eb;
    color: white;
    cursor: pointer;
}

.filter-reset {
    background: #475569;
    color: white;
}

.results-info {
    margin-bottom: 15px;
    color: #94a3b8;
    text-align: left;
}

@media (max-width: 760px) {
    .filter-form {
        grid-template-columns: 1fr;
    }

    .filter-button,
    .filter-reset {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }
}
