:root {
    --primary-color: #6200ee;
    --primary-light: #9c4dcc;
    --primary-dark: #3700b3;
    --error-color: #b00020;
    --background: #f5f5f5;
    --surface: #ffffff;
    --on-surface: rgba(0, 0, 0, 0.87);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background);
    color: var(--on-surface);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 400px;
}

.card, .chat-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: var(--transition);
}

.card__header, .chat-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.card__title {
    font-size: 1.5rem;
    font-weight: 500;
}

.card__subtitle {
    color: rgba(0, 0, 0, 0.6);
    font-size: 0.875rem;
}

.card__body {
    padding: 20px;
}

.card__footer {
    padding: 0 20px 20px;
    text-align: center;
}

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

.input-group {
    position: relative;
    margin-bottom: 16px;
}

.input-icon {
    position: absolute;
    top: 12px;
    left: 12px;
    color: rgba(0, 0, 0, 0.6);
}

.input-field {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid rgba(0, 0, 0, 0.23);
    border-radius: 4px;
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
}

.input-field:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(98, 0, 238, 0.2);
}

.btn {
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
}

.btn--primary {
    background-color: var(--primary-color);
    color: white;
}

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

.btn--error {
    background-color: var(--error-color);
    color: white;
}

.btn--block {
    width: 100%;
}

.btn--icon {
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#toggle-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

#toggle-link:hover {
    text-decoration: underline;
}

/* Chat UI */
.chat-card {
    max-width: 600px;
    height: 80vh;
    display: flex;
    flex-direction: column;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-email {
    margin-right: 10px;
    font-size: 0.875rem;
    color: rgba(0, 0, 0, 0.6);
}

.admin-panel {
    padding: 10px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.message {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 70%;
    word-wrap: break-word;
    position: relative;
}

.message--sent {
    background: var(--primary-color);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.message--received {
    background: #e0e0e0;
    color: var(--on-surface);
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.message-info {
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: 2px;
}

.message-form {
    display: flex;
    padding: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: var(--surface);
}

.message-input {
    flex: 1;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.23);
    border-radius: 20px;
    outline: none;
    margin-right: 10px;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form, .chat-card {
    animation: fadeIn 0.3s ease-out;
}
