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

:root {
    --bg: #060b13;
    --card: #101825;
    --card-border: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --accent: #00d1e0;
    --accent-hover: #00b8c7;
    --accent-soft: rgba(0, 209, 224, 0.12);
    --danger: #ef4444;
    --input-bg: rgba(15, 23, 42, 0.85);
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

html, body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background:
        radial-gradient(circle at top, rgba(0, 209, 224, 0.08), transparent 32%),
        var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.page {
    min-height: 100vh;
    max-width: 520px;
    margin: 0 auto;
    padding: 24px 18px 40px;
}

.brand-header {
    text-align: center;
    margin-bottom: 18px;
}

.logo-wrap {
    display: inline-flex;
    background: #fff;
    border-radius: 14px;
    padding: 10px 14px;
    margin-bottom: 14px;
}

.logo-wrap img {
    display: block;
    max-width: 280px;
    width: 100%;
    height: auto;
}

.event-banner {
    border: 1px solid rgba(0, 209, 224, 0.35);
    background: rgba(0, 209, 224, 0.06);
    border-radius: var(--radius);
    padding: 14px 16px;
}

.event-name {
    margin: 0 0 4px;
    color: var(--accent);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.event-meta,
.event-booth {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.event-booth {
    margin-top: 6px;
    color: var(--text);
    font-weight: 600;
}

.card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: calc(var(--radius) + 2px);
    padding: 24px 20px;
    box-shadow: var(--shadow);
}

.card h1,
.card h2 {
    margin: 0 0 6px;
    font-size: 1.35rem;
    font-weight: 700;
}

.card .subtitle {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 0.92rem;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.92rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: var(--input-bg);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(0, 209, 224, 0.55);
    box-shadow: 0 0 0 3px rgba(0, 209, 224, 0.12);
}

.form-group textarea {
    min-height: 96px;
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #64748b;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    border: none;
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.15s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--accent);
    color: #041016;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(148, 163, 184, 0.35);
    margin-top: 12px;
}

.btn-secondary:hover {
    border-color: rgba(0, 209, 224, 0.45);
    background: rgba(255, 255, 255, 0.03);
}

.btn-sm {
    width: auto;
    padding: 8px 14px;
    font-size: 0.88rem;
}

.privacy-note {
    margin: 14px 0 0;
    text-align: center;
    color: var(--muted);
    font-size: 0.78rem;
}

.alert {
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 0.92rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fecaca;
}

.site-footer {
    margin-top: 28px;
    text-align: center;
    color: var(--muted);
    font-size: 0.88rem;
}

.site-footer p {
    margin: 4px 0;
}

.footer-company {
    color: var(--text);
    font-weight: 600;
}

.thank-you-text {
    color: var(--muted);
    font-size: 0.92rem;
    margin: 0 0 20px;
}

.thank-you-actions {
    display: flex;
    flex-direction: column;
}

.icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Admin styles */
.admin-page {
    max-width: 900px;
}

.admin-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.admin-header h1 {
    margin: 0;
    font-size: 1.6rem;
}

.admin-header .lead-count {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font: inherit;
    font-size: 0.88rem;
    cursor: pointer;
    text-decoration: none;
}

.btn-icon:hover {
    border-color: rgba(0, 209, 224, 0.4);
}

.btn-csv {
    background: var(--accent);
    color: #041016;
    border: none;
    font-weight: 600;
}

.leads-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lead-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 18px;
}

.lead-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.lead-name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.lead-date {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.lead-phone {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.lead-phone:hover {
    text-decoration: underline;
}

.lead-requirement {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 0.88rem;
}

.status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.status-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.status-btn {
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: transparent;
    color: var(--muted);
    border-radius: 999px;
    padding: 6px 14px;
    font: inherit;
    font-size: 0.82rem;
    cursor: pointer;
}

.status-btn.active {
    background: var(--accent);
    color: #041016;
    border-color: var(--accent);
    font-weight: 600;
}

.btn-delete {
    border: none;
    background: transparent;
    color: var(--danger);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.12);
}

.comments-block {
    margin-top: 14px;
}

.comment-item {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 10px;
    font-size: 0.88rem;
}

.comment-item time {
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    margin-top: 4px;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment-form textarea {
    width: 100%;
    min-height: 72px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: var(--input-bg);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font: inherit;
    resize: vertical;
}

.comment-form textarea:focus {
    outline: none;
    border-color: rgba(0, 209, 224, 0.55);
}

.comment-save {
    width: auto;
    align-self: flex-end;
    min-width: 96px;
    padding: 10px 18px;
    font-size: 0.88rem;
}

.comment-save:disabled {
    opacity: 0.6;
    cursor: wait;
}

.empty-state {
    text-align: center;
    color: var(--muted);
    padding: 40px 20px;
}

.login-card {
    max-width: 420px;
    margin: 12vh auto 0;
}

@media (max-width: 600px) {
    .admin-header {
        flex-direction: column;
    }

    .lead-top {
        flex-direction: column;
    }

    .comment-save {
        width: 100%;
        align-self: stretch;
        padding: 12px 18px;
        font-size: 0.95rem;
    }
}
