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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0f172a;
    color: #e5e7eb;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app {
    width: 100%;
    max-width: 960px;
    background: #020617;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    overflow: hidden;
}

header {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f9fafb;
}

main {
    padding: 1.5rem;
}

section {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #e5e7eb;
}

input {
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(15, 23, 42, 0.9);
    color: #f9fafb;
}

input:focus {
    outline: 2px solid #0ea5e9;
    outline-offset: 1px;
}

button {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: linear-gradient(to right, #0ea5e9, #6366f1);
    color: #f9fafb;
    font-weight: 600;
    font-size: 0.9rem;
}

button:hover {
    opacity: 0.95;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.error {
    color: #f97373;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.hidden {
    display: none;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tab {
    flex: 1;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 999px;
    border: 1px solid transparent;
}

.tab.active {
    border-color: #0ea5e9;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

#event-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

#events-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.event-item {
    padding: 0.75rem;
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.event-main {
    flex: 1;
}

.event-title {
    font-weight: 600;
}

.event-meta {
    font-size: 0.8rem;
    color: #9ca3af;
}

.event-actions {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.event-actions button {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.chat-messages {
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.3);
    padding: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 0.75rem;
}

.chat-message {
    margin-bottom: 0.5rem;
    display: flex;
}

.chat-message span {
    padding: 0.35rem 0.6rem;
    border-radius: 0.75rem;
    max-width: 80%;
}

.chat-message.user {
    justify-content: flex-end;
}

.chat-message.user span {
    background: linear-gradient(to right, #0ea5e9, #6366f1);
}

.chat-message.bot span,
.chat-message.agent span {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.4);
}

#chat-form,
#agent-reply-form {
    display: flex;
    gap: 0.5rem;
}

#chat-form input,
#agent-reply-form input {
    flex: 1;
}

#password-reset-btn {
    margin-top: 0.5rem;
    background: transparent;
    border: 1px dashed rgba(148, 163, 184, 0.6);
}

@media (max-width: 768px) {
    .app {
        border-radius: 0;
        height: 100vh;
    }

    #event-form {
        grid-template-columns: 1fr;
    }

    .event-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

