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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    letter-spacing: -0.5px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: none;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.25rem 0.25rem 0.25rem 0.9rem;
    font: inherit;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.user-button:hover {
    background-color: rgba(102, 126, 234, 0.08);
    border-color: rgba(102, 126, 234, 0.25);
}

.user-button:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.user-label {
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    text-transform: uppercase;
}

main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.container {
    background-color: white;
    border-radius: 12px;
    padding: 4rem 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.greeting {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.welcome-text {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
    overflow-wrap: break-word;
}

.accent {
    color: #667eea;
    font-weight: 600;
}

.decorative-element {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    margin: 2rem auto;
    border-radius: 2px;
}

footer {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 1.5rem 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: #999;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.dialog-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(40, 30, 70, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 10;
}

.dialog-backdrop[hidden] {
    display: none;
}

.dialog {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    text-align: left;
}

.dialog-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
    letter-spacing: -0.5px;
}

.dialog-help {
    font-size: 0.875rem;
    color: #999;
    margin-top: 0.35rem;
    margin-bottom: 1.25rem;
}

.dialog-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.dialog-input {
    width: 100%;
    font: inherit;
    font-size: 1rem;
    color: #333;
    padding: 0.7rem 0.85rem;
    border: 1px solid #dcdce6;
    border-radius: 8px;
    background-color: #fbfbfe;
}

.dialog-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.18);
}

.dialog-error {
    color: #c0392b;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.dialog-error[hidden] {
    display: none;
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.6rem 1.1rem;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.btn-primary {
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-ghost {
    color: #666;
    background-color: transparent;
    border-color: #dcdce6;
}

.btn-ghost:hover {
    background-color: #f4f4fa;
}

@media (max-width: 720px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    main {
        padding: 1rem;
    }

    .container {
        padding: 2rem 1.5rem;
        border-radius: 8px;
    }

    .greeting {
        font-size: 2rem;
    }

    .welcome-text {
        font-size: 1rem;
    }

    .user-label {
        max-width: 9rem;
    }

    footer {
        padding: 1rem;
        font-size: 0.75rem;
    }

    .dialog {
        padding: 1.5rem;
    }

    .dialog-actions .btn {
        flex: 1 1 auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}
